Highlighted

How to get layer transform data in plugin?

New Here ,
Nov 21, 2020

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!

Adobe Community Professional
Correct answer by shachar carmi | Adobe Community Professional

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.

TOPICS
Error or problem, SDK

Views

32

Likes

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

How to get layer transform data in plugin?

New Here ,
Nov 21, 2020

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!

Adobe Community Professional
Correct answer by shachar carmi | Adobe Community Professional

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.

TOPICS
Error or problem, SDK

Views

33

Likes

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
Nov 21, 2020 0
Adobe Community Professional ,
Nov 22, 2020

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.

Likes

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
Reply
Loading...
Nov 22, 2020 1
New Here ,
Nov 22, 2020

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.

Screenshot_121.png

 

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.

Screenshot_120.png

 

Thanks again @shachar carmi !

Likes

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
Reply
Loading...
Nov 22, 2020 0