Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Can I merge these two expressions into one?

  • Can I merge these two expressions into one?

    Posted by Huntington Carpenter on July 29, 2019 at 2:13 am

    Im trying to control a single parameter on the Y position, it works great, but I’d like to add a marker control to trigger the animation, Im not certain how to go about it. Any help appreciated.

    if (numKeys > 1){
    t1 = key(1).time;
    t2 = key(2).time;
    v1 = 0;
    v2 = thisComp.layer("y position").effect("Slider Control")("Slider").value;
    linear(time,t1,t2,v1,v2);
    }else
    value

    if (thisProperty.numKeys == 0) { t = 0; }
    else {
    n = 0;
    if (marker.numKeys > 0){
    n = marker.nearestKey(time).index;
    if (marker.key(n).time > time){ n--;}
    }

    if (n == 0){ t = 0; }

    else{
    m = marker.key(n);
    t = time - m.time;
    }
    }
    valueAtTime(t)

    Huntington Carpenter replied 6 years, 9 months ago 2 Members · 2 Replies
  • 2 Replies

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