Skip to main content
Richard Rosenman
Inspiring
January 11, 2022
Answered

PF_ADD_FLOAT_SLIDERX doesn't respect various flags! Why?

  • January 11, 2022
  • 1 reply
  • 589 views

Hi gang!

 

I am using PF_ADD_FLOAT_SLIDERX float sliders with the following flags to make them not animatable (make the animation stopwatch icon disappear) and to supervise it so as to affect other parameters when it is adjusted: 

 

def.flags = PF_ParamFlag_SUPERVISE |
PF_ParamFlag_CANNOT_TIME_VARY |
PF_ParamFlag_CANNOT_INTERP;

 

However, the animation stopwatch icon is still there. Likewise, in my UserChangedParam function it doesn't recognize it when I click / adjust that parameter.

 

If I change it from PF_ADD_FLOAT_SLIDERX to PF_ADD_SLIDER, the animation stopwatch icon disappears and when I click on it, it notfies me so the supervision works. Most other parameters also respect these flags so why doesn't PF_ADD_FLOAT_SLIDERX?

 

Is there another type of float slider I should be using that accepts these flags? Or am I missing a step somewhere?

 

Thanks,

-Richard

This topic has been closed for replies.
Correct answer Richard Rosenman

Looks like I figured it out.

 

It seems for PF_ADD_FLOAT_SLIDERX I need to add the flags in the actual parameter statement. Not sure why it differs from the others.

 

I had it like this:

 

AEFX_CLR_STRUCT(def);
def.flags = PF_ParamFlag_SUPERVISE |
PF_ParamFlag_CANNOT_TIME_VARY |
PF_ParamFlag_CANNOT_INTERP;

PF_ADD_FLOAT_SLIDERX("Slider", 0.0, 100.0, 0.0, 100.0, 25.0, PF_Precision_TENTHS, 0, LAYER_ID);

 

 

But it needs to be like this:

 

AEFX_CLR_STRUCT(def);

PF_ADD_FLOAT_SLIDERX("Slider", 0.0, 100.0, 0.0, 100.0, 33.3333, PF_Precision_TENTHS, PF_ValueDisplayFlag_PERCENT, PF_ParamFlag_SUPERVISE | PF_ParamFlag_CANNOT_TIME_VARY |
PF_ParamFlag_CANNOT_INTERP, LAYER_ID);

 

If someone can confirm this, I can mark this as the correct answer for someone else in the future.

 

-Richard

1 reply

Richard Rosenman
Richard RosenmanAuthorCorrect answer
Inspiring
January 11, 2022

Looks like I figured it out.

 

It seems for PF_ADD_FLOAT_SLIDERX I need to add the flags in the actual parameter statement. Not sure why it differs from the others.

 

I had it like this:

 

AEFX_CLR_STRUCT(def);
def.flags = PF_ParamFlag_SUPERVISE |
PF_ParamFlag_CANNOT_TIME_VARY |
PF_ParamFlag_CANNOT_INTERP;

PF_ADD_FLOAT_SLIDERX("Slider", 0.0, 100.0, 0.0, 100.0, 25.0, PF_Precision_TENTHS, 0, LAYER_ID);

 

 

But it needs to be like this:

 

AEFX_CLR_STRUCT(def);

PF_ADD_FLOAT_SLIDERX("Slider", 0.0, 100.0, 0.0, 100.0, 33.3333, PF_Precision_TENTHS, PF_ValueDisplayFlag_PERCENT, PF_ParamFlag_SUPERVISE | PF_ParamFlag_CANNOT_TIME_VARY |
PF_ParamFlag_CANNOT_INTERP, LAYER_ID);

 

If someone can confirm this, I can mark this as the correct answer for someone else in the future.

 

-Richard

Community Expert
January 11, 2022

you are correct.

PF_ADD_FLOAT_SLIDER was buggy and required to insert the flags separatly of the macro declaration.

PF_ADD_FLOAT_SLIDERX came to fix that issue, and overwrites the separately defined falgs with those in the macro.

so the usege of these 2 macros is not interchangable.

(bottom line, you figured it out)