Fix regression of importing only a single material for models with split objects enabled

#1483
This commit is contained in:
Wojtek Figat
2023-09-22 19:43:00 +02:00
parent 0948f7f18e
commit 248304a78f
3 changed files with 22 additions and 7 deletions

View File

@@ -910,10 +910,6 @@ bool ModelTool::ImportModel(const String& path, ModelData& meshData, Options& op
{
auto& texture = data.Textures[i];
// When splitting imported meshes allow only the first mesh to import assets (mesh[0] is imported after all following ones so import assets during mesh[1])
if (!options.SplitObjects && options.ObjectIndex != 1 && options.ObjectIndex != -1)
continue;
// Auto-import textures
if (autoImportOutput.IsEmpty() || (data.Types & ImportDataTypes::Textures) == ImportDataTypes::None || texture.FilePath.IsEmpty())
continue;