Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions AE Script to copy layers from comp to comp

  • Andrei Popa

    April 2, 2019 at 8:01 am

    If you want to copy all the layers, null included, i don’t think you should worry about the parenting. And to do that, use something like this.
    You must declare comp1 and comp2 according to your project. I suggest searching the rd_GimmePropPath script to easily find out that.


    comp1 = app.project.item(1);
    comp2 = app.project.item(2);

    comp1.openInViewer();
    for (i = 1; i <=comp1.numLayers; i++){
    comp1.layer(i).selected = true;
    }

    app.executeCommand(19); //Copy
    comp2.openInViewer();
    app.executeCommand(20); //Paste

    Andrei
    My Envato portfolio.

  • Emmanuel Mauries-rinfret

    April 2, 2019 at 12:39 pm

    That’s perfect.
    Thanks!

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