unreal.AnimDatabaseLibrary

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

Bases: BlueprintFunctionLibrary

A blueprint library providing functions for writing back frame attribute data into an animation database.

This library provides something akin to AnimModifiers, where it becomes possible to write an asset action which can extract some frame attributes and then write these back to the animation data either in the form of AnimNotifies, AnimNotifyStates, Curves, or modifications to bone transforms. This method of AnimModifiers is far more efficient as it can be scripted via blueprints but still perform processing in batch.

C++ Source:

  • Plugin: AnimDatabase

  • Module: AnimDatabase

  • File: AnimDatabase.h

classmethod add_anim_notifies_to_sequence(anim_sequence, track_name, class_, times) None

Adds AnimNotifies of the provided class to a sequence at the given times

Parameters:
classmethod add_anim_notify_states_to_sequence(anim_sequence, track_name, class_, times, durations) None

Adds AnimNotifyStates of the provided class to a sequence at the given times with the given durations

Parameters:
classmethod database_add_anim_notifies(database, anim_notify_track_names, classes, frames, colors, should_transact=False) None

Create AnimNotifies at the provided Frames in the database using the given track names and classes

Parameters:
classmethod database_add_anim_notify(database, anim_notify_track_name, class_, frames, color=[1.000000, 0.000000, 0.000000, 1.000000], should_transact=False) None

Create AnimNotifies at the provided Frames in the database using the given track name and class

Parameters:
classmethod database_add_anim_notify_object(database, track_name, anim_notify, frames, color=[1.000000, 0.000000, 0.000000, 1.000000], should_transact=False) None

Create AnimNotifies at the provided Frames from a duplicate of the given AnimNotify

Parameters:
classmethod database_add_anim_notify_objects(database, anim_notify_track_names, anim_notifies, frames, colors, should_transact=False) None

Create AnimNotifies at the provided Frames in the database using the given track names and duplicates of the given AnimNotifies

Parameters:
classmethod database_add_anim_notify_state(database, anim_notify_state_track_name, class_, frame_ranges, color=[1.000000, 0.000000, 0.000000, 1.000000], should_transact=False) None

Create AnimNotifyStates at the provided FrameRanges in the database using the given track name and class

Parameters:
classmethod database_add_anim_notify_state_object(database, track_name, anim_notify_state, frame_ranges, color=[1.000000, 0.000000, 0.000000, 1.000000], should_transact=False) None

Create AnimNotifyStates at the provided FrameRanges from a duplicate of the given AnimNotifyState

Parameters:
classmethod database_add_anim_notify_state_objects(database, anim_notify_state_track_names, anim_notify_states, frame_ranges, colors, should_transact=False) None

Create AnimNotifyStates at the provided FrameRanges in the database using the given track names and duplicates of the given AnimNotifyStates

Parameters:
classmethod database_add_anim_notify_states(database, anim_notify_state_track_names, classes, frame_ranges, colors, should_transact=False) None

Create AnimNotifyStates at the provided FrameRanges in the database using the given track names and classes

Parameters:
classmethod database_add_curve(database, curve_name, float_frame_attribute, color=[1.000000, 0.000000, 0.000000, 1.000000], sparse_keys=False, should_transact=False) None

Write the provided float frame attribute back to the animations in the database with the given curve name

Parameters:
classmethod database_add_curves(database, curve_names, float_frame_attributes, colors, sparse_keys=False, should_transact=False) None

Write the provided float frame attributes back to the animations in the database with the given curve names

Parameters:
classmethod database_add_sync_marker(database, sync_marker_track_name, sync_marker_name, frames, color=[1.000000, 0.000000, 0.000000, 1.000000], should_transact=False) None

Create SyncMarkers at the provided Frames in the database using the given track name and sync marker name

Parameters:
classmethod database_add_sync_markers(database, sync_marker_track_names, sync_marker_names, frames, colors, should_transact=False) None

Create SyncMarkers at the provided Frames in the database using the given track names and sync marker names

Parameters:
classmethod database_export_as_anim_sequences(database, frame_ranges, path, asset_name_format_string, export_mirrored, should_transact=False) None

Exports the given frame ranges in the database as AnimSequences into the provided path

Parameters:
classmethod database_export_as_bvh(database, frame_ranges, path, add_root_axes_change_rotation=True, rotation_order=AnimDatabaseRotationOrder.XYZ) None

Exports the given frame ranges in the database as BVH files into the provided directory

Parameters:
classmethod database_export_notifies(database, frame_ranges, path) None

Exports all AnimNotifies and AnimNotifyStates as JSON

Parameters:
classmethod database_export_root_motion(database, frame_ranges, path) None

Exports the root motion of given frame ranges in the database as a JSON file

Parameters:
classmethod database_import_from_bvh(database, import_path, asset_path, remove_root_axes_change_rotation=True, add_to_database=True, ignore_mirrored=False) None

Imports all the BVH files from the given ImportPath directory into the AssetPath directory and adds them to the database

