Move new project wizard into its own panel and actually title it "New Project Wizard" for clarity

This commit is contained in:
Dion Moult
2024-06-28 22:49:56 +10:00
parent 03b6c08c50
commit f8dffa1a9b
4 changed files with 47 additions and 4 deletions
@@ -141,6 +141,7 @@ classes = [
# Tabs panel
ui.BIM_PT_tabs,
# Project overview
ui.BIM_PT_tab_new_project_wizard,
ui.BIM_PT_tab_project_info,
ui.BIM_PT_tab_spatial_decomposition,
ui.BIM_PT_tab_project_setup,
@@ -65,6 +65,7 @@ classes = (
prop.BIMProjectProperties,
ui.BIM_MT_new_project,
ui.BIM_MT_project,
ui.BIM_PT_new_project_wizard,
ui.BIM_PT_project,
ui.BIM_PT_project_library,
ui.BIM_PT_links,
@@ -102,8 +102,6 @@ class BIM_PT_project(Panel):
self.draw_loaded_project_ui(context)
else:
self.draw_unsaved_project_ui(context)
else:
self.draw_project_setup_ui(context)
def draw_advanced_loading_ui(self, context):
pprops = context.scene.BIMProjectProperties
@@ -243,7 +241,20 @@ class BIM_PT_project(Panel):
row.operator("bim.select_ifc_file", icon="FILE_FOLDER", text="")
row.operator("bim.unload_project", text="", icon="CANCEL")
def draw_project_setup_ui(self, context):
class BIM_PT_new_project_wizard(Panel):
bl_label = "New Project Wizard"
bl_idname = "BIM_PT_new_project_wizard"
bl_space_type = "PROPERTIES"
bl_region_type = "WINDOW"
bl_context = "scene"
bl_options = {"HIDE_HEADER"}
bl_parent_id = "BIM_PT_tab_new_project_wizard"
def draw(self, context):
self.layout.use_property_decorate = False
self.layout.use_property_split = True
props = context.scene.BIMProperties
pprops = context.scene.BIMProjectProperties
prop_with_search(self.layout, pprops, "export_schema")
+31 -1
View File
@@ -427,6 +427,28 @@ class BIM_PT_tabs(Panel):
tab_entry.enabled = enabled
class BIM_PT_tab_new_project_wizard(Panel):
bl_label = "New Project Wizard"
bl_space_type = "PROPERTIES"
bl_region_type = "WINDOW"
bl_context = "scene"
@classmethod
def poll(cls, context):
if not tool.Blender.is_tab(context, "PROJECT"):
return False
props = context.scene.BIMProperties
pprops = context.scene.BIMProjectProperties
if pprops.is_loading:
return False
elif tool.Ifc.get() or props.ifc_file:
return False
return True
def draw(self, context):
pass
class BIM_PT_tab_project_info(Panel):
bl_label = "Project Info"
bl_space_type = "PROPERTIES"
@@ -435,7 +457,15 @@ class BIM_PT_tab_project_info(Panel):
@classmethod
def poll(cls, context):
return tool.Blender.is_tab(context, "PROJECT")
if not tool.Blender.is_tab(context, "PROJECT"):
return False
props = context.scene.BIMProperties
pprops = context.scene.BIMProjectProperties
if pprops.is_loading:
return True
elif tool.Ifc.get() or props.ifc_file:
return True
return False
def draw(self, context):
pass