Jump to content

how to use PRM_ChoiceList() callback function


Recommended Posts

static void
sopBuildRestGroup(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 code
The 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 *”

Link to comment
Share on other sites

Guest mantragora

Have you tried to look into HDK documentation part about parameters? I think the info there is more than enough to make it work, as long as you understand C++ and that you didn't jumped there by assuming that just copy pasting code will make it work.

Link to comment
Share on other sites

  • 8 months later...

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...