diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2020-09-18 20:58:48 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2020-09-18 20:58:58 +0300 |
commit | 5502517c3c12086c111ae5477fae9c0d2eb8a84c (patch) | |
tree | 07a1978b5b81b5c1679a002111457acf73561a37 /source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c | |
parent | 827dfd76dddec962e67825815931d4f2953c741b (diff) |
Unify all XYZ symmetry options using Mesh Symmetry
This adds XYZ symmetry as a property of meshes and updates all modes to
use the mesh symmetry by default to have a consistent tool behavior
between all modes and when switching objects.
Reviewed By: brecht, mano-wii, campbellbarton
Maniphest Tasks: T79785
Differential Revision: https://developer.blender.org/D8587
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c b/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c index 9b8252e1add..eea79bad789 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c +++ b/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c @@ -120,8 +120,13 @@ static int weight_from_bones_exec(bContext *C, wmOperator *op) Mesh *me = ob->data; int type = RNA_enum_get(op->ptr, "type"); - ED_object_vgroup_calc_from_armature( - op->reports, depsgraph, scene, ob, armob, type, (me->editflag & ME_EDIT_MIRROR_X)); + ED_object_vgroup_calc_from_armature(op->reports, + depsgraph, + scene, + ob, + armob, + type, + (me->editflag & ME_EDIT_VERTEX_GROUPS_X_SYMMETRY)); DEG_id_tag_update(&me->id, 0); DEG_relations_tag_update(CTX_data_main(C)); @@ -232,7 +237,7 @@ static int weight_sample_invoke(bContext *C, wmOperator *op, const wmEvent *even vc.obact, defbase_tot, &defbase_tot_sel); if (defbase_tot_sel > 1) { - if (me->editflag & ME_EDIT_MIRROR_X) { + if (me->editflag & ME_EDIT_VERTEX_GROUPS_X_SYMMETRY) { BKE_object_defgroup_mirror_selection( vc.obact, defbase_tot, defbase_sel, defbase_sel, &defbase_tot_sel); } @@ -458,7 +463,7 @@ static bool weight_paint_set(Object *ob, float paintweight) vgroup_active = ob->actdef - 1; /* if mirror painting, find the other group */ - if (me->editflag & ME_EDIT_MIRROR_X) { + if (me->editflag & ME_EDIT_VERTEX_GROUPS_X_SYMMETRY) { vgroup_mirror = ED_wpaint_mirror_vgroup_ensure(ob, vgroup_active); } @@ -486,7 +491,7 @@ static bool weight_paint_set(Object *ob, float paintweight) dw_prev->weight = dw->weight; /* set the undo weight */ dw->weight = paintweight; - if (me->editflag & ME_EDIT_MIRROR_X) { /* x mirror painting */ + if (me->editflag & ME_EDIT_VERTEX_GROUPS_X_SYMMETRY) { /* x mirror painting */ int j = mesh_get_x_mirror_vert(ob, NULL, vidx, topology); if (j >= 0) { /* copy, not paint again */ |