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.
This commit is contained in:
Ziad-I
2024-08-09 23:06:39 +03:00
parent 105bfb5647
commit 8acaf0ff26
+1 -1
View File
@@ -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")