ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Trigger Animation through layer Marker

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Nathaniel Logan
Trigger Animation through layer Marker
on Nov 21, 2018 at 7:18:28 pm

Hi Dan,

I was using one of your expression to trigger the keyframes of text layer animation, can we use the Marker name to trigger the Animation so that, i can insert a new marker for animation "Out" so that the animation doesn't Override.

preroll = 1;
L= thisComp.layer("Controller");
n = 0;
t0 = time + preroll;
if (L.marker.numKeys > 0){
n = L.marker.nearestKey(t0).index;
if (L.marker.key(n).time > t0) n--;
}
if (n &lt; 1){
t = 0;
}else{
t = t0 - L.marker.key(n).time;
}
valueAtTime(t)


Return to posts index

Dan Ebberts
Re: Trigger Animation through layer Marker
on Nov 21, 2018 at 8:17:14 pm

I haven't tested this, but if I understand what you're asking, I think it would be like this:


preroll = 1;
L= thisComp.layer("Controller");
t0 = time + preroll;
t = 0;
if (L.marker.numKeys > 0){
try{
if (t0 > L.marker.key("Out").time){
t = t0 - L.marker.key("Out").time;
}
}catch(e){
}
}
valueAtTime(t)



Dan



Return to posts index

Nathaniel Logan
Re: Trigger Animation through layer Marker
on Nov 22, 2018 at 5:23:18 am

Thank you, So much Dan. Works like Charm! 😃


Return to posts index

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