-
Blink slider to control the Y position of another layer.
Hello,
I’m new to after effects an have some trouble solving this expression I need.
I’m rigging the head of a 2D character. I have set a slider to control the blinks of its eyes.
The slider has three pairs of blink associated with if/else.From 0 to 10: eyes closed.
From 11 to 20: sibylline eyes.
From 21 to 30: neutral eyes.
Frpm 31 to 40: wide open eyes.I’ve used this kind of expression:
a=thisComp.layer(“HEAD_CTRL”).effect(“BLINK”)(“Slider”);
if((a>30)&&(a<=40)) 100 else 0NOW, I want the eyebrows to change their Y position with just one blink mode, the wide open eyes. So I wrote down the Y value for both positions and made an expression for Y position like this:
a=thisComp.layer(“HEAD_CTRL”).effect(“BLINK”)(“Slider”);
if((a>30)&&(a<=40)) 524 else 528And it worked, but then I needed to parent the eyebrows to the HEAD_CTRL, and when I did OBVIOUSLY the eye brows comp went crazy. I figured out it was because I set some fixed values for Y that wouldn’t work if I changed the HEAD_CTRL position.
So I need some variation of that expression for any position of the HEAD_CTRL.
I want the eyebrows, to be in some Y position when the blink slide is set to “SURPRISE EYES” and Y position +4 with any other.Something like this, but in proper java language:
a=thisComp.layer(“HEAD_CTRL”).effect(“BLINK”)(“Slider”);
if((a>30)&&(a<=40)) Y position else Y position+4Thanks.