Copy link to clipboard
Copied
Dear ae fellows,
I'm writing a simple script which imports a png sequence into the composition and adds it to the layers at a particular time (for example at the time where a time slider on a time track is positioned at the moment).
Is there a way to insert an item at a particulat time?
Right now, I'm only able to insert my sequence at t = 0
So far my code looks as follows
// ******** importing a sequence into project**********************
var importOptions = new ImportOptions();
importOptions.file = new File(file); // file is the first file in my png sequence
importOptions.sequence = true;
importOptions.forceAlphabetical = false;
var item = app.project.importFile(importOptions);
// ******** end of importing a sequence into project**********************
var activeItem = app.project.activeItem;
//******** position of a time slider****************************
time = app.project.activeItem.time;
//************** here I add png sequence at time t = 0.
var solidLayer = activeItem.layers.add(item);
How would I add it at t= time ?
Yaroslav.
Like this:
var solidLayer = activeItem.layers.add(item);
solidLayer.startTime = t;
Copy link to clipboard
Copied
Like this:
var solidLayer = activeItem.layers.add(item);
solidLayer.startTime = t;
Copy link to clipboard
Copied
Thank you, Dan!