Disabling/Hiding an Arb Param
I have an arbitrary parameter with a custom UI. Depending on the value of another parameter I want to disable or enable it.
If I disable it (default) I get an "Unsupported parameter type" error whenever I add the effect, or click back into a comp containing it. Disabling the parameter also hides it rather than greying it out.
I've got round it by explicitly hiding it in UpdateParameterUI rather than disabling it, which solves the error problem. However when I unhide it the parameter is collapsed and I can't find a way to automatically expand the twirly.
I've tried explicitly turning off the PF_ParamFlag_COLLAPSE_TWIRLY flag, like so after showing the parameter in UpdateParameterUI:
if(params[PARAM_CHOICE]->u.pd.value != QPB_CHOICES_NONE) {
params[PARAM_MY_UI]->flags &= ~PF_ParamFlag_COLLAPSE_TWIRLY;
}
...but that doesn't work.
Any ideas? I may just have to leave the param showing AND active all the time but I'd rather not do that if at all possible.
Thanks!