After testing my script, there is a strange anomaly.
I have a sequence with split (extended) markers that show a range inside the sequence.
When I run this script:
var activeSequence = app.project.activeSequence; if (activeSequence) { var markers = activeSequence.markers; if (markers) { var numMarkers = markers.numMarkers; if (numMarkers > 0) { var marker_index = 1; for(var current_marker = markers.getFirstMarker(); current_marker !== undefined; current_marker = markers.getNextMarker(current_marker)){ var selectIn = current_marker.start.seconds; app.project.activeSequence.setInPoint(selectIn); var getIn = app.project.activeSequence.getInPoint(); $.writeln("In: "+marker_index+" -> "+getIn); var selectOut = current_marker.end.seconds; app.project.activeSequence.setOutPoint(selectOut); var getOut = app.project.activeSequence.getOutPoint(); $.writeln("Out: "+marker_index+" -> "+getOut); app.encoder.encodeSequence(app.project.activeSequence,"test-"+marker_index+".mp4", "preset.epr", app.encoder.ENCODE_IN_TO_OUT, 1); alert(); } } } } |
All is fine - the encoder fires up, adds the sequence to it, shows me an alert - and after I click it it goes through all the sequences - and exports the correct ranges perfectly.
When I comment the alert(); -- I runs through all the markers, and adds them to the queue all using the same in/out point.
It seems like when the alert fires, the window is brought to the front and the selection is done correctly - but when it's done in the background there is something going wrong.
Bruce Bullis -- is this a bug? Or is there another way to do this more efficiently?