-
Referencing Layer Name based on integer
I had trouble coming up with a descriptive title for this post, but here’s my problem:
Let’s say I have a bunch of layers named like so:
Penguin 1
Penguin 2
[…]
Penguin 49
Penguin 50etc.
Now let’s say I have a variable that could return anything from 1 to 50. Call it “myVar”.
I would like to reference a particular Penguin layer based on the result of myVar. If myVar is 30, I want the expression to be linked to Penguin 30; if myVar is 17, I want to link to Penguin 17.
so for example,
myPos = thisComp.layer(“Penguin ###”).transform.position;
where ### is replaced by the integer value of myVar.
Is this possible?
Thanks