unreal.UserDefinedCaptureProtocol

class unreal.UserDefinedCaptureProtocol(outer: Object | None = None, name: Name | str = 'None')

Bases: MovieSceneImageCaptureProtocolBase

A blueprintable capture protocol that defines how to capture frames from the engine

C++ Source:

  • Module: MovieSceneCapture

  • File: UserDefinedCaptureProtocol.h

Editor Properties: (see get_editor_property/set_editor_property)

  • world (World): [Read-Write] World pointer assigned on Setup

generate_filename(frame_metrics) str

Generate a filename for the current frame

Parameters:

frame_metrics (FrameMetrics) –

Return type:

str

get_current_frame_metrics() FrameMetrics

Access this protocol’s current frame metrics

Return type:

FrameMetrics

on_begin_finalize() None

Called when this protocol is going to be shut down - should not capture any more frames

on_can_finalize() bool

Called to check whether this protocol has finished any pending tasks, and can now be shut down

Return type:

bool

on_capture_frame() None

Called when this protocol should capture the current frame

on_finalize() None

Called to complete finalization of this protocol

on_pause_capture() None

Called when this protocol should temporarily stop capturing frames

on_pixels_received(pixels, id, frame_metrics) None

Called when pixels have been received for the specified stream name

Parameters:
on_pre_tick() None

Called before the capture process itself is ticked, before each frame is set up for capture Useful for any pre-frame set up or resetting the previous frame’s state

on_setup() bool

Called once at the start of the capture process, but before any warmup frames

Returns:

true if this protocol set up successfully, false otherwise

Return type:

bool

on_start_capture() None

Called when this protocol should start capturing frames

on_tick() None

Called after the capture process itself is ticked, after the frame is set up for capture, but before most actors have ticked

on_warm_up() None

Called when the capture process is warming up. Protocols may transition from either an initialized, or capturing state to warm-up

resolve_buffer(buffer, buffer_id) None
  • Resolve the specified buffer and pass it directly to the specified handler when done (does not pass to any bound streams)

Parameters:
  • buffer (Texture) – The desired buffer to save *

  • buffer_id (CapturedPixelsID) – The ID of this buffer that is passed to the pixel handler (e.g. a composition pass name).

start_capturing_final_pixels(stream_id) None

Instruct this protocol to start capturing LDR final pixels (including slate widgets and burn-ins)

Parameters:

stream_id (CapturedPixelsID) – The identifier to use for the final pixels buffer

stop_capturing_final_pixels() None

Instruct this protocol to stop capturing LDR final pixels

property world: World

[Read-Only] World pointer assigned on Setup

Type:

(World)