Navigation
API > API/Runtime > API/Runtime/SkeletalMeshDescription > API/Runtime/SkeletalMeshDescription/FSkeletalMeshOperations
Description
Copies skin weight attribute from one mesh to another. Assumes the two geometries are identical or near-identical. Uses closest triangle on the target mesh to interpolate skin weights to each of the points on the target mesh. Attributes for the given profiles on both meshes should exist in order for this function to succeed.
| Name | CopySkinWeightAttributeFromMesh |
| Type | function |
| Header File | /Engine/Source/Runtime/SkeletalMeshDescription/Public/SkeletalMeshOperations.h |
| Include Path | #include "SkeletalMeshOperations.h" |
| Source | /Engine/Source/Runtime/SkeletalMeshDescription/Private/SkeletalMeshOperations.cpp |
static bool CopySkinWeightAttributeFromMesh
(
const FMeshDescription & InSourceMesh,
FMeshDescription & InTargetMesh,
const FName InSourceProfile,
const FName InTargetProfile,
const TMap < int32, int32 > * SourceBoneIndexToTargetBoneIndexMap
)
Parameters
| Name | Remarks |
|---|---|
| InSourceMesh | The mesh to copy skin weights from. |
| InTargetMesh | The mesh to copy skin weights to. |
| InSourceProfile | The name of the skin weight profile on the source mesh to read from. |
| InTargetProfile | The name of the skin weight profile on the target mesh to write to. |
| SourceBoneIndexToTargetBoneIndexMap | An optional mapping table to map bone indexes on the source mesh to the target mesh. The table needs to be complete for all the source bone indexes to valid target bone indexes, otherwise the behavior is undefined. If the table is not given, the bone indexes on the source and target meshes are assumed to be the same. |