[VCS-1030] fallback for non-found .mtl file: try file name of original obj with just the file extension replaced by "mtl"

This commit is contained in:
Robert Liebo
2016-03-22 18:38:28 +01:00
committed by ViewAR Win32
parent 76e4e82ecb
commit abb3e6b854
3 changed files with 15 additions and 7 deletions

View File

@@ -72,7 +72,7 @@ public:
public:
/// \brief Constructor with data array.
ObjFileParser(std::vector<char> &Data,const std::string &strModelName, IOSystem* io, ProgressHandler* progress);
ObjFileParser(std::vector<char> &Data, const std::string &strModelName, IOSystem* io, ProgressHandler* progress, const std::string &originalObjFileName);
/// \brief Destructor
~ObjFileParser();
/// \brief Model getter.
@@ -143,6 +143,8 @@ private:
//! Pointer to progress handler
ProgressHandler* m_progress;
/// Path to the current model
// name of the obj file where the buffer comes from
const std::string& m_originalObjFileName;
};
} // Namespace Assimp