PF_PUI_DISABLED does not disable slider on setup
Newbie question, which I hope have a simpel answer 🙂
When I setup my slider I cannot disable it by default in ParamsSetup:
PF_ADD_FLOAT_SLIDERX( "Custom Aspect Ratio",
1, // min
5, // max
1, // slider min
5, // slider max
1, // default
PF_Precision_HUNDREDTHS,
PF_PUI_DISABLED, //this does nothing, it is still visible
CUSTOM_ASPECT_DISK_ID);
The PF_PUI_DISABLED flag does not disable it, while the other parameters do what they are expected to. I can enable/disable it on events in ParamChange:
AEGP_SuiteHandler suites(in_data->pica_basicP); //Call helper suites (should this be done outside the if-else?)
//Get 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;
else
aspectParam.ui_flags |= PF_PUI_DISABLED;
ERR(suites.ParamUtilsSuite3()->PF_UpdateParamUI(in_data->effect_ref, FIRST_CUSTOM_ASPECT, &aspectParam));
I somehow get the feeling, that the disable flag should be set some other way initially rather than in the slider definition.
Help is greatly appreciated 🙂