-
Time remap with markers
Hi! I need some help with the time remaping. It is a template for titles and lower thirds. Usually i just place two keyframes in the begining and in the end of the composition and by moving them you can adjust duration. But recently i’ve found an expression which is binding two keyframes to a marker and by moving markers you can change duration. The problem is, that in the frame just before the second marker some things just dissapper. I’ve tested it in diffrenet versions of AE but the problem still there and i can’t figure out why. All i can think of it there is something wrong with calcultaion of time.
Here is the screenshot for this issue

Here is the link to a project file if someone decide to look into it (AE 2017 required)
13160_modernminimaltitles.aep.zipIt is not something very important but i just want to figure what is wrong with it. Thanks for help in advance!
The expression
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 < 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;
