Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Reference “this shape”

  • Reference “this shape”

    Posted by Paul Roper on September 5, 2012 at 9:58 am

    Hello.

    I have a shape layer with 18 rectangles in it, each in their own group. Is there an easy way to reference “THIS rectangle”? Let me explain…

    On ONE shape layer, if I make a shape, say “Rectangle 1”, add an expression to one of its properties, then duplicate the shape (to create “Rectangle 2”) the script remains linked to “Rectangle 1”. I have to manually change it to reference “Rectangle 2”. Is there an equivalent of the “index” function or thisLayer to access “ThisShape”?

    I hope that kinda makes sense……..!

    Paul Roper replied 13 years, 8 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    September 5, 2012 at 1:02 pm

    You can use propertyGroup() to navigate the hierarchy. I think your expression would look like this:

    myRectangle = thisProperty.propertyGroup(2);
    mySize = myRectangle.content(“Rectangle Path 1”).size;
    mySize/2

    Dan

  • Paul Roper

    September 6, 2012 at 9:59 am

    Thanks Dan! You surely are the AE Expressions genius!

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