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:
target_mesh (DynamicMesh) –
skeleton (Skeleton) – The skeleton to compute binding for the skin weights.
options (GeometryScriptSmoothBoneWeightsOptions) – The options to set for the binding algorithm.
profile (GeometryScriptBoneWeightProfile) – The skin weight profile to update with the smooth binding.
debug (GeometryScriptDebug) –
- Return type:
- 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:
target_mesh (DynamicMesh) –
vertex_id (int32) – requested vertex
profile (GeometryScriptBoneWeightProfile) – identifier for the bone/skin weight profile
- 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:
target_mesh (DynamicMesh) –
profile (GeometryScriptBoneWeightProfile) – identifier for the bone/skin weight profile
- 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:
target_mesh (DynamicMesh) –
vertex_id (int32) – requested vertex
profile (GeometryScriptBoneWeightProfile) – identifier for the bone/skin weight profile
- 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:
target_mesh (DynamicMesh) –
replace_existing_profile (bool) – if true, if the Profile already exists, it is reset
profile (GeometryScriptBoneWeightProfile) – identifier for the bone/skin weight profile
- Returns:
profile_existed (bool): will be returned true if the requested bone weight profile already existed
- Return type:
- 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:
target_mesh (DynamicMesh) –
profile (GeometryScriptBoneWeightProfile) – identifier for the bone/skin weight profile
- Returns:
has_bone_weights (bool): will be returned true if the requested bone weight profile exists
- Return type:
- 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:
target_mesh (DynamicMesh) –
bone_weights (Array[GeometryScriptBoneWeight]) – input array of bone index/weight pairs for the Vertex
profile (GeometryScriptBoneWeightProfile) – identifier for the bone/skin weight profile
- Return type:
- 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:
target_mesh (DynamicMesh) –
vertex_id (int32) – vertex to update
bone_weights (Array[GeometryScriptBoneWeight]) – input array of bone index/weight pairs for the Vertex
profile (GeometryScriptBoneWeightProfile) – identifier for the bone/skin weight profile
- Returns:
is_valid_vertex_id (bool): will be returned as true if the vertex ID is valid
- Return type: