OutputModule object

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

Description

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.


Attributes

OutputModule.file

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

Description

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

Type

ExtendScript File object; read/write.


OutputModule.includeSourceXMP

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

Description

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.

Type

Boolean; read/write.


OutputModule.name

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

Description

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

Type

String; read-only.


OutputModule.postRenderAction

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

Description

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

Type

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

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

OutputModule.templates

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

Description

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

Type

Array of strings; read-only.


Methods

OutputModule.applyTemplate()

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

Description

Applies the specified existing output-module template.

Parameters

templateName A string containing the name of the template to be applied.

Returns

Nothing.


OutputModule.getSetting()

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

Example

// Get object containing string version of all current render setting
// values of render queue item 1.
// To get the values in the number format, use GetSettingsFormat.NUMBER
// as an argument.

var rqItem1_all_str = app.project.renderQueue.item(1).getSettings( GetSettingsFormat.STRING );

// Convert to JSON format so that it is human-readable.

var rqItem1_all_str_json = rqItem1_all_str.toSource();

// Get an object that contains string version of settable render setting
// values of render queue item 1.
// To get the values in the number format, use
// GetSettingsFormat.NUMBER_SETTABLE as an argument.

var rqItem1_settable_str = app.project.renderQueue.item(1).getSettings( GetSettingsFormat.STRING_SETTABLE );

// Set render queue item 2 with values that you got from render
//queue item 1.

app.project.renderQueue.item(2).setSettings( rqItem1_settable_str );

// Set render queue item 3 with values you create.

var my_renderSettings = {
   "Color Depth"       : "32 bits per channel",
   Quality             : "Best",
   Effects             : "All On",
   "Time Span Duration": "1.0",
   "Time Span Start"   : "2.0",
};
app.project.renderQueue.item(2).setSettings( my_renderSettings );

// Get object that contains all possible values of all render settings of
// render queue item 1 and convert to JSON format.

var rqItem1_spec_str = app.project.renderQueue.item(1).getSettings(GetSettingsFormat.SPEC);
var rqItem1_spec_str_json = rqItem1_spec_str.toSource();

// 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 );

// 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 );

// 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"];

// Note: there is a bug that causes OutputModule object to be invalidated after the
// output module setting is modified.
// So, you need to retrieve OMitem after you modify it.

Note

This functionality was added in After Effects 13.0 (CC 2014)

Description

Depreciated Source: https://blogs.adobe.com/creativecloud/new-changed-after-effects-cc-2014/?segment=dva

Archived version: https://web.archive.org/web/20200622100656/https://blogs.adobe.com/creativecloud/new-changed-after-effects-cc-2014/?segment=dva


OutputModule.remove()

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

Description

Removes this OutputModule object from the collection.

Parameters

None.

Returns

Nothing.


OutputModule.saveAsTemplate()

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

Description

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

Parameters

name A string containing the name of the new template.

Returns

Nothing.


OutputModule.setSetting()

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

Examples

This is the new way to change the output file path of output module 1 of render queue item 1.

// In this example, output file is routed 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_path = "~/new_output";
var new_dir = new Folder( new_path );
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 );

This is the new way to change the output file path of output module 1 of render queue item 1.

// 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);

var file_name = File.decode( om1.file.name ); // Name contains special character, such as space?
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 );

Note

This functionality was added in After Effects 13.0 (CC 2014)

See the example in OutputModule.getSetting() for more.

Description

Depreciated Source: https://blogs.adobe.com/creativecloud/new-changed-after-effects-cc-2014/?segment=dva

Archived version: https://web.archive.org/web/20200622100656/https://blogs.adobe.com/creativecloud/new-changed-after-effects-cc-2014/?segment=dva