unreal.AnimationLibrary

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

Bases: BlueprintFunctionLibrary

Blueprint library for altering and analyzing animation / skeletal data

C++ Source:

  • Module: AnimationBlueprintLibrary

  • File: AnimationBlueprintLibrary.h

classmethod add_animation_notify_event(animation_sequence_base, notify_track_name, start_time, notify_class) AnimNotify

Adds an Animation Notify Event to Notify track in the given Animation with the given Notify creation data

Parameters:
Return type:

AnimNotify

classmethod add_animation_notify_event_object(animation_sequence_base, start_time, notify, notify_track_name) None

Adds an the specific Animation Notify to the Animation Sequence (requires Notify’s outer to be the Animation Sequence)

Parameters:
classmethod add_animation_notify_state_event(animation_sequence_base, notify_track_name, start_time, duration, notify_state_class) AnimNotifyState

Adds an Animation Notify State Event to Notify track in the given Animation with the given Notify State creation data

Parameters:
Return type:

AnimNotifyState

classmethod add_animation_notify_state_event_object(animation_sequence_base, start_time, duration, notify_state, notify_track_name) None

Adds an the specific Animation Notify State to the Animation Sequence (requires Notify State’s outer to be the Animation Sequence)

Parameters:
classmethod add_animation_notify_track(animation_sequence_base, notify_track_name, track_color=[1.000000, 1.000000, 1.000000, 1.000000]) None

Adds an Animation Notify Track to the Animation Sequence

Parameters:
classmethod add_animation_sync_marker(animation_sequence, marker_name, time, notify_track_name) None

Adds an Animation Sync Marker to Notify track in the given Animation with the corresponding Marker Name and Time

Parameters:
classmethod add_curve(animation_sequence, curve_name, curve_type=RawCurveTrackTypes.RCT_FLOAT, meta_data_curve=False) None

Adds an Animation Curve by Type and Name to the given Animation Sequence

Parameters:
classmethod add_float_curve_key(animation_sequence, curve_name, time, value) None

Adds a Float Key to the specified Animation Curve inside of the given Animation Sequence

Parameters:
classmethod add_float_curve_keys(animation_sequence, curve_name, times, values) None

Adds a multiple of Float Keys to the specified Animation Curve inside of the given Animation Sequence

Parameters:
classmethod add_meta_data(animation_asset, meta_data_class) AnimMetaData

Creates and Adds an instance of the specified MetaData Class to the given Animation Asset

Parameters:
Returns:

meta_data_instance (AnimMetaData):

Return type:

AnimMetaData

classmethod add_meta_data_object(animation_asset, meta_data_object) None

Adds an instance of the specified MetaData Class to the given Animation Asset (requires MetaDataObject’s outer to be the Animation Asset)

Parameters:
classmethod add_node_asset_override(anim_blueprint, target, override, print_applied_overrides=False) None

Adds an Animation Asset override for the provided AnimationBlueprint, replacing any instance of Target with Override

Parameters:
  • anim_blueprint (AnimBlueprint) – The Animation Blueprint to add/set the Override for

  • target (AnimationAsset) – The Animation Asset to add an override for (overrides all instances of the asset)

  • override (AnimationAsset) – The Animation Asset to used to override the Target with (types have to match)

  • print_applied_overrides (bool) – Flag whether or not to print the applied overrides

classmethod add_transformation_curve_key(animation_sequence, curve_name, time, transform) None

Adds a Transformation Key to the specified Animation Curve inside of the given Animation Sequence

Parameters:
classmethod add_transformation_curve_keys(animation_sequence, curve_name, times, transforms) None

Adds a multiple of Transformation Keys to the specified Animation Curve inside of the given Animation Sequence

Parameters:
classmethod add_vector_curve_key(animation_sequence, curve_name, time, vector) None

Adds a Vector Key to the specified Animation Curve inside of the given Animation Sequence

Parameters:
classmethod add_vector_curve_keys(animation_sequence, curve_name, times, vectors) None

Adds a multiple of Vector Keys to the specified Animation Curve inside of the given Animation Sequence

Parameters:
classmethod add_virtual_bone(animation_sequence, source_bone_name, target_bone_name) Name

Adds a Virtual Bone between the Source and Target Bones to the given Animation Sequence

