create layer to add image


using code below able import image file composition. how may create new layer add image using script.

 

var activeitem = app.project.activeitem; var mynewsource = "d:\\temp\\facebook.png"; var myfile = file(mynewsource); var myimportoptions = new importoptions(myfile); var myfootage = app.project.importfile(myimportoptions); 

check out layercollection add() method in ae scripting guide.

app.project.item(index).layers.add(item, duration)

 

so like:

activeitem.layers.add(myfootage);

 

the second parameter setting duration of still layers optional.



More discussions in After Effects Scripting


adobe

Comments

Popular posts from this blog

Joomla 3.3 Installation Error message - Joomla! Forum - community, help and support

Multilanguage infinite redirect loop error. - Joomla! Forum - community, help and support

trim media limit reached