[Bf-blender-cvs] [645c2bd4d00] master: Fix sculpt transform incorrently flipping displacement in Y and Z axis
Pablo Dobarro
noreply at git.blender.org
Mon Nov 30 23:40:23 CET 2020
Commit: 645c2bd4d002d685cf240d6a46c635c00c0c1706
Author: Pablo Dobarro
Date: Fri Nov 27 01:42:24 2020 +0100
Branches: master
https://developer.blender.org/rB645c2bd4d002d685cf240d6a46c635c00c0c1706
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
===================================================================
M source/blender/editors/sculpt_paint/sculpt.c
===================================================================
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);
}
}
More information about the Bf-blender-cvs
mailing list