Skip to main content
Inspiring
May 18, 2022
Answered

Getting composition width in PF_Cmd_USER_CHANGED_PARAM function

  • May 18, 2022
  • 1 reply
  • 351 views

Dear AE fellows,

In c++ plugin I'm unable to read out my composition width and height from PF_Cmd_USER_CHANGED_PARAM function.

 

When I try to read it inside PF_Cmd_USER_CHANGED_PARAM function:

 

HandleEvent(in_data, out_data, params, output, reinterpret_cast<const PF_UserChangedParamExtra*>(extra));

my output pointer is NULL.

How do I get the composition size and width then?

 

P.S.

In my SmartRender function the output width and height implemented via

 

ERR(extraP->cb->checkout_output(in_data->effect_ref, &output));

 where extraP is sent right into SmartRender as: reinterpret_cast<PF_PreRenderExtra*>(extra)

 

Somehow this approach didn't work for PF_Cmd_USER_CHANGED_PARAM function.

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

the in_data->width and height denote your effect's layer *source item* full res size. (i.e, unmasked, unchanged by effects)

if you need the comp size (which may or may not be the same as the layer size) you need to get the effect's layer source item, and get the project item's dimensions.

1 reply

shachar carmiCommunity ExpertCorrect answer
Community Expert
May 18, 2022

the in_data->width and height denote your effect's layer *source item* full res size. (i.e, unmasked, unchanged by effects)

if you need the comp size (which may or may not be the same as the layer size) you need to get the effect's layer source item, and get the project item's dimensions.

Inspiring
May 18, 2022

Thanks, Shachar!

It works! (You are swift as lightning, as usual)