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

coordinates of layer corners

New Here ,
Jan 13, 2011 Jan 13, 2011

Hey,

I am trying to retrieve the final coordinates of the four footage layer's corners (top-left, top-right, bottom-right, bottom-left) as they appear on the rendered output for every single frame. I am able to read the layer's position, rotation, scale etc. with

layer.property("position").valueAtTime(...)

But when combining these with a specific anchor point and/or additional effects or when having parent layers things become more tricky. Instead of reading these values individually and re-apply the computation AE already does, I'd like to have a transformation function that could project coordinates from the source footage space into the final composition panel's space. In AE Expressions I can see a toWorld() and toComp(). Is this what I am looking for? How can I invoke those from Scripting then?

Any help appreciated.

Regards,

Heiko

TOPICS
Scripting
769
Translate
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
Community Expert ,
Jan 13, 2011 Jan 13, 2011
LATEST

Unfortunately, all that expressions layer space transform goodness doesn't exist in the scripting world. The easiest way to do it might be to have the scipt apply a slider to which it then applies the appropriate expression, for each dimension and each corner and harvest the result each time. So you'd apply the slider, apply the 12 expressions (reading the value each time) and delete the slider. If everything is 2D, you could use a point control and only have to apply 4 expressions (one for each corner).

Dan

Translate
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