Page 1 of 1

Changing the 'Output to' setting...

Posted: November 3rd, 2005, 6:56 pm
by bohdi
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!

Posted: November 4th, 2005, 7:33 am
by byronnash
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

Posted: November 4th, 2005, 10:01 am
by Paul Tuersley
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);

Posted: January 10th, 2006, 3:45 am
by teedoubleyou
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.