Code: Select all
executeCommand(app.findMenuCommandId("Add Output Module"));
Code: Select all
curItem.outputModule(2).applyTemplate(templateName);
Code: Select all
OMCollection.add()
Moderator: Paul Tuersley
Code: Select all
executeCommand(app.findMenuCommandId("Add Output Module"));
Code: Select all
curItem.outputModule(2).applyTemplate(templateName);
Code: Select all
OMCollection.add()
Code: Select all
{
var activeItem = app.project.activeItem;
// make sure a comp is selected
if (activeItem != null && activeItem instanceof CompItem) {
// if there is one, grab the first existing render queue item
if (app.project.renderQueue.numItems != 0) {
var RQitem = app.project.renderQueue.item(1);
} else {
// othewise create a new one from the selected comp
var RQitem = app.project.renderQueue.items.add(activeItem);
}
// grab the first output module
var OMitem1 = RQitem.outputModules[1];
// if there is only one output module, add another one
if (RQitem.outputModules.length > 1) {
var OMitem2 = RQitem.outputModules[2];
} else {
var OMitem2 = RQitem.outputModules.add();
}
// apply templates
RQitem.applyTemplate("Draft Settings");
OMitem1.applyTemplate("Photoshop");
OMitem2.applyTemplate("Alpha Only");
}
}
Code: Select all
{
var activeItem = app.project.activeItem;
// make sure a comp is selected
if (activeItem != null && activeItem instanceof CompItem) {
// if there is one, grab the first existing render queue item
if (app.project.renderQueue.numItems != 0) {
var existingRQ = app.project.renderQueue.numItems;
for (a = 1; a <= existingRQ; a++) {
var curItem = app.project.renderQueue.item(a);
if (curItem.status == RQItemStatus.QUEUED) {
// if there is only one output module, add another one
if (curItem.outputModules.length > 1) {
var OMitem2 = curItem.outputModules[2];
} else {
var OMitem2 = curItem.outputModules.add();
}
var OMitem1 = curItem.outputModules[1];
// apply templates
curItem.applyTemplate("Best Settings");
OMitem1.applyTemplate("RGB");
OMitem2.applyTemplate("Alpha Only");
}
}
}
}
}