Skip to main content
Inspiring
November 30, 2023
Answered

access to property below

  • November 30, 2023
  • 1 reply
  • 336 views

I want to access the rotation property of a rectangle below, the easiest way is to use the pick whip, but it will always access the same “Rectangle 1”. I want to duplicate the group several times and always take the rotation of a rectangle below, not the "rectangle 1"


I normally access the properties of a layer below using "thisComp.layer(thisLayer, 1).transform.rotation" but I'm not sure if it works the same

 

This topic has been closed for replies.
Correct answer Dan Ebberts

Try this:

idx = thisProperty.propertyGroup(2).propertyIndex;
thisProperty.propertyGroup(3)(idx+1)("Transform")("Rotation")

1 reply

Dan Ebberts
Community Expert
Dan EbbertsCommunity ExpertCorrect answer
Community Expert
November 30, 2023

Try this:

idx = thisProperty.propertyGroup(2).propertyIndex;
thisProperty.propertyGroup(3)(idx+1)("Transform")("Rotation")
Inspiring
November 30, 2023

worked perfectly, thanks!