2
0
Эх сурвалжийг харах

gltf instant ok on valid extension.

Marco Di Benedetto 7 жил өмнө
parent
commit
c749594e9d

+ 2 - 2
code/glTF2Importer.cpp

@@ -103,8 +103,8 @@ bool glTF2Importer::CanRead(const std::string& pFile, IOSystem* pIOHandler, bool
 {
     const std::string &extension = GetExtension(pFile);
 
-    if (extension != "gltf" && extension != "glb")
-        return false;
+    if (extension == "gltf" || extension == "glb")
+        return true;
 
     if (pIOHandler) {
         glTF2::Asset asset(pIOHandler);

+ 2 - 2
code/glTFImporter.cpp

@@ -102,8 +102,8 @@ bool glTFImporter::CanRead(const std::string& pFile, IOSystem* pIOHandler, bool
 {
     const std::string &extension = GetExtension(pFile);
 
-    if (extension != "gltf" && extension != "glb")
-        return false;
+    if (extension == "gltf" || extension == "glb")
+        return true;
 
     if (pIOHandler) {
         glTF::Asset asset(pIOHandler);