KAZIK/tools/generators/make_studio_v4.jsx

33 lines
2.3 KiB
JavaScript

/* Editable finishing timeline for the real Blender-rendered studio ident. */
(function () {
app.beginSuppressDialogs();
var root=File($.fileName).parent.parent.parent.fsName.replace(/\\/g,"/");
var work=root+"/build/cinematic-v4";
function log(s){var f=new File(work+"/ae-studio-v4.log");f.open("a");f.writeln(s);f.close();}
try {
app.newProject();app.project.bitsPerChannel=16;
var options=new ImportOptions(new File(work+"/workshop-clutter/frame_0001.png"));
options.sequence=true;options.forceAlphabetical=true;
var footage=app.project.importFile(options);
footage.name="Blender / physical cluttered workshop / 1920x1080";
footage.mainSource.conformFrameRate=24;
if(footage.duration<7.99)throw new Error("Incomplete Blender sequence: "+footage.duration);
var master=app.project.items.addComp("MASTER / EBLAN GAMES - Night shift",1920,1080,1,8,24);
master.layers.addSolid([0,0,0],"Black / CRT power on and off",1920,1080,1,8);
var film=master.layers.add(footage);film.name="Real 3D camera / rendered in Blender Cycles";
var opacity=film.property("ADBE Transform Group").property("ADBE Opacity");
opacity.setValueAtTime(0,0);opacity.setValueAtTime(.3,100);
opacity.setValueAtTime(7.5,100);opacity.setValueAtTime(8,0);
var sound=app.project.importFile(new ImportOptions(new File(root+"/assets/audio/startup/studio-workshop-v4.wav")));
var audio=master.layers.add(sound);audio.name="Stereo / CRT relay, keys, PC chime";audio.outPoint=8;
master.markerProperty.setValueAtTime(0,new MarkerValue("Workshop / cold CRT / wider view"));
master.markerProperty.setValueAtTime(.5,new MarkerValue("Power relay / original terminal animation"));
master.markerProperty.setValueAtTime(5,new MarkerValue("Studio logo / PC chime"));
master.markerProperty.setValueAtTime(7.5,new MarkerValue("Fade / next game features page"));
master.openInViewer();
app.project.save(new File(root+"/assets/cinematics/source/EblanGames-workshop-v4.aep"));
log("SUCCESS / 1920x1080 / 24fps / 192 source frames / 8 seconds / stereo");
app.project.close(CloseOptions.DO_NOT_SAVE_CHANGES);
}catch(e){log("ERROR: "+e.toString()+" at line "+e.line);}
app.endSuppressDialogs(false);app.quit();
})();