Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-07-15 04:01:33 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-07-15 04:01:33 +0300
commita5a2b36b9ead8f1b6aed60833c03d7a90ace9b03 (patch)
treeb7adefbbb94b802283ab50e9c8a7434bdd457645
parent376d609664afd1df56f50ba1139b9efe2991732a (diff)
Fix T66820: Cell fracture not working properly
This failed to properly calculate booleans from the fractured cells.
-rw-r--r--object_fracture_cell/fracture_cell_setup.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/object_fracture_cell/fracture_cell_setup.py b/object_fracture_cell/fracture_cell_setup.py
index 6bd8937d..83f7cdd1 100644
--- a/object_fracture_cell/fracture_cell_setup.py
+++ b/object_fracture_cell/fracture_cell_setup.py
@@ -321,7 +321,6 @@ def cell_fracture_boolean(context, obj, objects,
collection = context.collection
scene = context.scene
view_layer = context.view_layer
- depsgraph = context.evaluated_depsgraph_get()
if use_interior_hide and level == 0:
# only set for level 0
@@ -337,11 +336,18 @@ def cell_fracture_boolean(context, obj, objects,
if use_interior_hide:
obj_cell.data.polygons.foreach_set("hide", [True] * len(obj_cell.data.polygons))
+ # Calculates all booleans at once (faster).
+ depsgraph = context.evaluated_depsgraph_get()
+
+ for obj_cell in objects:
+
+ if not use_debug_bool:
+
obj_cell_eval = obj_cell.evaluated_get(depsgraph)
mesh_new = bpy.data.meshes.new_from_object(obj_cell_eval)
mesh_old = obj_cell.data
obj_cell.data = mesh_new
- obj_cell.modifiers.remove(mod)
+ obj_cell.modifiers.remove(obj_cell.modifiers[-1])
# remove if not valid
if not mesh_old.users: