Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Shape layer hierarchy confused

  • Shape layer hierarchy confused

    Posted by Ilya Sire on April 27, 2017 at 8:37 am

    Hello, I have a question about shape layer hierarchy expression as here

    how to get opacity from Group 2> Rectangle 1> Opactity?

    Please help me
    Thank you

    thisProperty.propertyGroup(3)(1).transform.opacity

    Ilya Sire replied 9 years ago 3 Members · 6 Replies
  • 6 Replies
  • Xavier Gomez

    April 27, 2017 at 12:55 pm

    Maybe this:

    thisProperty.propertyGroup(6).content(“Group 2”).content(“Rectangle 1”).transform.opacity;

    or :

    thisLayer.content(“Group 2”).content(“Rectangle 1”).transform.opacity;

    Xavier

    thisProperty.propertyGroup(5)(“Group 2”).content(“Rectangle 1”).transform.opacity; would also work, but less clear imo.

  • Kyle Daily

    April 27, 2017 at 2:02 pm

    You can always pick whip the property to get its syntax.

    thisComp.layer("Shape study").content("Group 2").content("Rectangle 1").transform.opacity

  • Ilya Sire

    April 27, 2017 at 2:57 pm

    Yes it worked, but could you please explain me why propertyGroup(6)? How did you count it?

    thisProperty.propertyGroup(6).content(“Group 2”).content(“Rectangle 1”).transform.opacity;

    I dont really understand about shape indexing.

  • Xavier Gomez

    April 27, 2017 at 4:05 pm

    In :

    thisLayer.content(“Group 2”).content(“Rectangle 1”).transform.opacity;

    you “get down 6 times” to go from the Layer to the Opacity.
    (Layer –> Contents —> “Group 2” —> Contents —-> Rectangle 1 —-> Transform —> Opacity

    Hence, the other way round, you need to climb up 6 times to go from the Opacity to the Layer.

    One thing to know is that every Shape Group inside a shape layer has a “Contents” and a “Transform”
    (similarly to the layer itself having a Contents and a Transform)
    The “Contents” step is hidden in the UI though, but it is still there somehow and must be accounted for.

    Xavier

  • Ilya Sire

    April 27, 2017 at 4:39 pm

    oh i see it. Thank you for your explanation.

    so i learned this way;

    1) counting from thisLayer down to property, be like:
    thisLayer.content(“Group 2”).content(“Rectangle 1”).transform.opacity;
    thisLayer.content(2).content(1).transform.opacity;

    2) counting from thisProperty climb up to other group, will be like:
    thisProperty.propertyGroup(6).content(2).content(1).transform.opacity;

    i guess level 6 = thisLayer is maximum

  • Ilya Sire

    April 28, 2017 at 4:12 am

    Thank you for this lesson. 🙂

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