Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Substitute keyframe values with values from point controls or sliders (but …

  • Substitute keyframe values with values from point controls or sliders (but …

    Posted by Christopher Hesse on May 8, 2024 at 9:52 am

    keep the keyframe curves)

    I have an expression that lets me substitute the value of one keyframe with values from a point control or slider. This is the expression, which I originally found here (all the way at the end of the page, thanks Dan Ebbert!):

    https://community.adobe.com/t5/after-effects-discussions/dynamic-keyframe-value-using-expression/td-p/10130410

    var newValue=thisComp.layer(“Tief-Blau Farbfläche 1”).effect(“newValue”)(“ADBE Point Control-0001”);

    var firstValue = key(1).value;

    var lastValue = key(2).value;

    if (firstValue[0] < lastValue[0])

    x = linear(value[0],firstValue[0],lastValue[0],firstValue[0],newValue[0])

    else

    x = linear(value[0],lastValue[0],firstValue[0],newValue[0],firstValue[0]);

    if (firstValue[1] < lastValue[1])

    y = linear(value[1],firstValue[1],lastValue[1],firstValue[1],newValue[1])

    else

    y = linear(value[1],lastValue[1],firstValue[1],newValue[1],firstValue[1]);

    [x,y]

    ————————————————————————————————————-
    What I’m looking for is an expression that lets me do the same for a variable number of n keyframes. I guess it could be done with a “for -> each-loop”, but my own humble expression-whiz doesn’t cut it and so I’m stuck. Does anybody have an idea?

    Christopher Hesse replied 8 months, 2 weeks ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

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