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:
Diffstat (limited to 'object_fracture_cell')
-rw-r--r--object_fracture_cell/fracture_cell_setup.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/object_fracture_cell/fracture_cell_setup.py b/object_fracture_cell/fracture_cell_setup.py
index c3e47bbd..dc45c43c 100644
--- a/object_fracture_cell/fracture_cell_setup.py
+++ b/object_fracture_cell/fracture_cell_setup.py
@@ -66,15 +66,16 @@ def _points_from_object(obj, source):
points.extend([matrix * v.co for v in mesh.vertices])
else:
depsgraph = bpy.context.evaluated_depsgraph_get()
+ ob_eval = ob.evaluated_get(depsgraph)
try:
- mesh = ob.evaluated_get(depsgraph).to_mesh()
+ mesh = ob_eval.to_mesh()
except:
mesh = None
if mesh is not None:
matrix = obj.matrix_world.copy()
points.extend([matrix * v.co for v in mesh.vertices])
- bpy.data.meshes.remove(mesh)
+ ob_eval.to_mesh_clear()
def points_from_particles(obj):
points.extend([p.location.copy()
@@ -339,7 +340,8 @@ def cell_fracture_boolean(context, obj, objects,
if use_interior_hide:
obj_cell.data.polygons.foreach_set("hide", [True] * len(obj_cell.data.polygons))
- mesh_new = obj_cell.evaluated_get(depsgraph).to_mesh()
+ 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)