From 06dac0a453208a81ea6386aa2c648d096f6b6366 Mon Sep 17 00:00:00 2001 From: Howard Trickey Date: Sun, 8 Nov 2020 08:39:01 -0500 Subject: 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. --- source/blender/blenlib/intern/mesh_boolean.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/blender/blenlib') diff --git a/source/blender/blenlib/intern/mesh_boolean.cc b/source/blender/blenlib/intern/mesh_boolean.cc index bad0b84d10f..8b6a7ed65f7 100644 --- a/source/blender/blenlib/intern/mesh_boolean.cc +++ b/source/blender/blenlib/intern/mesh_boolean.cc @@ -428,7 +428,9 @@ class Cell { BoolOpType bool_optype) { std::copy(from_cell.winding().begin(), from_cell.winding().end(), winding_.begin()); - winding_[shape] += delta; + if (shape >= 0) { + winding_[shape] += delta; + } winding_assigned_ = true; in_output_volume_ = apply_bool_op(bool_optype, winding_); } -- cgit v1.2.3