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 amHello, 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 youthisProperty.propertyGroup(3)(1).transform.opacityIlya Sire replied 9 years ago 3 Members · 6 Replies -
6 Replies
-
Xavier Gomez
April 27, 2017 at 12:55 pmMaybe 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 pmYou 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 pmYes 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 pmIn :
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 —> OpacityHence, 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 pmoh 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
Reply to this Discussion! Login or Sign Up
