[Bf-blender-cvs] [7148f31a3a0] newboolean: Reverse the operand order for Difference to match old boolean.

Howard Trickey noreply at git.blender.org
Wed Jul 15 02:50:06 CEST 2020


Commit: 7148f31a3a06b4ea872196d5bd5b9c780779fd29
Author: Howard Trickey
Date:   Tue Jul 14 20:49:03 2020 -0400
Branches: newboolean
https://developer.blender.org/rB7148f31a3a06b4ea872196d5bd5b9c780779fd29

Reverse the operand order for Difference to match old boolean.

===================================================================

M	source/blender/bmesh/tools/bmesh_boolean.cc

===================================================================

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;
     };



More information about the Bf-blender-cvs mailing list