UMovieSceneCapture

Class responsible for capturing scene data

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

MovieSceneCapture

Header

/Engine/Source/Runtime/MovieSceneCapture/Public/MovieSceneCapture.h

Include

#include "MovieSceneCapture.h"

Syntax

class UMovieSceneCapture :
    public UObject,
    public IMovieSceneCaptureInterface,
    public ICaptureProtocolHost

Remarks

Class responsible for capturing scene data

Variables

Name Description

Public variable

FString

 

AdditionalCommandLineArguments

Additional command line arguments to pass to the external process when capturing

Public variable

TObjectPtr< UMo...

 

AudioCaptureProtocol

Public variable

FSoftClassPath

 

AudioCaptureProtocolType

The type of capture protocol to use for audio data.

Protected variable

bool

 

bCapturing

Whether we have started capturing or not

Public variable

bool

 

bCloseEditorWhenCaptureStarts

When enabled, the editor will shutdown when the capture starts

Protected variable

bool

 

bFinalizeWhenReady

Whether we should automatically attempt to capture frames every tick or not

Protected variable

bool

 

bIsAudioCapturePass

If we're currently doing an audio pass or not

Public variable

bool

 

bUseSeparateProcess

Whether to capture the movie in a separate process or not

Protected variable

FCachedMetrics

 

CachedMetrics

Cached metrics for this capture operation

Protected variable

Scalability::FQ...

 

CachedQualityLevels

Cached quality levels

Protected variable

TSharedPtr< ICa...

 

CaptureStrategy

Strategy used for capture (real-time/fixed-time-step)

Protected variable

TMap< FString, ...

 

FormatMappings

Format mappings used for generating filenames

Protected variable

int32

 

FrameNumberOffset

Frame number index offset when saving out frames.

Protected variable

FMovieSceneCapt...

 

Handle

Our unique handle, used for external representation without having to link to the MovieSceneCapture module

Public variable

TObjectPtr< UMo...

 

ImageCaptureProtocol

Capture protocol responsible for actually capturing frame data

Public variable

FSoftClassPath

 

ImageCaptureProtocolType

The type of capture protocol to use for image data

Public variable

FString

 

InheritedCommandLineArguments

Command line arguments inherited from this process

Protected variable

TOptional< FCap...

 

InitSettings

The settings we will use to set up the capture protocol

Protected variable

FOnCaptureFinis...

 

OnCaptureFinishedDelegate

Event that is triggered when capturing has finished

Public variable

FMovieSceneCapt...

 

Settings

Settings that define how to capture

Constructors

Name Description

Public function

UMovieSceneCapture

(
    const FObjectInitializer& Initiali...
)

Functions

Name Description

Protected function Virtual Const

void

 

AddFormatMappings

(
    TMap< FString, FStringFormatArg >&...,
    const FFrameMetrics& FrameMetrics
)

Add additional format mappings to be used when generating filenames

Public function

void

 

CaptureThisFrame

(
    float DeltaSeconds
)

Indicate that this frame should be captured - must be called before the movie scene capture is ticked

Protected function Virtual

void

 

DeserializeAdditionalJson

(
    const FJsonObject& Object
)

Custom, additional json deserialization

Public function

void

 

DeserializeJson

(
    const FJsonObject& Object
)

Deserialize additional json data for this capture

Public function

void

 

Finalize()

Finalize the capturing process, assumes all frames have been processed.

Public function

void

 

FinalizeWhenReady()

Automatically finalizes the capture when all currently pending frames are dealt with

Protected function

void

 

ForciblyReinitializeCaptureProtocols()

Public function

UMovieSceneC...

 

GetAudioCaptureProtocol()

Public function

UMovieSceneC...

 

GetImageCaptureProtocol()

Access the capture protocol we are using

Public function Const

const FCache...

 

GetMetrics()

Access this object's cached metrics

Protected function

void

 

InitializeCaptureProtocols()

Initialize the settings structure for the current capture type

Protected function Virtual Const

bool

 

IsAudioPassIfNeeded()

Returns true if this is currently the audio pass, or if an audio pass is not needed.

Public function Virtual

void

 

LoadFromConfig()

Load save from config helpers

Public function

FOnCaptureFi...

 

OnCaptureFinished()

Protected function Virtual

void

 

OnTick

(
    float DeltaSeconds
)

Called at the end of a frame, before a frame is presented by slate

Public function Virtual

void

 

SaveToConfig()

Protected function Virtual

void

 

SerializeAdditionalJson

(
    FJsonObject& Object
)

Custom, additional json serialization

Public function

void

 

SerializeJson

(
    FJsonObject& Object
)

Serialize additional json data for this capture

Public function

void

 

SetAudioCaptureProtocolType

Public function

void

 

SetImageCaptureProtocolType

Public function Const

bool

 

ShouldFinalize()

Check whether we should automatically finalize this capture

Public function

void

 

StartCapture()

Initialize the capture so that it is able to start capturing frames

Public function

void

 

StartWarmup()

Starts warming up.

Public function

void

 

Tick

(
    float DeltaSeconds
)

Called at the end of a frame, before a frame is presented by slate

Overridden from UObject

Name Description

Protected function Virtual

void

 

PostEditChangeProperty

(
    FPropertyChangedEvent& PropertyCha...
)

Called when a property on this object has been modified externally

Public function Virtual

void

 

PostInitProperties()

Called after the C++ constructor and after the properties have been initialized, including those loaded from config.

Overridden from IMovieSceneCaptureInterface

Name Description

Public function Virtual

void

 

Close()

Shut down this movie capture

Public function Virtual Const

const int32

 

GetFrameNumberOffset()

Access Frame Number Offset

Public function Virtual Const

FMovieSceneC...

 

GetHandle()

Get a unique handle to this object

Public function Virtual Const

const FMovie...

 

GetSettings()

Access specific movie scene capture settings

Public function Virtual

void

 

Initialize

(
    TSharedPtr< FSceneViewport > Viewpo...,
    int32 PIEInstance
)

Initialize this capture object by binding it to the specified viewport

Public function Virtual

void

 

StartCapturing()

Instruct this capture to start capturing frames

Overridden from ICaptureProtocolHost

Name Description

Public function Virtual Const

FFrameRate

 

GetCaptureFrameRate()

Get the capture frequency

Public function Virtual Const

const ICaptu...

 

GetCaptureStrategy()

Access the host's capture strategy

Public function Virtual Const

double

 

GetEstimatedCaptureDurationSeconds()

Estimate how long our duration is going to be for pre-allocation purposes.

Public function Virtual Const

FString

 

ResolveFileFormat

(
    const FString& Format,
    const FFrameMetrics& FrameMetrics
)

Resolve the specified format using the user supplied formatting rules.

Classes

Name

Description

Public class

FOnCaptureFinished

Event that is fired after we've finished capturing

Constants

Name

Description

MovieSceneCaptureUIName

This name is used by the UI to save/load a specific instance of the settings from config that doesn't affect the CDO which would affect scripting environments.