unreal.DaySequencePlayer

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

Bases: Object

UDaySequencePlayer is used to actually “play” a Day sequence asset at runtime.

This class keeps track of playback state and provides functions for manipulating a DaySequence while its playing.

C++ Source:

  • Plugin: DaySequence

  • Module: DaySequence

  • File: DaySequencePlayer.h

Editor Properties: (see get_editor_property/set_editor_property)

  • on_finished (OnDaySequencePlayerEvent): [Read-Write] Event triggered when the level sequence player finishes naturally (without explicitly calling stop)

  • on_pause (OnDaySequencePlayerEvent): [Read-Write] Event triggered when the level sequence player is paused

  • on_play (OnDaySequencePlayerEvent): [Read-Write] Event triggered when the level sequence player is played

  • on_play_reverse (OnDaySequencePlayerEvent): [Read-Write] Event triggered when the level sequence player is played in reverse

  • on_stop (OnDaySequencePlayerEvent): [Read-Write] Event triggered when the level sequence player is stopped

get_bound_objects(object_binding) Array[Object]

Retrieve all objects currently bound to the specified binding identifier

Parameters:

object_binding (MovieSceneObjectBindingID)

Return type:

Array[Object]

get_completion_mode_override() MovieSceneCompletionModeOverride

Get the state of the completion mode override

Return type:

MovieSceneCompletionModeOverride

get_disable_camera_cuts() bool

Set whether to disable camera cuts

Return type:

bool

get_end_time() QualifiedTime

Get the offset within the level sequence to finish playing

Return type:

QualifiedTime

get_frame_duration() int32

Get this sequence’s duration in frames

Return type:

int32

get_frame_rate() FrameRate

Get this sequence’s display rate.

Return type:

FrameRate

get_object_bindings(object) Array[MovieSceneObjectBindingID]

Get the object bindings for the requested object

Parameters:

object (Object)

Return type:

Array[MovieSceneObjectBindingID]

get_play_rate() float

Get the playback rate of this player.

Return type:

float

get_sequence() MovieSceneSequence

Access the sequence this player is playing

Returns:

the sequence currently assigned to this player

Return type:

MovieSceneSequence

get_sequence_name(add_client_info=False) str

Get the name of the sequence this player is playing

Parameters:

add_client_info (bool) – If true, add client index if running as a client

Returns:

the name of the sequence, or None if no sequence is set

Return type:

str

get_start_time() QualifiedTime

Get the offset within the level sequence to start playing

Return type:

QualifiedTime

go_to_end_and_stop() None

Go to end of the sequence and stop. Adheres to ‘When Finished’ section rules.

is_paused() bool

Check whether the sequence is paused.

Return type:

bool

is_playing() bool

Check whether the sequence is actively playing.

Return type:

bool

property on_finished: OnDaySequencePlayerEvent

[Read-Write] Event triggered when the level sequence player finishes naturally (without explicitly calling stop)

Type:

(OnDaySequencePlayerEvent)

property on_pause: OnDaySequencePlayerEvent

[Read-Write] Event triggered when the level sequence player is paused

Type:

(OnDaySequencePlayerEvent)

property on_play: OnDaySequencePlayerEvent

[Read-Write] Event triggered when the level sequence player is played

Type:

(OnDaySequencePlayerEvent)

property on_play_reverse: OnDaySequencePlayerEvent

[Read-Write] Event triggered when the level sequence player is played in reverse

Type:

(OnDaySequencePlayerEvent)

property on_stop: OnDaySequencePlayerEvent

[Read-Write] Event triggered when the level sequence player is stopped

Type:

(OnDaySequencePlayerEvent)

play() None

Start playback forwards from the current time cursor position, using the current play rate.

play_looping(num_loops=-1) None

Start playback from the current time cursor position, looping the specified number of times.

Parameters:

num_loops (int32) – The number of loops to play. -1 indicates infinite looping.

remove_weight() None

Removes a previously assigned weight

request_invalidate_binding(object_binding) None

Invalidates the given binding, forcing it to be refetched. This may be useful for some custom bindings that wish their resolution code to be called again.

Parameters:

object_binding (MovieSceneObjectBindingID)

scrub() None

Scrub playback.

set_completion_mode_override(completion_mode_override) None

Set the state of the completion mode override. Note, setting the state to force restore state will only take effect if the sequence hasn’t started playing

Parameters:

completion_mode_override (MovieSceneCompletionModeOverride)

set_disable_camera_cuts(disable_camera_cuts) None

Set whether to disable camera cuts

Parameters:

disable_camera_cuts (bool)

set_frame_range(start_frame, duration, sub_frames=0.000000) None

Set the valid play range for this sequence, determined by a starting frame number (in this sequence player’s plaback frame), and a number of frames duration

Parameters:
  • start_frame (int32) – The frame number to start playing back the sequence

  • duration (int32) – The number of frames to play

  • sub_frames (float)

set_frame_rate(frame_rate) None

Set the frame-rate that this player should play with, making all frame numbers in the specified time-space

Parameters:

frame_rate (FrameRate)

set_play_rate(play_rate) None

Set the playback rate of this player. Negative values will play the animation in reverse.

Parameters:

play_rate (float) – The new rate of playback for the animation.

set_weight(weight) None

Set a manual weight to be multiplied with all blendable elements within this sequence note:: It is recommended that a weight between 0 and 1 is supplied, though this is not enforced note:: It is recommended that either FMovieSceneSequencePlaybackSettings::DynamicWeighting should be true for this player or the asset it’s playing back should be set to enable dynamic weight to avoid undesirable behavior

Parameters:

weight (double) – The weight to suuply to all elements in this sequence

stop() None

Stop playback and move the cursor to the end (or start, for reversed playback) of the sequence.

stop_at_current_time() None

Stop playback without moving the cursor.