Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Keyframe interpolation via scripts

  • Keyframe interpolation via scripts

    Posted by Swati Sonkar on March 23, 2012 at 12:53 pm

    Hi guys. .
    I m new to After effects scripting, I was writing script to set keyframes. I am wondering if it is possible to modify keyframe interpolation using only scripts (not by using AE interface). . .
    .
    such as set 2 keyframes for the position property of a layer and modify the interpolation of keyframes. By default it goes at constant speed from first to second keyframe (very unrealistic/ robotic). I want it a more natural way and control the speed of the animation like speed increasing slowly at begining and pick up the pace(like we do using graph editor).
    .
    Please don’t say its impossible !!
    .
    Thanks thanks Thanks in advance…

    Buz Bryant-greene replied 6 years, 5 months ago 4 Members · 5 Replies
  • 5 Replies
  • Declan Smith

    March 23, 2012 at 1:33 pm

    Select your keyframes and right click. Keyframe assistant and Keyframe velocity may well be what you need. Easy Ease gives a more natural entry/exit from a keyframe

    Also, you can use the graph editor to alter the curves.

    Declan Smith
    https://www.madpanic.tv
    After Effects CS5.5/ FCS3 / Canon 7D / Canon XL2 / Reason / Cubase

    “it’s either binary or it’s not”

  • Swati Sonkar

    March 23, 2012 at 5:40 pm

    THANKS for Response. .
    .
    I want to do the same by running script. My script can create keyframes but can not change the speed right now. . . I was asking how to do the same (you told using graph editor/ select keyframe hit f9[easy ease]/ keyframe assistant etc). . . I can do it that way. . No problems. ..
    .

    • 1.I write the script using Extend script toolkit.
    • 2. Run the script.
    • 3. Script will set key frames.
    • 4. script will set speed in between.
    • 5. I’ll give the script to my friends for thier use


    .
    Again I want to do it using script.

  • Swati Sonkar

    March 23, 2012 at 6:02 pm

    Okay. . I got something. .
    .
    Its in the AVLayer. . . setInterpolationTypeAtKey method takes care of the interpolation. . . with that I can set keyframe interpolation to LINEAR, BEIZERE OR HOLD. . .
    But now my problem is how I set to something that we get by grabbing handles. . I need it to start very slowly at first keyframe and near the second keyframe it should be like sudden boost in speed. .

  • John Cuevas

    March 23, 2012 at 6:15 pm

    I think you will find more help in the after effects expressions forum, scipting shares some of the same language I believe.

    This forum is for people new to AE who encounter problems.

    Johnny Cuevas, Editor
    Thinkck.com

    “I have not failed 700 times. I have succeeded in proving that those 700 ways will not work. When I have eliminated the ways that will not work, I will find the way that will work.”
    —THOMAS EDISON on inventing the light bulb.

  • Buz Bryant-greene

    March 27, 2020 at 4:52 pm

    I’m late to the party but the simplest solution is to use setSpatialContinuousAtKey() or setTemporalContinuousAtKey(). If fine control is necessary then look into KeyframeEase.

    Hope this helps the next person to come through.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy