Creative Communities of the World Forums

The peer to peer support community for media production professionals.

  • Posted by Adam Levine on May 5, 2016 at 7:11 am

    I created this script to rename layers so easy for active comp.It works fine. Use it if you need.

    function stingStartsWith (string, prefix) {
    return string.slice(0, prefix.length) == prefix;
    }

    app.beginUndoGroup("My Undo");

    var comp = app.project.activeItem;

    for (var i=1; i<=comp.layers.length; i++){ var myLayer = comp.layers[i]; var myLayerstartswith = stingStartsWith (myLayer.name, "Layer"); if (myLayerstartswith){ myLayer.selected = true; myLayer.name = "My Layer"; } else { myLayer.selected = false; } } app.endUndoGroup();

    Adam Levine replied 10 years, 3 months 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