From b60a0302f5d3eb9a371ffd59645fc1a5bec49e83 Mon Sep 17 00:00:00 2001 From: Mikhail Rachinskiy Date: Sun, 13 Oct 2019 17:21:50 +0400 Subject: 3D-Print: cleanup redundant code already unlinks and removes object. --- object_print3d_utils/export.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'object_print3d_utils') diff --git a/object_print3d_utils/export.py b/object_print3d_utils/export.py index a294512b..d1359ecf 100644 --- a/object_print3d_utils/export.py +++ b/object_print3d_utils/export.py @@ -177,11 +177,7 @@ def write_mesh(context, report_cb): image_copy_guess(filepath, context_override["selected_objects"]) if obj_tmp is not None: - obj = obj_tmp - mesh = obj.data - collection.objects.unlink(obj) - bpy.data.objects.remove(obj) - bpy.data.meshes.remove(mesh) + bpy.data.meshes.remove(obj_tmp.data) # Automatically unlinks and removes object # restore context for ob in context_backup["selected_objects"]: -- cgit v1.2.3