diff options
-rw-r--r-- | source/blender/blenkernel/intern/geometry_component_mesh.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/geometry_component_mesh.cc b/source/blender/blenkernel/intern/geometry_component_mesh.cc index 88ea1af8a8d..9e64acf218b 100644 --- a/source/blender/blenkernel/intern/geometry_component_mesh.cc +++ b/source/blender/blenkernel/intern/geometry_component_mesh.cc @@ -1092,6 +1092,11 @@ class VertexGroupsAttributeProvider final : public DynamicAttributesProvider { for (MDeformVert &dvert : MutableSpan(mesh->dvert, mesh->totvert)) { MDeformWeight *weight = BKE_defvert_find_index(&dvert, index); BKE_defvert_remove_group(&dvert, weight); + for (MDeformWeight &weight : MutableSpan(dvert.dw, dvert.totweight)) { + if (weight.def_nr > index) { + weight.def_nr--; + } + } } return true; } |