Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions expression question (how do you say “the above layer”? )

  • expression question (how do you say “the above layer”? )

    Posted by Jakob Thommessen on February 4, 2006 at 3:40 pm

    I would like to reference the layer above, I would like to say: “take the scale of the layer above and add 4”. (whithout referencing the specific layer)
    anyone who has any idea?

    Jakob

    Lars Bunch replied 20 years, 3 months ago 2 Members · 2 Replies
  • 2 Replies
  • Lars Bunch

    February 4, 2006 at 4:42 pm

    Hi,

    This would do it…

    thisComp.layer(index-1).scale+4

    index = the current layer. So index-1 is the layer above it. And index+1 would be the layer below.

    Lars

  • Lars Bunch

    February 4, 2006 at 4:51 pm

    I tested this out and noticed it only worked on the X value so here is an expression that would work on both x and y scale values…

    Xscale=thisComp.layer(index-1).scale[0]+4;
    Yscale=thisComp.layer(index-1).scale[1]+4;
    [Xscale,Yscale]

    Hope this helps,

    Lars

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