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

Change params valid_max/valid_min

Explorer ,
Jun 01, 2016 Jun 01, 2016

Copy link to clipboard

Copied

I would like to change a slider to match the size of the input data. These are not defined at setup time, so I try to change them in UpdateUI (I have also tried ParamChange).

The problem is that I cannot change the valid_min/valid_max values and they remain stuck at whatever value setup in ParamsSetup.

I use the following code to change my slider:

PF_ParamDef centerParams = *(params[PARAM_S_PROTECTED_CENTER]);

centerParams.u.fs_d.valid_max = (PF_FpShort)in_data->width;

centerParams.uu.change_flags = PF_ChangeFlag_CHANGED_VALUE;

ERR(suites.ParamUtilsSuite3()->PF_UpdateParamUI(in_data->effect_ref, PARAM_S_PROTECTED_CENTER ,  &centerParams));

This does nothing for valid_max, am I missing something, or is just not possible?

Help is greatly appreciated 🙂

TOPICS
SDK

Views

478

Translate

Translate

Report

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

correct answers 1 Correct answer

Adobe Employee , Jun 02, 2016 Jun 02, 2016

Hi Rasmus,

Are you developing your effect plug-in for use in After Effects?  Or Premiere Pro?

According to the header comments for PF_UpdateParamUI() in AE_EffectSuites.h, valid_min/max are not among the parameters that can be changed.

AE holds strictly to this specification.  PPro is more flexible in this regard (I can explain, if you are developing for PPro).

You could define the min/max to be the widest possible range, and then use PF_UpdateParamUI() to set the UI range dynamically, according to

...

Votes

Translate

Translate
Adobe Employee ,
Jun 02, 2016 Jun 02, 2016

Copy link to clipboard

Copied

Hi Rasmus,

Are you developing your effect plug-in for use in After Effects?  Or Premiere Pro?

According to the header comments for PF_UpdateParamUI() in AE_EffectSuites.h, valid_min/max are not among the parameters that can be changed.

AE holds strictly to this specification.  PPro is more flexible in this regard (I can explain, if you are developing for PPro).

You could define the min/max to be the widest possible range, and then use PF_UpdateParamUI() to set the UI range dynamically, according to the input data.

Zac

Votes

Translate

Translate

Report

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
Explorer ,
Jun 03, 2016 Jun 03, 2016

Copy link to clipboard

Copied

Thanks, it is for both AE and Pr.

I can probably do as you suggest, set the slider values dynamically and then make a check on the actual value to make sure it does not exceed the slider values.

Votes

Translate

Translate

Report

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
Explorer ,
Jun 05, 2016 Jun 05, 2016

Copy link to clipboard

Copied

LATEST

Thanks for the help, I thought I could create a workaround as you suggested.

To keep the value in check (within slider min max) I would need to be able to update the slider value, which is not possible.

I ended up using a percentage, which I can then use in accordance with the input width.

Votes

Translate

Translate

Report

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