Forum Replies Created

  • Andrew Sherman

    March 1, 2023 at 10:49 am in reply to: Apply ease to selected keyframes using scripting

    I’ve updated this now and it works nicely on things like opacity and separated position dimensions. I know how to update it to work for arrays (eg for scale), I just have not done that yet. However, When I try to run this easing script on something like keyframes on an effect slider, it gives me an error “undefined is not an object”. Do you know how I can get this to work for effect properties as well? It’s working correctly easing transform properties, but not effect properties.

    // Get the selected properties

    var selectedProperties = app.project.activeItem.selectedProperties;

    // Define easing

    var easeSlow = new KeyframeEase(0, 90);

    // Loop through the selected properties

    for (var i = 0; i < selectedProperties.length; i++) {

    // Get the selected keyframes on the property

    var selectedKeyframes = selectedProperties[i].selectedKeys;

    // Apply easing to each selected keyframe

    for (var j = 0; j < selectedKeyframes.length; j++) {

    var keyframeIndex = selectedKeyframes[j];

    selectedProperties[i].setTemporalEaseAtKey(keyframeIndex, [easeSlow], [easeSlow]);

    }

    }

  • Andrew Sherman

    March 1, 2023 at 10:41 am in reply to: Apply ease to selected keyframes using scripting

    Perfect – thank you!

  • Andrew Sherman

    March 9, 2021 at 9:38 am in reply to: Apply an expression using a keyboard shortcut

    So I found how to apply an expression in After Effects using a shortcut.

    You will need to use automation software to create a macro (performs multiple steps one after another), and control your shortcuts.

    Automation software options

    Mac: Soundflow (highly recommended), Keyboard Maestro, Stream Deck

    Windows: Auto Hot Key, Stream Deck

    These are the steps I included in my macro, on Mac:

    – Manually select layer

    – Press trigger (in my case it’s a stream deck button but it could be a customer keyboard shortcut)

    Automated steps:

    – Press S to show scale property

    – Press Command Alt A (select the visible properties)

    – Menu: Animation / Add expression (or use the shortcut)

    – Use your automation software to paste a pre-defined expression into the expression area, which is now active

    – Press numpad enter to exit the expression editor

    So with a single button press, I can apply an expression.

    Taking it further, you can make it so that you press a button, and a search option pops up, you type a few letters and then press enter to choose your desired expression, and then it gets applied once you select it. You will need to use an advanced automation platform like Soundflow to get that kind of functionality.

  • Andrew Sherman

    March 8, 2021 at 1:51 pm in reply to: Penner easing expressions with layer slide

    Fantastic, thank you so much Dan

  • Andrew Sherman

    March 6, 2021 at 8:23 pm in reply to: Penner easing expressions with layer slide

    Dan, I’m a long-time beneficiary of your wisdom on these forums, so just wanted to say thank you, and I’m also a user of some of your paid scripts on aescripts.

    I’m trying to get this expression to work but I’m getting a syntax error (I think it’s the t = time line). Do you know how this might be resolved? I’m using latest AE CC.

    I also wanted to know how I might use a different easing, like one of the other Penner easings (expo or bounce etc). Do I just change the calculation in the function with the relevant math?

    // Penner easeInOutExpo

    function easeInOut (t,b,c,d) {

    if (t <= 0) return b;

    if (t >= d) return b + c;

    if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;

    return c/2*((t-=2)*t*t*t*t + 2) + b;

    }

    var xstartVal = 500;

    var ystartVal = 500;

    var xendVal = 500;

    var yendVal = 800;

    var startDur = 0;

    var endDur = 1.8;

    t = time – (startDur + inPoint);

    d = endDur – startDur;

    y = easeInOut (t,ystartVal, yendVal – ystartVal, d);

    x = easeInOut (t,xstartVal, xendVal – xstartVal, d);

    [x,y];

    
    
    		
        

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