Activity › Forums › Adobe After Effects › Copy Layer Styles Script
-
Copy Layer Styles Script
Posted by Oscar Gomez on November 20, 2017 at 11:09 pmHi 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!
OscarOscar Gomez replied 8 years, 9 months ago 3 Members · 4 Replies -
4 Replies
-
Oscar Gomez
November 21, 2017 at 12:32 amThanks 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 amNo 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 pmI 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 amOh 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!
Reply to this Discussion! Login or Sign Up
