-
propertyIndex in Transform properties returns unexpected values. Why?
Hey everyone.
So I’m trying to dynamically link Transform properties (like Position, Anchor Point, etc.) to a Pseudo Effect (mimicing that exact Property stack) in a way that works across all language versions of After Effects.While doing this, I noticed something weird.
thisProperty.propertyIndex doesn’t increment by 1 for each Transform property—it skips around. I’ve included a screenshot showing this, along with a comparison of the Pseudo Effect, which behaves as expected with clean indices.To give you context why I need this, this is a snippet I wanna use on all Transform Properties:
const autoVal = effect("CTRL_AutoAnimation_" + autoAnimationIndex)(thisProperty.propertyIndex+4);This syntax is important for me, since I need to need to make a complex project work in all languages. Previously I used:
const autoVal = effect("CTRL_AutoAnimation_" + autoAnimationIndex)(thisProperty.name);Which obviously returns an error in a non-english After Effects Version, because the Effect names are hardcoded and the Transform names change (For example, “Anchor Point” -> “Ankerpunkt” in German). I’d like to change this line with a batch operation for the whole project which includes a couple dozens of layers that each have this expression issue.
Thanks a bunch in advance!
Simon