-
control inpoint/starttime with script
Hey, I have a script that I use as an extend script before calling some other scrits thought CLI.
This script changes the length of a composition mentioned in a json file.
it looks like this:
var myTime = $D.job.get(“time”);
var myTarget = $D.job.get(“compname”);
var start_comp = $D.job.get(“start_time1”);
var myComp;
for (var i = 1; i <= app.project.numItems; i ++) {
if ((app.project.item(i) instanceof CompItem) && (app.project.item(i).name === myTarget)) {
myComp = app.project.item(i);
break;
}
}
myComp.duration = (myTime);I want to add to control inPoint or startTime to this but it does not seem to work.
I found a way to do this like without using the data from json and with layer index
var proj = app.project;
var myComp = proj.item(1);
myComp.layer(1).startTime = 3;I want to use it like the upper example by taking the compname and my_start_time from the json. I can’t figure it out how.