How should I go about doing this? I've set the flags for the popup param to PF_ParamFlag_SUPERVISE like so
def.flags = PF_ParamFlag_SUPERVISE;
PF_ADD_POPUP(
"Mode",
6,
1,
"Option 1|Option 2|...",
POPUP_MODE_ID
);
And I'm capturing the PF_Cmd_USER_CHANGED_PARAM command like so
case PF_Cmd_USER_CHANGED_PARAM:
ERR(UserChangedParam(in_data, out_data, params, output, reinterpret_cast<PF_UserChangedParamExtra *>(extra));
break;
...
static PF_Err UserChangedParam(
PF_InData* in_data,
PF_OutData* out_data,
PF_ParamDef* params[],
PF_LayerDef* outputP,
PF_UserChangedParamExtra* extra)
{
PF_Err err = PF_Err_NONE;
if (extra->param_index == POPUP_MODE_ID)
{
if (params[POPUP_MODE_ID]->u.cd.value == 2)
{
//Code to enable and show the controls
}
else
{
//Cose to disable or hide the controls
}
}
return err;
}
Am I doing everything right so far? What code do I need to put in the "if (params[POPUP_MODE_ID]->u.cd.value == 2)" block to disable a parameter? How different would the code be to hide the parameter completely? Can I hid entire topics like I can hide parameters? I'd have a use for all three things, I just can't figure out how to do them.