Page 1 of 1

easy ease

Posted: April 28th, 2014, 8:25 pm
by tc123
Hey there,

I've been getting into coding for a massive two days now and have managed to create my first working script... hurray!
I have applied some scale keyframes to selected layers using the following:

Code: Select all

var myScale = myLayer[i].property("scale");
everything is all good but can someone explain to me if it's possible to code the default easy ease keyframes that you get by hitting F9 in AE rather than the standard keyframes?

any help/explanation would be much appreciated!

Re: easy ease

Posted: April 29th, 2014, 12:54 pm
by chriskelley
Hey tc123 -

You can control the easing of keyframes using the "setTemporalEaseAtKey()" method, which makes use of the KeyframeEase Object. You will need to use both things to set easing for your keyframes.

One thing to watch for is that you are setting your keyframes with setValueAtTime(), but setTemporalEaseAtKey() will reference your keyframes based on index, not time.

Another thing to watch for is if your layer is 2D or 3D - you will need to pass setTemporalEaseAtKey() arrays of different lengths since you are using a property that can be either 2 or 3 dimensions.

Good luck!