Navigation
API > API/Developer > API/Developer/MeshBoneReduction > API/Developer/MeshBoneReduction/IMeshBoneReduction
Description
Build a list of bone names that do not have vertices weighted against them.
This function will iterate through all LODs and determines which bones are referenced by skin weights and adds these to the array of bones to be kept, along with the given bones to force keep as well as all parents of such bones up to the root bone. All remaining bones will be added to the output removal list.
The output can be used for bone count reduction for leaf skeletal meshes where we only need to process bones that actually influence any vertices. Don't use this for partly invisible skeletal meshes holding bones driving attachments.
| Name | BuildBonesToBeRemovedUsedBySkinWeights |
| Type | function |
| Header File | /Engine/Source/Developer/MeshBoneReduction/Public/MeshBoneReduction.h |
| Include Path | #include "MeshBoneReduction.h" |
void BuildBonesToBeRemovedUsedBySkinWeights
(
const USkeletalMesh * SkeletalMesh,
const TArray< FName > & ForceKeepBones,
TArray< FName > & OutBonesToRemove
)
Parameters
| Name | Remarks |
|---|---|
| SkeletalMesh | The skeletal mesh to analyze. If null, no bones will be removed. |
| ForceKeepBones | Optional list of bone names that must be preserved regardless of skin weight usage. |
| OutBonesToRemove | Output array populated with the names of bones that can be removed. |