Changeset View
Changeset View
Standalone View
Standalone View
io_mesh_ply/import_ply.py
| Context not available. | |||||
| if not mesh: | if not mesh: | ||||
| return {'CANCELLED'} | return {'CANCELLED'} | ||||
| scn = bpy.context.scene | |||||
| obj = bpy.data.objects.new(ply_name, mesh) | obj = bpy.data.objects.new(ply_name, mesh) | ||||
| scn.objects.link(obj) | collection = bpy.context.view_layer.collections.active.collection | ||||
| scn.objects.active = obj | collection.objects.link(obj) | ||||
| obj.select = True | obj.select_set('SELECT') | ||||
| 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'} | ||||
| Context not available. | |||||