unreal.GeometryScript_BoneWeights

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

Bases: BlueprintFunctionLibrary

Geometry Script Library Mesh Bone Weight Functions

C++ Source:

  • Plugin: GeometryScripting

  • Module: GeometryScriptingCore

  • File: MeshBoneWeightFunctions.h

classmethod compute_smooth_bone_weights(target_mesh, skeleton, options, profile=['Default'], debug=None) DynamicMesh

Computes a smooth skin binding for the given mesh to the skeleton provided.

Parameters:
Return type:

DynamicMesh

classmethod get_largest_vertex_bone_weight(target_mesh, vertex_id, profile=["Default"]) -> (DynamicMesh, bone_weight=GeometryScriptBoneWeight, has_valid_bone_weights=bool)

Return the Bone/Skin Weight with the maximum weight at a given vertex of TargetMesh

Parameters:
Returns:

bone_weight (GeometryScriptBoneWeight): the bone index and weight that was found to have the maximum weight

has_valid_bone_weights (bool): will be returned as true if the vertex has bone weights in the given profile and a largest weight was found

Return type:

tuple

classmethod get_max_bone_weight_index(target_mesh, profile=["Default"]) -> (DynamicMesh, has_bone_weights=bool, max_bone_index=int32)

Determine the largest bone weight index that exists on the Mesh

Parameters:
Returns:

has_bone_weights (bool): will be returned true if the requested bone weight profile exists

max_bone_index (int32): maximum bone index will be returned here, or -1 if no bone indices exist

Return type:

tuple

classmethod get_vertex_bone_weights(target_mesh, vertex_id, profile=["Default"]) -> (DynamicMesh, bone_weights=Array[GeometryScriptBoneWeight], has_valid_bone_weights=bool)

Return an array of Bone/Skin Weights at a given vertex of TargetMesh

Parameters:
Returns:

bone_weights (Array[GeometryScriptBoneWeight]): output array of bone index/weight pairs for the given Vertex

has_valid_bone_weights (bool): will be returned as true if the vertex has bone weights in the given profile, ie BoneWeights is valid

Return type:

tuple

classmethod mesh_create_bone_weights(target_mesh, replace_existing_profile=False, profile=["Default"]) -> (DynamicMesh, profile_existed=bool)

Create a new BoneWeights attribute on the TargetMesh, if it does not already exist. If it does exist, and bReplaceExistingProfile is passed as true, the attribute will be removed and re-added, to reset it.

Parameters:
Returns:

profile_existed (bool): will be returned true if the requested bone weight profile already existed

Return type:

bool

classmethod mesh_has_bone_weights(target_mesh, profile=["Default"]) -> (DynamicMesh, has_bone_weights=bool)

Check whether the TargetMesh has a per-vertex Bone/Skin Weight Attribute set

Parameters:
Returns:

has_bone_weights (bool): will be returned true if the requested bone weight profile exists

Return type:

bool

classmethod set_all_vertex_bone_weights(target_mesh, bone_weights, profile=['Default']) DynamicMesh

Set all vertices of the TargetMesh to the given Bone/Skin Weights

Parameters:
Return type:

DynamicMesh

classmethod set_vertex_bone_weights(target_mesh, vertex_id, bone_weights, profile=["Default"]) -> (DynamicMesh, is_valid_vertex_id=bool)

Set the Bone/Skin Weights at a given vertex of TargetMesh

Parameters:
Returns:

is_valid_vertex_id (bool): will be returned as true if the vertex ID is valid

Return type:

bool