diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-07-21 19:33:26 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-07-21 19:33:26 +0400 |
commit | ad860068ce053f3f9bc5f5b4dfb3edd54684820f (patch) | |
tree | 4a2801d90c616e63a1fe1bb7be50a66cb188b066 | |
parent | 6c19e6cf0bc030b4c4e202cb78b74505acb7079b (diff) |
updates for changes in separate operator
-rw-r--r-- | object_fracture_cell/fracture_cell_setup.py | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/object_fracture_cell/fracture_cell_setup.py b/object_fracture_cell/fracture_cell_setup.py index 5a57fbb3..c26994f1 100644 --- a/object_fracture_cell/fracture_cell_setup.py +++ b/object_fracture_cell/fracture_cell_setup.py @@ -378,26 +378,15 @@ def cell_fracture_boolean(scene, obj, objects, if (not use_debug_bool) and use_island_split: # this is ugly and Im not proud of this - campbell - objects_islands = [] + base = None + for base in scene.object_bases: + base.select = False for obj_cell in objects_boolean: + obj_cell.select = True - scene.objects.active = obj_cell + bpy.ops.mesh.separate(type='LOOSE') - group_island = bpy.data.groups.new(name="Islands") - group_island.objects.link(obj_cell) - - bpy.ops.object.mode_set(mode='EDIT') - bpy.ops.mesh.select_all(action='SELECT') - bpy.ops.mesh.separate(type='LOOSE') - bpy.ops.object.mode_set(mode='OBJECT') - - objects_islands.extend(group_island.objects[:]) - - bpy.data.groups.remove(group_island) - - scene.objects.active = None - - objects_boolean = objects_islands + objects_boolean[:] = [obj_cell for obj_cell in scene.objects if obj_cell.select] scene.update() |