Merge branch 'OnlyCreateMaterialSlots' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-OnlyCreateMaterialSlots

# Conflicts:
#	Source/Engine/Tools/ModelTool/ModelTool.h
This commit is contained in:
Wojtek Figat
2026-03-25 17:15:47 +01:00
2 changed files with 12 additions and 5 deletions

View File

@@ -1335,7 +1335,7 @@ bool ModelTool::ImportModel(const String& path, ModelData& data, Options& option
auto& texture = data.Textures[i];
// Auto-import textures
if (autoImportOutput.IsEmpty() || EnumHasNoneFlags(options.ImportTypes, ImportDataTypes::Textures) || texture.FilePath.IsEmpty())
if (autoImportOutput.IsEmpty() || EnumHasNoneFlags(options.ImportTypes, ImportDataTypes::Textures) || texture.FilePath.IsEmpty() || options.CreateEmptyMaterialSlots)
continue;
String assetPath = GetAdditionalImportPath(autoImportOutput, importedFileNames, StringUtils::GetFileNameWithoutExtension(texture.FilePath));
#if COMPILE_WITH_ASSETS_IMPORTER
@@ -1391,6 +1391,10 @@ bool ModelTool::ImportModel(const String& path, ModelData& data, Options& option
}
}
// The rest of the steps this function performs become irrelevant when we're only creating slots.
if (options.CreateEmptyMaterialSlots)
continue;
if (options.ImportMaterialsAsInstances)
{
// Create material instance