ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Can I merge these two expressions into one?

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Huntington Carpenter
Can I merge these two expressions into one?
on Jul 29, 2019 at 2:13:35 am

Im trying to control a single parameter on the Y position, it works great, but I'd like to add a marker control to trigger the animation, Im not certain how to go about it. Any help appreciated.

if (numKeys > 1){
t1 = key(1).time;
t2 = key(2).time;
v1 = 0;
v2 = thisComp.layer("y position").effect("Slider Control")("Slider").value;
linear(time,t1,t2,v1,v2);
}else
value




if (thisProperty.numKeys == 0) { t = 0; }
else {
n = 0;
if (marker.numKeys > 0){
n = marker.nearestKey(time).index;
if (marker.key(n).time > time){ n--;}
}

if (n == 0){ t = 0; }

else{
m = marker.key(n);
t = time - m.time;
}
}
valueAtTime(t)


Return to posts index

Tomas Bumbulevičius
Re: Can I merge these two expressions into one?
on Jul 29, 2019 at 10:46:58 am

Hey, the main question is how you would like it to be controlled, when both - keys and markers are in place. Which should be the 'main driver'?

Find out more:
After Effects Tutorials: motion design, expressions, scripting.
Boxer - Dynamic Text Boxes Template with a Live Preview


Return to posts index

Huntington Carpenter
Re: Can I merge these two expressions into one?
on Jul 29, 2019 at 2:47:23 pm

I was thinking that the marker would trigger the animation, the slider controls where the y axis lands. The end goal is to set it up so I could link the layer marker to the main comp. So basically the master comp triggers the animation and the slider drives the landing position.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 CreativeCOW.net All Rights Reserved
[TOP]