Fix obj .mtl file loading
Fix the obj file loader by adding a new method which allows a name to be read considering the space in the middle between two words and use that for parsing the "mtlib" line in the .obj file parsing method. Before, the method used in the obj parsing function would have returned the string "mtlib NAME_OF_MTL" instead of "mtlib" only, which resulted in the .mtl file being never parsed.
This commit is contained in:
@@ -178,7 +178,7 @@ void ObjFileParser::parseFile( IOStreamBuffer<char> &streamBuffer ) {
|
||||
{
|
||||
std::string name;
|
||||
|
||||
getName(m_DataIt, m_DataItEnd, name);
|
||||
getNameNoSpace(m_DataIt, m_DataItEnd, name);
|
||||
|
||||
size_t nextSpace = name.find(" ");
|
||||
if (nextSpace != std::string::npos)
|
||||
|
||||
Reference in New Issue
Block a user