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
This commit is contained in:
parent
ea064133e5
commit
645c2bd4d0
Notes:
blender-bot
2023-02-14 09:19:09 +01:00
Referenced by issue #83288, Crash when deleting objects Referenced by issue #83275, Excluding a collection crashes with viewport statistics enabled
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue