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/sculpt_pose.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/sculpt_pose.c')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_pose.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_pose.c b/source/blender/editors/sculpt_paint/sculpt_pose.c
index e53e33c1186..4081e7a962f 100644
--- a/source/blender/editors/sculpt_paint/sculpt_pose.c
+++ b/source/blender/editors/sculpt_paint/sculpt_pose.c
@@ -230,7 +230,7 @@ static void pose_brush_grow_factor_task_cb_ex(void *__restrict userdata,
SculptThreadedTaskData *data = userdata;
PoseGrowFactorTLSData *gftd = tls->userdata_chunk;
SculptSession *ss = data->ob->sculpt;
- const char symm = data->sd->paint.symmetry_flags & PAINT_SYMM_AXIS_ALL;
+ const char symm = SCULPT_mesh_symmetry_xyz_get(data->ob);
PBVHVertexIter vd;
BKE_pbvh_vertex_iter_begin(ss->pbvh, data->nodes[n], vd, PBVH_ITER_UNIQUE)
{
@@ -561,7 +561,7 @@ void SCULPT_pose_calc_pose_data(Sculpt *sd,
PoseFloodFillData fdata = {
.radius = radius,
- .symm = sd->paint.symmetry_flags & PAINT_SYMM_AXIS_ALL,
+ .symm = SCULPT_mesh_symmetry_xyz_get(ob),
.pose_factor = r_pose_factor,
.tot_co = 0,
};
@@ -777,7 +777,7 @@ static SculptPoseIKChain *pose_ik_chain_init_face_sets(
PoseFloodFillData fdata = {
.radius = radius,
- .symm = sd->paint.symmetry_flags & PAINT_SYMM_AXIS_ALL,
+ .symm = SCULPT_mesh_symmetry_xyz_get(ob),
.pose_factor = ik_chain->segments[s].weights,
.tot_co = 0,
.fallback_count = 0,
@@ -1134,7 +1134,7 @@ void SCULPT_do_pose_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode)
{
SculptSession *ss = ob->sculpt;
Brush *brush = BKE_paint_brush(&sd->paint);
- const ePaintSymmetryFlags symm = sd->paint.symmetry_flags & PAINT_SYMM_AXIS_ALL;
+ const ePaintSymmetryFlags symm = SCULPT_mesh_symmetry_xyz_get(ob);
/* The pose brush applies all enabled symmetry axis in a single iteration, so the rest can be
* ignored. */