浏览代码

restored gltf checks.

Marco Di Benedetto 7 年之前
父节点
当前提交
5f38bd01ec
共有 2 个文件被更改,包括 4 次插入4 次删除
  1. 2 2
      code/glTF2Importer.cpp
  2. 2 2
      code/glTFImporter.cpp

+ 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);
     const std::string &extension = GetExtension(pFile);
 
 
-    if (extension == "gltf" || extension == "glb")
-        return true;
+    if (extension != "gltf" && extension != "glb")
+        return false;
 
 
     if (pIOHandler) {
     if (pIOHandler) {
         glTF2::Asset asset(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);
     const std::string &extension = GetExtension(pFile);
 
 
-    if (extension == "gltf" || extension == "glb")
-        return true;
+    if (extension != "gltf" && extension != "glb")
+        return false;
 
 
     if (pIOHandler) {
     if (pIOHandler) {
         glTF::Asset asset(pIOHandler);
         glTF::Asset asset(pIOHandler);