Activity › Forums › Adobe After Effects Expressions › checkbox expression
-
checkbox expression
Posted by Roby Kiss on November 19, 2011 at 6:29 pmI have a simple question:
I got an effect and I want to like it to a checkbox and when the checkbox is check the effect to be on (fx) else the effect to be (off).
can`t figure out how to do it.
Ale Elizondo replied 11 years, 7 months ago 4 Members · 8 Replies -
8 Replies
-
Dan Ebberts
November 19, 2011 at 7:01 pmIt will depend on the effect, but as an example, you could use this to set a blur amount to 5 while the checkbox is on and set it 0 when the checkbox is off:
if (effect(“Checkbox Control”)(“Checkbox”) == 1) 5 else 0
Dan
-
Viorel Hartopanu
November 19, 2011 at 7:07 pmi Think i can help;)
so first create an adjustment layer in your edit window of your project name it, let`s say “_Fx CTRL” with the checkbox control name it, let`s say “GLOW” after select your comp or layer with your effect press T which brings you the opacity, keep press left ALT on ur keyboard and click on the stop watch now type:value * thisComp.layer("_Fx CTRL").effect("GLOW")("Checkbox");DONE! I hope is gonna help you! chhers
-
Roby Kiss
November 19, 2011 at 7:51 pmyes there are many ways to do it and easier with other expression (slider, …), but I wanted to know if for example:
I have a layer with an Effect “Black & White” and I have an “Adjustment Layer” with “Checkbox Control” .
I want when Checkbox is tick “Black & White” else to be off -
Dan Ebberts
November 19, 2011 at 8:12 pmYou could add a CC Composite effect below the Black and White effect and use this on its Opacity control:
if (thisComp.layer(“Adjustment Layer 1”).effect(“Checkbox Control”)(“Checkbox”)==1) 0 else 100
Dan
-
Ale Elizondo
August 31, 2014 at 9:52 pmVery helpful this 🙂
But this expression only works with properties of one dimension. How works it with a property of two dimensions? I hope you can tell me.
-
Dan Ebberts
September 1, 2014 at 3:57 amTwo dimensions would be like this:
if (thisComp.layer(“Adjustment Layer 1”).effect(“Checkbox Control”)(“Checkbox”)==1) [0,0] else [100,100]
Dan
Reply to this Discussion! Login or Sign Up