[Bf-extensions-cvs] [39b8dbb5] master: PLY: flush selection on import

Mikhail Rachinskiy noreply at git.blender.org
Wed Jul 22 07:56:51 CEST 2020


Commit: 39b8dbb572472870c9a8b000bc49a02a9e47d25c
Author: Mikhail Rachinskiy
Date:   Wed Jul 22 09:53:31 2020 +0400
Branches: master
https://developer.blender.org/rBA39b8dbb572472870c9a8b000bc49a02a9e47d25c

PLY: flush selection on import

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

M	io_mesh_ply/import_ply.py

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

diff --git a/io_mesh_ply/import_ply.py b/io_mesh_ply/import_ply.py
index 2bc67746..c118aa3c 100644
--- a/io_mesh_ply/import_ply.py
+++ b/io_mesh_ply/import_ply.py
@@ -408,12 +408,16 @@ def load_ply(filepath):
     if not mesh:
         return {'CANCELLED'}
 
+    for ob in bpy.context.selected_objects:
+        ob.select_set(False)
+
     obj = bpy.data.objects.new(ply_name, mesh)
     bpy.context.collection.objects.link(obj)
     bpy.context.view_layer.objects.active = obj
     obj.select_set(True)
 
     print("\nSuccessfully imported %r in %.3f sec" % (filepath, time.time() - t))
+
     return {'FINISHED'}



More information about the Bf-extensions-cvs mailing list