Copy link to clipboard
Copied
Im trying to build an essential graphics template in After Effects. I want to use a slider control (clamped with "Math.floor(clamp(value, min=1, max=2));") to control the scale an object. I guess the issue is that scale is an array and not a single value. What's the best way to solve this?
myVar = thisComp.layer("Control-layer").effect("Slider Control")("Slider");
if(myVar == 1)100 else 50;
thanks
//Si
Like this maybe:
myVar = thisComp.layer("Control-layer").effect("Slider Control")("Slider");
s = (myVar == 1) ? 100 : 50;
[s,s]
Dan
Copy link to clipboard
Copied
Like this maybe:
myVar = thisComp.layer("Control-layer").effect("Slider Control")("Slider");
s = (myVar == 1) ? 100 : 50;
[s,s]
Dan
Copy link to clipboard
Copied
Many thanks! That works like a charm.