7 Replies Latest reply: Jun 12, 2012 4:11 PM by walczakb RSS

    BAD_CALLBACK_PARAM error invoking PF_UpdateParamUI

    walczakb Community Member

      Hi everyone,

       

      I'm trying to disable a popup, after a checkbox is clicked, and on invoking PF_UpdateParamUI() I keep getting error 516 (BAD_CALLBACK_PARAM).

       

      It seems like the reference to in_data->effect_ref is broken, but how can that be?

       

      I can assign the disabled flag during ParamsSetup(), but still can't change it in any other way. I tried using simple PF_ParamDef with only ui_flags parameter, but it also didn't work. I'm stumped.

       

      I compiled the Supervisor plugin as well, but when I try to apply it to a layer, the parameters do not show in the effect palette, so I can't even check if the SDK example is correct.

       

      Here's the code:

      ERR(MakeParamCopy(params, param_copy));
      
      if (!err) {
                if (params[VIG_SHOW_MASK]->u.bd.value == TRUE) {
                param_copy[VIG_BLENDING_MODE].ui_flags     |= PF_PUI_DISABLED;               
                strcpy(param_copy[VIG_BLENDING_MODE].name, STR(StrID_Mode_Param_Name_Disabled));
           } else {
                param_copy[VIG_BLENDING_MODE].ui_flags     &= ~PF_PUI_DISABLED;               
                strcpy(param_copy[VIG_BLENDING_MODE].name, STR(StrID_Mode_Param_Name));
           }
                
           try { 
                ERR(suites.ParamUtilsSuite3()->PF_UpdateParamUI(
                                         in_data->effect_ref,
                                         VIG_BLENDING_MODE,
                                         &param_copy[VIG_BLENDING_MODE]));
           } catch (PF_Err &thrown_err ) {
                char buf[30];
                PF_SPRINTF(buf,"%d",thrown_err);
                
                suites.AdvAppSuite2()->PF_InfoDrawText3(buf,"show mask","error");
           }
      }
      

       

      Thanks

      Bart