Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-07-15 03:39:36 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-07-15 03:42:59 +0300
commit376d609664afd1df56f50ba1139b9efe2991732a (patch)
treeb7c816764a73eac066c760c672ce7ed3d6a12a62
parent70b42a69b58f6859eabc3b4bc702a67bc2b2f42d (diff)
object_fracture_cell: link collections to scene
Also fixes cursor access.
-rw-r--r--object_fracture_cell/__init__.py2
1 files changed, 2 insertions, 0 deletions
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: