From 02b042d78eea03841d288b1cf08f333c1632f88e Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Sun, 5 Nov 2017 16:35:22 +0100 Subject: [PATCH] closes https://github.com/assimp/assimp/issues/1351: use correct name for obj-meshname export for groups. --- code/ObjExporter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ObjExporter.cpp b/code/ObjExporter.cpp index 3f9fabdc4..fffafa328 100644 --- a/code/ObjExporter.cpp +++ b/code/ObjExporter.cpp @@ -383,7 +383,7 @@ void ObjExporter::AddMesh(const aiString& name, const aiMesh* m, const aiMatrix4 mMeshes.push_back(MeshInstance()); MeshInstance& mesh = mMeshes.back(); - mesh.name = std::string(name.data,name.length) + (m->mName.length ? "_" + std::string(m->mName.data,m->mName.length) : ""); + mesh.name = std::string( name.data, name.length ); mesh.matname = GetMaterialName(m->mMaterialIndex); mesh.faces.resize(m->mNumFaces);