Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions ExtendScript – toComp?

  • ExtendScript – toComp?

    Posted by PJ Palomaki on March 28, 2023 at 5:31 pm

    Hi,

    I’m writing a simple ExtendScript script (.jsx) where I want to get the screen-space coordinates of a 3D layer (which is parented to another 3D layer). Usually, when using Expressions, I can use toComp, but it seems that toComp is not available in ExtendScript. Looking at the AE Scripting Guide (https://ae-scripting.docsforadobe.dev/), there doesn’t seem to be any similar functions to get the screen-space coordinates of a layer position (in relation to the comp).

    Does anyone have any ideas how to accomplish this?

    Thanks,
    PJ

    Brie Clayton replied 1 year, 2 months ago 3 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    March 28, 2023 at 5:36 pm

    What I’ve done in the past is to have the script add a temporary Point Control somewhere, add the toComp() expression to the Point Control, harvest the result, and delete Point Control. Somewhat of a pain, but effective.

  • PJ Palomaki

    March 28, 2023 at 5:39 pm

    Hmm not a bad idea, might have a go at that. Thanks!

  • PJ Palomaki

    March 29, 2023 at 8:19 am

    Thanks again, worked perfectly.

  • Brie Clayton

    March 29, 2023 at 1:16 pm

    Thank you, Dan!

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy