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

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: 47
Joined: October 31st, 2016, 5:00 pm
Location: Portland
Contact:

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

Thanks for the snippet!! And the link,

m,
Post Reply