Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions AE expression that turns on a layer only if a certain layer is on?

  • AE expression that turns on a layer only if a certain layer is on?

    Posted by Tara Devlin on December 18, 2018 at 7:44 pm

    Hi Everyone,

    Does anyone know where I can find an expression that turns on a layer (via opacity) only if a certain layer is also on?

    Is that possible?

    Thanks,

    Tara

    Scott Mcgee replied 7 years, 4 months ago 2 Members · 2 Replies
  • 2 Replies
  • Scott Mcgee

    December 19, 2018 at 11:16 am

    Unless you’re trying to do something else with it.

    This should be fine.

    if(thisComp.layer(index+1).active == true) 100 else 0;

    for cc2019 as I’ve not upgraded. This should work based off what I’ve read.

    if(thisComp.layer(index+1).active == true){
    100
    } else {
    0
    };

  • Scott Mcgee

    December 19, 2018 at 2:28 pm

    Just realised when testing it, I didn’t write it the other way round.

    It wants to be 0 else 100

    🙂

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