I have a comp that has around 500 layers laid out, from right in front of the comp camera, back into deep Z space. There's about a 500 pixel gap in Z space between each layer. Added to that, each layer has a random x/y position.
What I want to do is change the Z depth of every single layer, but *not* affect the x/y position of the layers. So for example if I wanted to increase the 500 pixel gap to say 1000 pixels for ever layer, but not affect the x/y position, how would I do this without monotonously moving each individual layer at a time, not to mention I probably wouldn't get the spacing right the first time, so I'd end up doing it for the rest of my life?!
You could use an expression. Add a null to your project and add the Effect -> Expression Controls -> Slider Control. Twirl down the effect so you can see the slider control.
Open up one of the layers position and paste this expression.
x = transform.position;
y = transform.position;
z = transform.position + thisComp.layer("Null 1").effect("Slider Control")("Slider");
Right-click the position property and choose "copy expression only". Now just select all your other layers and paste.
Johnny Cuevas, Editor
"I have not failed 700 times. I have succeeded in proving that those 700 ways will not work. When I have eliminated the ways that will not work, I will find the way that will work."
---THOMAS EDISON on inventing the light bulb.