Navigation
API > API/Plugins > API/Plugins/SkeletalMeshModifiers > API/Plugins/SkeletalMeshModifiers/USkinWeightModifier
Description
Set bone weights for a single vertex. The weights are stored as supplied and not normalized until either "CommitWeightsToSkeletalMesh()" or "NormalizeVertexWeights()" is called.
| Name | SetVertexWeights |
| Type | function |
| Header File | /Engine/Plugins/Runtime/MeshModelingToolset/Source/SkeletalMeshModifiers/Public/SkinWeightModifier.h |
| Include Path | #include "SkinWeightModifier.h" |
| Source | /Engine/Plugins/Runtime/MeshModelingToolset/Source/SkeletalMeshModifiers/Private/SkinWeightModifier.cpp |
UFUNCTION (BlueprintCallable, Category="Weights")
bool SetVertexWeights
(
const int32 VertexID,
const TMap < FName , float > & InWeights,
const bool bReplaceAll
)
Parameters
| Name | Remarks |
|---|---|
| VertexID | the index of the vertex |
| InWeights | a map of Bone-Name to Weight for all bones that influence the specified vertex, ie {"Head": 0.6, "Neck": 0.4} |
| bReplaceAll | if true, all weights on this vertex will be replaced with the input weights. Default is false. |