[Bf-extensions-cvs] [a5a2b36b] master: Fix T66820: Cell fracture not working properly
Campbell Barton
noreply at git.blender.org
Mon Jul 15 03:02:50 CEST 2019
Commit: a5a2b36b9ead8f1b6aed60833c03d7a90ace9b03
Author: Campbell Barton
Date: Mon Jul 15 11:01:33 2019 +1000
Branches: master
https://developer.blender.org/rBAa5a2b36b9ead8f1b6aed60833c03d7a90ace9b03
Fix T66820: Cell fracture not working properly
This failed to properly calculate booleans from the fractured cells.
===================================================================
M object_fracture_cell/fracture_cell_setup.py
===================================================================
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:
More information about the Bf-extensions-cvs
mailing list