Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Trigger expression only when there’s no keyframe

  • Trigger expression only when there’s no keyframe

    Posted by Gabriele Cannizzaro on December 3, 2013 at 1:31 pm

    Hi everyone. I’m trying to set up a layer so that a flicker occurs, but I also need to precisely animate the opacity in certain points. Up until now the best way to do so seems to be setting a checkbox controller and use an if/else statement to check for its value. Though this works, it requires me to add the extra controller and keyframe it. I tried this expression:

    if (!value) {wiggle(10,50);}
    else {value;}

    Now, while it seems to work perfectly fine on a test comp (a red solid with its opacity animated), it does not work in my bigger comp. It simply does nothing at all.

    I was wondering if the code above is legit and what would be the easiest way to achieve this effect.

    Thank you

    Gabriele Cannizzaro

    Gabriele Cannizzaro replied 12 years, 4 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    December 3, 2013 at 6:20 pm

    What your expression does is apply a wiggle whenever the keyframed value is exactly zero, which may not generally be what you want. Unless the expression has some way to recognize from the keyframed value when you want it to be active, the checkbox may be your best bet.

    Dan

  • Gabriele Cannizzaro

    December 10, 2013 at 10:21 am

    Thank you!

    Gabriele Cannizzaro

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