Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions AE expression: During Marker Duration Layer Opacity 100, End marker Opacity 0.

  • AE expression: During Marker Duration Layer Opacity 100, End marker Opacity 0.

    Posted by Craig Trayler on March 3, 2022 at 2:30 pm

    Hi all,
    I tried searching with no luck, so hopefully someone can assist.

    I have seen expressions linked to markers with set names “In””Out”, but I would like an expression that would be something like:
    Start and for the duration of markers length, layer opacity = 100%.
    After marker ends, opacity = 0%.

    So that the gap in-between the end of the last marker and before the start of the next marker the layers opacity will be 0%/Off, and during the markers, the layer will be 100%.

    Thanks in advance for any help.
    Craig

    Craig Trayler replied 4 years, 2 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    March 3, 2022 at 3:48 pm

    Something like this maybe:

    m = marker;

    val = value;

    if (m.numKeys > 0){

    n= m.nearestKey(time).index;

    if (time < m.key(n).time) n--;

    if (n > 0){

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

    val = (t > m.key(n).duration) ? 0 : 100;

    }else{

    val = 0;

    }

    }

    val

  • Craig Trayler

    March 4, 2022 at 12:21 pm

    Dan! Perfect! Thank you soo much!

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