-
Modifying 2-D expressions to 1D values
I’m using Dan’s standard “Creating Trails” expression:
delay = thisComp.layer(“Delay Null”).effect(“Slider Control”)(“Slider”); //number of frames to delay
d = delay*thisComp.frameDuration*(index – 1);
thisComp.layer(1).position.valueAtTime(time – d)And it works great for 2D position properties. But if I use the “Separate Dimensions” command, it breaks if I apply it to a “1D” property like X or Y individually. How can I modify it to work with just one dimension?