From 5aea7b459195e1072854095b68c65214f6fc4c19 Mon Sep 17 00:00:00 2001 From: Falk David Date: Fri, 11 Apr 2025 10:53:58 +0200 Subject: [PATCH] Fix #136243: Grease Pencil: Automerge doesn't propagate vertex groups The `vertex_group_names` of the `CurvesGeometry` was not being propagated leading to vertex group data getting lost. Pull Request: https://projects.blender.org/blender/blender/pulls/137296 --- source/blender/geometry/intern/merge_curves.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/blender/geometry/intern/merge_curves.cc b/source/blender/geometry/intern/merge_curves.cc index ae515423fc6..a1d5936f9fb 100644 --- a/source/blender/geometry/intern/merge_curves.cc +++ b/source/blender/geometry/intern/merge_curves.cc @@ -5,6 +5,8 @@ #include "BLI_array_utils.hh" #include "BLI_stack.hh" +#include "BKE_deform.hh" + #include "GEO_merge_curves.hh" namespace blender::geometry { @@ -247,6 +249,9 @@ static bke::CurvesGeometry join_curves_ranges(const bke::CurvesGeometry &src_cur { bke::CurvesGeometry dst_curves = bke::CurvesGeometry(src_curves.points_num(), old_curves_by_new.size()); + /* Copy vertex group names. */ + BKE_defgroup_copy_list(&dst_curves.vertex_group_names, &src_curves.vertex_group_names); + dst_curves.attributes_active_index = src_curves.attributes_active_index; /* NOTE: using the offsets as an index map means the first curve of each range is used for * attributes. */