unreal.UserDefinedImageCaptureProtocol

class unreal.UserDefinedImageCaptureProtocol(outer=None, name='None')

Bases: unreal.UserDefinedCaptureProtocol

A blueprintable capture protocol tailored to capturing and exporting frames as images

C++ Source:

  • Module: MovieSceneCapture

  • File: UserDefinedCaptureProtocol.h

Editor Properties: (see get_editor_property/set_editor_property)

  • compression_quality (int32): [Read-Write] The compression quality for the image type. For EXRs, 0 = Default ZIP compression, 1 = No compression, PNGs and JPEGs expect a value between 0 and 100

  • enable_compression (bool): [Read-Write] Whether to save images with compression or not. Not supported for bitmaps.

  • format (DesiredImageFormat): [Read-Write] The image format to save as

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

property compression_quality

[Read-Write] The compression quality for the image type. For EXRs, 0 = Default ZIP compression, 1 = No compression, PNGs and JPEGs expect a value between 0 and 100

Type

(int32)

property enable_compression

[Read-Write] Whether to save images with compression or not. Not supported for bitmaps.

Type

(bool)

property format

[Read-Write] The image format to save as

Type

(DesiredImageFormat)

generate_filename_for_buffer(buffer, stream_id)str
  • Generate a filename for the specified buffer using this protocol’s file name formatter

Parameters
  • buffer (Texture) – The desired buffer to generate a filename for *

  • stream_id (CapturedPixelsID) – The ID of the stream for this buffer (e.g. a composition pass name) *

Returns

A fully qualified file name

Return type

str

generate_filename_for_current_frame()str
  • Generate a filename for the current frame using this protocol’s file name formatter

Returns

A fully qualified file name for the current frame number

Return type

str

write_image_to_disk(pixel_data, stream_id, frame_metrics, copy_image_data=False)None
  • Generate a filename for the current frame using this protocol’s file name formatter

Parameters
Returns

A fully qualified file name for the current frame number