add model import option to only create material slots
but not import actual materials
This commit is contained in:
@@ -1430,7 +1430,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
|
||||
@@ -1486,6 +1486,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
|
||||
|
||||
Reference in New Issue
Block a user