Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions If ”not ” active

  • If ”not ” active

  • Adam Greenberg

    March 31, 2022 at 12:08 am

    Hi all, I have an expression I need to edit in a project and I want to avoid having to rewrite the whole project. basically I have an if else statement which looks at 2 conditions with ”&&”

    But the FIRST condition is if a layer is active. so I need to write if this layer is not active. is this possible ?

    here is the expression as is, but i need the 1st condition to be not active in order for my if statement to be true.

    sourceSize = thisComp.layer(“TITLE”).sourceRectAtTime(time, false);

    y = sourceSize.height;

    if(thisComp.layer(“Mention”).active&&y>50) 100;

    else 0

    thanks so much

  • Dan Ebberts

    March 31, 2022 at 12:14 am

    Like this, I think:

    if(! thisComp.layer("Mention").active && y>50) 100
  • Adam Greenberg

    March 31, 2022 at 12:40 am

    awesome, that works perfectly. I knew the symbol ! but could not figure out how to use it.

    Thanks again Dan

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