Skip to content
Snippets Groups Projects
Commit 39b8dbb5 authored by Mikhail Rachinskiy's avatar Mikhail Rachinskiy
Browse files

PLY: flush selection on import

parent 85173fa5
Branches
Tags
No related merge requests found
...@@ -408,12 +408,16 @@ def load_ply(filepath): ...@@ -408,12 +408,16 @@ def load_ply(filepath):
if not mesh: if not mesh:
return {'CANCELLED'} return {'CANCELLED'}
for ob in bpy.context.selected_objects:
ob.select_set(False)
obj = bpy.data.objects.new(ply_name, mesh) obj = bpy.data.objects.new(ply_name, mesh)
bpy.context.collection.objects.link(obj) bpy.context.collection.objects.link(obj)
bpy.context.view_layer.objects.active = obj bpy.context.view_layer.objects.active = obj
obj.select_set(True) obj.select_set(True)
print("\nSuccessfully imported %r in %.3f sec" % (filepath, time.time() - t)) print("\nSuccessfully imported %r in %.3f sec" % (filepath, time.time() - t))
return {'FINISHED'} return {'FINISHED'}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment