Quantcast
Channel: Adobe Community : Popular Discussions - After Effects SDK
Viewing all articles
Browse latest Browse all 73444

Disabling and or hiding parameter controls depending on the value of a popup

$
0
0

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.


Viewing all articles
Browse latest Browse all 73444

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>