FLODUtilities::AdjustImportDataFaceMaterialIndex

Before building skeletalmesh base LOD (LOD index 0) using MeshUtilities.BuildSkeletalMesh, we want to adjust the imported faces material index to point on the correct sk material.

Unreal Engine C++ API Reference > Developer > SkeletalMeshUtilitiesCommon > FLODUtilities

References

   
Module SkeletalMeshUtilitiesCommon
Header /Engine/Source/Developer/SkeletalMeshUtilitiesCommon/Public/LODUtilities.h
Include #include "LODUtilities.h"
Source /Engine/Source/Developer/SkeletalMeshUtilitiesCommon/Private/LODUtilities.cpp
static void AdjustImportDataFaceMaterialIndex
(
    const [TArray](API\Runtime\Core\Containers\TArray)< [FSkeletalMaterial](API\Runtime\Engine\Engine\FSkeletalMaterial) > & Materials,
    [TArray](API\Runtime\Core\Containers\TArray)< [SkeletalMeshImportData::FMaterial](API\Runtime\Engine\Rendering\FMaterial) > & RawMeshMaterials,
    [TArray](API\Runtime\Core\Containers\TArray)< [SkeletalMeshImportData::FMeshFace](API\Runtime\Engine\Rendering\FMeshFace) > & LODFaces,
    int32 LODIndex
)

Remarks

Before building skeletalmesh base LOD (LOD index 0) using MeshUtilities.BuildSkeletalMesh, we want to adjust the imported faces material index to point on the correct sk material. We use the material name to match the material.

Parameters

Name Description
Materials The skeletalmesh material list to fit the import data face material
RawMeshMaterials The import data material list
LODFaces The face to adjust with the material remap
LODIndex We can adjust only the base LOD (LODIndex 0), the function will not do anything if LODIndex is not 0

Ask questions and help your peers Developer Forums

Write your own tutorials or read those from others Learning Library