Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Dobarro <pablodp606@gmail.com>2020-09-18 20:58:48 +0300
committerPablo Dobarro <pablodp606@gmail.com>2020-09-18 20:58:58 +0300
commit5502517c3c12086c111ae5477fae9c0d2eb8a84c (patch)
tree07a1978b5b81b5c1679a002111457acf73561a37 /source/blender/editors/sculpt_paint/paint_vertex.c
parent827dfd76dddec962e67825815931d4f2953c741b (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.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index 3753709875b..4a3babde5f3 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -765,7 +765,7 @@ static void do_weight_paint_vertex_single(
MDeformWeight *dw_mirr;
/* from now on we can check if mirrors enabled if this var is -1 and not bother with the flag */
- if (me->editflag & ME_EDIT_MIRROR_X) {
+ if (me->editflag & ME_EDIT_VERTEX_GROUPS_X_SYMMETRY) {
index_mirr = mesh_get_x_mirror_vert(ob, NULL, index, topology);
vgroup_mirr = wpi->mirror.index;
@@ -961,7 +961,7 @@ static void do_weight_paint_vertex_multi(
float dw_rel_free, dw_rel_locked;
/* from now on we can check if mirrors enabled if this var is -1 and not bother with the flag */
- if (me->editflag & ME_EDIT_MIRROR_X) {
+ if (me->editflag & ME_EDIT_VERTEX_GROUPS_X_SYMMETRY) {
index_mirr = mesh_get_x_mirror_vert(ob, NULL, index, topology);
if (index_mirr != -1 && index_mirr != index) {
@@ -1610,7 +1610,7 @@ static bool wpaint_stroke_test_start(bContext *C, wmOperator *op, const float mo
int i;
bDeformGroup *dg;
- if (me->editflag & ME_EDIT_MIRROR_X) {
+ if (me->editflag & ME_EDIT_VERTEX_GROUPS_X_SYMMETRY) {
BKE_object_defgroup_mirror_selection(
ob, defbase_tot, defbase_sel, defbase_sel, &defbase_tot_sel);
}
@@ -2173,7 +2173,8 @@ static void wpaint_paint_leaves(bContext *C,
/* NOTE: current mirroring code cannot be run in parallel */
TaskParallelSettings settings;
- BKE_pbvh_parallel_range_settings(&settings, !(me->editflag & ME_EDIT_MIRROR_X), totnode);
+ BKE_pbvh_parallel_range_settings(
+ &settings, !(me->flag & ME_EDIT_VERTEX_GROUPS_X_SYMMETRY), totnode);
switch ((eBrushWeightPaintTool)brush->weightpaint_tool) {
case WPAINT_TOOL_AVERAGE:
@@ -2291,7 +2292,7 @@ static void wpaint_do_symmetrical_brush_actions(
Mesh *me = ob->data;
SculptSession *ss = ob->sculpt;
StrokeCache *cache = ss->cache;
- const char symm = wp->paint.symmetry_flags & PAINT_SYMM_AXIS_ALL;
+ const char symm = SCULPT_mesh_symmetry_xyz_get(ob);
int i = 0;
/* initial stroke */
@@ -3311,7 +3312,7 @@ static void vpaint_do_symmetrical_brush_actions(
Mesh *me = ob->data;
SculptSession *ss = ob->sculpt;
StrokeCache *cache = ss->cache;
- const char symm = vp->paint.symmetry_flags & PAINT_SYMM_AXIS_ALL;
+ const char symm = SCULPT_mesh_symmetry_xyz_get(ob);
int i = 0;
/* initial stroke */