Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Copy Layer Styles Script

  • Copy Layer Styles Script

    Posted by Oscar Gomez on November 20, 2017 at 11:09 pm

    Hi everyone!

    Does anyone know if there’s a script to copy the Layer Styles of the selected layer in After Effects? is this possible?

    Thanks!
    Oscar

    Oscar Gomez replied 8 years, 9 months ago 3 Members · 4 Replies
  • 4 Replies
  • Oscar Gomez

    November 21, 2017 at 12:32 am

    Thanks for responding Dave,

    That’s definitely one way of doing it. The problem is we have many different layers which different layer styles assigned to them, that need to be copied and pasted to multiple different layers in multiple different comps. This becomes a very tedious task, one that could be improved by adding a Copy Layer Styles button to something like FT Toolbar or Kbar.

    Thanks!

  • Roei Tzoref

    November 21, 2017 at 6:54 am

    No specific shortcut unfortunately. you can press UU to reveal modified properties and highlight the layer styles hirerchy and copy paste.

    Roei Tzoref
    2D/VFX Generalist & Instructor
    ♫ AeBlues Tutorials ♫
    http://www.tzoref.com

  • Walter Soyka

    November 21, 2017 at 10:28 pm

    I would love to see your Kbar setup sometime.

    Of course this is possible:

    var selectedItem = null;
    var layerStylesExist = false;

    // find the first selected item
    if (app.project.activeItem instanceof CompItem) {
    if (app.project.activeItem.selectedLayers.length > 0)
    selectedItem = app.project.activeItem.selectedLayers[0];
    }

    // see if it has layer styles
    if (selectedItem == null) {
    clearOutput();
    writeLn("No valid selection.");
    } else {
    layerStylesExist = true;
    try {
    selectedItem.property("Layer Styles").selected = true;
    } catch (err) {
    layerStylesExist = false;
    clearOutput();
    writeLn("No layer styles on (first) selected layer.");
    }
    }

    // copy the layer styles if they exist
    if (layerStylesExist) {
    app.executeCommand(app.findMenuCommandId("Deselect All"));
    selectedItem.property("Layer Styles").selected = true;
    app.executeCommand(app.findMenuCommandId("Copy"));
    clearOutput();
    writeLn("Copied layer style(s).");
    }

    Walter Soyka
    Designer & Mad Scientist at Keen Live [link]
    Motion Graphics, Widescreen Events, Presentation Design, and Consulting
    @keenlive   |   RenderBreak [blog]   |   Profile [LinkedIn]

  • Oscar Gomez

    November 22, 2017 at 6:31 am

    Oh man! you’ve done it again!

    Thank you so much, I’ve got to start learning to code. It’s amazing how you just know how to do this. Thanks!!!

    Here’s my Kbar Setup. It’s constantly growing and changing, sometimes thanks to you!

    Unfortunately I can’t show you the Kbar for the production I’m working on which includes the script you made to set keyframes on the selected layer’s slider control. It’s been really helpful btw!

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