From 047081841113da73d7a13886218f5a56cfc62de6 Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Wed, 24 Apr 2019 16:24:53 +0300 Subject: Fix T59848: precisely represent the dependencies of Armature modifier. When the modifier uses vertex groups, the set of the bones it actually needs is precisely defined by the set of the group names. If envelopes are enabled, this refinement is not available, because any bone can potentially be used. This can be used in the dependency graph construction to allow objects deformed by a part of the armature to be used in constraints on other bones, e.g. for placing cartoon-style face elements on top of the body mesh via Shrinkwrap constraints. Since the list of vertex group names is now used as an input by the dependency graph, adding/removing/renaming groups should now be triggering a graph rebuild. Differential Revision: https://developer.blender.org/D4715 --- source/blender/editors/sculpt_paint/paint_vertex_weight_utils.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender/editors/sculpt_paint/paint_vertex_weight_utils.c') diff --git a/source/blender/editors/sculpt_paint/paint_vertex_weight_utils.c b/source/blender/editors/sculpt_paint/paint_vertex_weight_utils.c index 88aed201b48..c71315872f6 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex_weight_utils.c +++ b/source/blender/editors/sculpt_paint/paint_vertex_weight_utils.c @@ -41,6 +41,8 @@ #include "BKE_report.h" #include "BKE_object.h" +#include "DEG_depsgraph_build.h" + /* Only for blend modes. */ #include "IMB_imbuf.h" @@ -93,6 +95,7 @@ bool ED_wpaint_ensure_data(bContext *C, bDeformGroup *dg = defgroup_find_name(ob, pchan->name); if (dg == NULL) { dg = BKE_object_defgroup_add_name(ob, pchan->name); /* sets actdef */ + DEG_relations_tag_update(CTX_data_main(C)); } else { int actdef = 1 + BLI_findindex(&ob->defbase, dg); @@ -105,6 +108,7 @@ bool ED_wpaint_ensure_data(bContext *C, } if (BLI_listbase_is_empty(&ob->defbase)) { BKE_object_defgroup_add(ob); + DEG_relations_tag_update(CTX_data_main(C)); } /* ensure we don't try paint onto an invalid group */ -- cgit v1.2.3