-
Can an expression link to another expression?
Thank you ahead of time
I have searched and found little to no results to find if I can link one expression to another.
i.e.,
I have over 60 layers that I want to have an expression. However, instead of re-adjusting the expressoion one by one. I’m thinking crazy, maybe there’s a way to link one expression to another. So my end results is that I have 60 layers with expressions all pointing to one expression. So that the “Master” expression is adjusted, it affects all links.
Here’s my expression;
Vy0 = 500; //initial y velocity (pixels/second)
Vx0 = 100; // initial x velocity (pixels/second)
g = 2500; // gravity (pixels/second/second)
floor = 400;
e = .85; //elasticity
b = floor – position[1];
h = b + Vy0*Vy0/(2*g);
T = Vy0/g + Math.sqrt(2*h/g);
if ((time-inPoint) < T){
y = Vy0*(time-inPoint) – g*(time-inPoint)*(time-inPoint)/2 + b;
}else{
Vy = -(Vy0 – g*T);
while (true){
Vy *= e;
t = T;
T += 2*Vy/g;
if ((time-inPoint) < T){
t = (time-inPoint) – t;
y = Vy*t – g*t*t/2;
break;
}else if (T – t < thisComp.frameDuration){
y = 0;
break;
}
}
}Cool very cool! I’m excited… Just cause
