unreal.AnimPoseExtensions

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

Bases: unreal.BlueprintFunctionLibrary

Script exposed functionality for populating, retrieving data from and setting data on FAnimPose

C++ Source:

  • Module: AnimationBlueprintLibrary

  • File: AnimPose.h

classmethod evaluate_animation_blueprint_with_input_pose(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
  • input_pose (AnimPose) – Anim Pose used to populate the input pose node value inside of the Animation Blueprint

  • 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

classmethod get_anim_pose_at_frame(animation_sequence_base, frame_index, evaluation_options) AnimPose

Evaluates an Animation Sequence Base to generate a valid Anim Pose instance

Parameters
  • animation_sequence_base (AnimSequenceBase) – Animation sequence base to evaluate the pose from

  • frame_index (int32) – Exact frame at which the pose should be evaluated

  • evaluation_options (AnimPoseEvaluationOptions) – Options determining the way the pose should be evaluated

Returns

pose (AnimPose): Anim Pose to hold the evaluated data

Return type

AnimPose

classmethod get_anim_pose_at_time(animation_sequence_base, time, evaluation_options) AnimPose

Evaluates an Animation Sequence Base to generate a valid Anim Pose instance

Parameters
  • animation_sequence_base (AnimSequenceBase) – Animation sequence base to evaluate the pose from

  • time (float) – Time at which the pose should be evaluated

  • evaluation_options (AnimPoseEvaluationOptions) – Options determining the way the pose should be evaluated

Returns

pose (AnimPose): Anim Pose to hold the evaluated data

Return type

AnimPose

classmethod get_bone_names(pose)

Returns an array of bone names contained by the pose

Parameters

pose (AnimPose) – Anim Pose to retrieve the names from

Returns

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

Return type

Array(Name)

classmethod get_bone_pose(pose, bone_name, space=AnimPoseSpaces.LOCAL) Transform

Retrieves the transform for the provided bone name from a pose

Parameters
  • pose (AnimPose) – Anim Pose to retrieve the transform from

  • 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

classmethod get_ref_bone_pose(pose, bone_name, space=AnimPoseSpaces.LOCAL) Transform

Retrieves the reference pose transform for the provided bone name

Parameters
  • pose (AnimPose) – Anim Pose to retrieve the transform from

  • 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

classmethod get_ref_pose_relative_transform(pose, 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
  • pose (AnimPose) – Anim Pose to retrieve the transform from

  • 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

classmethod get_reference_pose(skeleton) AnimPose

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

Parameters

skeleton (Skeleton) – USkeleton object to retrieve the reference pose from

Returns

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

Return type

AnimPose

classmethod get_relative_to_ref_pose_transform(pose, bone_name, space=AnimPoseSpaces.LOCAL) Transform

Retrieves the relative transform between reference and animated bone transform

Parameters
  • pose (AnimPose) – Anim Pose to retrieve the transform from

  • 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

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

Retrieves the relative transform between the two provided bone names

Parameters
  • pose (AnimPose) – Anim Pose to retrieve the transform from

  • 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

classmethod is_valid(pose) bool

Returns whether the Anim Pose contains valid data

Parameters

pose (AnimPose) – Anim Pose to validate

Returns

Result of the validation

Return type

bool

classmethod set_bone_pose(pose, transform, bone_name, space=AnimPoseSpaces.LOCAL) AnimPose

Sets the transform for the provided bone name for a pose

Parameters
  • pose (AnimPose) – Anim Pose to set transform in

  • 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

Returns

pose (AnimPose): Anim Pose to set transform in

Return type

AnimPose