PF_PUI_DISABLED does not disable the cursor to Setup

Newbie question, which I hope to have a response from simpel :-)

When I place my cursor I can't disable it by default in ParamsSetup:

PF_ADD_FLOAT_SLIDERX ( ) "Report of appearance customized"

1, // min

5, // max

1, / / slider min

5, / / max slider

1, / / default

PF_Precision_HUNDREDTHS ,

PF_PUI_DISABLED , //This does nothing, it is always visible

CUSTOM_ASPECT_DISK_ID );

The PF_PUI_DISABLED flag does not, disable other settings do what they are supposed to. I can turn it on events in ParamChange:

AEGP_SuiteHandler suites (in_data-> pica_basicP); Assistance //Call suites (this should be done outside of the if-else?)

Download the selected format

FORMAT = format (FORMAT) (params[FIRST_STRETCHFORMAT]-> u.pd.value - 1);

PF_ParamDef aspectParam = * (params[FIRST_CUSTOM_ASPECT]);

if (format == FORMAT:CUSTOM( )

aspectParam.ui_flags & = ~ PF_PUI_DISABLED ;

on the other

aspectParam.ui_flags | = PF_PUI_DISABLED ;

ERR (suites. ParamUtilsSuite3()-> PF_UpdateParamUI (in_data-> effect_ref, FIRST_CUSTOM_ASPECT, & aspectParam));

I have somehow the feeling, that the flag to disable should be set another way at the start rather than in the definition of the cursor.

Help is greatly appreciated :-)

Well, you can try this macro code:

#define PF_ADD_FLOAT_SLIDERXX (NAME, VALID_MIN, VALID_MAX, SLIDER_MIN, SLIDER_MAX, LTVDS, PREC, DISP, FLAGS, UI_FLAGS, ID).

{\

AEFX_CLR_STRUCT (def); \

PF_Err priv_err = PF_Err_NONE; \

def.param_type = PF_Param_FLOAT_SLIDER; \

PF_STRCPY (def.name (NAME)); \

def. Flags = (FLAGS); \

def.ui_flags = (UI_FLAGS); \

def.u.fs_d.valid_min = (VALID_MIN); \

def.u.fs_d.slider_min = (SLIDER_MIN); \

def.u.fs_d.valid_max = (VALID_MAX); \

def.u.fs_d.slider_max = (SLIDER_MAX); \

def.u.fs_d.value = (LTVDS); \

def.u.fs_d.dephault = (PF_FpShort) (def.u.fs_d.value); \

def.u.fs_d.precision = (PREC); \

def.u.fs_d.display_flags = (DISP); \

def.u.fs_d.fs_flags = (WANT_PHASE)? PF_FSliderFlag_WANT_PHASE: 0; \

def.u.fs_d.curve_tolerance = AEFX_AUDIO_DEFAULT_CURVE_TOLERANCE; \

def.uu.ID = (ID); \

If ((priv_err = PF_ADD_PARAM (in_data,-1, & def))! = PF_Err_NONE) return priv_err; \

} while (0)

And then add the parameter as follows:

PF_ADD_FLOAT_SLIDERXX ('custom Aspect Ratio',

1, / / min

5, / / max

1, / / slider min

5, / / max slider

1, / / default

PF_Precision_HUNDREDTHS, / / precision

0, / / display indicators

0, / / general flags

PF_PUI_DISABLED, //UI flags

CUSTOM_ASPECT_DISK_ID / / ID

);

Tags: After Effects

Similar Questions

Maybe you are looking for