mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 15:08:51 +00:00
Fix bug where you couldn't do import profiling on Windows. Thanks erab!
This commit is contained in:
@@ -13,8 +13,11 @@ class ProfileImportIFC(bpy.types.Operator):
|
|||||||
import cProfile
|
import cProfile
|
||||||
import pstats
|
import pstats
|
||||||
|
|
||||||
|
# For Windows
|
||||||
|
filepath = bpy.context.scene.BIMProperties.ifc_file.replace('\\', '\\\\')
|
||||||
|
|
||||||
cProfile.run(
|
cProfile.run(
|
||||||
f"import bpy; bpy.ops.import_ifc.bim(filepath='{bpy.context.scene.BIMProperties.ifc_file}')", "blender.prof"
|
f"import bpy; bpy.ops.import_ifc.bim(filepath='{filepath}')", "blender.prof"
|
||||||
)
|
)
|
||||||
p = pstats.Stats("blender.prof")
|
p = pstats.Stats("blender.prof")
|
||||||
p.sort_stats("cumulative").print_stats(50)
|
p.sort_stats("cumulative").print_stats(50)
|
||||||
|
|||||||
Reference in New Issue
Block a user