-
Dynamically targeting layers with the index property
I have a .png that has been split up into a grid of segments using Utility Box v1.6 – each segment is one composition/layer. I want to scramble the image by rearranging the segments randomly. To do so, I rearranged the layers randomly, and I want to use an ease expression to move the layer from its existing position to the position of the layer under it:
ease(time, 0, 2, value, thisComp.layer(index + 1).transform.position)
This works great when I put it on layer 1 – it moves from its position to the position of layer 2 over 2 seconds. Great.
When I copy that expression to layer 2, both layer 1 and layer 2 move to layer 3’s position.
Is there a way to get after effects to evaluate the expressions independently?
Thanks,
ease(time, 0, 2, value, thisComp.layer(index + 1).transform.position)