Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Where I should put beingUndoGroup and endUndoGroup for undo all in 1 undo

  • Where I should put beingUndoGroup and endUndoGroup for undo all in 1 undo

    Posted by Supak Suksawat on August 24, 2021 at 4:30 am

    startButton.onClick = function(){

    for(var i =0;i<layers.length;i++){

    layers[i].Effects.addProperty(“Grow Bounds”)(“Pixels”).setValue(300);

    layers[i].Effects.addProperty(“CC Bend It”)(“Start”).expression=”try\n{\nvar x=transform.position[0];\nvar y=transform.position[1];\nvalue=value+[x-960,y-810];\n}\ncatch(err)\n{\nvalue;}”;

    layers[i].Effects.property(“CC Bend It”)(“End”).expression=”try\n{\nvar x=transform.position[0];\nvar y=transform.position[1]-1500;\nvalue=value+[x-960,y-500];\n}\ncatch(err)\n{\nvalue;}”;

    }

    }

    Fabrice Leconte replied 4 years, 8 months ago 2 Members · 1 Reply
  • 1 Reply
  • Fabrice Leconte

    August 25, 2021 at 10:47 pm

    Hello, place it before and after the FOR loop.

    app.beginUndoGroup("undo");

    for(var i =0;i<layers.length;i++){

    ...

    }

    app.endUndoGroup();

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