FORUMS: list search recent posts

Copy Layer Styles Script

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Oscar Gomez
Copy Layer Styles Script
on Nov 20, 2017 at 11:09:47 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


Return to posts index

Dave LaRonde
Re: Copy Layer Styles Script
on Nov 21, 2017 at 12:13:25 am

You can always duplicate the layer, then replace the layer with a new piece of footage from the project pane. Takes all of 3 seconds.

Dave LaRonde
Promotion Producer
KGAN (CBS) & KFXA (Fox) Cedar Rapids, IA


Return to posts index

Oscar Gomez
Re: Copy Layer Styles Script
on Nov 21, 2017 at 12:32:55 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!


Return to posts index


Roei Tzoref
Re: Copy Layer Styles Script
on Nov 21, 2017 at 6:54:27 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


Return to posts index

Walter Soyka
Re: Copy Layer Styles Script
on Nov 21, 2017 at 10:28:52 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 [twitter]   |   RenderBreak [blog]   |   Profile [LinkedIn]


Return to posts index

Oscar Gomez
Re: Copy Layer Styles Script
on Nov 22, 2017 at 6:31:03 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!


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]