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-11-01 03:07:00 +0300
committerHoward Trickey <howard.trickey@gmail.com>2020-11-01 03:48:24 +0300
commitc271600101a2b5e491315f4dfa7fe89e4a4d5b1a (patch)
tree4384658bccf98d663f5e93d78181f8452d4f66a4 /source/blender/modifiers/intern/MOD_boolean.c
parentc249eb7a8d61e08b7564102a6a97c52ee7ce1595 (diff)
Fix T82089 Boolean on empty mesh with collection fails.
For the fast solver, there was an optimization carried over from the non-collection case for empty meshes which did not work in the chained boolean code for collection operands. Removed that optimization in the collection case.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_boolean.c')
-rw-r--r--source/blender/modifiers/intern/MOD_boolean.c43
1 files changed, 16 insertions, 27 deletions
diff --git a/source/blender/modifiers/intern/MOD_boolean.c b/source/blender/modifiers/intern/MOD_boolean.c
index 5d28aea54b5..1cf57669eb1 100644
--- a/source/blender/modifiers/intern/MOD_boolean.c
+++ b/source/blender/modifiers/intern/MOD_boolean.c
@@ -644,33 +644,22 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *
/* XXX This is utterly non-optimal, we may go from a bmesh to a mesh back to a bmesh!
* But for 2.90 better not try to be smart here. */
BKE_mesh_wrapper_ensure_mdata(mesh_operand_ob);
- /* when one of objects is empty (has got no faces) we could speed up
- * calculation a bit returning one of objects' derived meshes (or empty one)
- * Returning mesh is depended on modifiers operation (sergey) */
- result = get_quick_mesh(object, mesh, operand_ob, mesh_operand_ob, bmd->operation);
-
- if (result == NULL) {
- bm = BMD_mesh_bm_create(mesh, object, mesh_operand_ob, operand_ob, &is_flip);
-
- BMD_mesh_intersection(bm, md, ctx, mesh_operand_ob, object, operand_ob, is_flip);
-
- /* Needed for multiple objects to work. */
- BM_mesh_bm_to_me(NULL,
- bm,
- mesh,
- (&(struct BMeshToMeshParams){
- .calc_object_remap = false,
- }));
-
- result = BKE_mesh_from_bmesh_for_eval_nomain(bm, NULL, mesh);
- BM_mesh_free(bm);
- result->runtime.cd_dirty_vert |= CD_MASK_NORMAL;
- }
- /* if new mesh returned, return it; otherwise there was
- * an error, so delete the modifier object */
- if (result == NULL) {
- BKE_modifier_set_error(object, md, "Cannot execute boolean operation");
- }
+
+ bm = BMD_mesh_bm_create(mesh, object, mesh_operand_ob, operand_ob, &is_flip);
+
+ BMD_mesh_intersection(bm, md, ctx, mesh_operand_ob, object, operand_ob, is_flip);
+
+ /* Needed for multiple objects to work. */
+ BM_mesh_bm_to_me(NULL,
+ bm,
+ mesh,
+ (&(struct BMeshToMeshParams){
+ .calc_object_remap = false,
+ }));
+
+ result = BKE_mesh_from_bmesh_for_eval_nomain(bm, NULL, mesh);
+ BM_mesh_free(bm);
+ result->runtime.cd_dirty_vert |= CD_MASK_NORMAL;
}
}
}