Arthur~Chiu Posted February 26, 2014 Share Posted February 26, 2014 i want create a StringAttribMenu , it can list point attribute and i can Choice .so as "attribpromote" or "attribute" sopnode. how to do this in my custom rop node or sop versions Attached Thumbnails Quote Link to comment Share on other sites More sharing options...
edward Posted February 26, 2014 Share Posted February 26, 2014 You need to create a PRM_ChoiceList() that takes a callback function to generate the list of attributes. Look here for an example that does this with groups: http://www.sidefx.com/docs/hdk13.0/hdk_opbasics_overview_parameters.html#HDK_OpBasics_Overview_Parameters_Menus Quote Link to comment Share on other sites More sharing options...
Arthur~Chiu Posted February 27, 2014 Author Share Posted February 27, 2014 Whether the rop nodes can also such operations ? Quote Link to comment Share on other sites More sharing options...
Arthur~Chiu Posted February 27, 2014 Author Share Posted February 27, 2014 static voidsopBuildRestGroup(void *data, PRM_Name *choicenames, int listsize,const PRM_SpareData *spare, PRM_Parm *parm){SOP_Node *sop = CAST_SOPNODE((OP_Node *)data);if( sop ){sop->buildInputGroups( SOP_REST_INPUT, choicenames, listsize,PRIM_GROUP, 0, true, parm );}else{choicenames[0].setToken(0);choicenames[0].setLabel(0);}}static PRM_ChoiceList sopRestGroupMenu(PRM_CHOICELIST_TOGGLE,sopBuildRestGroup); I copied the code in my codeThe result error: error C2664: “PRM_ChoiceList::PRM_ChoiceList(PRM_ChoiceListType,PRM_Name *)”: Parameters 2 can not be “void (__cdecl *)(void *,PRM_Name *,int,const PRM_SpareData *,PRM_Parm *)”convert to“PRM_Name *” Quote Link to comment Share on other sites More sharing options...
edward Posted February 28, 2014 Share Posted February 28, 2014 ROP_Node's have no geometry so the question doesn't make sense. If you have a SOP_Node handy, then you can get the attributes from it. The last parameter to sopBuildRestGroup() is missing const. 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.