diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2020-11-27 03:42:24 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2020-12-01 01:40:06 +0300 |
commit | 645c2bd4d002d685cf240d6a46c635c00c0c1706 (patch) | |
tree | c1d77880804476b0027f814f81f21393e967ba6c /source | |
parent | ea064133e53a11539f3869da010560a4f07826a8 (diff) |
Fix sculpt transform incorrently flipping displacement in Y and Z axis
These functions were only checking the X axis for flipping the
displacement for a symmetry area depending on the initial position of
the pivot.
This affects transform and any other tools that transform vertices and
applies symmetry based on areas (the pose brush, for example).
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D9654
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 1ddfa0b9b17..b9427677745 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -4025,13 +4025,13 @@ void SCULPT_flip_v3_by_symm_area(float v[3], const ePaintSymmetryAreas symmarea, const float pivot[3]) { - for (char i = 0; i < 3; i++) { + for (int i = 0; i < 3; i++) { ePaintSymmetryFlags symm_it = 1 << i; if (symm & symm_it) { if (symmarea & symm_it) { flip_v3(v, symm_it); } - if (pivot[0] < 0) { + if (pivot[i] < 0.0f) { flip_v3(v, symm_it); } } @@ -4043,13 +4043,13 @@ void SCULPT_flip_quat_by_symm_area(float quat[3], const ePaintSymmetryAreas symmarea, const float pivot[3]) { - for (char i = 0; i < 3; i++) { + for (int i = 0; i < 3; i++) { ePaintSymmetryFlags symm_it = 1 << i; if (symm & symm_it) { if (symmarea & symm_it) { flip_qt(quat, symm_it); } - if (pivot[0] < 0) { + if (pivot[i] < 0.0f) { flip_qt(quat, symm_it); } } |