-
Creating a script to apply an expression
Hey all,
I have this expression:
i=index-1;
p=thisComp.layer(“spline”).position;
s=thisComp.layer(“spline”).effect(“distribute”)(“Slider”);
q=thisComp.numLayers-1;
n=thisComp.layer(“spline”).in_point;
t=thisComp.layer(“spline”).out_point;
d=(t-n)/q;
e=d*i*s;
z=p.valueAtTime(e);
[value[0],value[1],z[2]]I need to apply it to a LOT of layers. And unfortunately i cant copy and paste the position of one and paste to all, because that copies the x and y positions too.
So, instead of applying one by one, I would like to make a script that applies this expression to selected layers position property.
Any advice?
Thanks so much guys.