Skip to content

Commit

Permalink
Update ObjFileParser.cpp (assimp#5598)
Browse files Browse the repository at this point in the history
Ensure not checking empty strings
  • Loading branch information
kimkulling authored May 26, 2024
1 parent 30466aa commit 4584719
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions code/AssetLib/Obj/ObjFileParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -582,10 +582,12 @@ void ObjFileParser::getMaterialDesc() {
skip = true;
}

// If the current mesh has the same material, we simply ignore that 'usemtl' command
// If the current mesh has the same material, we will ignore that 'usemtl' command
// There is no need to create another object or even mesh here
if (m_pModel->mCurrentMaterial && m_pModel->mCurrentMaterial->MaterialName == aiString(strName)) {
skip = true;
if (!skip) {
if (m_pModel->mCurrentMaterial && m_pModel->mCurrentMaterial->MaterialName == aiString(strName)) {
skip = true;
}
}

if (!skip) {
Expand Down

0 comments on commit 4584719

Please sign in to comment.