-
Turn rotation expression on and off
I’m creating a “simple” ball character rig, and I want to use the expression that’s used by DUIK’s Wheel animation tool. It looks like this:
O = thisLayer.toWorld(thisLayer.anchorPoint);
R = thisLayer.effect('Radius')(1);
Rev = thisLayer.effect('Reverse')(1);
result = 0;
R > 0 ? result = radiansToDegrees(O[0]/R) : result = 0 ;Rev == 1 ? value - result : value + result;
There are two controllers that automatically get added onto the null- one slider for Radius and one checkbox for Reverse. I want to be able to animate this feature on and off depending on how I’m animating the character, but can’t seem to find a good solution. If I change the above expression to multiply “result” by 0, it stops having an effect, but if I animate that with a slider it has to spin back to where it started. Is there an expression that can freeze this expression where it is? Maybe it can be done with markers? I’d like to be able to ease it on and off rather than having just a checkbox, but I at least need the function of a checkbox.