Skip to main content
Known Participant
June 9, 2012
Answered

BAD_CALLBACK_PARAM error invoking PF_UpdateParamUI

  • June 9, 2012
  • 2 replies
  • 2458 views

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

This topic has been closed for replies.
Correct answer Mike_Basil

Unfortunately, I keep getting the same error, regardless of where I put the code, and whether I do it with a copy or original params.


Looks like you are using SDK for AE 11.

One suggestion: try this with PF_PARAMUTILSSUITE1 (instead of 3)!

2 replies

Community Expert
June 12, 2012

i don't know why you're getting this error, but i think you can set param flags using the stream suite.

i use it successfully to hide params.

you can also do that whenever you want and not just during specific calls.

Inspiring
June 9, 2012

Try setting PF_PUI_DISABLED on params, not on a copy!

Also i would suggest disabling/enbling them  in ParamsUpdated instead of ParamsChanged, for example by storing a list of params that need to changed in sequence data.

let us know if this works out,

greets

robertgieAuthor
Known Participant
June 11, 2012

Thanks, I'll check it out. I used a copy, because it was explicitely stated in the SDK example (Supervisor) that you have to do it with a copy.

robertgieAuthor
Known Participant
June 11, 2012

Unfortunately, I keep getting the same error, regardless of where I put the code, and whether I do it with a copy or original params.