Skip to main content
Participant
December 2, 2022
解決済み

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

  • December 2, 2022
  • 返信数 1.
  • 528 ビュー

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,

このトピックへの返信は締め切られました。
解決に役立った回答 Dan Ebberts

Try this:

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

返信数 1

Dan Ebberts
Community Expert
Dan EbbertsCommunity Expert解決!
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);