diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-07-10 12:27:31 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-07-10 12:27:31 +0400 |
commit | 96e87b329e011f9570de60cd978f86301d50440b (patch) | |
tree | 9115cc38ed6495f7d20c750fd1b14502c73f2f65 /object_fracture_cell/__init__.py | |
parent | cc635eecbc4019f96a6ac10dfa28f19bfbcb29da (diff) |
fix for fracture when objects are already in a group.
Diffstat (limited to 'object_fracture_cell/__init__.py')
-rw-r--r-- | object_fracture_cell/__init__.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/object_fracture_cell/__init__.py b/object_fracture_cell/__init__.py index 4e85831d..9f0a1a12 100644 --- a/object_fracture_cell/__init__.py +++ b/object_fracture_cell/__init__.py @@ -145,8 +145,10 @@ def main_object(scene, obj, level, **kw): group = bpy.data.groups.get(group_name) if group is None: group = bpy.data.groups.new(group_name) + group_objects = group.objects[:] for obj_cell in objects: - group.objects.link(obj_cell) + if obj_cell not in group_objects: + group.objects.link(obj_cell) if kw_copy["use_debug_redraw"]: obj.draw_type = obj_draw_type_prev @@ -314,7 +316,7 @@ class FractureCell(Operator): use_layer_index = IntProperty( name="Layer Index", description="Layer to add the objects into or 0 for existing", - default=-1, + default=0, min=0, max=20, ) @@ -413,7 +415,7 @@ class FractureCell(Operator): rowsub.prop(self, "use_layer_index") rowsub.prop(self, "use_layer_next") rowsub.prop(self, "group_name") - + box = layout.box() col = box.column() col.label("Debug") |