Skip to content
Snippets Groups Projects
Commit 96e87b32 authored by Campbell Barton's avatar Campbell Barton
Browse files

fix for fracture when objects are already in a group.

parent cc635eec
No related branches found
No related tags found
No related merge requests found
......@@ -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")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment