Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions checkbox expression

  • checkbox expression

    Posted by Roby Kiss on November 19, 2011 at 6:29 pm

    I 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 pm

    It 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 pm

    i 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 pm

    yes 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 pm

    You 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

  • Roby Kiss

    November 19, 2011 at 10:18 pm

    thanks it work 😀

  • Ale Elizondo

    August 31, 2014 at 9:52 pm

    Very 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 am

    Two dimensions would be like this:

    if (thisComp.layer(“Adjustment Layer 1”).effect(“Checkbox Control”)(“Checkbox”)==1) [0,0] else [100,100]

    Dan

  • Ale Elizondo

    September 25, 2014 at 4:25 pm

    thanks dan!! 🙂

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy