Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Simultaneously turning expressions on/off on multiple layers?

  • Simultaneously turning expressions on/off on multiple layers?

    Posted by Jesper Hellvik andersen on August 28, 2016 at 8:42 am

    Hi guys

    I have multiple layers with a “random position” expression on them. Is there a way to simultaneously switch the expression on and off on all layers (32 of them)?

    The expression is this one:

    seedRandom(index, true)

    a = [-10000, 0, -10000];
    b = [10000, 0, 10000];

    random(a, b);

    I am a complete idiot when it comes to writing codes and scripts but I was thinking if the expression somehow could be linked to a checkbox effect on a separate null layer? That would really make life much easier.

    Crossed fingers
    Jesper

    seedRandom(index, true)

    a = [-10000, 0, -10000];
    b = [10000, 0, 10000];

    random(a, b);

    Kalleheikki Kannisto replied 9 years, 8 months ago 2 Members · 1 Reply
  • 1 Reply
  • Kalleheikki Kannisto

    August 28, 2016 at 3:28 pm

    You can check if a checkbox on a layer “controls” is on with the code

    seedRandom(index, true);

    a = [-10000, 0, -10000];
    b = [10000, 0, 10000];

    if(thisComp.layer("controls").effect("Checkbox Control")("Checkbox")==1){
    random(a, b)
    } else value

    Kalleheikki Kannisto
    Senior Graphic Designer

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