• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Easy Ease Keyframe Temporal Interpolation in AE Scripting

Engaged ,
Sep 09, 2018 Sep 09, 2018

Copy link to clipboard

Copied

My goal is to apply several keyframes to a property of a layer and then set them all as "Easy Ease": essentially, I'm looking to achieve the exact same effect as doing the following in After Effects:

Playing keyframes, without changing their default interpolation (so leaving them as linear)

Selecting all keyframes just placed.

Pressing F9 to apply Easy Ease.

I know how to do this when using After Effects manually but not when writing scripts.  I would like to achieve the exactly same effect with After Effects scripting.  I've come close, but I'm not quite there.  For example:

master_comp.layer(1).property("Opacity").setInterpolationTypeAtKey(1, KeyframeInterpolationType.BEZIER, KeyframeInterpolationType.BEZIER);

Will change the newest pre-existing linear keyframe to Bezier, but it will not apply Easy Ease to it; they are not the same.

How can I apply Easy Ease to all the keyframes for a given property of a layer?

TOPICS
Scripting

Views

4.3K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 09, 2018 Sep 09, 2018

Copy link to clipboard

Copied

thank you

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 10, 2018 Sep 10, 2018

Copy link to clipboard

Copied

var easeIn = new KeyframeEase(0.5, 50);

var easeOut = new KeyframeEase(0.75, 85);

var myPositionProperty = app.project.item(1).layer(1).property("Position")

myPositionProperty.setTemporalEaseAtKey(2, [easeIn], [easeOut]);

The default easy ease is (0,33) . More on this on page 84 in this document

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Sep 17, 2018 Sep 17, 2018

Copy link to clipboard

Copied

var easeIn = new KeyframeEase(0, 33);

var easeOut = new KeyframeEase(0, 33);

master_comp.layer(1).property("Scale").setTemporalEaseAtKey(1, [easeIn, easeIn, easeIn], [easeOut, easeOut, easeOut]); // key index = 1

I don't quite get the same result as Easy Ease.  Here's the graph editor screenshot for reference:

O5TZFN7.png

Can you help me figure out what I'm doing wrong?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 17, 2018 Sep 17, 2018

Copy link to clipboard

Copied

johnt53984649 That very small difference is due to the numbers. Try using 33.33333(the more 3's, the more precision, but i think 5 decimals should do) instead of just 33.

var easeIn = new KeyframeEase(0, 33.33333);

var easeOut = new KeyframeEase(0, 33.33333);

master_comp.layer(1).property("Scale").setTemporalEaseAtKey(1, [easeIn, easeIn, easeIn], [easeOut, easeOut, easeOut]); // key index = 1

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 21, 2024 Mar 21, 2024

Copy link to clipboard

Copied

LATEST

If I wanted the zoom to start slow and then accelerate over time, do you know how I would set the key frames?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Sep 22, 2018 Sep 22, 2018

Copy link to clipboard

Copied

I figured it out; it turns out you need to apply all the keyframes first, and THEN apply Easy Ease to them.  I was applying a keyframe, then easy ease to the keyframe, and continuing that cycle for the rest of them.  You have to do ALL the keyframes and THEN apply all the Easy Eases, one by one to each keyframe from left to right.  That makes it work perfectly.

As you mentioned earlier, 33 is the default.  It comes out exactly right, so it is indeed 33 and not 33.33333 as you suggested.

Thank you very much!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines