From 67be997af550d9f91f1b1733f64d901d543473b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Wed, 18 Jan 2023 21:11:33 +0100 Subject: [PATCH] AnySceneImporter: add a TODO for recognizing `*.mtl`. While UfbxImporter knows to import these directly, AssimpImporter tries to load them as FBX and fails (heh!), and ObjImporter has no idea about materials at all, so recognizing this extension would only add more harm than good at the moment. --- src/MagnumPlugins/AnySceneImporter/AnySceneImporter.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/MagnumPlugins/AnySceneImporter/AnySceneImporter.cpp b/src/MagnumPlugins/AnySceneImporter/AnySceneImporter.cpp index 83f5a2d72..4e34e620f 100644 --- a/src/MagnumPlugins/AnySceneImporter/AnySceneImporter.cpp +++ b/src/MagnumPlugins/AnySceneImporter/AnySceneImporter.cpp @@ -120,6 +120,9 @@ void AnySceneImporter::doOpenFile(const Containers::StringView filename) { plugin = "ModoImporter"_s; else if(normalizedExtension == ".ms3d"_s) plugin = "MilkshapeImporter"_s; + /** @todo pass `*.mtl` files to ObjImporter as well, once the builtin one + can handle materials and can open them directly (UfbxImporter can, + Assimp tries to open them as a FBX ffs) */ else if(normalizedExtension == ".obj"_s) plugin = "ObjImporter"_s; else if(normalizedExtension == ".xml"_s)