Jump to content

Dynamic Choicelist or similar


Recommended Posts

Hi!

I was wondering if there's a way to create a dynamic choiceList or something similar. I need to create a node navigator, where the list contains the current node's children, and if I select one and do some button pressing it just goes inside and repopulates the list again.

I couldn't find a way of changing the static nature of ChoiceLists, and it occured to me that a good choice would be something like a string field where the entries are selected by me. Does this make sense?

Thanks!

Link to comment
Share on other sites

There is a constructor for PRM_ChoiceList which takes a function pointer (PRM_ChoiceList.h). That version allows you to fill in items, up to 'thelistsize' in number. Don't forget to terminate the list with a NULL token on the last PRM_Name.

typedef void (* PRM_ChoiceGenFunc)(void *thedata,
				   PRM_Name *thechoicenames,
				   int thelistsize,
				   const PRM_SpareData *thespareptr,
				   PRM_Parm *theparm);

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...