From 8648c2af45444348cd6a680baff0f19f7b839c81 Mon Sep 17 00:00:00 2001 From: copycd Date: Mon, 23 Oct 2023 20:55:02 +0900 Subject: [PATCH] fix mesh-name error. --- code/AssetLib/Obj/ObjFileParser.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/AssetLib/Obj/ObjFileParser.cpp b/code/AssetLib/Obj/ObjFileParser.cpp index 09602e882..acb3f074c 100644 --- a/code/AssetLib/Obj/ObjFileParser.cpp +++ b/code/AssetLib/Obj/ObjFileParser.cpp @@ -605,7 +605,8 @@ void ObjFileParser::getMaterialDesc() { } if (needsNewMesh(strName)) { - createMesh(strName); + auto newMeshName = m_pModel->mActiveGroup.empty() ? strName : m_pModel->mActiveGroup; + createMesh(newMeshName); } m_pModel->mCurrentMesh->m_uiMaterialIndex = getMaterialIndex(strName);