Skip to main content
Participant
December 2, 2022
Answered

Expression keyframes follow which follow the duration of it's layer

  • December 2, 2022
  • 1 reply
  • 527 views

Hi,

Is there any way to have an expression so my offset effect key frames follow the duration of my layer ?

 

An example

If my layers is 4second long, my 1st key will be at 0s and my last will be at 4s, and if I make my layer longer the key frames will follow automatically 

 

Thanks,

This topic has been closed for replies.
Correct answer Dan Ebberts

Try this:

t = linear(time,inPoint,outPoint,key(1).time,key(2).time);
valueAtTime(t);

1 reply

Dan Ebberts
Community Expert
Dan EbbertsCommunity ExpertCorrect answer
Community Expert
December 2, 2022

Try this:

t = linear(time,inPoint,outPoint,key(1).time,key(2).time);
valueAtTime(t);
Participant
December 2, 2022

Works perfectly Dan, many thanks ! 

 

One last thing, what should I add to this base if I want a short delay after my key frames

 

This is for my Animator 2, it's same as my animator 1 but with a short delay (you can see attach if it's not clear)

 

Thank you!

Participant
December 2, 2022

Got it !

 

 t = linear(time,inPoint,outPoint,key(1).time,key(2).time);
valueAtTime(t-0.2);