Navigation
API > API/Plugins > API/Plugins/GeometryScriptingCore > API/Plugins/GeometryScriptingCore/UGeometryScriptLibrary_MeshBoneW-
Description
Blends two bone weights using an Alpha value that ranges from 0 to 1, inclusive. If Alpha is 0, then only weights from BoneWeightsA are used, and if Alpha is 1, then only weights from BoneWeightsB are used. For any value in between the weights are linearly interpolated. Each bone weight from either array, that has the same bone index, are linearly interpolated. Any bone weights that are missing from either BoneWeightsA or BoneWeightsB, are assumed to exist and have a weight of 0. After blending, the result is renormalized and sorted. Values that are below the influence threshold, or exceeding the default bone weight limit (currently set to 12) will be thrown away.
| Name | BlendBoneWeights |
| Type | function |
| Header File | /Engine/Plugins/Runtime/GeometryScripting/Source/GeometryScriptingCore/Public/GeometryScript/MeshBoneWeightFunctions.h |
| Include Path | #include "GeometryScript/MeshBoneWeightFunctions.h" |
| Source | /Engine/Plugins/Runtime/GeometryScripting/Source/GeometryScriptingCore/Private/MeshBoneWeightFunctions.cpp |
UFUNCTION (BlueprintPure, Category="GeometryScript|MeshQueries|BoneWeights",
Meta=(HidePin="Debug"))
static void BlendBoneWeights
(
const TArray < FGeometryScriptBoneWeight > & BoneWeightsA,
const TArray < FGeometryScriptBoneWeight > & BoneWeightsB,
float Alpha,
TArray < FGeometryScriptBoneWeight > & Result,
UGeometryScriptDebug * Debug
)
Parameters
| Name | Remarks |
|---|---|
| BoneWeightsA | List of bone weights to blend, such that its influence is greatest when Alpha is 0 and smallest when Alpha is 1. |
| BoneWeightsB | List of bone weights to blend, such that its influence is greatest when Alpha is 1 and smallest when Alpha is 0. |
| Alpha | The blending factor, ranging from 0 to 1, inclusive. Values outside of this range are clamped. |
| Result | The resulting blend of the two bone weight arrays. |