diff options
author | Sebastian Parborg <darkdefende@gmail.com> | 2019-03-09 13:45:31 +0300 |
---|---|---|
committer | Sebastian Parborg <darkdefende@gmail.com> | 2019-03-09 13:45:31 +0300 |
commit | 36cd31060b6db6a81668996757bf166cfff38a22 (patch) | |
tree | 88618ec2c26e8de7932bfc561e9167163230cdf0 /source | |
parent | fede272d2c061dbe95993ce790525166e80e80c1 (diff) |
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
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesrna/intern/rna_object.c | 2 |
1 files changed, 2 insertions, 0 deletions
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); } |