Skip to content

Commit

Permalink
#5721: Only use model loaders matching the file extension to avoid sp…
Browse files Browse the repository at this point in the history
…amming the console with loader errors.
  • Loading branch information
codereader committed Aug 22, 2021
1 parent b5616fe commit a4fc9e9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion radiant/ui/modelexport/ConvertModelDialog.cpp
Expand Up @@ -214,11 +214,12 @@ void ConvertModelDialog::handleInputPathChanged()
return;
}

auto modelExtension = string::to_upper_copy(os::getExtension(inputFilename));
model::IModelPtr model;

GlobalModelFormatManager().foreachImporter([&](const model::IModelImporterPtr& importer)
{
if (!model)
if (!model && importer->getExtension() == modelExtension)
{
model = importer->loadModelFromPath(inputFilename);
}
Expand Down

0 comments on commit a4fc9e9

Please sign in to comment.