unreal.AnimationLibrary

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

Bases: unreal.BlueprintFunctionLibrary

Blueprint library for altering and analyzing animation / skeletal data

C++ Source:

  • Module: AnimationModifiers

  • File: AnimationBlueprintLibrary.h

classmethod add_animation_notify_event(animation_sequence, 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
Returns

Return type

AnimNotify

classmethod add_animation_notify_event_object(animation_sequence, 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, 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
Returns

Return type

AnimNotifyState

classmethod add_animation_notify_state_event_object(animation_sequence, 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, notify_track_name, track_color=[0.0, 0.0, 0.0, 0.0])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_sequence, meta_data_class, meta_data_instance)None

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

Parameters
classmethod add_meta_data_object(animation_sequence, meta_data_object)None

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

Parameters
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_sequence, meta_data_class)bool

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

Parameters
Returns

Return type

bool

classmethod copy_anim_notifies_from_sequence(src_anim_sequence, dest_anim_sequence)None

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

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
Returns

Return type

bool

classmethod finalize_bone_animation(animation_sequence)None

Apply all the changes made to Bone Tracks to Finalize. This triggers recompression. Note that this is expensive, but will require to get correct compressed data

Parameters

animation_sequence (AnimSequence) –

classmethod find_bone_path_to_root(animation_sequence, bone_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_trigger_time(notify_event)float

Returns the actual trigger time for a NotifyEvent

Parameters

notify_event (AnimNotifyEvent) –

Returns

Return type

float

classmethod get_animation_curve_names(animation_sequence, curve_type)

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_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)

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

Parameters

animation_sequence (AnimSequence) –

Returns

event_names (Array(Name)):

Return type

Array(Name)

classmethod get_animation_notify_events(animation_sequence)

Retrieves all Animation Notify Events found within the given Animation Sequence

Parameters

animation_sequence (AnimSequence) –

Returns

notify_events (Array(AnimNotifyEvent)):

Return type

Array(AnimNotifyEvent)

classmethod get_animation_notify_events_for_track(animation_sequence, notify_track_name)

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)

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

Parameters

animation_sequence (AnimSequence) –

Returns

track_names (Array(Name)):

Return type

Array(Name)

classmethod get_animation_sync_markers(animation_sequence)

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)

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)

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

Parameters

animation_sequence (AnimSequence) –

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, bone_name, frame, extract_root_motion)Transform

Retrieves Bone Pose data for the given Bone Name at the specified Frame from the given Animation Sequence

Parameters
  • animation_sequence (AnimSequence) –

  • bone_name (Name) –

  • frame (int32) –

  • extract_root_motion (bool) –

Returns

pose (Transform):

Return type

Transform

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

Retrieves Bone Pose data for the given Bone Name at the specified Time from the given Animation Sequence

Parameters
Returns

pose (Transform):

Return type

Transform

classmethod get_bone_poses_for_frame(animation_sequence, bone_names, frame, extract_root_motion, preview_mesh=None)

Retrieves Bone Pose data for the given Bone Names at the specified Frame from the given Animation Sequence

Parameters
Returns

poses (Array(Transform)):

Return type

Array(Transform)

classmethod get_bone_poses_for_time(animation_sequence, bone_names, time, extract_root_motion, preview_mesh=None)

Retrieves Bone Pose data for the given Bone Names at the specified Time from the given Animation Sequence

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, 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_sequence, meta_data)None

Retrieves all Meta Data Instances from the given Animation Sequence

Parameters
classmethod get_meta_data_of_class(animation_sequence, meta_data_class, meta_data_of_class)None

Retrieves all Meta Data Instances from the given Animation Sequence

Parameters
classmethod get_num_frames(animation_sequence)int32

Retrieves the number of animation frames for the given Animation Sequence

Parameters

animation_sequence (AnimSequence) –

Returns

num_frames (int32):

Return type

int32

classmethod get_rate_scale(animation_sequence)float

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

Parameters

animation_sequence (AnimSequence) –

Returns

rate_scale (float):

Return type

float

classmethod get_raw_track_data(animation_sequence, track_name) -> (position_keys=Array(Vector), rotation_keys=Array(Quat), scaling_keys=Array(Vector))

Retrieves the Raw Animation Data for the given Animation Track Name and Animation Sequence

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, track_name)

Retrieves the Raw Translation Animation Data for the given Animation Track Name and Animation Sequence

Parameters
Returns

position_data (Array(Vector)):

Return type

Array(Vector)

classmethod get_raw_track_rotation_data(animation_sequence, track_name)

Retrieves the Raw Rotation Animation Data for the given Animation Track Name and Animation Sequence

Parameters
Returns

rotation_data (Array(Quat)):

Return type

Array(Quat)

classmethod get_raw_track_scale_data(animation_sequence, track_name)

Retrieves the Raw Scale Animation Data for the given Animation Track Name and Animation Sequence

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)float

Retrieves the Length of the given Animation Sequence

Parameters

animation_sequence (AnimSequence) –

Returns

length (float):

Return type

float

classmethod get_time_at_frame(animation_sequence, 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)

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_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) –

Returns

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) –

Returns

Return type

bool

classmethod is_valid_anim_notify_track_name(animation_sequence, notify_track_name)bool

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

Parameters
Returns

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
Returns

Return type

bool

classmethod is_valid_raw_animation_track_name(animation_sequence, track_name)bool

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

Parameters
Returns

Return type

bool

classmethod is_valid_time(animation_sequence, 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)None

Removes All Animation Notify Tracks from Animation Sequence

Parameters

animation_sequence (AnimSequence) –

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_sequence)None

Removes all Meta Data from the given Animation Sequence

Parameters

animation_sequence (AnimSequence) –

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, notify_name)int32

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

Parameters
Returns

Return type

int32

classmethod remove_animation_notify_events_by_track(animation_sequence, notify_track_name)int32

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

Parameters
Returns

Return type

int32

classmethod remove_animation_notify_track(animation_sequence, 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
Returns

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
Returns

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_sequence, meta_data_object)None

Removes the specified Meta Data Instance from the given Animation Sequence

Parameters
classmethod remove_meta_data_of_class(animation_sequence, meta_data_class)None

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

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, 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, 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, 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