unreal.TimelineComponent

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

Bases: ActorComponent

TimelineComponent holds a series of events, floats, vectors or colors with associated keyframes. Events can be triggered at keyframes along the timeline. Floats, vectors, and colors are interpolated between keyframes along the timeline.

C++ Source:

  • Module: Engine

  • File: TimelineComponent.h

Editor Properties: (see get_editor_property/set_editor_property)

  • asset_user_data (Array[AssetUserData]): [Read-Write] Array of user data stored with the component

  • asset_user_data_editor_only (Array[AssetUserData]): [Read-Write] Array of user data stored with the component

  • auto_activate (bool): [Read-Write] Whether the component is activated at creation or must be explicitly activated.

  • can_ever_affect_navigation (bool): [Read-Write] Whether this component can potentially influence navigation

  • component_tags (Array[Name]): [Read-Write] Array of tags that can be used for grouping and categorizing. Can also be accessed from scripting.

  • editable_when_inherited (bool): [Read-Write] True if this component can be modified when it was inherited from a parent actor class

  • is_editor_only (bool): [Read-Write] If true, the component will be excluded from non-editor builds

  • on_component_activated (ActorComponentActivatedSignature): [Read-Write] Called when the component has been activated, with parameter indicating if it was from a reset

  • on_component_deactivated (ActorComponentDeactivateSignature): [Read-Write] Called when the component has been deactivated

  • primary_component_tick (ActorComponentTickFunction): [Read-Write] Main tick function for the Component

  • replicate_using_registered_sub_object_list (bool): [Read-Write] When true the replication system will only replicate the registered subobjects list When false the replication system will instead call the virtual ReplicateSubObjects() function where the subobjects need to be manually replicated.

  • replicates (bool): [Read-Write] Is this component currently replicating? Should the network code consider it for replication? Owning Actor must be replicating first!

add_event(time, event_func) None

Add a callback event to the timeline

Parameters:
add_interp_float(float_curve, interp_func, property_name='None', track_name='None') None

Add a float interpolation to the timeline

Parameters:
add_interp_linear_color(linear_color_curve, interp_func, property_name='None', track_name='None') None

Add a linear color interpolation to the timeline

Parameters:
add_interp_vector(vector_curve, interp_func, property_name='None', track_name='None') None

Add a vector interpolation to the timeline

Parameters:
get_ignore_time_dilation() bool

Get whether to ignore time dilation.

Return type:

bool

get_play_rate() float

Get the current play rate for this timeline

Return type:

float

get_playback_position() float

Get the current playback position of the Timeline

Return type:

float

get_scaled_timeline_length() float

Get length of the timeline divided by the play rate

Return type:

float

get_timeline_length() float

Get length of the timeline

Return type:

float

is_looping() bool

Get whether we are looping or not

Return type:

bool

is_playing() bool

Get whether this timeline is playing or not.

Return type:

bool

is_reversing() bool

Get whether we are reversing or not

Return type:

bool

play() None

Start playback of timeline

play_from_start() None

Start playback of timeline from the start

reverse() None

Start playback of timeline in reverse

reverse_from_end() None

Start playback of timeline in reverse from the end

set_float_curve(new_float_curve, float_track_name) None

Update a certain float track’s curve

Parameters:
set_ignore_time_dilation(new_ignore_time_dilation) None

Set whether to ignore time dilation.

Parameters:

new_ignore_time_dilation (bool) –

set_linear_color_curve(new_linear_color_curve, linear_color_track_name) None

Update a certain linear color track’s curve

Parameters:
set_looping(new_looping) None

true means we would loop, false means we should not.

Parameters:

new_looping (bool) –

set_new_time(new_time) None

Set the new playback position time to use

Parameters:

new_time (float) –

set_play_rate(new_rate) None

Sets the new play rate for this timeline

Parameters:

new_rate (float) –

set_playback_position(new_position, fire_events, fire_update=True) None

Jump to a position in the timeline.

Parameters:
  • new_position (float) –

  • fire_events (bool) – If true, event functions that are between current position and new playback position will fire.

  • fire_update (bool) – If true, the update output exec will fire after setting the new playback position.

set_timeline_finished_func(new_timeline_finished_func) None

Set the delegate to call when timeline is finished

Parameters:

new_timeline_finished_func (OnTimelineEvent) –

set_timeline_length(new_length) None

Set length of the timeline

Parameters:

new_length (float) –

set_timeline_length_mode(new_length_mode) None

Sets the length mode of the timeline

Parameters:

new_length_mode (TimelineLengthMode) –

set_timeline_post_update_func(new_timeline_post_update_func) None

Set the delegate to call after each timeline tick

Parameters:

new_timeline_post_update_func (OnTimelineEvent) –

set_vector_curve(new_vector_curve, vector_track_name) None

Update a certain vector track’s curve

Parameters:
stop() None

Stop playback of timeline