diff --git a/object_fracture_cell/__init__.py b/object_fracture_cell/__init__.py index 4e85831dbbc526ac46717988288f2b93ed411293..9f0a1a122159c69907dd28d719e6fd7bbb290cca 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")