Skip to content
Snippets Groups Projects
Commit d269e6b9 authored by Campbell Barton's avatar Campbell Barton
Browse files

Fix 'object_fracture_cell' error setting selection & matrix multiply

Much older update from 07ec6458
enabled instead of disabling the selection.

Also use `@` for matrix multiply.
parent f1176bd2
No related branches found
Tags
No related merge requests found
......@@ -199,9 +199,9 @@ def main(context, **kw):
def _getObjectBBMinMax():
min_co = Vector((1000000.0, 1000000.0, 1000000.0))
max_co = -min_co
matrix = obj_cell.matrix_world
matrix = obj_cell.matrix_world.copy()
for i in range(0, 8):
bb_vec = obj_cell.matrix_world * Vector(obj_cell.bound_box[i])
bb_vec = matrix @ Vector(obj_cell.bound_box[i])
min_co[0] = min(bb_vec[0], min_co[0])
min_co[1] = min(bb_vec[1], min_co[1])
min_co[2] = min(bb_vec[2], min_co[2])
......
......@@ -391,17 +391,13 @@ def cell_fracture_boolean(context, obj, objects,
if (not use_debug_bool) and use_island_split:
# this is ugly and Im not proud of this - campbell
for ob in view_layer.objects:
ob.select_set(True)
ob.select_set(False)
for obj_cell in objects_boolean:
obj_cell.select_set(True)
objects_before = set(scene.objects)
bpy.ops.mesh.separate(type='LOOSE')
objects_boolean[:] = [obj_cell for obj_cell in scene.objects if obj_cell not in objects_before]
del objects_before
objects_boolean[:] = [obj_cell for obj_cell in view_layer.objects if obj_cell.select_get()]
context.view_layer.update()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment