From 4bfb3ef843424dec4d4d0727e2554b0bcdb56c92 Mon Sep 17 00:00:00 2001 From: Xiao Qi Date: Wed, 2 Nov 2022 17:39:48 +0800 Subject: [PATCH] Used node name instead of mesh name --- src/Libraries/MeshCompiler.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Libraries/MeshCompiler.cpp b/src/Libraries/MeshCompiler.cpp index cd7eea7..f600e3d 100644 --- a/src/Libraries/MeshCompiler.cpp +++ b/src/Libraries/MeshCompiler.cpp @@ -28,6 +28,7 @@ namespace SH_COMP aiMesh* mesh = scene.mMeshes[node.mMeshes[i]]; meshes.emplace_back(); GetMesh(*mesh, meshes.back()); + meshes.back().name = node.mName.C_Str(); } for (size_t i{ 0 }; i < node.mNumChildren; ++i) @@ -111,8 +112,6 @@ namespace SH_COMP meshData.indices.push_back(face.mIndices[j]); } } - - meshData.name = mesh.mName.C_Str(); } void MeshCompiler::BuildHeaders(MeshAsset& asset) noexcept