From 0b34089df00740c86606c70995e367f75cc4dc0c Mon Sep 17 00:00:00 2001 From: VennGrayDog Date: Mon, 15 May 2017 02:27:14 -0400 Subject: [PATCH] Added TokensForSearch in BlenderLoader to allow CanRead return true for in-memory files. --- code/BlenderLoader.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/BlenderLoader.cpp b/code/BlenderLoader.cpp index b9a4e8890..1453ef000 100644 --- a/code/BlenderLoader.cpp +++ b/code/BlenderLoader.cpp @@ -110,6 +110,7 @@ BlenderImporter::~BlenderImporter() } static const char* Tokens[] = { "BLENDER" }; +static const char* TokensForSearch[] = { "blender" }; // ------------------------------------------------------------------------------------------------ // Returns whether the class can handle the format of the given file. @@ -122,7 +123,7 @@ bool BlenderImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, b else if ((!extension.length() || checkSig) && pIOHandler) { // note: this won't catch compressed files - return SearchFileHeaderForToken(pIOHandler,pFile, Tokens,1); + return SearchFileHeaderForToken(pIOHandler,pFile, TokensForSearch,1); } return false; }