Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Exponential scale between 2 keyframes jsx script

  • Exponential scale between 2 keyframes jsx script

    Posted by Geoff Rights on June 6, 2016 at 6:25 pm

    Hey All,

    Say, I have two keyframes, I select both then right-click them and go to Keyframe Assistant -> exponential scale that works in the GUI. What I am trying to do is script that in jsx. Is there a way to apply a value to the keyframes that would adjust the scale from linear to exponential between the keyframes?

    Any help is appreciated!

    Thanks

    Walter Soyka replied 10 years, 2 months ago 2 Members · 3 Replies
  • 3 Replies
  • Walter Soyka

    June 6, 2016 at 8:43 pm

    You might write a function that performs the easing you’re describing, then generate keyframes for it via the script for each frame of the transition.

    Walter Soyka
    Designer & Mad Scientist at Keen Live [link]
    Motion Graphics, Widescreen Events, Presentation Design, and Consulting
    @keenlive   |   RenderBreak [blog]   |   Profile [LinkedIn]

  • Geoff Rights

    June 7, 2016 at 3:58 pm

    Hi Walter,

    Do you mean apply an exponential scale expression to the entire scale timeline and then add two keyframes (with the values i want) after thats done?

  • Walter Soyka

    June 8, 2016 at 11:04 am

    Geoff, I was suggesting that you re-implement the functionality of the Exponential Scale keyframe assistant in your script. Write an easing function that fits your requirements, use it to calculate the value of a parameter through a range of time, and generate one keyframe per frame over that range.

    This would be a bit cleaner if you could figure it out with keyframe velocities (the Bezier handles in the graph editor) and incorporate that into your script instead.

    The trouble with applying expressions to an entire property when you really intend them to only affect a few keyframes is that you can get unexpected results if you try to do additional animation on those properties. For scale, you might consider making a null, making the null the parent of your layer, and adding your custom values and an easing expression (instead of calculating the value per frame) to the null’s scale property.

    Walter Soyka
    Designer & Mad Scientist at Keen Live [link]
    Motion Graphics, Widescreen Events, Presentation Design, and Consulting
    @keenlive   |   RenderBreak [blog]   |   Profile [LinkedIn]

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