From d609009748a604c1df2d8babfa4098260666d01a Mon Sep 17 00:00:00 2001 From: NBurn <7nburn@gmail.com> Date: Tue, 29 Jan 2019 10:54:49 -0500 Subject: addons: objects.link/unlink syntax update Changed objects.link and objects.unlink from scene to collection --- object_print3d_utils/export.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'object_print3d_utils') 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 -- cgit v1.2.3