Skip to main content
smarts19193560
Inspiring
December 8, 2020
Answered

Issue with PF_ADD_POPUP param in managing version of plugins

  • December 8, 2020
  • 2 replies
  • 1240 views

Hi, everyone!

I have an issue with PF_ADD_POPUP param in managing version of plugins.

In my params, the first param is PF_ADD_POPUP on version 1.

I am going to add few more paramers on version 2.

If the order should be changed on UI. the value is not keeping.

I used same IDs of old params always.

 

version 1.

enum
{

MOVEMENT_DIRECTION,
AMOUNT_SLIDER,
MATRANSIT_NUM_PARAMS
};

enum
{
MOVEMENT_DIRECTION_ID, // PF_ADD_POPUP 
AMOUNT_SLIDER_ID,
};

 

version 2:

enum
{

NEW_FIELD_SLIDER,

MOVEMENT_DIRECTION,
AMOUNT_SLIDER,
MATRANSIT_NUM_PARAMS
};

enum
{
MOVEMENT_DIRECTION_ID,
AMOUNT_SLIDER_ID,

NEW_FIELD_SLIDER_ID
};

 

 

This problem is appearing only if first param is PF_ADD_POPUP on old version.

Please let me know if it is my issues or premiere pro problem.

 

Thanks.

 

This topic has been closed for replies.
Correct answer shachar carmi

Above code is for new version.
There is no the LOGIN parameters on old version.


i see...

i checked in my plug-ins, and i see i start the _ID enums with the value 1 instead of 0.

peraps using the value 0 on the first param triggers the auto-assign thingie you mentioned, regadless of having non-0 values on the subsequent params...

you'll need to test to check.

 

if that is the case, then you might have an issue with re-ordeirng params for existing projects saved with the old version... (better fix it on an early version rather than on a late one, or consider shipping both versions with the old one flagged OBSOLETE, so old projects use the old version and new applications of the effect will use the new version)

2 replies

Community Expert
December 11, 2020

let's make sure about getting the basics right...
when declaring each param, do you use the _ID enum?
PF_SLIDER(..., AMOUNT_SLIDER_ID)
or do you use the non _ID enum?

smarts19193560
Inspiring
December 11, 2020

Thanks for your replay.

 

PF_SLIDER(..., AMOUNT_SLIDER_ID)

 

I am using the _ID enum.

 

Thanks.

Community Expert
December 11, 2020

then perhaps the problem is in the reading of the data and not it's storage...

in the NON _ID enum, the first param's enum value should be 1.

value 0 is reserved to the default invisible layer param that serves as the effect's input. perhaps that's the problem?

Bruce Bullis
Legend
December 8, 2020
smarts19193560
Inspiring
December 9, 2020

Thanks for your replay

 

I can see following as:

 if it was zero, it was assumed that the programmer hadn’t bothered to ID params; After Effects then assigned each its own ID. This assumption works fine if you never set param IDs, but not so well if you start numbering your IDs from NULL. That’s why.

 

enum
{
MOVEMENT_DIRECTION_ID,
AMOUNT_SLIDER_ID,

NEW_FIELD_SLIDER_ID
};

 

The first parameter id is set by 0 as you can see on enum.

In the case, how can we keep original values on new version?

 

Thanks.