Copy link to clipboard
Copied
Greetings all,
I have a normal pixel processing effect that creates grain on my image/video. Now want to read the layer's position, anchor, and scale so I can use in some calculation. How can I read this information?
Kindly, all your help is appreciated!
if you want to get the layer's numeric transform values, use AEGP_GetNewLayerStream to get the param's stream and AEGP_GetNewStreamValue to retreive it's numeric value.
however, that might not be too helpful if you need all of the layer's transformations in the comp, including parenting or event camera movement which affects layer position on screen.
if that's what you need, then AEGP_GetLayerToWorldXform mixed with the camera matrix would be the way to go.
Copy link to clipboard
Copied
if you want to get the layer's numeric transform values, use AEGP_GetNewLayerStream to get the param's stream and AEGP_GetNewStreamValue to retreive it's numeric value.
however, that might not be too helpful if you need all of the layer's transformations in the comp, including parenting or event camera movement which affects layer position on screen.
if that's what you need, then AEGP_GetLayerToWorldXform mixed with the camera matrix would be the way to go.
Copy link to clipboard
Copied
Thank you for the assistance!
I did some extra thing to finally get this to work (for anyone who reads this later and needs assistance)
First I got AEGP_PluginID during GlobalSetup(). I think this is required for many AEGP methods.
Then using your help I got several other values to final get a Transform value. In this case I get the position and put it in the streamValue variable.
Thanks again @shachar carmi !