Output module
OutputModule
¶
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.
Example
See: https://ae-scripting.docsforadobe.dev/renderqueue/outputmodule/
Attributes¶
file
¶
file: str
The full path for the file this output module is set to render.
Resolves template variables like [compName], [width], [frameRate],
etc. to their actual values based on the composition and render settings.
Read / Write.
file_template
¶
file_template: str
The raw file path template, may contain [compName] and
[fileExtension] variables. Read / Write.
format_options
¶
format_options: (
CineonFormatOptions
| JpegFormatOptions
| OpenExrFormatOptions
| PngFormatOptions
| TargaFormatOptions
| TiffFormatOptions
| XmlFormatOptions
| None
)
Format-specific render options for this output module. The concrete type depends on the output format:
- CineonFormatOptions for Cineon/DPX sequences
- JpegFormatOptions for JPEG sequences
- OpenExrFormatOptions for OpenEXR sequences
- PngFormatOptions for PNG sequences
- TargaFormatOptions for Targa sequences
- TiffFormatOptions for TIFF sequences
- XmlFormatOptions for XML-based formats (AVI, H.264, MP3, QuickTime, WAV)
Nonefor formats without parsed format options
Read-only.
include_source_xmp
¶
When True, writes all source footage XMP metadata to the output file.
Read / Write.
output_color_space
¶
output_color_space: str
The output color space (Output Module Settings > Color Management). Read / Write.
Reading returns the name of an Adobe ICC profile (e.g. "ARRI LogC3
Wide Color Gamut - EI 800"), the OCIO color-space name (reverse-mapped
from the id via the project's OCIO configuration), or - when set to the
working color space - the project's working-space name (mirroring AE).
Writable as "Working Color Space", a catalogued Adobe ICC profile name
(Adobe CMS mode; the 16-byte profile ID is written, no ICC bytes needed),
or - in OCIO mode - any color space, role, alias, or display/view pair
of the project's OCIO configuration (the 16-byte id is computed from the
config; see [ocio_output_profile_id][py_aep.color.ocio.ocio_output_profile_id]).
Note
Not exposed in ExtendScript.
parent
¶
parent: RenderQueueItem
Reference to parent RenderQueueItem, used for resolving file paths and accessing comp and render settings. Read-only.
post_render_action
¶
post_render_action = enum(
PostRenderAction, "_om_ldat", "post_render_action"
)
An action to perform when rendering is complete. Read / Write.
post_render_target_comp
¶
post_render_target_comp: CompItem
The CompItem to use for post-render actions that require a comp.
Only used when post_render_action is IMPORT_AND_REPLACE or
SET_PROXY. Read-only.
settings
¶
[SettingsView][py_aep.models.settings.SettingsView] dict with
ExtendScript-compatible keys. Includes "Video Output",
"Audio Bit Depth", "Preserve RGB", "Convert to Linear Light",
etc. Matches the format from
OutputModule.get_settings(GetSettingsFormat.NUMBER).
templates
¶
Available output module template names.
Requires ae_preferences_dir to have been passed to parse().
Returns an empty list if no preferences directory was provided.
Functions¶
apply_template
¶
apply_template(name: str) -> None
Apply an output module template by name.
Copies the template's settings (channels, resize, crop, audio, post-render action, etc.) and format info (Rouu data) to this output module.
The format_options object is rebuilt for the new format:
references held to the previous one are stale afterwards -
re-fetch om.format_options.
Requires ae_preferences_dir to have been passed to parse().
Parameters:
-
name(str) –Template name (e.g.
"Lossless","H.264 - Match Render Settings - 15 Mbps").
Raises:
-
ValueError–If the template name is not found.
batch_edit
¶
batch_edit() -> Iterator[OutputModule]
Edit several coupled settings as one transaction.
Inside the block, per-write format validation and clamps are
deferred, so coupled settings can be written in any order. On
exit the final state is validated as a whole: any violation (or
an exception in the block) rolls the module back to its state at
entry and raises a single ValueError listing every violation.
Covers the output-module settings, the format header (Rouu)
and the format options (Ropt + PNG HDR10 sidecar). File path
and module name writes are not rolled back. References held to
format_options across a failed batch are stale - re-fetch.
Nested batches are reentrant; the outermost one validates.
get_setting
¶
get_setting(
key: str, format: GetSettingsFormat = STRING
) -> Any
Return a single output module setting in the specified format.
Parameters:
-
key(str) –The setting key (e.g.
"Video Output","Audio Bit Depth"). -
format(GetSettingsFormat, default:STRING) –The output format.
get_settings
¶
get_settings(
format: GetSettingsFormat = STRING,
) -> dict[str, Any]
Return output module settings in the specified format.
Parameters:
-
format(GetSettingsFormat, default:STRING) –The output format.
GetSettingsFormat.NUMBERreturns numeric values (enums unwrapped to ints).GetSettingsFormat.STRINGreturns all values as strings
remove
¶
Remove this output module from the render queue item.
Raises:
-
RuntimeError–If this is the last output module (AE requires at least one).
validate_state
¶
Check every rule-covered setting against the current context.
Returns a list of (key, value, allowed) violations (empty when
the state is consistent). Used by batch_edit on exit and by the
corpus self-validation test; also useful to lint a parsed file.
Stale-by-design values are skipped: settings of a disabled audio/video stream, absent format-option params, and raw fallbacks from out-of-enum stored bytes (the binary is trusted).