[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [1838] trunk/py/scripts/addons/ object_fracture: *Bug fixes (script thought there was 32 layers, lol).
Bastien Montagne
montagne29 at wanadoo.fr
Fri Apr 15 14:15:03 CEST 2011
Revision: 1838
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=1838
Author: mont29
Date: 2011-04-15 12:15:02 +0000 (Fri, 15 Apr 2011)
Log Message:
-----------
*Bug fixes (script thought there was 32 layers, lol).
*Commented out non-manifold check on returned shards, it prevented open meshes to be fractured (e.g. Suzanne).
*Enhanced UI of Fracture Group op.
Modified Paths:
--------------
trunk/py/scripts/addons/object_fracture/__init__.py
trunk/py/scripts/addons/object_fracture/fracture_ops.py
Modified: trunk/py/scripts/addons/object_fracture/__init__.py
===================================================================
--- trunk/py/scripts/addons/object_fracture/__init__.py 2011-04-15 11:50:16 UTC (rev 1837)
+++ trunk/py/scripts/addons/object_fracture/__init__.py 2011-04-15 12:15:02 UTC (rev 1838)
@@ -21,7 +21,7 @@
"author": "pildanovak",
"version": (2, 0),
"blender": (2, 5, 7),
- "api": 35622,
+ "api": 36147,
"location": "Search > Fracture Object & Add -> Fracture Helper Objects",
"description": "Fractured Object, Bomb, Projectile, Recorder",
"warning": "",
Modified: trunk/py/scripts/addons/object_fracture/fracture_ops.py
===================================================================
--- trunk/py/scripts/addons/object_fracture/fracture_ops.py 2011-04-15 11:50:16 UTC (rev 1837)
+++ trunk/py/scripts/addons/object_fracture/fracture_ops.py 2011-04-15 12:15:02 UTC (rev 1838)
@@ -69,9 +69,6 @@
False, False, False, False,
False, False, False, False,
False, False, False, False,
- False, False, False, False,
- False, False, False, False,
- False, False, False, False,
False, False, False, False))
bpy.ops.object.editmode_toggle()
@@ -161,7 +158,7 @@
bpy.ops.object.select_all(action='DESELECT')
bpy.context.scene.objects.active = shard
shard.select = True
- bpy.ops.object.duplicate(linked=False, mode=1)
+ bpy.ops.object.duplicate(linked=False, mode='DUMMY')
a = bpy.context.scene.objects.active
sm = a.data
print (a.name)
@@ -231,8 +228,11 @@
fault = 1
#print ('boolop: sizeerror')
- elif min(nmesh.edge_face_count) < 2: # Manifold check
- fault = 1
+ # This checks whether returned shards are non-manifold.
+ # Problem is, if org mesh is non-manifold, it will always fail (e.g. with Suzanne).
+ # And disabling it does not seem to cause any problem…
+# elif min(nmesh.edge_face_count) < 2: # Manifold check
+# fault = 1
if not fault:
new_shards = getIslands(new_shard)
@@ -407,25 +407,31 @@
bl_options = {'REGISTER', 'UNDO'}
exe = BoolProperty(name="Execute",
- description="If it shall actually run, for optimal performance...",
- default=False)
+ description="If it shall actually run, for optimal performance...",
+ default=False)
- e = []
- for i, g in enumerate(bpy.data.groups):
- e.append((g.name, g.name, ''))
+ group = StringProperty(name="Group",
+ description="Specify the group used for fracturing")
- group = EnumProperty(name='Group (hit F8 to refresh list)',
- items=e,
- description='Specify the group used for fracturing')
+# e = []
+# for i, g in enumerate(bpy.data.groups):
+# e.append((g.name, g.name, ''))
+# group = EnumProperty(name='Group (hit F8 to refresh list)',
+# items=e,
+# description='Specify the group used for fracturing')
def execute(self, context):
#getIslands(context.object)
- if self.exe:
+ if self.exe and self.group:
fracture_group(context, self.group)
return {'FINISHED'}
+ def draw(self, context):
+ layout = self.layout
+ layout.prop(self, "exe")
+ layout.prop_search(self, "group", bpy.data, "groups")
#####################################################################
# Import Functions
More information about the Bf-extensions-cvs
mailing list