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

Issue with PF_ADD_POPUP param in managing version of plugins

Explorer ,
Dec 08, 2020 Dec 08, 2020

Copy link to clipboard

Copied

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.

 

TOPICS
SDK

Views

622

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

Community Expert , Dec 11, 2020 Dec 11, 2020

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 ver

...

Votes

Translate

Translate
Adobe Employee ,
Dec 08, 2020 Dec 08, 2020

Copy link to clipboard

Copied

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 ,
Dec 09, 2020 Dec 09, 2020

Copy link to clipboard

Copied

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.

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
Community Expert ,
Dec 11, 2020 Dec 11, 2020

Copy link to clipboard

Copied

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?

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 ,
Dec 11, 2020 Dec 11, 2020

Copy link to clipboard

Copied

Thanks for your replay.

 

PF_SLIDER(..., AMOUNT_SLIDER_ID)

 

I am using the _ID enum.

 

Thanks.

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
Community Expert ,
Dec 11, 2020 Dec 11, 2020

Copy link to clipboard

Copied

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?

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 ,
Dec 11, 2020 Dec 11, 2020

Copy link to clipboard

Copied

in .cpp

static PF_Err ParamsSetup(
	PF_InData* in_data,
	PF_OutData* out_data,
	PF_ParamDef* params[],
	PF_LayerDef* output)
{
	PF_ParamDef	def;

	AEFX_CLR_STRUCT(def);
	PF_ADD_BUTTON(
		STR(StrID_Login_Param_Name),
		STR(StrID_Login_Button_Name),
		0,
		PF_ParamFlag_SUPERVISE,
		LOGIN_ID
	);

	AEFX_CLR_STRUCT(def);
	PF_ADD_POPUP(STR(StrID_MovementDirection_Param_Name),
		4,
		1,
		STR(StrID_MovementDirection_Param),
		MOVEMENT_DIRECTION_ID);

	AEFX_CLR_STRUCT(def);
	PF_ADD_SLIDER(
		STR(StrID_Amount_Param_Name),
		0,
		100,
		0,
		100,
		30,
		AMOUNT_SLIDER_ID);

....

 

in .H file

enum
{
	SHIFTERBOUNCE_INPUT = 0,
	
	LOGIN,
	MOVEMENT_DIRECTION,
	AMOUNT_SLIDER,
....
};

enum
{
	MOVEMENT_DIRECTION_ID, 
	AMOUNT_SLIDER_ID,
	LOGIN_ID,
....


Thanks.

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 ,
Dec 11, 2020 Dec 11, 2020

Copy link to clipboard

Copied

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

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
Community Expert ,
Dec 11, 2020 Dec 11, 2020

Copy link to clipboard

Copied

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)

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 ,
Dec 12, 2020 Dec 12, 2020

Copy link to clipboard

Copied

LATEST

Thanks @shachar carmi 

It was much help for me.

 

Regards, 

Anthonie.

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