Needs Output

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
yuppster
Posts: 16
Joined: March 3rd, 2006, 4:01 pm

So I've got this script (below). All it does is render any comps with "qqq" in the compname to a specified folder. It's a combination of the renderNamedItems.jsx and newRenderLocations.jsx scripts that come with AE.

For some reason this script works on some computers but not others. On more than one computer it's added the files to render queue but then stops (doesn't render anything) and puts "Needs Output" under "Output to:". Works fine on my computer. Have any idea why this would behave like that?

Using CS3 on OSX.

Thanks!
Matt Kuebrich

Code: Select all

//See if we've saved a default for the composition name to use as a user prompt

var sectionName = "AE Example Scripts"; //Groups together keys into a section, stored in Prefs file
var keyName = "Render comps with this string"; //A useful way of labelling what data we've saved
var searchString = ""; //prompt that will display when dialog appears; set to nothing

if (app.settings.haveSetting(sectionName, keyName)) { //Look in the prefs file to see if settings exist
	searchString = app.settings.getSetting(sectionName, keyName); //If so, set the variable to existing
}	

//Prompt user for name or string to populate Render Queue

// searchString = prompt("What string to render?", searchString);

searchString = "qqq"

//Go through all items in Project, for all items that are compositions, see if the name string matches

if (searchString) { //If the user pressed "Cancel" searchString will be undefined
	
	app.settings.saveSetting(sectionName, keyName, searchString);
	
	searchString = searchString.toLowerCase();
	
	for (i = 1; i <= app.project.numItems; ++i) { //for/next loop goes through all Items
		var curItem = app.project.item(i);
		
		if (curItem instanceof CompItem) { //test if current item is a composition
			if (curItem.name.toLowerCase().indexOf(searchString) != -1) { //test if string exists in comp name
				app.project.renderQueue.items.add(curItem); //add item to the Render Queue
			}
		}
	}

	app.project.renderQueue.showWindow(true); //bring the RQ window to the front

}

//Prompt the user for a new folder location

var newLocation = folderGetDialog("Select a render destination...");

//Set active RQItems to render to the new location

if (newLocation) { //boolean to see if the user cancelled
	for (i = 1; i <= app.project.renderQueue.numItems; ++i) {
		var curItem = app.project.renderQueue.item(i);
		
		if (curItem.status == RQItemStatus.QUEUED) {
			for (j = 1; j <= curItem.numOutputModules; ++j) {
				var curOM = curItem.outputModule(j);
				
				var oldLocation = curOM.file;
				curOM.file = new File(newLocation.toString() + "/" + oldLocation.name);
				
				//alert(curOM.file.fsName);
			}
		}
	}
}

//render

		var myQueue = app.project.renderQueue //creates a shortcut for RQ
		
		// Call render
		myQueue.render();
nab
Posts: 203
Joined: November 29th, 2005, 3:00 am
Location: Royan
Contact:

If I recall correctly, when you send a comp to the queue for the first time, AE asks for a destination folder (via a dialog box). If these machines have never rendered any file or the output module file has never been set, I guess you would face the problem you mentionned.
yuppster
Posts: 16
Joined: March 3rd, 2006, 4:01 pm

Sorry for the delayed response. That was totally it! Didn't think about that at all. Thanks!
Post Reply