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

How to get layer transform data in plugin?

New Here ,
Nov 21, 2020 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!

TOPICS
Error or problem , SDK

Views

427

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 , Nov 22, 2020 Nov 22, 2020

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.

Votes

Translate

Translate
Community Expert ,
Nov 22, 2020 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.

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
New Here ,
Nov 22, 2020 Nov 22, 2020

Copy link to clipboard

Copied

LATEST

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 !

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