Browse Source

AnySceneImporter: treat both *.gltf and *.glb the same.

pull/432/head
Vladimír Vondruš 6 years ago
parent
commit
27f4a7073e
  1. 5
      src/MagnumPlugins/AnySceneImporter/AnySceneImporter.cpp
  2. 4
      src/MagnumPlugins/AnySceneImporter/AnySceneImporter.h
  3. 1
      src/MagnumPlugins/AnySceneImporter/Test/AnySceneImporterTest.cpp

5
src/MagnumPlugins/AnySceneImporter/AnySceneImporter.cpp

@ -92,10 +92,9 @@ void AnySceneImporter::doOpenFile(const std::string& filename) {
plugin = "DxfImporter"; plugin = "DxfImporter";
else if(Utility::String::endsWith(normalized, ".fbx")) else if(Utility::String::endsWith(normalized, ".fbx"))
plugin = "FbxImporter"; plugin = "FbxImporter";
else if(Utility::String::endsWith(normalized, ".gltf")) else if(Utility::String::endsWith(normalized, ".gltf") ||
Utility::String::endsWith(normalized, ".glb"))
plugin = "GltfImporter"; plugin = "GltfImporter";
else if(Utility::String::endsWith(normalized, ".glb"))
plugin = "GlbImporter";
else if(Utility::String::endsWith(normalized, ".ifc")) else if(Utility::String::endsWith(normalized, ".ifc"))
plugin = "IfcImporter"; plugin = "IfcImporter";
else if(Utility::String::endsWith(normalized, ".irrmesh") || else if(Utility::String::endsWith(normalized, ".irrmesh") ||

4
src/MagnumPlugins/AnySceneImporter/AnySceneImporter.h

@ -68,8 +68,8 @@ tries to open the file with it. Supported formats:
- DirectX X (`*.x`), loaded with any plugin that provides `DirectXImporter` - DirectX X (`*.x`), loaded with any plugin that provides `DirectXImporter`
- AutoCAD DXF (`*.dxf`), loaded with any plugin that provides `DxfImporter` - AutoCAD DXF (`*.dxf`), loaded with any plugin that provides `DxfImporter`
- Autodesk FBX (`*.fbx`), loaded with any plugin that provides `FbxImporter` - Autodesk FBX (`*.fbx`), loaded with any plugin that provides `FbxImporter`
- glTF (`*.gltf`), loaded with any plugin that provides `GltfImporter` - glTF (`*.gltf`, `*.glb`), loaded with any plugin that provides
- Binary glTF (`*.glb`), loaded with any plugin that provides `GlbImporter` `GltfImporter`
- Industry Foundation Classes (IFC/Step) (`*.ifc`), loaded with any plugin - Industry Foundation Classes (IFC/Step) (`*.ifc`), loaded with any plugin
that provides `IfcImporter` that provides `IfcImporter`
- Irrlicht Mesh and Scene (`*.irrmesh`, `*.irr`), loaded with any plugin that - Irrlicht Mesh and Scene (`*.irrmesh`, `*.irr`), loaded with any plugin that

1
src/MagnumPlugins/AnySceneImporter/Test/AnySceneImporterTest.cpp

@ -76,7 +76,6 @@ constexpr struct {
{"COLLADA", "xml.dae", "ColladaImporter"}, {"COLLADA", "xml.dae", "ColladaImporter"},
{"FBX", "autodesk.fbx", "FbxImporter"}, {"FBX", "autodesk.fbx", "FbxImporter"},
{"glTF", "khronos.gltf", "GltfImporter"}, {"glTF", "khronos.gltf", "GltfImporter"},
{"glTF binary", "khronos.glb", "GlbImporter"},
{"OpenGEX", "eric.ogex", "OpenGexImporter"}, {"OpenGEX", "eric.ogex", "OpenGexImporter"},
{"Stanford PLY", "bunny.ply", "StanfordImporter"}, {"Stanford PLY", "bunny.ply", "StanfordImporter"},
{"Stanford PLY uppercase", "ARMADI~1.PLY", "StanfordImporter"}, {"Stanford PLY uppercase", "ARMADI~1.PLY", "StanfordImporter"},

Loading…
Cancel
Save