-
Question from the book 'The Power of Expressions'
I’m working my way through the book and on pages 88-90(if you have the book), is a expression to create a cascade effect on layers, sort of recreating the windows OS dock.
All layers have a scale expression to increase scale as cursor moves close to it.
cursor = thisComp.layer(‘CURSOR’).position;
x = length (position,cursor);
linear (x,0,300,[200,200],[100,100]);Leader layer is the bottom of the stack, and follower layers are above it and have this expression in the position parameter. (I’ve attached the project if I was unclear.)
layerBelow = thisComp.layer(thisLayer,1);
[layerBelow.position[0]+ layerBelow.scale[0]*0.7, layerBelow.position[1]];The concept I’m confused by is the (thisLayer, 1). What is happening there? I replaced that with (thisLayer.index+1) and got the exact same result, so is (thisLayer, 1) another way of referencing the index of a layer, or is this something a little different. And if it’s different, why would you use one method instead of the other? I’m just trying to wrap my head around what is happening here.
Thanks.