Add Split Objects object to split imported meshes/animations into separate assets

This commit is contained in:
Wojciech Figat
2021-11-24 17:40:56 +01:00
parent 4322563eed
commit 05d0e1bdcc
9 changed files with 536 additions and 390 deletions

View File

@@ -54,7 +54,6 @@ void ModelTool::Options::Serialize(SerializeStream& stream, const void* otherObj
SERIALIZE(OptimizeKeyframes);
SERIALIZE(EnableRootMotion);
SERIALIZE(RootNodeName);
SERIALIZE(AnimationIndex);
SERIALIZE(GenerateLODs);
SERIALIZE(BaseLOD);
SERIALIZE(LODCount);
@@ -62,6 +61,8 @@ void ModelTool::Options::Serialize(SerializeStream& stream, const void* otherObj
SERIALIZE(ImportMaterials);
SERIALIZE(ImportTextures);
SERIALIZE(RestoreMaterialsOnReimport);
SERIALIZE(SplitObjects);
SERIALIZE(ObjectIndex);
}
void ModelTool::Options::Deserialize(DeserializeStream& stream, ISerializeModifier* modifier)
@@ -90,7 +91,6 @@ void ModelTool::Options::Deserialize(DeserializeStream& stream, ISerializeModifi
DESERIALIZE(OptimizeKeyframes);
DESERIALIZE(EnableRootMotion);
DESERIALIZE(RootNodeName);
DESERIALIZE(AnimationIndex);
DESERIALIZE(GenerateLODs);
DESERIALIZE(BaseLOD);
DESERIALIZE(LODCount);
@@ -98,6 +98,14 @@ void ModelTool::Options::Deserialize(DeserializeStream& stream, ISerializeModifi
DESERIALIZE(ImportMaterials);
DESERIALIZE(ImportTextures);
DESERIALIZE(RestoreMaterialsOnReimport);
DESERIALIZE(SplitObjects);
DESERIALIZE(ObjectIndex);
// [Deprecated on 23.11.2021, expires on 21.11.2023]
int32 AnimationIndex = -1;
DESERIALIZE(AnimationIndex);
if (AnimationIndex != -1)
ObjectIndex = AnimationIndex;
}
#endif