Parameters:
Returns:

virtual_bone_name (Name):

Return type:

Name

classmethod contains_meta_data_of_class(animation_asset, meta_data_class) bool

Checks whether or not the given Animation Asset contains Meta Data Instance of the specified Meta Data Class

Parameters:
Return type:

bool

classmethod copy_anim_notifies_from_sequence(source_animation_sequence_base, destination_animation_sequence_base, delete_existing_notifies=False) None

Copies animation notifies from Src Animation Sequence to Dest. Creates anim notify tracks as necessary. Returns true on success.

Parameters:
classmethod copy_animation_curve_names_to_skeleton(old_skeleton, new_skeleton, sequence_base, curve_type) None

Ensures that any curve names that do not exist on the NewSkeleton are added to it, in which case the SmartName on the actual curve itself will also be updated deprecated: It is no longer necessary to copy curve names to the skeleton. If metadata is required to be updated, please use the metadata setting APIs.

Parameters:
classmethod does_bone_name_exist(animation_sequence, bone_name) bool

Checks whether or not the given Bone Name exist on the Skeleton referenced by the given Animation Sequence

Parameters:
Returns:

exists (bool):

Return type:

bool

classmethod does_curve_exist(animation_sequence, curve_name, curve_type) bool

Checks whether or not the given Curve Name exist on the Skeleton referenced by the given Animation Sequence

Parameters:
Return type:

bool

classmethod evaluate_root_bone_timecode_attributes_at_time(animation_sequence_base, eval_time) QualifiedTime or None

Evaluates timecode attributes (e.g. “TCFrame”, “TCSecond”, etc.) of the root bone and returns the resulting qualified frame time. return:: true if the root bone had timecode attributes that could be evaluated and a qualified frame time was set, or false otherwise.

Parameters:
Returns:

out_qualified_frame_time (QualifiedTime):

Return type:

QualifiedTime or None

classmethod evaluate_root_bone_timecode_subframe_attribute_at_time(animation_sequence_base, eval_time) float or None

Evaluates the subframe timecode attribute (e.g. “TCSubframe”) of the root bone and returns the resulting value.

Since the subframe component of FFrameTime is clamped to the range [0.0, 1.0), it cannot accurately represent the use case where the timecode metadata represents subframe values as whole numbered subframes instead of as a percentage of a frame the way the engine does. The subframe component of the FQualifiedFrameTime returned by EvaluateRootBoneTimecodeAttributesAtTime() may not reflect the authored subframe metadata in that case.

This function allows access to the subframe values that were actually authored in the timecode metadata. return:: true if the root bone had a subframe timecode attribute that could be evaluated and a value was set, or false otherwise.

Parameters:
Returns:

out_subframe (float):

Return type:

float or None

classmethod finalize_bone_animation(animation_sequence) None

Finalize Bone Animation deprecated: FinalizeBoneAnimation has been deprecated, use UAnimDataController instead

Parameters:

animation_sequence (AnimSequence) –

classmethod find_bone_path_to_root(animation_sequence_base, bone_name) Array[Name]

Finds the Bone Path from the given Bone to the Root Bone

Parameters:
Returns:

bone_path (Array[Name]):

Return type:

Array[Name]

classmethod get_additive_animation_type(animation_sequence) AdditiveAnimationType

Retrieves the Additive Animation type for the given Animation Sequence

Parameters:

animation_sequence (AnimSequence) –

Returns:

additive_animation_type (AdditiveAnimationType):

Return type:

AdditiveAnimationType

classmethod get_additive_base_pose_type(animation_sequence) AdditiveBasePoseType

Retrieves the Additive Base Pose type for the given Animation Sequence

Parameters:

animation_sequence (AnimSequence) –

Returns:

additive_base_pose_type (AdditiveBasePoseType):

Return type:

AdditiveBasePoseType

classmethod get_anim_notify_event_duration(notify_event) float

Returns the duration for a NotifyEvent, only non-zero for Anim Notify States

Parameters:

notify_event (AnimNotifyEvent) –

Return type:

float

classmethod get_anim_notify_event_trigger_time(notify_event) float

Returns the actual trigger time for a NotifyEvent

Parameters:

notify_event (AnimNotifyEvent) –

Return type:

float

classmethod get_animation_curve_names(animation_sequence, curve_type) Array[Name]

