Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Trouble with collapsing / uncollapsing parameters

Engaged ,
Sep 02, 2020 Sep 02, 2020

Hi gang;

 

I am having trouble with trying to keep my parameters uncollapsed (closed). I will do my best to explain the problem

 

I have a dropdown that allows you to select an option:

 

 

 

AEFX_CLR_STRUCT(def);
def.flags = PF_ParamFlag_SUPERVISE;
PF_ADD_POPUP( "Option", 
4,
1,
"Option 1|Option 2|Option 3|Option 4",
OPTION_DISK_ID);

 

 

Then in the UpdateParameterUI function, I check to see which option has been selected. If Option 1 has been selected, I disable a parameter. Otherwise, I enable it. The angle parameter is also supervised in the ParamsSetup function.

 

 

if (params[OPTION_DISK]->u.pd.value == 1) 
{
params[ANGLE_DISK]->ui_flags |= PF_PUI_DISABLED; 
params[ANGLE_DISK]->flags |= PF_ParamFlag_COLLAPSE_TWIRLY;

}
else
{
params[ANGLE_DISK]->ui_flags &= ~PF_PUI_DISABLED; 
params[ANGLE_DISK]->flags |= PF_ParamFlag_COLLAPSE_TWIRLY;

}

 

 

I also have the collapse_twirly flag to keep it closed no matter which option is selected because I don't want it to automatically pop open.

 

Finally, I update the parameter:

 

 

AEGP_SuiteHandler		suites(in_data->pica_basicP);

ERR(suites.ParamUtilsSuite3()->PF_UpdateParamUI(in_data->effect_ref, 
															ANGLE_DISK,
															params[ANGLE_DISK]));

 

 

Now, my problem using this code is that if I collapse (open) the ANGLE parameter and try ot adjust the slider, it immediately closes. I think this is because I've added the PF_ParamFlag_COLLAPSE_TWIRLY. However, if I don't, the parameter will automatically collapse (open) when I select an option from the dropdox.

 

I realize it's difficult to explain this. But what I want to do, is make a selection from the option dropdown parameter, which will enable the angle parameter, but NOT have the angle parameter collapse (open) unless the user opens it.. 

 

What am I doing wrong?

 

-Rich

TOPICS
SDK
203
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 10, 2020 Sep 10, 2020
LATEST

you can hide and unhide the param using AEGP_SetDynamicStreamFlag(). when hidden and the unhidden, the param should revert to it's default twirl state. perahps that would give you a more stable starting point for the twirling process.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines