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:
authorNBurn <7nburn@gmail.com>2019-01-29 18:54:49 +0300
committerNBurn <7nburn@gmail.com>2019-01-29 18:54:49 +0300
commitd609009748a604c1df2d8babfa4098260666d01a (patch)
tree98150e04df48252889e2fc8e049c13115e0afe72 /object_print3d_utils
parent5c994fde52196dfe8a7e0db03b6935bac001d353 (diff)
addons: objects.link/unlink syntax update
Changed objects.link and objects.unlink from scene to collection
Diffstat (limited to 'object_print3d_utils')
-rw-r--r--object_print3d_utils/export.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/object_print3d_utils/export.py b/object_print3d_utils/export.py
index d563b549..d980bcc4 100644
--- a/object_print3d_utils/export.py
+++ b/object_print3d_utils/export.py
@@ -53,6 +53,7 @@ def image_copy_guess(filepath, objects):
def write_mesh(context, info, report_cb):
scene = context.scene
+ collection = context.collection
layer = context.view_layer
unit = scene.unit_settings
print_3d = scene.print_3d
@@ -184,7 +185,7 @@ def write_mesh(context, info, report_cb):
if obj_base_tmp is not None:
obj = obj_base_tmp.object
mesh = obj.data
- scene.objects.unlink(obj)
+ collection.objects.unlink(obj)
bpy.data.objects.remove(obj)
bpy.data.meshes.remove(mesh)
del obj_base_tmp, obj, mesh