From: Dan Rosen <dr@(email surpressed)>
Subject: Re: AE Rush submit
   Date: Thu, 08 Aug 2013 16:24:34 -0400
Msg# 2346
View Complete Thread (13 articles) | All Threads
Last Next
Thanks. This is awesome. Could you please email me an attachment offline since the text got mangled in some email server weirdness.

thx
Dan

On Aug 8, 2013, at 11:05 AM, Cameron Leger <cleger@(email surpressed)> wrote:

[posted to rush.general]

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 =3D new Array();
   if (app.project !=3D null)
   {
       var selectedItems =3D app.project.selection;
       for (var i =3D 0; i < selectedItems.length; i++)
       {
           projItem =3D selectedItems[i];
           if (projItem instanceof CompItem)
               selectedComps[selectedComps.length] =3D projItem;
       }
   }
   return selectedComps;
}

if ( app.project.file ) {
   var comps =3D lsComps()
   var numb =3D app.project.renderQueue.numItems;
   for (i =3D numb; i > 0; i--) {
       var curItem =3D app.project.renderQueue.item(i);
       curItem.remove();
   }
   for (var i =3D 0; i < comps.length; i++) {
       rQC =3D app.project.renderQueue.items.add(comps[i]);
       rQCM =3D 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 =3D "/Volumes/Scripts_1/SubmitScripts/submit-afterfx.pl";
var CPUS   =3D "+ae=3D60@100";
var BATCH  =3D 50;

if ( app.project.file ) {
   app.project.save()
   var aeproj =3D app.project.file.name.replace(/%20/gi," ");
   var aeproj_no_ext =3D aeproj.substring(0,aeproj.length-4);
   var numb =3D app.project.renderQueue.numItems;
   for (i =3D numb; i > 0; i--) {
       var curItem =3D app.project.renderQueue.item(i);
       var comp =3D curItem.comp;
       var projectPath =3D app.project.file.fsName.toString();
       app.project.timecodeDisplayType =3D TimecodeDisplayType.FRAMES;
       var workAreaStart =3D comp.workAreaStart;
       var workAreaEnd =3D comp.workAreaDuration + workAreaStart;
       var sframe =3D timeToCurrentFormat(workAreaStart, =
comp.frameRate, false);
       var eframe =3D timeToCurrentFormat(workAreaEnd,   =
comp.frameRate, false);
       sframe =3D parseFloat(sframe);
       eframe =3D parseFloat(eframe);
       var compname      =3D comp.name;
       var jobtitle      =3D aeproj_no_ext+"."+compname;
      =20
       var tmp =3D new File("/var/tmp/rushaesubmit");
       tmp.lineFeed =3D "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 =3D tmp.absoluteURI;
           tmp.close();
           var cmd =3D "perl "+SCRIPT+" -submit \""+tmpfile+"\" > =
/dev/null 2>&1 < /dev/null &";
           var out =3D 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]
> =20
> Hello,
> =20
> We are just getting around to a formal Rush submit script launched out =
=3D
> of AE. We are on Rush 102.42a9, CS5, Mac OSX 10.6.8.
> =20
> I have found a few issues and have a few questions.
> =20
> - Leaving the OutputPath blank does not render what's setup in Queue =
as =3D
> advertised by Rush help.
> =20
> - I am looking to add some features to a simple jsx script that was =3D
> posted to this forum. The script is great at adding the project file =
and =3D
> comp name to the Rush submit window, but I'd like to add more =
features. =3D
> Are there simple examples of getting a selecting comp into the Queue =
and =3D
> setting it's output properties? Any examples/help on this front is =
much =3D
> appreciated.
> =20
> - Is there a way to add a custom menu to AE? like Nuke at the top menu =
=3D
> items?
> =20

----------------------------
Cameron Leger
the dvi group | 3D Artist / Coding
1486 Mecaslin Street NW, Atlanta, GA  30309
Phone: 404-873-6283 x 113
www.thedvigroup.com



Last Next