Parameters:
classmethod database_import_notifies(database, frame_ranges, path) None

Imports AnimNotifies and AnimNotifyStates from a JSON file

Parameters:
classmethod database_make_looped(database, frame_ranges, start_end_ratio, blend_in_time, blend_out_time, should_transact=False) None

Makes the given ranges looped in the database

Parameters:
classmethod database_patch_ranges(database, frame_ranges, apply_to_root, bone_indices, should_transact=False) None

Patches the given ranges for the provided bones with a simple interpolation

Parameters:
classmethod database_remove_anim_notifies_from_track(database, frame_ranges, anim_notify_track_name, should_transact=False) None

Remove all the anim notifies on a given track

Parameters:
classmethod database_remove_anim_notifies_from_tracks(database, frame_ranges, anim_notify_track_names, should_transact=False) None

Remove all the anim notifies from the given tracks

Parameters:
classmethod database_remove_foot_ground_penetration(database, frame_ranges, left_toe_bone, right_toe_bone, toe_bone_length, pelvis_height_adjustment=-1.000000, left_knee_side_vector=[0.000000, 0.000000, 1.000000], right_knee_side_vector=[0.000000, 0.000000, 1.000000], left_toe_forward_vector=[-1.000000, 0.000000, 0.000000], right_toe_forward_vector=[-1.000000, 0.000000, 0.000000], should_transact=False) None

Removes foot ground penetration in the database

Parameters:
classmethod database_remove_notifies(database, frame_ranges) None

Removes all AnimNotifies and AnimNotifyStates from the given frame ranges

Parameters:
classmethod database_remove_sync_marker_from_track(database, frame_ranges, sync_marker_track_name, should_transact=False) None

Remove all the sync markers on a given track

Parameters:
classmethod database_remove_sync_marker_from_tracks(database, frame_ranges, sync_marker_track_names, should_transact=False) None

Remove all the sync markers from the given tracks

Parameters:
classmethod database_reset_bone_transform(database, frame_ranges, bone_name, should_transact=False) None

Set the given bone’s local transforms in the database to the reference pose

Parameters:
classmethod database_reset_bone_transforms(database, frame_ranges, bone_names, should_transact=False) None

Set the given bones’ local transforms in the database to the reference pose

Parameters:
classmethod database_set_global_bone_transform(database, bone_name, transform_frame_attribute, should_transact=False) None

Set the given bone’s global transform in the database at the given transform frame attribute

Parameters:
classmethod database_set_global_bone_transforms(database, bone_names, transform_frame_attributes, should_transact=False) None

Set the given bones’ global transforms in the database at the given transform frame attributes

Parameters:
classmethod database_set_local_bone_transform(database, bone_name, transform_frame_attribute, should_transact=False) None

Set the given bone’s local transform in the database at the given transform frame attribute

Parameters:
classmethod database_set_local_bone_transforms(database, bone_names, transform_frame_attributes, should_transact=False) None

Set the given bones’ local transforms in the database at the given transform frame attributes

Parameters:
classmethod database_set_to_reference_pose(database, frame_ranges, apply_to_root, ignore_bone_indices, should_transact=False) None

Sets the given ranges to the reference pose, with the exception of the provided IgnoreBoneIndices

Parameters:
classmethod database_strip_unused_bone_tracks(database, frame_ranges, should_transact=False) None

Strips unused bone tracks from the data to reduce the file size on disk

Parameters:
classmethod enable_root_motion_and_force_root_lock_on_sequences(sequences) None

Enables root motion and force root lock on the given animation sequences

Parameters:

sequences (Array[AnimSequence])

classmethod get_anim_sequence_anim_notify_classes(anim_sequence) Array[type(Class)]

Gets all the AnimNotify classes present in a given AnimSequence

Parameters:

anim_sequence (AnimSequence)

Returns:

out_classes (Array[type(Class)]):

Return type:

Array[type(Class)]

classmethod get_anim_sequence_anim_notify_state_classes(anim_sequence) Array[type(Class)]

Gets all the AnimNotifyState classes present in a given AnimSequence

Parameters:

anim_sequence (AnimSequence)

Returns:

out_classes (Array[type(Class)]):

Return type:

Array[type(Class)]

classmethod get_anim_sequence_anim_notify_state_times_and_durations(class_, anim_sequence) -> (out_times=Array[float], out_durations=Array[float])

Gets the times and durations of each AnimNotifyState of the given class, in the given sequence

Parameters:
Returns:

out_times (Array[float]):

out_durations (Array[float]):

Return type:

tuple

classmethod get_anim_sequence_anim_notify_times(class_, anim_sequence) Array[float]

Gets the times of each AnimNotify of the given class, in the given sequence

Parameters:
Returns:

out_times (Array[float]):

Return type:

Array[float]

classmethod remove_all_anim_notifies_and_anim_notify_states_from_sequence(anim_sequence) None

Removes all AnimNotifies and AnimNotifyStates from a sequence

Parameters:

anim_sequence (AnimSequence)