From 8acaf0ff269b54febd59834bb3ac586cc70195a1 Mon Sep 17 00:00:00 2001 From: Ziad-I <68874104+Ziad-I@users.noreply.github.com> Date: Fri, 9 Aug 2024 23:06:39 +0300 Subject: [PATCH] edit condition if user tries to export to web with no server previously it was just checking if there was a server running but not if blender was connected to a server, this was being handled in the operator itself which isn't the best. --- src/bonsai/bonsai/bim/module/csv/operator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bonsai/bonsai/bim/module/csv/operator.py b/src/bonsai/bonsai/bim/module/csv/operator.py index c837eaeeca..23f48b7ace 100644 --- a/src/bonsai/bonsai/bim/module/csv/operator.py +++ b/src/bonsai/bonsai/bim/module/csv/operator.py @@ -254,7 +254,7 @@ class ExportIfcCsv(bpy.types.Operator): schedule_creator = scheduler.Scheduler() schedule_creator.schedule(self.filepath, tool.Drawing.get_path_with_ext(self.filepath, "svg")) if props.format == "web": - if not context.scene.WebProperties.is_running: + if not context.scene.WebProperties.is_running and not context.scene.WebProperties.is_connected: bpy.ops.bim.connect_websocket_server() tool.Web.send_webui_data(data=ifc_csv.dataframe.to_csv(index=False), data_key="csv_data", event="csv_data")