unreal.SkeletonModifier

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

Bases: Object

FSkeletalMeshSkeletonModifier

C++ Source:

  • Plugin: MeshModelingToolsetExp

  • Module: SkeletalMeshModifiers

  • File: SkeletonModifier.h

add_bone(bone_name, parent_name, transform) bool

Creates a new bone in the skeleton hierarchy at desired transform

Parameters:
  • bone_name (Name) – The new bone’s name.

  • parent_name (Name) – The new bone parent’s name.

  • transform (Transform) – The default local transform in the parent space.

Returns:

c true if the operation succeeded, false otherwise.

Return type:

bool

add_bones(bones_name, parents_name, transforms) bool

Add Bones

Parameters:
Return type:

bool

commit_skeleton_to_skeletal_mesh() bool

Actually applies the skeleton modifications to the skeletal mesh.

Returns:

true if commit succeeded.

Return type:

bool

get_all_bone_names() Array[Name]

Get All Bone Names

Returns:

c All bone names list

Return type:

Array[Name]

get_bone_transform(bone_name, global_=False) Transform

Get Bone Transform

Parameters:
  • bone_name (Name) – The current bone’s name.

  • global (bool) – Whether it should return the parent space or global transform

Returns:

c The current bone’s transform

Return type:

Transform

get_children_names(bone_name, recursive=False) Array[Name]

Get Children Names

Parameters:
  • bone_name (Name) – The parent’s name.

  • recursive (bool) – If set to true grand-children will also be added recursively

Returns:

c The children names list

Return type:

Array[Name]

get_parent_name(bone_name) Name

Get Parent Name

Parameters:

bone_name (Name) – The current bone’s name.

Returns:

c The current bone’s parent name

Return type:

Name

mirror_bone(bone_name, options=[AxisType.X, True, '_l', '_r', True]) bool

Mirror bones

Parameters:
  • bone_name (Name) – The new bone’s name.

  • options (MirrorOptions) – The mirroring options

Returns:

c true if the operation succeeded, false otherwise.

Return type:

bool

mirror_bones(bones_name, options=[AxisType.X, True, '_l', '_r', True]) bool

Mirror Bones

Parameters:
Return type:

bool

orient_bone(bone_name, options=[OrientAxis.POSITIVE_X, OrientAxis.POSITIVE_Y, True, [0.000000, 1.000000, 0.000000], True]) bool

Align bones

Parameters:
  • bone_name (Name) – The current bone’s name.

  • options (OrientOptions) – The orienting options

Returns:

c true if the operation succeeded, false otherwise.

Return type:

bool

orient_bones(bone_names, options=[OrientAxis.POSITIVE_X, OrientAxis.POSITIVE_Y, True, [0.000000, 1.000000, 0.000000], True]) bool

Orient Bones

Parameters:
Return type:

bool

parent_bone(bone_name, parent_name) bool

Parent bones

Parameters:
  • bone_name (Name) – The current bone’s name.

  • parent_name (Name) – The new parent’s name (Name_NONE to unparent).

Returns:

c true if the operation succeeded, false otherwise.

Return type:

bool

parent_bones(bone_names, parent_names) bool

Parent Bones

Parameters:
Return type:

bool

remove_bone(bone_name, remove_children) bool

Remove a bone in the skeleton hierarchy

Parameters:
  • bone_name (Name) – The new bone’s name.

  • remove_children (bool) – Remove children recursively.

Returns:

c true if the operation succeeded, false otherwise.

Return type:

bool

remove_bones(bone_names, remove_children) bool

Remove Bones

Parameters:
Return type:

bool

rename_bone(old_bone_name, new_bone_name) bool

Rename bones

Parameters:
  • old_bone_name (Name) – The current bone’s name.

  • new_bone_name (Name) – The new bone’s name.

Returns:

c true if the operation succeeded, false otherwise.

Return type:

bool

rename_bones(old_bone_names, new_bone_names) bool

Rename Bones

Parameters:
Return type:

bool

set_bone_transform(bone_name, new_transform, move_children) bool

Sets the bone the desired local transform

Parameters:
  • bone_name (Name) – The new bone’s name that needs to be moved.

  • new_transform (Transform) – The new local transform in the bone’s parent space.

  • move_children (bool) – Propagate new transform to children

Returns:

c true if the operation succeeded, false otherwise.

Return type:

bool

set_bones_transforms(bone_names, new_transforms, move_children) bool

Set Bones Transforms

Parameters:
Return type:

bool

set_skeletal_mesh(skeletal_mesh) bool

Set Skeletal Mesh

Parameters:

skeletal_mesh (SkeletalMesh) –

Return type:

bool