Merge pull request #1040 from johnmaf/bugfix/obj-mtllib-parse
Fix OBJ parser mtllib statement parsing bug.pull/1048/head
commit
8fd030f23d
|
@ -182,9 +182,14 @@ void ObjFileParser::parseFile()
|
||||||
|
|
||||||
case 'm': // Parse a material library or merging group ('mg')
|
case 'm': // Parse a material library or merging group ('mg')
|
||||||
{
|
{
|
||||||
std::string name;
|
std::string name;
|
||||||
|
|
||||||
|
getName(m_DataIt, m_DataItEnd, name);
|
||||||
|
|
||||||
|
size_t nextSpace = name.find(" ");
|
||||||
|
if (nextSpace != std::string::npos)
|
||||||
|
name = name.substr(0, nextSpace);
|
||||||
|
|
||||||
getName(m_DataIt, m_DataItEnd, name);
|
|
||||||
if (name == "mg")
|
if (name == "mg")
|
||||||
getGroupNumberAndResolution();
|
getGroupNumberAndResolution();
|
||||||
else if(name == "mtllib")
|
else if(name == "mtllib")
|
||||||
|
|
Loading…
Reference in New Issue