-
IF – AND – THEN expression
apologies if this is an old old question. I *did* try and search for “if and then expression” but you’d be surprised about how many people use the words ‘if’ ‘and’ and ‘then’. Hmmm
ANyhow!
I have a 2D layer (MOON_MASK) and 3D layer which revolves (MOON_REVOLVE).
I want MOON_MASK opacity to be 100 when MOON_REVOLVE’s Y rotation is between 0 and 180 and to be 0 when MOON_REVOLVE’s Y is between 181 and 360.
Fine, easy, here’s what’s working
maskOp = thisComp.layer(“MOON_REVOLVE”).transform.orientation[1];
if (maskOp < 180){
[100];
}else{ [0] ; }However I’ve just realised I actually need the MOON_MASK opacity to be 100 between MOON_REVOLVE’s y value being 90 and 270 and for the life of me I can’t figure out the grammar to get an AND statement in there.
Essentially what I want to say is
maskOp = thisComp.layer(“MOON_REVOLVE”).transform.orientation[1];
if (maskOp > 90) AND (maskOp <270){
[100];
}else{ [0] ; }but that’s obviously not happening!!
I’m actually sure there might be a more elegant way through it anyway but even if there is, does After Effects do if/and statments?
Many many thanks in advance for your help (anyone!!!)
as ever
Jim