[Bf-extensions-cvs] [b60a0302] master: 3D-Print: cleanup redundant code

Mikhail Rachinskiy noreply at git.blender.org
Sun Oct 13 15:22:02 CEST 2019


Commit: b60a0302f5d3eb9a371ffd59645fc1a5bec49e83
Author: Mikhail Rachinskiy
Date:   Sun Oct 13 17:21:50 2019 +0400
Branches: master
https://developer.blender.org/rBAb60a0302f5d3eb9a371ffd59645fc1a5bec49e83

3D-Print: cleanup redundant code

 already unlinks and removes object.

===================================================================

M	object_print3d_utils/export.py

===================================================================

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"]:



More information about the Bf-extensions-cvs mailing list