[Bf-extensions-cvs] [b4f07c45] blender-v2.83-release: Fix T76610: DXF export fails with Python 3.8

Brecht Van Lommel noreply at git.blender.org
Sun May 10 14:10:52 CEST 2020


Commit: b4f07c45de2e012bf7342cc17974f4065fe73fdf
Author: Brecht Van Lommel
Date:   Sun May 10 14:07:25 2020 +0200
Branches: blender-v2.83-release
https://developer.blender.org/rBAb4f07c45de2e012bf7342cc17974f4065fe73fdf

Fix T76610: DXF export fails with Python 3.8

Replace use of removed time.clock(), solution suggested by Paul Morelle.

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

M	io_export_dxf/export_dxf.py

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

diff --git a/io_export_dxf/export_dxf.py b/io_export_dxf/export_dxf.py
index 88a27b3b..71434a71 100644
--- a/io_export_dxf/export_dxf.py
+++ b/io_export_dxf/export_dxf.py
@@ -35,7 +35,7 @@ def exportDXF(context, filePath, settings):
     """
     print("----------\nExporting to {}".format(filePath))
     import time
-    time1 = time.clock()
+    time1 = time.perf_counter()
 
     if settings['verbose']:
         print("Generating Object list for export... (Root parents only)")
@@ -71,7 +71,7 @@ def exportDXF(context, filePath, settings):
 
             drawing.convert(filePath)
 
-        duration = time.clock() - time1
+        duration = time.perf_counter() - time1
         print('%s objects exported in %.2f seconds. -----DONE-----' %\
             (exported, duration))
     except IOError:



More information about the Bf-extensions-cvs mailing list