CaptureExtension#

class omni.kit.capture.viewport.CaptureExtension#

Bases: IExt

CaptureExtension provides a capture framework that manages the lifecycle of capturing viewport or application content. This extension is responsible for initializing capture options, preparing the capture environment, including folder structures and rendering configurations, and controlling the overall capture process from startup to shutdown. It supports various capture modes, such as single frame, sequence, and video capture, and it integrates with the rendering subsystem and timeline management to accurately record frame data. The extension can handle different rendering presets and dynamically adjust settings based on the capture configuration while ensuring that previous state settings are restored once the capture is complete.

Example

capture_ext = CaptureExtension()
if capture_ext.start():
    print('Capture started successfully')

Methods

cancel()

Cancels the ongoing capture process.

get_instance()

Gets the current instance of the capture extension.

get_outputs([validate])

Gets output file names from the completed capture.

on_shutdown()

Handles shutdown for the capture extension and cleans up resources.

on_startup()

Initializes the capture extension on startup and sets up capture resources.

pause()

Pauses the ongoing capture if it is currently capturing.

resume()

Resumes the paused capture process.

start()

Starts the capture process.

Attributes

capture_finished_fn

Gets the capture finished callback function.

done

Gets whether the capture has finished.

forward_one_frame_fn

Gets the function to forward one frame.

options

Gets the current capture options.

progress

Gets the current capture progress.

progress_update_fn

Gets the progress update function.

show_default_progress_window

Gets whether the default progress window is shown.

__init__(self: omni.ext._extensions.IExt) None#
class ReshadeUpdateState#

Bases: object

Represents the state of the reshade update process during capture operations.

This enumeration defines the internal stages used by the capture system to manage when and how reshade settings are applied. The states indicate whether reshade adjustments are to be applied before the capture (PRE_CAPTURE), immediately after the capture (POST_CAPTURE), or when post-capture processing is complete and the system is ready for further operations (POST_CAPTURE_READY).

This enum is intended for internal use in coordinating reshade transitions during the capture workflow to ensure that reshade settings are synchronized with frame capture events and that image quality is maintained throughout the process.

cancel()#

Cancels the ongoing capture process.

static get_instance()#

Gets the current instance of the capture extension.

Returns:

The current capture extension instance.

Return type:

CaptureExtension

get_outputs(
validate: bool = True,
) List[str]#

Gets output file names from the completed capture.

Returns:

List of output file names generated during capture.

Return type:

List[str]

on_shutdown()#

Handles shutdown for the capture extension and cleans up resources.

on_startup()#

Initializes the capture extension on startup and sets up capture resources.

pause()#

Pauses the ongoing capture if it is currently capturing.

resume()#

Resumes the paused capture process.

start() bool#

Starts the capture process.

Returns:

True if capture started successfully, False otherwise.

Return type:

bool

property capture_finished_fn#

Gets the capture finished callback function.

Returns:

The callback function executed upon capture completion.

Return type:

Callable

property done: bool#

Gets whether the capture has finished.

Returns:

True if capture is finished, otherwise False.

Return type:

bool

property forward_one_frame_fn#

Gets the function to forward one frame.

Returns:

The callback function used to forward one frame.

Return type:

Callable

property options#

Gets the current capture options.

Returns:

The current capture options.

Return type:

CaptureOptions

property progress#

Gets the current capture progress.

Returns:

Current capture progress.

Return type:

CaptureProgress

property progress_update_fn#

Gets the progress update function.

Returns:

The callback function used for progress updates.

Return type:

Callable

property show_default_progress_window#

Gets whether the default progress window is shown.

Returns:

True if the default progress window is shown, otherwise False.

Return type:

bool