Dan,
I think I've modified these from a .jsx posted here a while ago, but I think you'll find them useful.
This will empty the Render Queue and add the selected comps, applying a template named 'PNGA'.
app.beginUndoGroup("Rush Render Queue");
function lsComps()
{
var selectedComps = new Array();
if (app.project != null)
{
var selectedItems = app.project.selection;
for (var i = 0; i < selectedItems.length; i++)
{
projItem = selectedItems[i];
if (projItem instanceof CompItem)
selectedComps[selectedComps.length] = projItem;
}
}
return selectedComps;
}
if ( app.project.file ) {
var comps = lsComps()
var numb = app.project.renderQueue.numItems;
for (i = numb; i > 0; i--) {
var curItem = app.project.renderQueue.item(i);
curItem.remove();
}
for (var i = 0; i < comps.length; i++) {
rQC = app.project.renderQueue.items.add(comps[i]);
rQCM = rQC.outputModule(1);
rQCM.applyTemplate("PNGA");
}
app.project.save()
}
app.endUndoGroup();
alert("Render Queue cleared and the selected comps have been added. You should update each of their Output To sections in the Render Queue and then run RushRender");
This will submit a rush job for each item in the Render Queue.
app.beginUndoGroup("Rush Render");
var SCRIPT = "/Volumes/Scripts_1/SubmitScripts/submit-afterfx.pl";
var CPUS = "+ae=60@100";
var BATCH = 50;
if ( app.project.file ) {
app.project.save()
var aeproj = app.project.file.name.replace(/%20/gi," ");
var aeproj_no_ext = aeproj.substring(0,aeproj.length-4);
var numb = app.project.renderQueue.numItems;
for (i = numb; i > 0; i--) {
var curItem = app.project.renderQueue.item(i);
var comp = curItem.comp;
var projectPath = app.project.file.fsName.toString();
app.project.timecodeDisplayType = TimecodeDisplayType.FRAMES;
var workAreaStart = comp.workAreaStart;
var workAreaEnd = comp.workAreaDuration + workAreaStart;
var sframe = timeToCurrentFormat(workAreaStart, comp.frameRate, false);
var eframe = timeToCurrentFormat(workAreaEnd, comp.frameRate, false);
sframe = parseFloat(sframe);
eframe = parseFloat(eframe);
var compname = comp.name;
var jobtitle = aeproj_no_ext+"."+compname;
var tmp = new File("/var/tmp/rushaesubmit");
tmp.lineFeed = "Unix";
if (tmp.open("w", "TEXT")) {
tmp.writeln("JobTitle: "+jobtitle);
tmp.writeln("Frames: "+sframe+"-"+eframe);
tmp.writeln("ScenePath: "+projectPath);
tmp.writeln("CompName: "+compname);
tmp.writeln("BatchFrames: "+BATCH);
tmp.writeln("Cpus: "+CPUS);
tmp.writeln("AEVersion: -");
tmp.writeln("AutoDump: off");
tmp.writeln("BatchClip: yes");
tmp.writeln("LogFlags: Overwrite");
tmp.writeln("Ram: 1");
tmp.writeln("Retries: 5");
tmp.writeln("StartIrush: no");
tmp.writeln("RetryBehavior: AddNever+Requeue");
var tmpfile = tmp.absoluteURI;
tmp.close();
var cmd = "perl "+SCRIPT+" -submit \""+tmpfile+"\" > /dev/null 2>&1 < /dev/null &";
var out = system.callSystem(cmd);
} else {
alert("Couldn't submit "+compname);
}
}
}
app.endUndoGroup();
On Aug 8, 2013, at 1:27 PM, Dan Rosen wrote:
> [posted to rush.general]
>
> Hello,
>
> We are just getting around to a formal Rush submit script launched out =
> of AE. We are on Rush 102.42a9, CS5, Mac OSX 10.6.8.
>
> I have found a few issues and have a few questions.
>
> - Leaving the OutputPath blank does not render what's setup in Queue as =
> advertised by Rush help.
>
> - I am looking to add some features to a simple jsx script that was =
> posted to this forum. The script is great at adding the project file and =
> comp name to the Rush submit window, but I'd like to add more features. =
> Are there simple examples of getting a selecting comp into the Queue and =
> setting it's output properties? Any examples/help on this front is much =
> appreciated.
>
> - Is there a way to add a custom menu to AE? like Nuke at the top menu =
> items?
>
----------------------------
Cameron Leger
the dvi group | 3D Artist / Coding
1486 Mecaslin Street NW, Atlanta, GA 30309
Phone: 404-873-6283 x 113
www.thedvigroup.com
|