ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Use marker to control where animation starts

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Mervin James
Use marker to control where animation starts
on Jan 24, 2019 at 8:34:40 pm

Hi guys looking for some help to do this with an expression. Ive got an In and an Out animation on the position property. What Id like to do is control the out animation with a marker so I can just shift the marker and the out animation would be triggered where ever the marker is on the timeline. I know this can be done in AE 2019 with Responsive Design but Responsive Design doesnt work in earlier versions I dont think. Can anyone help out with this please. Any responses is greatly appreciated.


Return to posts index

Dan Ebberts
Re: Use marker to control where animation starts
on Jan 24, 2019 at 9:05:20 pm

How are you doing it now (without the marker)?


Dan



Return to posts index

Mervin James
Re: Use marker to control where animation starts
on Jan 25, 2019 at 5:57:56 am

I am doing it by shifting the keyframes. Alternatively id like to add a marker to make things easier. Also I am new to AE so im still figuring alot of things out. If you can help my utmost thanks to you.


Return to posts index


Dan Ebberts
Re: Use marker to control where animation starts
on Jan 25, 2019 at 6:05:30 am

The expression needs to know which keyframe starts the out animation. For this example, I've assumed it's the 3rd keyframe:


outKey = 3;
if (time > key(outKey-1).time){
m = marker;
n = 0;
if (m.numKeys > 0){
n = m.nearestKey(time).index;
if (m.key(n).time > time) n--;
}
t = n > 0 ? time - m.key(n).time : 0;
valueAtTime(key(outKey).time + t);
}else{
value;
}



Dan



Return to posts index

Mervin James
Re: Use marker to control where animation starts
on Jan 25, 2019 at 6:20:31 pm

It's working perfectly Dan. Many thanks.


Return to posts index

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