Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Fade Out at Marker End

  • Fade Out at Marker End

  • Henri Yates

    November 18, 2022 at 6:20 pm

    Hello… I want to add an expression to another expression to add a slight fade (like 5 or 6 frames) out to a text layer. I don’t want it to disappear abruptly.

    Here’s the expression;

    m = thisLayer.marker;

    n = 0;

    val = “”;

    if (m.numKeys > 0){

    n = m.nearestKey(time).index;

    if (m.key(n).time > time) n–;

    }

    if (n > 0){

    t = time – m.key(n).time;

    if (t < m.key(n).duration){

    val = m.key(n).comment;

    }

    }

    val

    Thanks.

  • Dan Ebberts

    November 18, 2022 at 6:37 pm

    I’m assuming this is a source text expression, correct? If so, change it to this:

    m = thisLayer.marker;
    n = 0;
    val = "";
    if (m.numKeys > 0){
    n = m.nearestKey(time).index;
    if (m.key(n).time > time) n--;
    }
    if (n > 0){
    val = m.key(n).comment;
    }
    val

    and add this opacity expression:

    m = thisLayer.marker;
    f = framesToTime(5);
    n = 0;
    val = 0;
    if (m.numKeys > 0){
    n = m.nearestKey(time).index;
    if (m.key(n).time > time) n--;
    }
    if (n > 0){
    t = time - m.key(n).time;
    d = m.key(n).duration;
    val = linear(t,d,d+f,100,0);
    }
    val

  • Henri Yates

    November 18, 2022 at 6:43 pm

    👏👏

    Thank you, Dan Ebberts.

Viewing 1 - 3 of 3 posts

Log in to reply.

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