Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions 68 layers with expression – slows down. Optimization possible?

  • 68 layers with expression – slows down. Optimization possible?

    Posted by Anders Hattne on August 14, 2014 at 9:52 am

    Hello!
    I have made the following expression which runs a short (3 second) animation from a different composition once the CTI hits a marker that corresponds to its layer’s name: So layers named “1” start when they hit marker 1, layers called “2” at marker 2 and so on.

    This is also applied to the scale property, on 68 layers (and might be applied to 130 layers in the end).
    At some point the comp gets a bit slow. I wonder if it could be because of the expression – since “timeAdvance” goes on counting once it has hit it’s marker.
    Is there a way to make the expression stop doing anything once it has done its three seconds of work?
    Or are these expression not really processor heavy? Or is it the 68 layers?

    //reference COMP for animation
    srcLayer= comp(“main animation 1”).layer(“animation 1”);

    lNme = thisLayer.name; //the name of this layer
    val1 = lNme.substr(0, 1); // first letter decides TIMING

    //the time of marker corresponding to the layer name
    compMarkerTime = thisComp.marker.key(val1).time;

    if (compMarkerTime <= time){
    timeAdvance = (time – compMarkerTime);
    } else {
    timeAdvance = 0;
    }

    srcLayer.transform.yRotation.valueAtTime(timeAdvance);

    http://www.ardillamedia.com

    Anders Hattne replied 12 years ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

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