unreal.Skeleton

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

Bases: Object

USkeletonthat links between mesh and animation
  • Bone hierarchy for animations

  • Bone/track linkup between mesh and animation

  • Retargetting related

C++ Source:

  • Module: Engine

  • File: Skeleton.h

Editor Properties: (see get_editor_property/set_editor_property)

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

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

  • bone_tree (Array[BoneNode]): [Read-Only] Skeleton bone tree - each contains name and parent index*

  • compatible_skeletons (Array[Skeleton]): [Read-Write] The list of compatible skeletons. This skeleton will be able to use animation data originating from skeletons within this array, such as animation sequences. This property is not bi-directional.

    This is an array of TSoftObjectPtr in order to prevent all skeletons to be loaded, as we only want to load things on demand. As this is EditAnywhere and an array of TSoftObjectPtr, checking validity of pointers is needed.

add_asset_user_data_of_class(user_data_class) bool

Creates and adds an instance of the provided AssetUserData class to the target asset.

Parameters:

user_data_class (type(Class)) – UAssetUserData sub class to create

Returns:

Whether or not an instance of InUserDataClass was succesfully added

Return type:

bool

add_compatible_skeleton(source_skeleton) None

Add Compatible Skeleton

Parameters:

source_skeleton (Skeleton) –

add_compatible_skeleton_soft(source_skeleton) None

Add Compatible Skeleton Soft

Parameters:

source_skeleton (Skeleton) –

property compatible_skeletons: None

[Read-Only] The list of compatible skeletons. This skeleton will be able to use animation data originating from skeletons within this array, such as animation sequences. This property is not bi-directional.

This is an array of TSoftObjectPtr in order to prevent all skeletons to be loaded, as we only want to load things on demand. As this is EditAnywhere and an array of TSoftObjectPtr, checking validity of pointers is needed.

Type:

(Array[Skeleton])

find_curve_identifier(name, curve_type) AnimationCurveIdentifier

Tries to construct a valid FAnimationCurveIdentifier instance. It tries to find the underlying SmartName on the provided Skeleton for the provided curve type. deprecated: Curve identifiers are no longer retrievable globally from the skeleton, they are specified per-animation.

Parameters:
Returns:

Valid FAnimationCurveIdentifier if the name exists on the skeleton and the operation was successful, invalid otherwise

Return type:

AnimationCurveIdentifier

get_asset_user_data_of_class(user_data_class) AssetUserData

Returns an instance of the provided AssetUserData class if it’s contained in the target asset.

Parameters:

user_data_class (type(Class)) – UAssetUserData sub class to get

Returns:

The instance of the UAssetUserData class contained, or null if it doesn’t exist

Return type:

AssetUserData

get_blend_profile(profile_name) BlendProfile

Get the specified blend profile by name

Parameters:

profile_name (Name) –

Return type:

BlendProfile

get_curve_identifier(name, curve_type) AnimationCurveIdentifier

Get Curve Identifier deprecated: Please use SetCurveIdentifier.

Parameters:
Return type:

AnimationCurveIdentifier

get_curve_identifiers(curve_type) Array[AnimationCurveIdentifier]

Retrieves all curve identifiers for a specific curve types from the provided Skeleton deprecated: Curve identifiers are no longer retrievable globally from the skeleton, they are specified per-animation.

Parameters:

curve_type (RawCurveTrackTypes) – Type of the curve identifers to retrieve

Returns:

Array of FAnimationCurveIdentifier instances each representing a unique curve if the operation was successful, empyty array otherwise

Return type:

Array[AnimationCurveIdentifier]

get_reference_pose() AnimPose

Populates an Anim Pose with the reference poses stored for the provided USkeleton

Returns:

out_pose (AnimPose): Anim pose to hold the reference pose

Return type:

AnimPose

has_asset_user_data_of_class(user_data_class) bool

Checks whether or not an instance of the provided AssetUserData class is contained.

Parameters:

user_data_class (type(Class)) – UAssetUserData sub class to check for

Returns:

Whether or not an instance of InUserDataClass was found

Return type:

bool