Skip to main content
Inspiring
January 28, 2022
Answered

PF_Cmd_UPDATE_PARAMS_UI is not triggered, take 2

  • January 28, 2022
  • 1 reply
  • 235 views

Dear AE fellows,

I have some strange behavior of my UI.

I unhide some parameters (in PF_Cmd_USER_CHANGED_PARAM function) as user enters new letters in my plugin.

And this part is fine. These new parameters do appear in my UI.  (Also, I set them in paramsSetup with SUPERVISE flags.) 

When my debugger leaves   PF_Cmd_USER_CHANGED_PARAM these unhidden parameters even have correct flags (which is 10 +32 +64).

 

The last two numbers are (PF_ParamFlag_START_COLLAPSED  and  PF_ParamFlag_SUPERVISE)

And indeed, they appear in UI in a collapsed mode as I want.

 

However, these flags are not sent then to PF_Cmd_UPDATE_PARAMS_UI (because PF_Cmd_UPDATE_PARAMS_UI  is not triggered after the debugger leaves PF_Cmd_USER_CHANGED_PARAM function)

 

And this is despite the fact that I added:

 

out_data->out_flags |= PF_OutFlag_FORCE_RERENDER | PF_OutFlag_REFRESH_UI;

 

at the end of the PF_Cmd_USER_CHANGED_PARAM function.

(Strange thing, rerender does get triggered)

 

As a result, when I start changing one of my  unhidden parameters PF_Cmd_UPDATE_PARAMS_UI is triggered with wrong flags, and all other newely unhidden parameters suddenly become uncollapsed (!).

 

Moreover, I added PF_OutFlag_SEND_UPDATE_PARAMS_UI in out_data->out_flags 

and PF_OutFlag2_PARAM_GROUP_START_COLLAPSED_FLAG

in out_data -> out_flags2 in my GlobalSetup function .

Finally,

when handling PF_Cmd_USER_CHANGED_PARAM event I even add

ERR(suites.ParamUtilsSuite3()->PF_UpdateParamUI(in_data->effect_ref, ENTER_SUBTOPIC21, &param_copy[ENTER_SUBTOPIC21]));

 

function. (here, the parameter that behaves badly is ENTER_SUBTOPIC21)

As I understand PF_UpdateParamUI shoud trigger PF_Cmd_UPDATE_PARAMS_UI event.

Yet, it doesn't.

 

What do I miss?

 

Yaroslav.

 

 

 

 

 

 

 

This topic has been closed for replies.
Correct answer yaroslavr32391224

Ok, I kind of figured it out. 

The point, as it seems, is that parameters of type TOPIC 

can't trigger PF_Cmd_UPDATE_PARAMS_UI. It is triggered if you set a supervise flag for the parameter inside this topic.

Then yep. After PF_Cmd_USER_CHANGED_PARAM  the PF_Cmd_UPDATE_PARAMS_UI is triggered.

 

1 reply

yaroslavr32391224AuthorCorrect answer
Inspiring
January 28, 2022

Ok, I kind of figured it out. 

The point, as it seems, is that parameters of type TOPIC 

can't trigger PF_Cmd_UPDATE_PARAMS_UI. It is triggered if you set a supervise flag for the parameter inside this topic.

Then yep. After PF_Cmd_USER_CHANGED_PARAM  the PF_Cmd_UPDATE_PARAMS_UI is triggered.