Retrieves the Names of the individual float curves for the given Animation Sequence

Parameters:
Returns:

curve_names (Array[Name]):

Return type:

Array[Name]

classmethod get_animation_graphs(animation_blueprint) Array[AnimationGraph]

Returns all Animation Graphs contained by the provided Animation Blueprint

Parameters:

animation_blueprint (AnimBlueprint) –

Returns:

animation_graphs (Array[AnimationGraph]):

Return type:

Array[AnimationGraph]

classmethod get_animation_interpolation_type(animation_sequence) AnimInterpolationType

Retrieves the Animation Interpolation type for the given Animation Sequence

Parameters:

animation_sequence (AnimSequence) –

Returns:

interpolation_type (AnimInterpolationType):

Return type:

AnimInterpolationType

classmethod get_animation_notify_event_names(animation_sequence_base) Array[Name]

Retrieves all Unique Animation Notify Events found within the given Animation Sequence

Parameters:

animation_sequence_base (AnimSequenceBase) –

Returns:

event_names (Array[Name]):

Return type:

Array[Name]

classmethod get_animation_notify_events(animation_sequence_base) Array[AnimNotifyEvent]

Retrieves all Animation Notify Events found within the given Animation Sequence

Parameters:

animation_sequence_base (AnimSequenceBase) –

Returns:

notify_events (Array[AnimNotifyEvent]):

Return type:

Array[AnimNotifyEvent]

classmethod get_animation_notify_events_for_track(animation_sequence_base, notify_track_name) Array[AnimNotifyEvent]

Retrieves all Animation Notify Events for the given Notify Track Name from the given Animation Sequence

Parameters:
Returns:

events (Array[AnimNotifyEvent]):

Return type:

Array[AnimNotifyEvent]

classmethod get_animation_notify_track_names(animation_sequence_base) Array[Name]

Retrieves all Unique Animation Notify Track Names found within the given Animation Sequence

Parameters:

animation_sequence_base (AnimSequenceBase) –

Returns:

track_names (Array[Name]):

Return type:

Array[Name]

classmethod get_animation_sync_markers(animation_sequence) Array[AnimSyncMarker]

Retrieves all the Animation Sync Markers for the given Animation Sequence

Parameters:

animation_sequence (AnimSequence) –

Returns:

markers (Array[AnimSyncMarker]):

Return type:

Array[AnimSyncMarker]

classmethod get_animation_sync_markers_for_track(animation_sequence, notify_track_name) Array[AnimSyncMarker]

Retrieves all Animation Sync Markers for the given Notify Track Name from the given Animation Sequence

Parameters:
Returns:

markers (Array[AnimSyncMarker]):

Return type:

Array[AnimSyncMarker]

classmethod get_animation_track_names(animation_sequence_base) Array[Name]

Retrieves the Names of the individual ATracks for the given Animation Sequence

Parameters:

animation_sequence_base (AnimSequenceBase) –

Returns:

track_names (Array[Name]):

Return type:

Array[Name]

classmethod get_bone_compression_settings(animation_sequence) AnimBoneCompressionSettings

Retrieves the Bone Compression Settings for the given Animation Sequence

Parameters:

animation_sequence (AnimSequence) –

Returns:

compression_settings (AnimBoneCompressionSettings):

Return type:

AnimBoneCompressionSettings

classmethod get_bone_pose_for_frame(animation_sequence_base, bone_name, frame, extract_root_motion) Transform

Get Bone Pose for Frame

Parameters:
Returns:

pose (Transform):

Return type:

Transform

classmethod get_bone_pose_for_time(animation_sequence_base, bone_name, time, extract_root_motion) Transform

Get Bone Pose for Time

Parameters:
Returns:

pose (Transform):

Return type:

Transform

classmethod get_bone_poses_for_frame(animation_sequence_base, bone_names, frame, extract_root_motion, preview_mesh=None) Array[Transform]

Get Bone Poses for Frame

Parameters:
Returns:

poses (Array[Transform]):

Return type:

Array[Transform]

classmethod get_bone_poses_for_time(animation_sequence_base, bone_names, time, extract_root_motion, preview_mesh=None) Array[Transform]

Get Bone Poses for Time

Parameters:
Returns:

poses (Array[Transform]):

