Skip to main content
Inspiring
May 19, 2021
Answered

Formula for AE_Effect_Global_OutFlags and AE_Effect_Global_OutFlags2

  • May 19, 2021
  • 1 reply
  • 2209 views

I'd like to keep all the magic numbers in PiPL.r file defined in a header. I have defined all except AE_Effect_Global_OutFlags and AE_Effect_Global_OutFlags2.

@10129214stated in https://community.adobe.com/t5/after-effects/what-is-function-of-pipl-r-file-in-plugin-development/m-p/9329471

 

put a break point in the global setup function and you'll be able to see the numerical value being applied to the outfalgs and outflags2 vars.

 

Sorry, this not a good workflow. Somewhere inside the AE headers will be the formula to calculate AE_Effect_Global_OutFlags and AE_Effect_Global_OutFlags2. Could AE support staff kindly look that up so that all the magic numbers inside PiPL.r files can be pre-calculated ?

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

It doesnt work.

 

#define OUTFLAGS PF_OutFlag_PIX_INDEPENDENT | PF_OutFlag_SEND_UPDATE_PARAMS_UI | PF_OutFlag_USE_OUTPUT_EXTENT | PF_OutFlag_DEEP_COLOR_AWARE

#define OUTFLAGS2 PF_OutFlag2_PARAM_GROUP_START_COLLAPSED_FLAG | PF_OutFlag2_FLOAT_COLOR_AWARE | PF_OutFlag2_SUPPORTS_SMART_RENDER | PF_OutFlag2_DOESNT_NEED_EMPTY_PIXELS


		/* [10]  */
		AE_Effect_Global_OutFlags {
			OUTFLAGS
		},
		/* [11]  */
		AE_Effect_Global_OutFlags_2 {
			OUTFLAGS2
		},

 

I get compile error - 1>BlursPiPL.r
1>ParseAEGlobalFlags: CloseBrace Expected, line 7424

 

It works when I use the hex value directly. 0x6000440 and 0x001448


you could do:

enum {

OUTFLAGS = PF_OutFlag_PIX_INDEPENDENT | PF_OutFlag_SEND_UPDATE_PARAMS_UI | PF_OutFlag_USE_OUTPUT_EXTENT | PF_OutFlag_DEEP_COLOR_AWARE,

OUTFLAGS2 = PF_OutFlag2_PARAM_GROUP_START_COLLAPSED_FLAG | PF_OutFlag2_FLOAT_COLOR_AWARE | PF_OutFlag2_SUPPORTS_SMART_RENDER | PF_OutFlag2_DOESNT_NEED_EMPTY_PIXELS,

};

1 reply

Community Expert
May 19, 2021

i put the global outflags calculation in an enum, and include that header in the resource file (and it's custom build definitions).

that works well on VS, but on XCODE it doesn't. on XCODE i put the value in a #define.

so... half solved.

AnmolMAuthor
Inspiring
May 19, 2021

 

I would assume that is about 100 enum values. I think there are about 10 different flags and there are a 100 different combos involved.

Would you consider posting the enum or define, and perhaps Adobe will consider documenting this in the SDK docs ?

AnmolMAuthor
Inspiring
May 19, 2021

ah yes.

but the same answer applies. just OR together the flags in an enum in the same manner.


Is the hex value just the OR'ed version of all the flags ?

#define OUTFLAGS PF_OutFlag_PIX_INDEPENDENT | PF_OutFlag_SEND_UPDATE_PARAMS_UI | PF_OutFlag_USE_OUTPUT_EXTENT | PF_OutFlag_DEEP_COLOR_AWARE
#define OUTFLAGS2 PF_OutFlag2_PARAM_GROUP_START_COLLAPSED_FLAG | PF_OutFlag2_FLOAT_COLOR_AWARE | PF_OutFlag2_SUPPORTS_SMART_RENDER | PF_OutFlag2_DOESNT_NEED_EMPTY_PIXELS

So this is all thats needed ? I thought there was a magic number that is OR'ed as well.