From f2ff6bd94de1a5fcde5609e98bcbf57a4b8f2b79 Mon Sep 17 00:00:00 2001 From: pere rifa Date: Tue, 1 Oct 2024 20:00:02 -0400 Subject: [PATCH] [Mutable] Add missing FFileCategoryID constructors. #rnx [CL 36760790 by pere rifa in 5.5 branch] --- .../Internal/MuCO/CustomizableObjectPrivate.h | 4 ++++ .../Private/MuCO/CustomizableObject.cpp | 12 +++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Engine/Plugins/Mutable/Source/CustomizableObject/Internal/MuCO/CustomizableObjectPrivate.h b/Engine/Plugins/Mutable/Source/CustomizableObject/Internal/MuCO/CustomizableObjectPrivate.h index 7fd313782bf9..588edecf052c 100644 --- a/Engine/Plugins/Mutable/Source/CustomizableObject/Internal/MuCO/CustomizableObjectPrivate.h +++ b/Engine/Plugins/Mutable/Source/CustomizableObject/Internal/MuCO/CustomizableObjectPrivate.h @@ -827,6 +827,10 @@ namespace MutablePrivate struct FFileCategoryID { + FFileCategoryID(EDataType DataType, uint16 ResourceType, uint16 Flags); + + FFileCategoryID() = default; + // DATATYPE EDataType DataType = EDataType::None; diff --git a/Engine/Plugins/Mutable/Source/CustomizableObject/Private/MuCO/CustomizableObject.cpp b/Engine/Plugins/Mutable/Source/CustomizableObject/Private/MuCO/CustomizableObject.cpp index 5bb2d419ebea..6aa657039bd6 100644 --- a/Engine/Plugins/Mutable/Source/CustomizableObject/Private/MuCO/CustomizableObject.cpp +++ b/Engine/Plugins/Mutable/Source/CustomizableObject/Private/MuCO/CustomizableObject.cpp @@ -2549,6 +2549,12 @@ namespace MutablePrivate } } + FFileCategoryID::FFileCategoryID(EDataType InDataType, uint16 InResourceType, uint16 InFlags) + { + DataType = InDataType; + ResourceType = InResourceType; + Flags = InFlags; + } uint32 GetTypeHash(const FFileCategoryID& Key) { @@ -2627,11 +2633,11 @@ namespace MutablePrivate // Model Roms. Iterate all Model roms to distribute them in categories. { // Add meshes and low-res textures to the Default bucket - DefaultBucket.Categories.Add({ FFileCategoryID(EDataType::Model, mu::DATATYPE::DT_MESH, 0) }); - DefaultBucket.Categories.Add({ FFileCategoryID(EDataType::Model, mu::DATATYPE::DT_IMAGE, 0) }); + DefaultBucket.Categories.Add({ FFileCategoryID(EDataType::Model, mu::DATATYPE::DT_MESH, 0), 0, 0, 0 }); + DefaultBucket.Categories.Add({ FFileCategoryID(EDataType::Model, mu::DATATYPE::DT_IMAGE, 0), 0, 0, 0 }); // Add High-res textures to the Optional bucket - OptionalBucket.Categories.Add({ FFileCategoryID(EDataType::Model, mu::DATATYPE::DT_IMAGE, (uint16)mu::ERomFlags::HighRes) }); + OptionalBucket.Categories.Add({ FFileCategoryID(EDataType::Model, mu::DATATYPE::DT_IMAGE, (uint16)mu::ERomFlags::HighRes), 0, 0, 0}); const int32 NumRoms = Model->GetRomCount(); for (int32 RomIndex = 0; RomIndex < NumRoms; ++RomIndex)