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:
authorHoward Trickey <howard.trickey@gmail.com>2020-07-15 03:49:03 +0300
committerHoward Trickey <howard.trickey@gmail.com>2020-07-15 03:49:03 +0300
commit7148f31a3a06b4ea872196d5bd5b9c780779fd29 (patch)
treeb2dcd9c34293e09212230480d3aa312206398c8e /source/blender/bmesh/tools/bmesh_boolean.cc
parent8541b335cb064c4aca63ad89f268db165a957835 (diff)
Reverse the operand order for Difference to match old boolean.
Diffstat (limited to 'source/blender/bmesh/tools/bmesh_boolean.cc')
-rw-r--r--source/blender/bmesh/tools/bmesh_boolean.cc9
1 files changed, 2 insertions, 7 deletions
diff --git a/source/blender/bmesh/tools/bmesh_boolean.cc b/source/blender/bmesh/tools/bmesh_boolean.cc
index 303d43c61e7..64dc20ef99e 100644
--- a/source/blender/bmesh/tools/bmesh_boolean.cc
+++ b/source/blender/bmesh/tools/bmesh_boolean.cc
@@ -182,20 +182,15 @@ static bool bmesh_boolean(BMesh *bm,
};
}
else {
- /* Binary boolean operation.
- * Because our boolean function's difference does shape 0 - shape 1,
- * and Blender's convention is to do the opposite, reverse the shape
- * assigment in this test.
- */
nshapes = 2;
shape_fn = [bm, test_fn, user_data](int f) {
BMFace *bmf = BM_face_at_index(bm, f);
int test_val = test_fn(bmf, user_data);
if (test_val == 0) {
- return 1;
+ return 0;
}
if (test_val == 1) {
- return 0;
+ return 1;
}
return -1;
};