{OBJ} Allow spaces in group names

pull/55/head
Andy Maloney 2013-06-20 08:40:08 -04:00
parent ca8f923a8b
commit d7c6cd9ece
1 changed files with 3 additions and 9 deletions

View File

@ -528,18 +528,12 @@ int ObjFileParser::getMaterialIndex( const std::string &strMaterialName )
// Getter for a group name.
void ObjFileParser::getGroupName()
{
// Get next word from data buffer
m_DataIt = getNextToken<DataArrayIt>(m_DataIt, m_DataItEnd);
m_DataIt = getNextWord<DataArrayIt>(m_DataIt, m_DataItEnd);
std::string strGroupName;
m_DataIt = getName<DataArrayIt>(m_DataIt, m_DataItEnd, strGroupName);
if ( isEndOfBuffer( m_DataIt, m_DataItEnd ) )
return;
// Store the group name in the group library
char *pStart = &(*m_DataIt);
while ( m_DataIt != m_DataItEnd && !isSeparator(*m_DataIt) )
m_DataIt++;
std::string strGroupName( pStart, &(*m_DataIt) );
// Change active group, if necessary
if ( m_pModel->m_strActiveGroup != strGroupName )
{