Activity › Forums › Adobe After Effects Expressions › How to use Shape Group #s instead of layer index in an Expression
-
How to use Shape Group #s instead of layer index in an Expression
Sandro Tagliavini replied 3 years, 5 months ago 8 Members · 22 Replies
-
Filip Vandueren
February 17, 2023 at 3:07 pm1.content() doesn’t make sense, perhaps you’re looking for this:
thisProperty.propertyGroup(4)(thisProperty.propertyGroup(3).propertyIndex-1).content(1).position-[250,0];
There’s an extra invisible PropertyGroup Parent up the chain: each ShapeGroup has an extra .contents level, so we need to go up 4 groups to get to the Base “Contents” and there you want to target the previous Rectangle by index, so: “my Rectangle Groups property index -1”
(and my Group is 3 levels up, again counting an invisible “.contents” layer)
-
Sandro Tagliavini
February 19, 2023 at 10:57 amSorry Dan, thanks for asking.
I would like to have a flexible expression that accesses the
position of the shape layer group below it (index+1), so that
when I duplicate the group the shapes get shifted 250px
(and I would like it to work with the index rather than with
name.split(” “), so it is more flexible)
/
and thanks Filip, that is exactly what I was looking for.
now I can quickly create grids by duplicating the groups…
Reply to this Discussion! Login or Sign Up