From 1de7b4372c3fee771c601fe44bd5ded19f913b20 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Fri, 17 Oct 2025 15:06:24 +0200 Subject: [PATCH] Fix #148229: Vertex weights in wrong groups after joining meshes Caused by 113d91aba8 Code first gathers a list of all vertexgroups on all objects. Then it iterates the objects to join, and for each of them, puts their vertexgroups in an index map. However (by a typo?), it was doing it for the `active mesh` (instead of the one currently visited) over and over again, resulting in weights from other objects written to `def_nr` from groups of the `active mesh`. Now corrected. Pull Request: https://projects.blender.org/blender/blender/pulls/148259 --- source/blender/editors/mesh/mesh_join.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/editors/mesh/mesh_join.cc b/source/blender/editors/mesh/mesh_join.cc index ba7307bbf4d..bcba0a74717 100644 --- a/source/blender/editors/mesh/mesh_join.cc +++ b/source/blender/editors/mesh/mesh_join.cc @@ -84,7 +84,7 @@ static VectorSet join_vertex_groups(const Span obje continue; } Vector index_map; - LISTBASE_FOREACH (const bDeformGroup *, dg, &dst_mesh.vertex_group_names) { + LISTBASE_FOREACH (const bDeformGroup *, dg, &src_mesh.vertex_group_names) { index_map.append(vertex_group_names.index_of_as(dg->name)); } for (const int vert : src_dverts.index_range()) {