unreal.AnimationAsset

class unreal.AnimationAsset(outer: Optional[Object] = None, name: Union[Name, str] = 'None')

Bases: Object

Animation Asset

C++ Source:

  • Module: Engine

  • File: AnimationAsset.h

Editor Properties: (see get_editor_property/set_editor_property)

  • asset_mapping_table (AssetMappingTable): [Read-Only] Asset Mapping Table: Asset mapping table when ParentAsset is set

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

  • meta_data (Array[AnimMetaData]): [Read-Write] Meta Data: Meta data that can be saved with the asset

    You can query by GetMetaData function

  • parent_asset (AnimationAsset): [Read-Only] Parent Asset: Parent Asset, if set, you won’t be able to edit any data in here but just mapping table

    During cooking, this data will be used to bake out to normal asset

  • preview_pose_asset (PoseAsset): [Read-Write] Preview Pose Asset: The default skeletal mesh to use when previewing this asset - this only applies when you open Persona using this asset// todo:: note that this doesn’t retarget right now

  • skeleton (Skeleton): [Read-Only] Skeleton: Pointer to the Skeleton this asset can be played on .

  • thumbnail_info (ThumbnailInfo): [Read-Only] Thumbnail Info: Information for thumbnail rendering

create_attribute_identifier(attribute_name, bone_name, attribute_type, validate_exists_on_asset=False) AnimationAttributeIdentifier

Constructs a valid FAnimationAttributeIdentifier instance. Ensuring that the underlying BoneName exists on the Skeleton for the provided AnimationAsset.

Parameters:
  • attribute_name (Name) – Name of the attribute

  • bone_name (Name) – Name of the bone this attribute should be attributed to

  • attribute_type (ScriptStruct) – Type of the underlying data (to-be) stored by this attribute

  • validate_exists_on_asset (bool) – Whether or not the attribute should exist on the AnimationAsset. False by default.

Returns:

Valid FAnimationCurveIdentifier if the operation was successful

Return type:

AnimationAttributeIdentifier

get_play_length() float

Get Play Length

Return type:

float

get_skeleton() Skeleton
Returns:

The target USkeleton for the provided UAnimationAsset

Return type:

Skeleton

set_preview_skeletal_mesh(preview_mesh) None

Sets or updates the preview skeletal mesh

Parameters:

preview_mesh (SkeletalMesh) –