AE ENHANCERS

Expressions/Scripts/Presets
It is currently Mon May 20, 2013 10:18 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: RENDER QUEUE SCRIPT QUESTION
PostPosted: Tue Aug 14, 2007 6:04 am 
Offline

Joined: Fri Aug 03, 2007 2:25 am
Posts: 1
Location: London
HELLO ALL

JUST A QUICK QUESTION REGARDING RENDER QUEUES AND MORE SPECIFICALLY THE 'OUTPUT TO' TAB AREA. DOES ANYONE KNOW OF A SMALL BIT OF SCRIPT THAT I CAN ADD TO THE 'OUTPUT TO' INFO THAT WILL AUTOMATICALLY CREATE A NEW FOLDER IN THE NAME OF THE QUEUED COMP, FOR EACH NEW RENDER IN SAID QUEUE.
I OFTEN HAVE TO CREATE QUITE LARGE RENDER QUEUES OF TGA SEQUENCES AND I FIND CREATING ALL THE SEPERATE FOLDERS FOR THE SEQUENCE'S TO GO IN RATHER LABOUR INTESIVE.

ANY ADVISE ON THIS WOULD BE GREAT.

THANKS


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 14, 2007 6:25 am 
Offline

Joined: Sat Jun 05, 2004 7:59 am
Posts: 645
Location: London, UK
You can't add a script to that "Output To" section. It just allows you to create a template to control the name of the render in various ways.

To automatically create new folders for each render in the queue, you'll need a regular script that you'd run from the File > Scripts menu. This post may be of some help: http://aenhancers.com/viewtopic.php?t=310


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 14, 2007 4:21 pm 
Offline

Joined: Sat Jun 05, 2004 7:59 am
Posts: 645
Location: London, UK
This script will take the existing render path for each queued render item, create a new folder at that location with the current comp name, and then set the file path for that render to inside the new folder.

Paste the code into a text/script editor, then save with a .jsx file extension into the AE Scripts folder.

If you try removing the "//" before each "alert" line in the script, it may help you understand what the script is doing. Typically I'll use lots of alerts when writing a script as it's very handy for tracking down errors.

Code:
{
   // define variables
   var thisRender, newPath, i, j;
   var renderQ = app.project.renderQueue;
   //alert("there are " + renderQ.numItems + " render queue items");
   
   // loop through each renderQueue item, checking if any are queued
   for (i = 1; i <= renderQ.numItems; ++i) {
      
      // check if the render item is queued
      if (renderQ.item(i).status == RQItemStatus.QUEUED) {
      
         // shortcut variable for render item   
         thisRender = renderQ.item(i);
         
         //alert(thisRender.comp.name + " is queued");   
         //alert("it has " + thisRender.outputModules.length + " output modules");
         
         // loop through any output modules
         for (j = 1; j <= thisRender.outputModules.length; ++j) {
         
            //alert("current path is " + thisRender.outputModule(j).file.path);
            newPath = thisRender.outputModule(j).file.path + "/" + thisRender.comp.name;
            //alert("path for new folder is " + newPath);
            
            // create a new folder
            Folder(newPath).create();
            
            newPath += "/" + thisRender.outputModule(j).file.name;
            //alert("new path for this render is " + newPath);
            
            // set the new file path
            thisRender.outputModule(j).file = new File(newPath);
            
         }   
      }
   }
}


Top
 Profile  
 
 Post subject: Re: RENDER QUEUE SCRIPT QUESTION
PostPosted: Tue Apr 26, 2011 1:56 pm 
Offline

Joined: Tue Apr 26, 2011 12:33 pm
Posts: 1
Thanks Paul, this was extremely helpful to me. I was able to modify this script to automatically place render queue items in specific folders within a file structure based on the shot code in DPX naming, without having to set any "output to" settings. This has saved me days of work. Instead of using the file.path from the render queue, I am grabbing it from my source object, then using that path to build a new file path where i want my comp to render. I think it is important to note that the name of your output is going to be whatever is after the last "/" of your newPath, and your newPath can be any path you choose. So in my case I declared a new var to create the right naming. I then create two folders, and the folder inside will be the correct naming for my render queue item. After the folders are made and AE sets the correct output name, the script then deletes the folder that is labeled (var outputName).

var outputName = fileName + ".[####].jpg"

//creates path for new folder
var newPath = (platesFolder + "/" + fileName + "_1k_jpg" + "/" + outputName);

//creates folder with name fileName_1k_jpg and create folder inside of it with proper naming for output jpeg sequence fileName.[####].jpg folder at path
Folder(newPath).create();

// forces AE to make output at end of path/ takes (var ouputName) as Name
qItem.outputModules[1].file = new File(newPath);


// declares var for folder created at end of path
var deleteFolder = Folder(newPath);

//deletes this unnecessary folder
deleteFolder.remove();




Almost four years since your post, and still extremely useful. Thank you!


Top
 Profile  
 
 Post subject: Re: RENDER QUEUE SCRIPT QUESTION
PostPosted: Thu Mar 15, 2012 8:56 am 
Offline

Joined: Mon Mar 12, 2012 9:51 am
Posts: 1
Hi, I know this is an old thread but it definitely needs to be seen! I just signed up to this website to make this post.

Thanks very much for this script. Helped loads with exporting multiple TIFF sequences into folders. Huge time saver.

Linus


Top
 Profile  
 
 Post subject: Re: RENDER QUEUE SCRIPT QUESTION
PostPosted: Wed Mar 21, 2012 4:52 pm 
Offline

Joined: Fri Jan 13, 2012 2:28 pm
Posts: 1
That little snippet of code is perfect! I had about 500 directories as well as Output modules to configure. Now, they are all done! Thanks!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: Bing [Bot] and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group