Forums › Adobe After Effects Expressions › If ”not ” active
-
If ”not ” active
-
Adam Greenberg
March 31, 2022 at 12:08 amHi 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 amLike this, I think:
if(! thisComp.layer("Mention").active && y>50) 100
-
Adam Greenberg
March 31, 2022 at 12:40 amawesome, that works perfectly. I knew the symbol ! but could not figure out how to use it.
Thanks again Dan
Log in to reply.