Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Turning on and off an effect via expressions

  • Turning on and off an effect via expressions

    Posted by Tyler Paul on November 7, 2006 at 7:27 pm

    As the subject says, I want to turn on/off effects with a checkbox

    I have on the checkbox
    if(thisComp.layer(“Pen”).effect(“Pen Sketch”)(“Checkbox”)==1) comp(“Pre”).Layer(“Pen”).Effect(“Brush Strokes”).active=1 else comp(“Pre”).Layer(“Pen”).Effect(“Brush Strokes”).active=0

    The checkbox works, just doesn’t turn off the effect.

    Tyler Paul replied 19 years, 6 months ago 3 Members · 5 Replies
  • 5 Replies
  • Tyler Paul

    November 7, 2006 at 8:20 pm

    well, I know my first problem. I expressions in a proporty can only effect that property….

    So… where do I put the expression to disable a layer? And I know active is for layers but I don’t even know if they work for effects as well…. and… boy do expressions suck… and rock…

    back to reading

  • Steve Roberts

    November 7, 2006 at 8:22 pm

    You can’t disable layers with expressions, but you can set their opacity to zero.

  • Dan Ebberts

    November 7, 2006 at 8:22 pm

    I see a couple of basic problems. First, you can’t affect a property with an expression applied to a different property. An expression can only control the value of the property it’s applied to.

    Second, an effect’s “active” attribute is read-only.

    What you could do though is apply an expression to the Brush Stroke’s Blend With Original parameter and set it to 0 or 100% based on the checkbox.

    Dan

  • Tyler Paul

    November 7, 2006 at 8:46 pm

    Well, dangit, that’s what I had originally and figuared there was a more correct way. So… when would active be used?

  • Tyler Paul

    November 7, 2006 at 8:59 pm

    Hey Dan,

    Thanks for the help. I had read your guide before I knew much about expressions and was pretty lost. I just got done reading through it again and it all made sense. Progress! It answered a lot of other questions I had too.

    Thanks again,
    Ty

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