Changing the 'Output to' setting...

What type of scripts do you need?

Moderator: byronnash

Post Reply
bohdi
Posts: 6
Joined: October 3rd, 2005, 4:26 pm

November 3rd, 2005, 6:56 pm

Working on my script that creates comps from frame sequences, sends the comps to the render queue, sets the output module to a preset for all comps in the render queue, and sets the output destination via a pop up dialog box that asks for a destination directory. The thing I'm trying to figure out is if After Effects scripting can created a new folder for each element being rendered in the render queue. In other words, I have comps by the name of Comp01.1-100.tiff, Comp02.1-100.tiff, Comp03.1-100.tiff, and I want them to be rendered as tiff sequences to directory '/Show/Posting/Tiff_Sequences/' (which already exists) and then create a folder for each element:

/Show/Posting/Tiff_Sequences/Comp01/
/Show/Posting/Tiff_Sequences/Comp02/

And then have the elements be rendered into their respective folders. I'm guessing this could be done with the Folder() or new Folder() method?

Thanks for any suggestions and help!
byronnash
Posts: 321
Joined: July 7th, 2004, 2:30 pm
Location: Charlotte, NC
Contact:

November 4th, 2005, 7:33 am

Take a look at this post. I haven't tried this but it may do what you need.
http://aenhancers.com/viewtopic.php?t= ... ght=folder
Paul Tuersley
Posts: 704
Joined: June 5th, 2004, 7:59 am
Location: London, UK

November 4th, 2005, 10:01 am

Here's a small bit of code from our in-house film out script, hopefully it'll point you in the right direction. It creates a folder with the shot name and another inside with the shot resolution, then sets the output name and path.

Code: Select all

// add to render queue
cineonRQ = app.project.renderQueue.items.add(twoKayComp);

// grab the output module
var cineonOM = cineonRQ.outputModules[1];

// apply templates
cineonRQ.applyTemplate(cineonSettingName);
cineonOM.applyTemplate(cineonModuleName);

// CREATE FILE PATH/NAME FOR CINEON OUTPUT MODULE
// assumes project file is in "Data" folder alongside "Comps" folder
projectPath = app.project.file.toString();
var projectPathParent = projectPath.substring(0, projectPath.lastIndexOf("Data"));
newPath = projectPathParent + "Comps" + "/" + shotName + "_" + shotVersionString;
Folder(newPath).create();
newPath += "/2048x1556";
Folder(newPath).create();
	
// APPLY NEW PATH/NAME
newPath += "/" + shotName + "_" + shotVersionString + ".\[####\].cin";
cineonOM.file = new File(newPath);
teedoubleyou
Posts: 6
Joined: December 12th, 2005, 5:29 am

January 10th, 2006, 3:45 am

Thanks for that tip btw.

I just looked it up, and although I didn't use the same method, it helped me understand how the file OM works.
Post Reply