diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2016-01-21 00:03:15 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-01-21 00:03:47 +0300 |
commit | 5ef2ed23e1238e88db899f9d96a9463e6f725e35 (patch) | |
tree | be650ab88c4acc28416b091b23b2b4a77fa1986c /source/blender/editors/sculpt_paint | |
parent | 3c74968aa461ec986190d3197cb3517851ac98be (diff) |
Weight Paint: Make multi-paint & mirror work as if bone selection was symmetric
The simplest way of handling mirroring in multi-paint is creating a
uniform symmetric selection and relying on existing symmetric weights
to direct changes to the appropriate vertex groups. This already works
if mirror bones are selected manually, and can be made easier to use
by doing it implicitly.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_vertex.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index 5296b8b0034..878c8274255 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -1017,6 +1017,11 @@ static int weight_sample_invoke(bContext *C, wmOperator *op, const wmEvent *even bool *defbase_sel = BKE_object_defgroup_selected_get(vc.obact, defbase_tot, &defbase_tot_sel); if (defbase_tot_sel > 1) { + if (me->editflag & ME_EDIT_MIRROR_X) { + BKE_object_defgroup_mirror_selection( + vc.obact, defbase_tot, defbase_sel, defbase_sel, &defbase_tot_sel); + } + vgroup_weight = BKE_defvert_multipaint_collective_weight( &me->dvert[v_idx_best], defbase_tot, defbase_sel, defbase_tot_sel, ts->auto_normalize); |