mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 22:33:33 +00:00
bim.activate_model - show time it took #5696
This commit is contained in:
@@ -2157,6 +2157,8 @@ class ActivateModel(bpy.types.Operator):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
|
start_time = time.time()
|
||||||
|
|
||||||
dprops = tool.Drawing.get_document_props()
|
dprops = tool.Drawing.get_document_props()
|
||||||
dprops.active_drawing_id = 0
|
dprops.active_drawing_id = 0
|
||||||
model_props = tool.Model.get_model_props()
|
model_props = tool.Model.get_model_props()
|
||||||
@@ -2210,6 +2212,11 @@ class ActivateModel(bpy.types.Operator):
|
|||||||
|
|
||||||
tool.Blender.update_viewport()
|
tool.Blender.update_viewport()
|
||||||
bonsai.bim.handler.refresh_ui_data()
|
bonsai.bim.handler.refresh_ui_data()
|
||||||
|
|
||||||
|
operator_time = time.time() - start_time
|
||||||
|
if operator_time > 10:
|
||||||
|
self.report({"INFO"}, f"{self.bl_label} was finished in {operator_time:.2f} seconds.")
|
||||||
|
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user