Add required options for material instance importing.

This commit is contained in:
Menotdan
2023-05-20 00:03:40 -04:00
parent 0d3bae3761
commit 9a71e0274f
4 changed files with 34 additions and 0 deletions

View File

@@ -61,6 +61,8 @@ void ModelTool::Options::Serialize(SerializeStream& stream, const void* otherObj
SERIALIZE(LODCount);
SERIALIZE(TriangleReduction);
SERIALIZE(ImportMaterials);
SERIALIZE(ImportMaterialsAsInstances);
SERIALIZE(InstanceToImportAs);
SERIALIZE(ImportTextures);
SERIALIZE(RestoreMaterialsOnReimport);
SERIALIZE(GenerateSDF);
@@ -102,6 +104,8 @@ void ModelTool::Options::Deserialize(DeserializeStream& stream, ISerializeModifi
DESERIALIZE(LODCount);
DESERIALIZE(TriangleReduction);
DESERIALIZE(ImportMaterials);
DESERIALIZE(ImportMaterialsAsInstances);
DESERIALIZE(InstanceToImportAs);
DESERIALIZE(ImportTextures);
DESERIALIZE(RestoreMaterialsOnReimport);
DESERIALIZE(GenerateSDF);

View File

@@ -11,6 +11,7 @@
#include "Engine/Graphics/Models/ModelData.h"
#include "Engine/Graphics/Models/SkeletonData.h"
#include "Engine/Animations/AnimationData.h"
#include <Engine/Content/Assets/Material.h>
class JsonWriter;
@@ -247,6 +248,8 @@ public:
// Materials
bool ImportMaterials = true;
bool ImportMaterialsAsInstances = false;
Guid InstanceToImportAs;
bool ImportTextures = true;
bool RestoreMaterialsOnReimport = true;