Skip to content

outputmodule

app.project.renderQueue.item(index).outputModule(index)

An OutputModule object of a RenderQueueItem generates a single file or sequence via a render operation, and contains attributes and methods relating to the file to be rendered.


app.project.renderQueue.item(index).outputModule(index).file

The Extendscript File object for the file this output module is set to render.

Extendscript File object; read/write.


app.project.renderQueue.item(index).outputModule(index).includeSourceXMP

When true, writes all source footage XMP metadata to the output file. Corresponds to the Include Source XMP Metadata option in the Output Module Settings dialog box.

Boolean; read/write.


app.project.renderQueue.item(index).outputModule(index).name

The name of the output module, as shown in the user interface.

String; read-only.


app.project.renderQueue.item(index).outputModule(index).postRenderAction

An action to be performed when the render operation is completed.

A PostRenderAction enumerated value (read/write); one of:

  • PostRenderAction.NONE
  • PostRenderAction.IMPORT
  • PostRenderAction.IMPORT_AND_REPLACE_USAGE
  • PostRenderAction.SET_PROXY

app.project.renderQueue.item(index).outputModule(index).templates

The names of all output-module templates available in the local installation of After Effects.

Array of strings; read-only.


app.project.renderQueue.item(index).outputModule(index).applyTemplate(templateName)

Applies the specified existing output-module template.

ParameterTypeDescription
templateNameStringThe name of the template to be applied.

Nothing.


app.project.renderQueue.item(index).outputModule(index).getSetting()

Gets a specific setting for a given Output Module.

See the example in RenderQueueItem.getSetting() for structure reference.


app.project.renderQueue.item(index).outputModule(index).getSettings()

Gets all settings for a given Output Module.

// Get object that contains the string version of all current output module setting
// values of output module item 1 from render queue item 1.
// To get the values in the number format, use GetSettingsFormat.NUMBER as an argument.
var omItem1_all_str= app.project.renderQueue.item(1).outputModule(1).getSettings( GetSettingsFormat.STRING );
// Convert to JSON format so that it is human-readable.
var omItem1_all_str_json = omItem1_all_str.toSource();
// Get object that contains string version of settable output module setting values
// of output module item 1 from render queue item 1.
// If you want to get the values in the number format, use
// GetSettingsFormat.NUMBER_SETTABLE as an argument.
var omItem1_settable_str = app.project.renderQueue.item(1).outputModule(1).getSettings( GetSettingsFormat.STRING_SETTABLE );
// Currently, the format setting in the output module is not settable, but it
// is readable. The next line will tell you the current format of output module
// item 1 from render queue item 1.
var current_format = app.project.renderQueue.item(1).outputModule(1).getSettings(GetSettingsFormat.STRING).Format;
// This line will tell you the output module file info.
var current_omFileTempalte = app.project.renderQueue.item(1).outputModule(1).getSettings(GetSettingsFormat.STRING)["Output File Info"]["File Template"];

app.project.renderQueue.item(index).outputModule(index).remove()

Removes this OutputModule object from the collection.

None.

Nothing.


app.project.renderQueue.item(index).outputModule(index).saveAsTemplate(name)

Saves this output module as a template and adds it to the te mpl ate s array.

ParameterTypeDescription
nameStringThe name of the new template.

Nothing.


app.project.renderQueue.item(index).outputModule(index).setSetting()

Sets a specific setting for a given Output Module.

See the example in RenderQueueItem.setSetting() for structure reference.


app.project.renderQueue.item(index).outputModule(index).setSettings()

There is a bug that causes OutputModule object to be invalidated after the output module setting is modified, so you need to retrieve the Output Module again after you modify it.

Get the settings from one item’s output module and use them on another:

// If you want to get the values in the number format, use
// GetSettingsFormat.NUMBER_SETTABLE as an argument.
var omItem1_settable_str = app.project.renderQueue.item(1).outputModule(1).getSettings( GetSettingsFormat.STRING_SETTABLE );
// Set output module item 1 of render queue item 2 with values that you get from
// output module 1 of render queue item 1
app.project.renderQueue.item(2).outputModule(1).setSettings( omItem1_settable_str );

Set output module item 1 of render queue item 3 with values that you create:

var crop_data = {
"Crop": true,
"Crop Bottom": 0,
"Crop Left": 0,
"Crop Right": 8,
"Crop Top": 10
};
app.project.renderQueue.item(1).outputModule(3).setSettings( crop_data );

Route the output file to the user directory:

var om1 = app.project.renderQueue.item(1).outputModule(1);
var file_name = File.decode( om1.file.name ); // Name contains special character, space?
var new_dir = new Folder( "~/new_output" );
var new_path = new_dir.fsName;
var new_data = {
"Output File Info": {
"Base Path": new_path,
"Subfolder Path": "draft",
"File Name": file_name
}
};
om1.setSettings( new_data );

In this example, the output file is routed to the user directory, but this time using the full path:

var om1 = app.project.renderQueue.item(1).outputModule(1);
// Name contains special character, such as space?
var file_name = File.decode( om1.file.name );
var new_path = "/Users/myAccount/new_output";
var separator = "/";
if ($.os.indexOf("Mac") == -1) {
new_path = "C:\Users\myAccount\new_output";
separator = "\\";
}
var new_data = {
"Output File Info": {
"Full Flat Path": new_path + separator + file_name
}
};
om1.setSettings( new_data );