Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Expression to use markers to control opacity

  • Expression to use markers to control opacity

  • Luca Lange

    December 1, 2019 at 11:02 pm


    I am not that familiar with AE expressions, so excuse the (probably) basic question.

    I have two layers, layer 1 with a mask on it, layer 2 with markers on it.
    How can I set the opacity of the mask on layer 1 to 0% (100% otherwise), for all frames for which layer 2 has markers?



  • Dan Ebberts

    December 1, 2019 at 11:57 pm

    This should work:

    m = thisComp.layer("Layer 2").marker;
    v = 100;
    if (m.numKeys > 0){
    n = m.nearestKey(time).index;
    if (timeToFrames(m.key(n).time) == timeToFrames(time)){
    v = 0;


  • Luca Lange

    December 2, 2019 at 11:55 am

    Exactly what I was looking for, thanks!

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