unreal.AnimPose

class unreal.AnimPose

Bases: StructBase

Script friendly representation of an evaluated animation bone pose

C++ Source:

  • Module: AnimationBlueprintLibrary

  • File: AnimPose.h

evaluate_animation_blueprint_with_input_pose(target_skeletal_mesh, animation_blueprint) AnimPose

Evaluates an Animation Blueprint instance, using the provided Anim Pose and its Input Pose value, generating a valid Anim Pose using the result. Warning this function may cause performance issues.

Parameters:
  • target_skeletal_mesh (SkeletalMesh) – USkeletalMesh object used as the target skeletal mesh, should have same USkeleton as InputPose and Animation Blueprint

  • animation_blueprint (AnimBlueprint) – Animation Blueprint to generate an AnimInstance with, used to evaluate the output Anim Pose

Returns:

out_pose (AnimPose): Anim pose to hold the data from evaluating the Animation Blueprint instance

Return type:

AnimPose

get_bone_names() Array[Name]

Returns an array of bone names contained by the pose

Returns:

bones (Array[Name]): Array to be populated with the bone names

Return type:

Array[Name]

get_bone_pose(bone_name, space=AnimPoseSpaces.LOCAL) Transform

Retrieves the transform for the provided bone name from a pose

Parameters:
  • bone_name (Name) – Name of the bone to retrieve

  • space (AnimPoseSpaces) – Space in which the transform should be retrieved

Returns:

Transform in requested space for bone if found, otherwise return identity transform

Return type:

Transform

get_curve_names() Array[Name]

Returns an array of curve names contained by the pose

Returns:

curves (Array[Name]): Array to be populated with the curve names

Return type:

Array[Name]

get_curve_weight(curve_name) float

Returns the weight of an evaluated curve - if found

Parameters:

curve_name (Name) – Curve to retrieve the weight value for

Returns:

Curve weight value, if found - 0.f otherwise

Return type:

float

get_ref_bone_pose(bone_name, space=AnimPoseSpaces.LOCAL) Transform

Retrieves the reference pose transform for the provided bone name

Parameters:
  • bone_name (Name) – Name of the bone to retrieve

  • space (AnimPoseSpaces) – Space in which the transform should be retrieved

Returns:

Transform in requested space for bone if found, otherwise return identity transform

Return type:

Transform

get_ref_pose_relative_transform(from_bone_name, to_bone_name, space=AnimPoseSpaces.LOCAL) Transform

Retrieves the relative transform for the reference pose between the two provided bone names

Parameters:
  • from_bone_name (Name) – Name of the bone to retrieve the transform relative from

  • to_bone_name (Name) – Name of the bone to retrieve the transform relative to

  • space (AnimPoseSpaces) – Space in which the transform should be retrieved

Returns:

Relative transform in requested space for bone if found, otherwise return identity transform

Return type:

Transform

get_relative_to_ref_pose_transform(bone_name, space=AnimPoseSpaces.LOCAL) Transform

Retrieves the relative transform between reference and animated bone transform

Parameters:
  • bone_name (Name) – Name of the bone to retrieve the relative transform for

  • space (AnimPoseSpaces) – Space in which the transform should be retrieved

Returns:

Relative transform in requested space for bone if found, otherwise return identity transform

Return type:

Transform

get_relative_transform(from_bone_name, to_bone_name, space=AnimPoseSpaces.LOCAL) Transform

Retrieves the relative transform between the two provided bone names

Parameters:
  • from_bone_name (Name) – Name of the bone to retrieve the transform relative from

  • to_bone_name (Name) – Name of the bone to retrieve the transform relative to

  • space (AnimPoseSpaces) – Space in which the transform should be retrieved

Returns:

Relative transform in requested space for bone if found, otherwise return identity transform

Return type:

Transform

is_valid() bool

Returns whether the Anim Pose contains valid data

Returns:

Result of the validation

Return type:

bool

set_bone_pose(transform, bone_name, space=AnimPoseSpaces.LOCAL) None

Sets the transform for the provided bone name for a pose

Parameters:
  • transform (Transform) – Transform to set the bone to

  • bone_name (Name) – Name of the bone to set

  • space (AnimPoseSpaces) – Space in which the transform should be set