Return type:

Array[Transform]

classmethod get_curve_compression_settings(animation_sequence) AnimCurveCompressionSettings

Retrieves the Curve Compression Settings for the given Animation Sequence

Parameters:

animation_sequence (AnimSequence) –

Returns:

compression_settings (AnimCurveCompressionSettings):

Return type:

AnimCurveCompressionSettings

classmethod get_float_keys(animation_sequence, curve_name) -> (times=Array[float], values=Array[float])

Retrieves, a multiple of, Float Key(s) from the specified Animation Curve inside of the given Animation Sequence

Parameters:
Returns:

times (Array[float]):

values (Array[float]):

Return type:

tuple

classmethod get_frame_at_time(animation_sequence_base, time) int32

Retrieves the Frame Index at the specified Time Value for the given Animation Sequence

Parameters:
Returns:

frame (int32):

Return type:

int32

classmethod get_meta_data(animation_asset) Array[AnimMetaData]

Retrieves all Meta Data Instances from the given Animation Asset

Parameters:

animation_asset (AnimationAsset) –

Returns:

meta_data (Array[AnimMetaData]):

Return type:

Array[AnimMetaData]

classmethod get_meta_data_of_class(animation_asset, meta_data_class) Array[AnimMetaData]

Retrieves all Meta Data Instances from the given Animation Asset

Parameters:
Returns:

meta_data_of_class (Array[AnimMetaData]):

Return type:

Array[AnimMetaData]

classmethod get_montage_slot_names(animation_montage) Array[Name]

Retrieves the Names of the Animation Slots used in the given Montage

Parameters:

animation_montage (AnimMontage) –

Returns:

slot_names (Array[Name]):

Return type:

Array[Name]

classmethod get_nodes_of_class(animation_blueprint, node_class, include_child_classes=True) Array[AnimGraphNode_Base]

Returns all Animation Graph Nodes of the provided Node Class contained by the Animation Blueprint

Parameters:
Returns:

graph_nodes (Array[AnimGraphNode_Base]):

Return type:

Array[AnimGraphNode_Base]

classmethod get_num_frames(animation_sequence_base) int32

Retrieves the number of animation frames for the given Animation Sequence

Parameters:

animation_sequence_base (AnimSequenceBase) –

Returns:

num_frames (int32):

Return type:

int32

classmethod get_num_keys(animation_sequence_base) int32

Retrieves the number of animation keys for the given Animation Sequence

Parameters:

animation_sequence_base (AnimSequenceBase) –

Returns:

num_keys (int32):

Return type:

int32

classmethod get_rate_scale(animation_sequence_base) float

Retrieves the (Play) Rate Scale of the given Animation Sequence

Parameters:

animation_sequence_base (AnimSequenceBase) –

Returns:

rate_scale (float):

Return type:

float

classmethod get_raw_track_data(animation_sequence_base, track_name) -> (position_keys=Array[Vector], rotation_keys=Array[Quat], scaling_keys=Array[Vector])

Get Raw Track Data

Parameters:
Returns:

position_keys (Array[Vector]):

rotation_keys (Array[Quat]):

scaling_keys (Array[Vector]):

Return type:

tuple

classmethod get_raw_track_position_data(animation_sequence_base, track_name) Array[Vector]

Get Raw Track Position Data

Parameters:
Returns:

position_data (Array[Vector]):

Return type:

Array[Vector]

classmethod get_raw_track_rotation_data(animation_sequence_base, track_name) Array[Quat]

Get Raw Track Rotation Data

Parameters:
Returns:

rotation_data (Array[Quat]):

Return type:

Array[Quat]

classmethod get_raw_track_scale_data(animation_sequence_base, track_name) Array[Vector]

Get Raw Track Scale Data

Parameters:
Returns:

scale_data (Array[Vector]):

Return type:

Array[Vector]

classmethod get_root_motion_lock_type(animation_sequence) RootMotionRootLock

Retrieves the Root Motion Lock Type for the given Animation Sequence

Parameters:

animation_sequence (AnimSequence) –

Returns:

lock_type (RootMotionRootLock):

Return type:

RootMotionRootLock

classmethod get_sequence_length(animation_sequence_base) float

Retrieves the Length of the given Animation Sequence

Parameters:

