From 376d609664afd1df56f50ba1139b9efe2991732a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 15 Jul 2019 10:39:36 +1000 Subject: object_fracture_cell: link collections to scene Also fixes cursor access. --- object_fracture_cell/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/object_fracture_cell/__init__.py b/object_fracture_cell/__init__.py index f3641506..037ed15c 100644 --- a/object_fracture_cell/__init__.py +++ b/object_fracture_cell/__init__.py @@ -65,6 +65,7 @@ def main_object(context, obj, level, **kw): use_sharp_edges = kw_copy.pop("use_sharp_edges") use_sharp_edges_apply = kw_copy.pop("use_sharp_edges_apply") + scene = context.scene collection = context.collection if level != 0: @@ -156,6 +157,7 @@ def main_object(context, obj, level, **kw): group = bpy.data.collections.get(collection_name) if group is None: group = bpy.data.collections.new(collection_name) + collection.children.link(group) group_objects = group.objects[:] for obj_cell in objects: if obj_cell not in group_objects: -- cgit v1.2.3