Animation Markers expression in After Effects

This expression requires four keyframes on the time-remap property and allows you to create animation markers. These markers are valuable for precisely timing events and actions within your composition, helping you synchronize different elements.
try{
if(marker.numKeys>1&&numKeys>1){
beginAnim=marker.key(1).time;
endAnim=marker.key(2).time;
markerMoveTime=endAnim-beginAnim;
keyStart=key(1).time;
keyStartN=key(2).time;
keyEnd=key(3).time;
if(time>=beginAnim && time<=endAnim)
{if((time-beginAnim)>=(keyStartN-keyStart)){valueAtTime(keyStartN);}
else valueAtTime(keyStart+(time-beginAnim));
}
else if(time>endAnim)
{valueAtTime(keyEnd+(time-endAnim));}
else if(time<beginAnim) {valueAtTime(keyStart);}
else {value;}
}else value;
}catch(err){value;}Pro tip: Go to AEJuice Pack Manager – Expressions Pack to apply this expression in 1 click. Here are direct links for the latest plugin version:
Windows / macOSClick here to receive more tips by email.

Get 10% off when you subscribe to our newsletter

By subscribing you agree to your email being stored and used to receive the emails in accordance to our Privacy Policy
descount