animation_sequence_base (AnimSequenceBase) –

Returns:

length (float):

Return type:

float

classmethod get_time_at_frame(animation_sequence_base, frame) float

Retrieves the Time Value at the specified Frame Indexfor the given Animation Sequence

Parameters:
Returns:

time (float):

Return type:

float

classmethod get_transformation_keys(animation_sequence, curve_name) -> (times=Array[float], values=Array[Transform])

Retrieves, a multiple of, Transformation Key(s) from the specified Animation Curve inside of the given Animation Sequence

Parameters:
Returns:

times (Array[float]):

values (Array[Transform]):

Return type:

tuple

classmethod get_unique_marker_names(animation_sequence) Array[Name]

Retrieves all the Unique Names for the Animation Sync Markers contained by the given Animation Sequence

Parameters:

animation_sequence (AnimSequence) –

Returns:

marker_names (Array[Name]):

Return type:

Array[Name]

classmethod get_variable_frame_stripping_settings(animation_sequence) VariableFrameStrippingSettings

Retrieves the Variable Frame Stripping Settings for the given Animation Sequence

Parameters:

animation_sequence (AnimSequence) –

Returns:

variable_frame_stripping_settings (VariableFrameStrippingSettings):

Return type:

VariableFrameStrippingSettings

classmethod get_vector_keys(animation_sequence, curve_name) -> (times=Array[float], values=Array[Vector])

Retrieves, a multiple of, Vector Key(s) from the specified Animation Curve inside of the given Animation Sequence

Parameters:
Returns:

times (Array[float]):

values (Array[Vector]):

Return type:

tuple

classmethod is_root_motion_enabled(animation_sequence) bool

Checks whether or not Root Motion is Enabled for the given Animation Sequence

Parameters:

animation_sequence (AnimSequence) –

Return type:

bool

classmethod is_root_motion_lock_forced(animation_sequence) bool

Checks whether or not Root Motion locking is Forced for the given Animation Sequence

Parameters:

animation_sequence (AnimSequence) –

Return type:

bool

classmethod is_valid_anim_notify_track_name(animation_sequence_base, notify_track_name) bool

Checks whether or not the given Track Name is a valid Animation Notify Track in the Animation Sequence

Parameters:
Return type:

bool

classmethod is_valid_animation_sync_marker_name(animation_sequence, marker_name) bool

Checks whether or not the given Marker Name is a valid Animation Sync Marker Name

Parameters:
Return type:

bool

classmethod is_valid_raw_animation_track_name(animation_sequence_base, track_name) bool

Checks whether or not the given Animation Track Name is contained within the Animation Sequence

Parameters:
Return type:

bool

classmethod is_valid_time(animation_sequence_base, time) bool

Checks whether or not the given Time Value lies within the given Animation Sequence’s Length

Parameters:
Returns:

is_valid (bool):

Return type:

bool

classmethod remove_all_animation_notify_tracks(animation_sequence_base) None

Removes All Animation Notify Tracks from Animation Sequence

Parameters:

animation_sequence_base (AnimSequenceBase) –

classmethod remove_all_animation_sync_markers(animation_sequence) None

Removes All Animation Sync Markers found within the Animation Sequence, and returns the number of removed instances

Parameters:

animation_sequence (AnimSequence) –

classmethod remove_all_bone_animation(animation_sequence) None

Removes all Animation Bone Track Data from the given Animation Sequence

Parameters:

animation_sequence (AnimSequence) –

classmethod remove_all_curve_data(animation_sequence) None

Removes all Animation Curve Data from the given Animation Sequence (Raw Animation Curves [Names] may not be removed from the Skeleton)

Parameters:

animation_sequence (AnimSequence) –

classmethod remove_all_meta_data(animation_asset) None

Removes all Meta Data from the given Animation Asset

Parameters:

animation_asset (AnimationAsset) –

classmethod remove_all_virtual_bones(animation_sequence) None

Removes all Virtual Bones from the given Animation Sequence

Parameters:

animation_sequence (AnimSequence) –

classmethod remove_animation_notify_events_by_name(animation_sequence_base, notify_name) int32

Removes Animation Notify Events found by Name within the Animation Sequence, and returns the number of removed name instances

Parameters:
Return type:

int32

