diff options
author | Howard Trickey <howard.trickey@gmail.com> | 2020-11-08 16:39:01 +0300 |
---|---|---|
committer | Howard Trickey <howard.trickey@gmail.com> | 2020-11-08 18:12:53 +0300 |
commit | 39012146e142bf400c7140d90ecfd27c45b589ca (patch) | |
tree | 2671e7fbc63c485fe15bb91737e2380326b27a2c /source/blender/editors | |
parent | 7be47dadea5066ae095c644e0b4f1f10d75f5ab3 (diff) |
Fix T81651, exact boolean modifier incorrect if operand hidden.
The code was trying to ignore hidden geometry when doing boolean,
which is correct when used as a tool, but not when a modifier.
Added a "keep_hidden" argument to bmesh_boolean to distinguish the
two cases.
Also fixed a bug when the tool is used with hidden geometry that
is attached to unhidden geometry that is deleted by the operation.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/mesh/editmesh_intersect.c | 13 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_mask.c | 2 |
2 files changed, 11 insertions, 4 deletions
diff --git a/source/blender/editors/mesh/editmesh_intersect.c b/source/blender/editors/mesh/editmesh_intersect.c index e2112f91060..ff4867454d6 100644 --- a/source/blender/editors/mesh/editmesh_intersect.c +++ b/source/blender/editors/mesh/editmesh_intersect.c @@ -204,8 +204,15 @@ static int edbm_intersect_exec(bContext *C, wmOperator *op) if (exact) { int nshapes = use_self ? 1 : 2; - has_isect = BM_mesh_boolean_knife( - em->bm, em->looptris, em->tottri, test_fn, NULL, nshapes, use_self, use_separate_all); + has_isect = BM_mesh_boolean_knife(em->bm, + em->looptris, + em->tottri, + test_fn, + NULL, + nshapes, + use_self, + use_separate_all, + true); } else { has_isect = BM_mesh_intersect(em->bm, @@ -369,7 +376,7 @@ static int edbm_intersect_boolean_exec(bContext *C, wmOperator *op) if (use_exact) { has_isect = BM_mesh_boolean( - em->bm, em->looptris, em->tottri, test_fn, NULL, 2, use_self, boolean_operation); + em->bm, em->looptris, em->tottri, test_fn, NULL, 2, use_self, true, boolean_operation); } else { has_isect = BM_mesh_intersect(em->bm, diff --git a/source/blender/editors/sculpt_paint/paint_mask.c b/source/blender/editors/sculpt_paint/paint_mask.c index 5ee38069fd9..f29a84a6eb7 100644 --- a/source/blender/editors/sculpt_paint/paint_mask.c +++ b/source/blender/editors/sculpt_paint/paint_mask.c @@ -1293,7 +1293,7 @@ static void sculpt_gesture_apply_trim(SculptGestureContext *sgcontext) BLI_assert(false); break; } - BM_mesh_boolean(bm, looptris, tottri, bm_face_isect_pair, NULL, 2, true, boolean_mode); + BM_mesh_boolean(bm, looptris, tottri, bm_face_isect_pair, NULL, 2, true, true, boolean_mode); } MEM_freeN(looptris); |