[ 3460982] Patch for Bug 3460978 - Obj loader not generating new objects for material groups.
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1108 67173fc5-114c-0410-ac8e-9d2fd5bffc1fpull/5/head
parent
e52a49a990
commit
2c0965795c
|
@ -377,6 +377,15 @@ void ObjFileParser::getFace(aiPrimitiveType type)
|
|||
// Get values for a new material description
|
||||
void ObjFileParser::getMaterialDesc()
|
||||
{
|
||||
// Each material request a new object.
|
||||
// Sometimes the object is already created (see 'o' tag by example), but it is not initialized !
|
||||
// So, we create a new object only if the current on is already initialized !
|
||||
if (m_pModel->m_pCurrent != NULL &&
|
||||
( m_pModel->m_pCurrent->m_Meshes.size() > 1 ||
|
||||
(m_pModel->m_pCurrent->m_Meshes.size() == 1 && m_pModel->m_Meshes[m_pModel->m_pCurrent->m_Meshes[0]]->m_Faces.size() != 0) )
|
||||
)
|
||||
m_pModel->m_pCurrent = NULL;
|
||||
|
||||
// Get next data for material data
|
||||
m_DataIt = getNextToken<DataArrayIt>(m_DataIt, m_DataItEnd);
|
||||
if (m_DataIt == m_DataItEnd)
|
||||
|
|
Loading…
Reference in New Issue