13 Replies Latest reply on Sep 14, 2012 8:10 AM by shachar carmi

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

    afxjordan Level 1

      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;






           "Option 1|Option 2|...",




      And I'm capturing the PF_Cmd_USER_CHANGED_PARAM command like so



           ERR(UserChangedParam(in_data, out_data, params, output, reinterpret_cast<PF_UserChangedParamExtra *>(extra));





      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




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