add open web ui button and dummy operator

This commit is contained in:
Ziad-I
2024-06-07 15:26:04 +03:00
committed by Dion Moult
parent bfd9cc0cf0
commit c4cbc577d8
3 changed files with 16 additions and 1 deletions
@@ -29,6 +29,7 @@ classes = (
operator.RemoveCsvAttribute,
operator.ReorderCsvAttribute,
operator.SelectCsvIfcFile,
operator.OpenWebUi,
prop.CsvAttribute,
prop.CsvProperties,
ui.BIM_PT_ifccsv,
@@ -306,3 +306,11 @@ class SelectCsvIfcFile(bpy.types.Operator):
def invoke(self, context, event):
context.window_manager.fileselect_add(self)
return {"RUNNING_MODAL"}
class OpenWebUi(bpy.types.Operator):
bl_idname = "bim.open_web_ui"
bl_label = "Open Web UI"
def execute(self, context):
return {"FINISHED"}
@@ -25,7 +25,7 @@ from blenderbim.bim.module.search.data import SearchData
class BIM_PT_ifccsv(Panel):
bl_label = "Spreadsheet Import/Export"
bl_idname = "BIM_PT_ifccsv"
bl_options = {"DEFAULT_CLOSED"}
bl_options = {"DEFAULT_CLOSED", "HEADER_LAYOUT_EXPAND"}
bl_space_type = "PROPERTIES"
bl_region_type = "WINDOW"
bl_context = "scene"
@@ -123,3 +123,9 @@ class BIM_PT_ifccsv(Panel):
row = layout.row(align=True)
row.operator("bim.export_ifccsv", icon="EXPORT", text="Export IFC to " + props.format.upper())
row.operator("bim.import_ifccsv", icon="IMPORT")
def draw_header(self, context):
row = self.layout.row(align=True)
row.label(text="")
# TODO: Look for a better "globe" icon for the web ui
row.operator("bim.open_web_ui", text="", icon="MATERIAL")