Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Extendscript: how to duplicate a solid inside a composition?

  • Extendscript: how to duplicate a solid inside a composition?

  • Frank Peeters

    April 30, 2020 at 7:50 am

    I’m thinking I might be wrong in my thinking process, but I’m unable to duplicate a solid layer inside my composition.

    Let’s say my layer is named “##background”.


    for (var i = 1; i <= app.project.activeItem.numLayers; i++) {
    var layer = app.project.activeItem.layer(i);
    if (layer.name === '##background') {
    var newLayer = layer.duplicate();
    }
    }

    When I run that command AE and Extendscript Toolkit hang.

    I read up on things, and though I would need to duplicate it in the project window with a menu command for duplication, but that yielded the same result.

    Can someone enlighten me what I’m doing wrong?

  • Andrei Popa

    April 30, 2020 at 9:43 am

    var newLayer = app.project.activeItem.layer('##background').duplicate()

    Andrei
    My Envato portfolio.

Viewing 1 - 2 of 2 posts

Log in to reply.

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