ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

How to get my two expressions to work with each other

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Alwyne Holder
How to get my two expressions to work with each other
on Feb 24, 2019 at 7:30:38 am

I'm trying to rig a character so that it's jaws moves down on certain mouth shapes. I'm doing this by having the mouth shapes on a slider (the shapes where the jaw would be down are on one side, and the up mouths are on the other). I then used an if/then expression so that when the slider gets to a certain point the jaw will move down automatically. That's the part I figured out.

The thing that is confusing me is that it has to work with other expressions (namely a duik controller), so I tried to test this with a loopOut. When I do this, only one expression works. Whichever expression is listed last is the only one that works. I need help getting both to work at the same time.

This is the expression I am using:
loopOut("cycle")
a = value;
if (thisComp.layer("MOUTH").effect("MOUTH: ON/OFF")("Slider").value>50) {a + 100}
else {a}

This expression works fine on it's own, but when paired with another, only the latter expression works.

Any help is greatly appreciated!


Return to posts index

Dan Ebberts
Re: How to get my two expressions to work with each other
on Feb 24, 2019 at 5:19:59 pm

The trick is generally to store the result of the first expression into a variable and then incorporate that variable into the second expression. Maybe like this:

v = loopOut("cycle");

if (thisComp.layer("MOUTH").effect("MOUTH: ON/OFF")("Slider").value>50) {v + 100}
else {v}


Dan



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 CreativeCOW.net All Rights Reserved
[TOP]