Copy link to clipboard
Copied
Hi
I have a shape layer (named shape ) with 3 groups in it, named 1,2,3 respectively.
Each group has 3 shapes ( not a puzzle I swear :p) named 1st, 2nd and 3rd, nested in a group ( named Group 1).
I am trying to access the name of the shape layers (1, 2, 3) in their properties.
Am I right in assuming the way propertyGroup behaves? (See picture uploaded)
var groupIndex = thisProperty.propertyGroup(4).propertyIndex;
var groupName = thisLayer("Contents")(groupIndex).name;
Is it going 4 levels up to get the hierarchy ?
In the image I am trying to access the name of the shape layer in the anchor point property.
Not sure what is the theory here.
But is the hierarchy working in this way? :
*shape
-3
-3rd
-Group1
-Transform : Group 1
-Anchor Point
Copy link to clipboard
Copied
The proper image
Copy link to clipboard
Copied
Kind of that - you can check easily by putting the expression to a text layer > source text property and see what it gives you.
With .name or .value appended to the property in your expression, you get the real strings like they are in the dropdown. So you can find your path with trial and error.
I'm sure there is a free script for that, too.
*Martin
Find more inspiration, events, and resources on the new Adobe Community
Explore Now