Jump to content
Sign in to follow this  
Arthur~Chiu

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 *”

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×