sibarrick Posted August 23, 2005 Share Posted August 23, 2005 Hi Has anyone got any example code for setting up a choice menu that doesn't use one of the default choices So I have PRM_Template(PRM_ORD, 1, &PRMorientName, 0, &PRMplaneMenu), But how do you define PRMorientName and PRMplaneMenu I tried a couple of thing but I don't think ny C++ is quite up to this yet. ta Quote Link to comment Share on other sites More sharing options...
George Posted August 23, 2005 Share Posted August 23, 2005 Hi Simon, There is an example in the sample SOP_BrushHairLen in the HDK. You basically just have to define an array of PRM_Name objects, one for each choice, and then instantiate a PRM_ChoiceList object, like this: static PRM_Name sopOpMenuNames[] = { PRM_Name("paint", "Paint"), PRM_Name("eyedrop", "Eye Dropper"), PRM_Name("smoothattrib", "Smooth"), PRM_Name("callback", "Callback"), PRM_Name("erase", "Erase Changes"), PRM_Name(0) }; static PRM_ChoiceList sopOpMenu((PRM_ChoiceListType)(PRM_CHOICELIST_EXCLUSIVE | PRM_CHOICELIST_REPLACE), sopOpMenuNames); (This is code from SOP_BrushHairLen.C) Take care, George. Quote Link to comment Share on other sites More sharing options...
sibarrick Posted August 23, 2005 Author Share Posted August 23, 2005 Cheers George I missed that one. I knew it was fairly easy I was just missing some of the syntax. ta Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.