Loading Output Modules and Render Settings with a script

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
crimsonc
Posts: 5
Joined: May 7th, 2007, 4:39 pm

Wondering if anyone out there had found a way to load Output Modules and Render Settings using a script. Since I can't create them myself, I'm figuring I can just output the ones that I want to a file and then have AfterFX load that file in at render time. So does anyone know how to load ars and aom settings files using the scripting language?

thanks

jesse
Mylenium
Posts: 139
Joined: July 20th, 2005, 12:07 am

crimsonc wrote:Wondering if anyone out there had found a way to load Output Modules and Render Settings using a script. Since I can't create them myself, I'm figuring I can just output the ones that I want to a file and then have AfterFX load that file in at render time. So does anyone know how to load ars and aom settings files using the scripting language?

thanks

jesse
You can't. Render settings and Output module templates have to exist in the local install of AE. You can only reference existing templates and modules and manage them on the render queue. However, I believe you can add a dummy entry and then tweak its parameters. This was discussed somewhere here on this forum and I think Jeff Almasol came up with a workaround.

Mylenium
[Pour Mylène, ange sur terre]
crimsonc
Posts: 5
Joined: May 7th, 2007, 4:39 pm

Been trying to find this with searching and haven't had any luck. Do you know what Jeff's username is, so I can search for that? thanks

jesse
Paul Tuersley
Posts: 704
Joined: June 5th, 2004, 7:59 am
Location: London, UK

I did this by importing a project that contained the render templates in the render queue and saving them if they didn't already exist in this copy of AE. Here are some snippets of code:

Code: Select all

	function checkRQsettings(testRQ)
	{	// check if render settings and output modules are present

		// check that there are Cineon and 1k/avid templates
		for (var i = 0; i < testRQ.templates.length; ++i) {
			tempName = testRQ.templates[i];
			if (tempName == cineonSettingName) {
				hasCineonSetting = true;
			} else {
				if (tempName == quicktimeSettingName) {
					hasQuicktimeSetting = true;
				}
			}
		}

		// check if output modules are present
		for (i = 0; i < testRQ.outputModules[1].templates.length; ++i) {
			tempName = testRQ.outputModules[1].templates[i];
			if (tempName == oneKayModuleName) {
				hasOneKayModule = true;
			} else {
				if (tempName == avidModuleName) {
					hasAvidModule = true;
				} else {	
					if (tempName == cineonModuleName) {
						hasCineonModule = true;
					} else {
						if (tempName == HDQTModuleName) {
							hasHDQTModule = true;
						}
					}
				}
			}			
		}

		if (hasCineonSetting && hasQuicktimeSetting && hasCineonModule && hasOneKayModule && hasAvidModule && hasHDQTModule) {
			hasTemplates = true;
		}
	return(hasTemplates)
	}

Code: Select all

// Identify the two new items added to RQ on project import.
cineonRQ = app.project.renderQueue.item(app.project.renderQueue.numItems -1);
quicktimeRQ = app.project.renderQueue.item(app.project.renderQueue.numItems)

var cineonOM = cineonRQ.outputModules[1];
var oneKayOM = quicktimeRQ.outputModules[1];
var avidOM = quicktimeRQ.outputModules[2];
var HDQTOM = quicktimeRQ.outputModules[3];

// if Cineon render setting is missing, save template
if (hasCineonSetting == false) {
	cineonRQ.saveAsTemplate(cineonSettingName);
}

// if Cineon output module is missing, save template
if (hasCineonModule == false) {
	cineonRQ.outputModules[1].saveAsTemplate(cineonModuleName);
}
crimsonc
Posts: 5
Joined: May 7th, 2007, 4:39 pm

yeah, I saw your post on doing this. It is the best and most clever solution I've found yet. There is something extremely hacky about doing it this way, which upsets me (not a knock on you).

The real problem with it is that you have to define the settings and the scripts ahead of time. So if you need to add a new preset, you have to make a new scene and a new script to deal with it. You could probably somehow make it able to handle things generically, but then it becomes harder to ensure that names are unique and handled correctly.

Now it is pretty clear that I can do almost all of this through the API and at worst case I'm going to write some plugins to do most, if not all of this. I'll just write a couple AEGPs to handle all this. Anyone know if there is a way to actually load aom and ars files through the API or am I going to have to make my own formats.
luigiblues
Posts: 4
Joined: February 11th, 2008, 5:03 am

I know that this is a super old thread, but I wanted to give a shout out to Paul Tuersley for the awesome post. Was struggling with this very problem for a while. Saving the renderSettings and outputModule templates in the ae file I'm sourcing to make the rest in our pipeline is a great work around.

Is this problem fixed in CS3? Does anyone know?

-luigi
Post Reply