From 36cd31060b6db6a81668996757bf166cfff38a22 Mon Sep 17 00:00:00 2001 From: Sebastian Parborg Date: Sat, 9 Mar 2019 11:45:31 +0100 Subject: Fix T62104: VertexGroup.add() doesn't push depsgraph update for the mesh. When adding and removing weights from the python api, no depsgraph updates were triggered. This would cause the mesh geometry to be out of sync in the viewport if there were any modifiers that used the vertex groups in question. Reviewed By: Brecht Differential Revision: http://developer.blender.org/D4439 --- source/blender/makesrna/intern/rna_object.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/makesrna') diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 622a4b7c01b..f320ce925ff 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -1474,6 +1474,7 @@ static void rna_VertexGroup_vertex_add(ID *id, bDeformGroup *def, ReportList *re while (index_len--) ED_vgroup_vert_add(ob, def, *index++, weight, assignmode); /* XXX, not efficient calling within loop*/ + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); WM_main_add_notifier(NC_GEOM | ND_DATA, (ID *)ob->data); } @@ -1489,6 +1490,7 @@ static void rna_VertexGroup_vertex_remove(ID *id, bDeformGroup *dg, ReportList * while (index_len--) ED_vgroup_vert_remove(ob, dg, *index++); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); WM_main_add_notifier(NC_GEOM | ND_DATA, (ID *)ob->data); } -- cgit v1.2.3