On 08/09/13 10:59, Dan Rosen wrote:
> It's all a bit simpler than you're thinking. There are saved setting
> names for Output Modules and Render Settings. Those include all the
> inner details of them. I am looking to add new ones on the fly and offer
> them up in a UI Panel. It will make the whole process of submitting a
> project or individual comps easy for the individual while offering
> control to the leads to set the standards (as always).
I see, sounds cool, a tight pipeline integration thing.
> I found some answers here:
> http://aenhancers.com/viewtopic.php?f=3D8&t=3D680
Note: I think that link got hit by the "=3D" issue talked about
previously.
I believe the link should be:
http://aenhancers.com/viewtopic.php?f=8&t=680
Quoting the relevant parts of that article below (in case it goes stale)
along with some of my comments which might or might not be useful:
* * *
> crimsonc writes:
> 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?
Paul Tuersley writes:
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:
--- snip
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)
}
--- snip
[..and separately..]
--- snip
// 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);
}
--- snip
* * *
Regarding the above link and "aehancers" article; it seems to leave
the .aom and .arl issue in the air.
However, looking at the above code, I can derive a few things which
might help..
The ".saveAsTemplate()" method shown above is documented in the
Javascript guide in the section called "OutputModule object",
which says:
--- snip
OutputModule saveAsTemplate() method
app.project.renderQueue.item(index).outputModules[index].saveAsTemplate(name)
Description
Saves this output module as a template and adds it to the templates array.
--- snip
In that same section it talks about a method called .applyTemplate(templateName)
(which "Applies an output-module template"), so that lets you apply
an existing template.
While I don't see a way to add new templates, it seems it might be
implied; the docs for the OutputModule object refers to a .templates
member which seems to contain "all template items for the output module",
and might be an array (?).
If that .templates member is an array of some kind, I would assume
you could add templates to it the way you would add to a normal array
in Javascript. In which case you could maybe then use saveAsTemplate() / applyTemplate().
Unfortunately there's not much else I could find about the .templates
member in the docs, ie. what its contents is.. perhaps you can reverse
engineer it, or search AE's own javascript code to see how it can be
manipulated. Or perhaps the SDK docs describes it better from a C++ point of view..
Anyway, just guessing.
If you're on the adobe_api mailing list, you could maybe ask for specifics.
--
Greg Ercolano, erco@(email surpressed)
Seriss Corporation
Rush Render Queue, http://seriss.com/rush/
Tel: (Tel# suppressed)ext.23
Fax: (Tel# suppressed)
Cel: (Tel# suppressed)
|