ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Time Remapping with markers

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Kirill Komrakov
Time Remapping with markers
on Oct 29, 2019 at 11:33:28 am

Hi!
I need some help with this expression.

It binds 4 keyframes to 2 markers, but the time between keyframe 2 and 3 freezes. What i am trying to do is to when you move markers time in between should act like when you move two last keyframes with normal time remapping - time between keyframes 2 and 3 just speed up. Thanks!

The idea just to move markers to get same result as moving keyframes without constantly hitting "U" button.

T = thisLayer;
if ((T.marker.numKeys > 1 ) && (numKeys > 3)){
sIn = key(2).time - key(1).time;
sOut = key(4).time - key(3).time;
eIn = T.marker.key(1).time;
eOut = T.marker.key(2).time;
if (time &lt; T.marker.key(2).time)
linear(time,eIn-sIn,eIn,key(1).value,key(2).value)
else
linear(time,eOut,eOut+sOut,key(3).value,key(4).value);
}else
value;


Return to posts index

Dan Ebberts
Re: Time Remapping with markers
on Oct 29, 2019 at 1:28:39 pm

I'm not sure if this is what you're looking for, but try this:


T = thisLayer;
if ((T.marker.numKeys > 1 ) && (numKeys > 3)){
sIn = key(2).time - key(1).time;
sOut = key(4).time - key(3).time;
eIn = T.marker.key(1).time;
eOut = T.marker.key(2).time;
if (time < eIn)
linear(time,eIn-sIn,eIn,key(1).value,key(2).value)
else if (time < eOut)
linear(time,eIn,eOut,key(2).value,key(3).value)
else
linear(time,eOut,eOut+sOut,key(3).value,key(4).value);
}else
value;



Dan



Return to posts index

Kirill Komrakov
Re: Time Remapping with markers
on Oct 29, 2019 at 1:35:36 pm

Thanks Dan, thank exactly what i was llokng for!


Return to posts index

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