[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [3641] trunk/py/scripts/addons/ object_fracture_cell/fracture_cell_setup.py: updates for changes in separate operator

Campbell Barton ideasman42 at gmail.com
Sat Jul 21 17:33:26 CEST 2012


Revision: 3641
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=3641
Author:   campbellbarton
Date:     2012-07-21 15:33:26 +0000 (Sat, 21 Jul 2012)
Log Message:
-----------
updates for changes in separate operator

Modified Paths:
--------------
    trunk/py/scripts/addons/object_fracture_cell/fracture_cell_setup.py

Modified: trunk/py/scripts/addons/object_fracture_cell/fracture_cell_setup.py
===================================================================
--- trunk/py/scripts/addons/object_fracture_cell/fracture_cell_setup.py	2012-07-20 08:35:33 UTC (rev 3640)
+++ trunk/py/scripts/addons/object_fracture_cell/fracture_cell_setup.py	2012-07-21 15:33:26 UTC (rev 3641)
@@ -378,27 +378,16 @@
 
     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)
+        objects_boolean[:] = [obj_cell for obj_cell in scene.objects if obj_cell.select]
 
-            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
-
     scene.update()
 
     return objects_boolean



More information about the Bf-extensions-cvs mailing list