21 lines
1.1 KiB
JavaScript
21 lines
1.1 KiB
JavaScript
/* Render the saved project in an isolated ordinary AE instance. */
|
|
(function(){
|
|
app.beginSuppressDialogs();
|
|
var root=File($.fileName).parent.parent.parent.fsName.replace(/\\/g,"/");
|
|
var work=root+"/build/cinematic-v3";
|
|
function log(s){try{var f=new File(work+"/ae-render.log");f.open("a");f.writeln(s);f.close();}catch(e){}}
|
|
try {
|
|
app.open(new File(root+"/assets/cinematics/source/AssemblerCasino-v3.aep"));
|
|
var request=new File(work+"/render-request.json");request.open("r");
|
|
var p=eval("("+request.read()+")");request.close();
|
|
var rq=app.project.renderQueue.item(1);
|
|
rq.render=true;rq.timeSpanStart=p.start/30;rq.timeSpanDuration=p.count/30;
|
|
rq.outputModule(1).file=new File(work+"/"+p.output);
|
|
log("START frame="+p.start+" count="+p.count);
|
|
try{app.setMultiFrameRenderingConfig(true,35);}catch(ignored){}
|
|
app.project.renderQueue.render();
|
|
log("DONE status="+rq.status);
|
|
} catch(e){log("ERROR: "+e.toString()+" line="+e.line);}
|
|
try{app.project.close(CloseOptions.DO_NOT_SAVE_CHANGES);}catch(e){}
|
|
app.endSuppressDialogs(false);app.quit();
|
|
})();
|