Properly parse 'mg' keyword in .obj files
The 'mg' keyword is currently being interpreted as a material library keyword, when it really refers to the merging group. Handle this case, in effect ignoring the keyword as merging groups are currently unsupported.
This commit is contained in:
@@ -149,9 +149,12 @@ void ObjFileParser::parseFile()
|
||||
}
|
||||
break;
|
||||
|
||||
case 'm': // Parse a material library
|
||||
case 'm': // Parse a material library or merging group ('mg')
|
||||
{
|
||||
getMaterialLib();
|
||||
if (*(m_DataIt + 1) == 'g')
|
||||
getGroupNumberAndResolution();
|
||||
else
|
||||
getMaterialLib();
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -609,6 +612,15 @@ void ObjFileParser::getGroupNumber()
|
||||
m_DataIt = skipLine<DataArrayIt>( m_DataIt, m_DataItEnd, m_uiLine );
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Not supported
|
||||
void ObjFileParser::getGroupNumberAndResolution()
|
||||
{
|
||||
// Not used
|
||||
|
||||
m_DataIt = skipLine<DataArrayIt>( m_DataIt, m_DataItEnd, m_uiLine );
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Stores values for a new object instance, name will be used to
|
||||
// identify it.
|
||||
|
||||
Reference in New Issue
Block a user