Add layer to comp

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
User avatar
Mules
Posts: 3
Joined: February 5th, 2018, 12:20 am

February 13th, 2018, 4:07 pm

Hi!

Is it possible to add an existing asset (solid) from the project window (asset library) to the current composition 
via scripting ?

Thanks!
User avatar
zlovatt
Posts: 24
Joined: October 31st, 2016, 5:00 pm
Location: Los Angeles
Contact:

February 14th, 2018, 12:55 pm

Yes, you certainly can.

Look at "layers.add" : http://docs.aenhancers.com/layers/layer ... ection-add


Code: Select all

var item = // your solid;
var comp = app.project.activeItem;
var itemAsLayer = comp.layers.add(item);
User avatar
Mules
Posts: 3
Joined: February 5th, 2018, 12:20 am

February 15th, 2018, 7:06 am

Thanks for the snippet!! And the link,

m,
Post Reply