Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Dynamic layer targeting

  • Dynamic layer targeting

    Posted by Ross Mcdowell on October 9, 2008 at 12:47 pm

    Hello all!

    Quick question for you guys, I am messing about with an expression…and I want to do something along the lines of the following:

    thisComp.layer(“layer[index+1]”).transform.position;

    Meaning that I want to be able to target the layer that is below the layer with the expression…how do I do this and is this even possible?

    It will make things easier for me as I can just duplicate pairs of layers and have it position itself for me…

    Thanks

    Ross

    Ross McDowell
    Animation Student

    Steve Bentley replied 8 years ago 3 Members · 2 Replies
  • 2 Replies
  • Eric Sanderson

    October 9, 2008 at 2:21 pm

    and are you saying that code isnt working?..if so try this…

    thisComp.layer(index+1).transform.position.

    in your ” layer(” “) ” you were telling AE to look for a layer named “layer[index+1]”, instead of telling it to look at the actual index.

  • Steve Bentley

    April 19, 2018 at 4:45 am

    I just stumbled on this and thought I would update and correct it. The syntax for the above is incorrect in both posts. It should be
    thisComp.layer(index+1).position;

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