Arthur~Chiu Posted May 4, 2014 Share Posted May 4, 2014 single group menu i can use cookInputPointGroups(context, myGroup, myDetailGroupPair, alone); but when custom sop node need group menu as Multi-Parms such as "object merge" parameter "group" how to do get the select of group Quote Link to comment Share on other sites More sharing options...
edward Posted May 5, 2014 Share Posted May 5, 2014 The key to the method is to supply the "parm_index" parameter, which defaults to 0 because the Group parameter is usually the first parameter of a SOP. If you want to run this for some other parameter, you need to give it an appropriate parm_index value. eg. (untested code!) int n = evalInt("num_groups", 0, context.getTime()); for (int i = 0; i < n; ++i) { PRM_Name multi_group("group#"); multi_group.harden(); multi_group.instance(&i, 1); int parm_index = getParmList()->getParmIndex(multi_group.getToken()); // call cookInputPointGroups with parm_index here } Quote Link to comment Share on other sites More sharing options...
Arthur~Chiu Posted May 14, 2014 Author Share Posted May 14, 2014 GU_DetailGroupPair myPointDetailGroupPair; const GA_PointGroup *mypointGroup; mypointGroup = gdp->findPointGroup(group_name); cout<<"no cook groupname: "<<mypointGroup->getName()<<endl; if(cookInputPointGroups(context, mypointGroup, myPointDetailGroupPair, 0,true,0,attribindex) < UT_ERROR_ABORT); { cout<<"cook groupname: "<<mypointGroup->getName()<<endl; } the callback is: no cook groupname: group1 cook groupname: __groupparse1__ why? can someone help me? Quote Link to comment Share on other sites More sharing options...
edward Posted May 16, 2014 Share Posted May 16, 2014 cookInputPointGroups() returns "mypointGroup" as the group parsed by evaluating the parameter "attribindex". This creates an internal group since the string can by just like "0-9" meaning the first ten points. Quote Link to comment Share on other sites More sharing options...
Arthur~Chiu Posted May 16, 2014 Author Share Posted May 16, 2014 GA_FOR_ALL_POINT_ATTRIBUTES(gdp,A) the a is? and how to use this function? 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.