Merge pull request #1323 from vkovalev123/master

Fixed texture bug due simultaneously using 'usemtl' and 'usemap' attr…
pull/1327/merge
Kim Kulling 2017-06-27 13:26:36 +02:00 committed by GitHub
commit 18538e353d
1 changed files with 12 additions and 1 deletions

View File

@ -179,7 +179,18 @@ void ObjFileParser::parseFile( IOStreamBuffer<char> &streamBuffer ) {
case 'u': // Parse a material desc. setter
{
getMaterialDesc();
std::string name;
getNameNoSpace(m_DataIt, m_DataItEnd, name);
size_t nextSpace = name.find(" ");
if (nextSpace != std::string::npos)
name = name.substr(0, nextSpace);
if(name == "usemtl")
{
getMaterialDesc();
}
}
break;