classmethod remove_animation_notify_events_by_track(animation_sequence_base, notify_track_name) int32

Removes Animation Notify Events found by Track within the Animation Sequence, and returns the number of removed name instances

Parameters:
Return type:

int32

classmethod remove_animation_notify_track(animation_sequence_base, notify_track_name) None

Removes an Animation Notify Track from Animation Sequence by Name

Parameters:
classmethod remove_animation_sync_markers_by_name(animation_sequence, marker_name) int32

Removes All Animation Sync Marker found within the Animation Sequence whose name matches MarkerName, and returns the number of removed instances

Parameters:
Return type:

int32

classmethod remove_animation_sync_markers_by_track(animation_sequence, notify_track_name) int32

Removes All Animation Sync Marker found within the Animation Sequence that belong to the specific Notify Track, and returns the number of removed instances

Parameters:
Return type:

int32

classmethod remove_bone_animation(animation_sequence, bone_name, include_children=True, finalize=True) None

Removes an Animation Curve by Name from the given Animation Sequence (Raw Animation Curves [Names] may not be removed from the Skeleton)

Parameters:
  • animation_sequence (AnimSequence) – : AnimSequence

  • bone_name (Name) – : Name of bone track user wants to remove

  • include_children (bool) – : true if user wants to include all children of BoneName

  • finalize (bool) – : If you set this to true, it will trigger compression. If you set bFinalize to be false, you’ll have to manually trigger Finalize.

classmethod remove_curve(animation_sequence, curve_name, remove_name_from_skeleton=False) None

Removes an Animation Curve by Name from the given Animation Sequence (Raw Animation Curves [Names] may not be removed from the Skeleton)

Parameters:
classmethod remove_meta_data(animation_asset, meta_data_object) None

Removes the specified Meta Data Instance from the given Animation Asset

Parameters:
classmethod remove_meta_data_of_class(animation_asset, meta_data_class) None

Removes all Meta Data Instance of the specified Class from the given Animation Asset

Parameters:
classmethod remove_virtual_bone(animation_sequence, virtual_bone_name) None

Removes a Virtual Bone with the specified Bone Name from the given Animation Sequence

Parameters:
classmethod remove_virtual_bones(animation_sequence, virtual_bone_names) None

Removes Virtual Bones with the specified Bone Names from the given Animation Sequence

Parameters:
classmethod replace_anim_notifies(animation_sequence_base, old_notify_class, new_notify_class, on_notify_replaced) None

Replaces animation notifies in the specified Animation Sequence

Parameters:
classmethod replace_anim_notify_states(animation_sequence_base, old_notify_class, new_notify_class, on_notify_state_replaced) None

Replaces animation notifies in the specified Animation Sequence

Parameters:
classmethod set_additive_animation_type(animation_sequence, additive_animation_type) None

Sets the Additive Animation type for the given Animation Sequence

Parameters:
classmethod set_additive_base_pose_type(animation_sequence, additive_base_pose_type) None

Sets the Additive Base Pose type for the given Animation Sequence

Parameters:
classmethod set_animation_interpolation_type(animation_sequence, interpolation_type) None

Sets the Animation Interpolation type for the given Animation Sequence

Parameters:
classmethod set_bone_compression_settings(animation_sequence, compression_settings) None

Sets the Bone Compression Settings for the given Animation Sequence

Parameters:
classmethod set_curve_compression_settings(animation_sequence, compression_settings) None

Sets the Curve Compression Settings for the given Animation Sequence

Parameters:
classmethod set_is_root_motion_lock_forced(animation_sequence, forced) None

Sets whether or not Root Motion locking is Forced for the given Animation Sequence

Parameters:
classmethod set_rate_scale(animation_sequence_base, rate_scale) None

Sets the (Play) Rate Scale for the given Animation Sequence

Parameters:
classmethod set_root_motion_enabled(animation_sequence, enabled) None

Sets whether or not Root Motion is Enabled for the given Animation Sequence

Parameters:
classmethod set_root_motion_lock_type(animation_sequence, root_motion_lock_type) None

Sets the Root Motion Lock Type for the given Animation Sequence

Parameters:
classmethod set_variable_frame_stripping_settings(animation_sequence, variable_frame_stripping_settings) None

Sets the Variable Frame Stripping Settings for the given Animation Sequence

Parameters: