From f190ddcd92e06304ab1f91e06f04eae3fc6942c1 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Mon, 27 May 2024 17:29:51 +1000 Subject: [PATCH] Move all N panels back into the scene tabs. No more panels spread around! Qto, 4D tools, 5D tools now in the Costing/Scheduling tab. The misc panel is now in the sandbox. Git history panel is now with the main Git panel. --- src/blenderbim/blenderbim/bim/__init__.py | 1 + src/blenderbim/blenderbim/bim/module/cost/ui.py | 8 +++++--- src/blenderbim/blenderbim/bim/module/ifcgit/ui.py | 8 +++++--- src/blenderbim/blenderbim/bim/module/misc/ui.py | 7 ++++--- src/blenderbim/blenderbim/bim/module/qto/ui.py | 8 +++++--- .../blenderbim/bim/module/sequence/ui.py | 8 +++++--- src/blenderbim/blenderbim/bim/ui.py | 14 ++++++++++++++ 7 files changed, 39 insertions(+), 15 deletions(-) diff --git a/src/blenderbim/blenderbim/bim/__init__.py b/src/blenderbim/blenderbim/bim/__init__.py index 37033001f2..9db15ef2a0 100644 --- a/src/blenderbim/blenderbim/bim/__init__.py +++ b/src/blenderbim/blenderbim/bim/__init__.py @@ -170,6 +170,7 @@ classes = [ ui.BIM_PT_tab_structural, # Construction scheduling ui.BIM_PT_tab_status, + ui.BIM_PT_tab_qto, ui.BIM_PT_tab_resources, ui.BIM_PT_tab_cost, ui.BIM_PT_tab_sequence, diff --git a/src/blenderbim/blenderbim/bim/module/cost/ui.py b/src/blenderbim/blenderbim/bim/module/cost/ui.py index 42eb5d578a..0df9354468 100644 --- a/src/blenderbim/blenderbim/bim/module/cost/ui.py +++ b/src/blenderbim/blenderbim/bim/module/cost/ui.py @@ -755,9 +755,11 @@ class BIM_UL_product_cost_items(UIList): class BIM_PT_Costing_Tools(Panel): bl_label = "5D Tools" bl_idname = "BIM_PT_Costing_Tools" - bl_space_type = "VIEW_3D" - bl_region_type = "UI" - bl_category = "4D/5D Toolkit" + bl_options = {"DEFAULT_CLOSED"} + bl_space_type = "PROPERTIES" + bl_region_type = "WINDOW" + bl_context = "scene" + bl_parent_id = "BIM_PT_tab_cost" def draw(self, context): self.props = context.scene.BIMCostProperties diff --git a/src/blenderbim/blenderbim/bim/module/ifcgit/ui.py b/src/blenderbim/blenderbim/bim/module/ifcgit/ui.py index be8af38b00..7d3a886cba 100644 --- a/src/blenderbim/blenderbim/bim/module/ifcgit/ui.py +++ b/src/blenderbim/blenderbim/bim/module/ifcgit/ui.py @@ -247,9 +247,11 @@ class IFCGIT_PT_revision_inspector(bpy.types.Panel): bl_idname = "IFCGIT_PT_revision_inspector" bl_label = "Git History" bl_options = {"DEFAULT_CLOSED"} - bl_space_type = "VIEW_3D" - bl_region_type = "UI" - bl_category = "BlenderBIM" + bl_space_type = "PROPERTIES" + bl_region_type = "WINDOW" + bl_context = "scene" + bl_options = {"DEFAULT_CLOSED"} + bl_parent_id = "IFCGIT_PT_panel" def draw(self, context): diff --git a/src/blenderbim/blenderbim/bim/module/misc/ui.py b/src/blenderbim/blenderbim/bim/module/misc/ui.py index a2c9ebb0ec..df7dd004dc 100644 --- a/src/blenderbim/blenderbim/bim/module/misc/ui.py +++ b/src/blenderbim/blenderbim/bim/module/misc/ui.py @@ -22,10 +22,11 @@ import bpy class BIM_PT_misc_utilities(bpy.types.Panel): bl_idname = "BIM_PT_misc_utilities" bl_label = "Miscellaneous" + bl_space_type = "PROPERTIES" + bl_region_type = "WINDOW" + bl_context = "output" bl_options = {"DEFAULT_CLOSED"} - bl_space_type = "VIEW_3D" - bl_region_type = "UI" - bl_category = "BlenderBIM" + bl_parent_id = "BIM_PT_tab_sandbox" def draw(self, context): layout = self.layout diff --git a/src/blenderbim/blenderbim/bim/module/qto/ui.py b/src/blenderbim/blenderbim/bim/module/qto/ui.py index 43e5e0b584..c7a79d1522 100644 --- a/src/blenderbim/blenderbim/bim/module/qto/ui.py +++ b/src/blenderbim/blenderbim/bim/module/qto/ui.py @@ -24,9 +24,11 @@ class BIM_PT_qto_utilities(bpy.types.Panel): bl_idname = "BIM_PT_qto_utilities" bl_label = "Quantity Take-off" bl_options = {"DEFAULT_CLOSED"} - bl_space_type = "VIEW_3D" - bl_region_type = "UI" - bl_category = "BlenderBIM" + bl_space_type = "PROPERTIES" + bl_region_type = "WINDOW" + bl_context = "scene" + bl_parent_id = "BIM_PT_tab_qto" + bl_options = {"HIDE_HEADER"} def draw(self, context): if not QtoData.is_loaded: diff --git a/src/blenderbim/blenderbim/bim/module/sequence/ui.py b/src/blenderbim/blenderbim/bim/module/sequence/ui.py index d0e8e15e03..6876030733 100644 --- a/src/blenderbim/blenderbim/bim/module/sequence/ui.py +++ b/src/blenderbim/blenderbim/bim/module/sequence/ui.py @@ -1084,9 +1084,11 @@ class BIM_PT_work_calendars(Panel): class BIM_PT_4D_Tools(Panel): bl_label = "4D Tools" bl_idname = "BIM_PT_4D_Tools" - bl_space_type = "VIEW_3D" - bl_region_type = "UI" - bl_category = "4D/5D Toolkit" + bl_options = {"DEFAULT_CLOSED"} + bl_space_type = "PROPERTIES" + bl_region_type = "WINDOW" + bl_context = "scene" + bl_parent_id = "BIM_PT_tab_sequence" def draw(self, context): self.props = context.scene.BIMWorkScheduleProperties diff --git a/src/blenderbim/blenderbim/bim/ui.py b/src/blenderbim/blenderbim/bim/ui.py index e00a1d449c..0de6b9cc23 100644 --- a/src/blenderbim/blenderbim/bim/ui.py +++ b/src/blenderbim/blenderbim/bim/ui.py @@ -535,6 +535,20 @@ class BIM_PT_tab_status(Panel): pass +class BIM_PT_tab_qto(Panel): + bl_label = "Quantity Take-off" + bl_space_type = "PROPERTIES" + bl_region_type = "WINDOW" + bl_context = "scene" + + @classmethod + def poll(cls, context): + return tool.Blender.is_tab(context, "SCHEDULING") and tool.Ifc.get() + + def draw(self, context): + pass + + class BIM_PT_tab_resources(Panel): bl_label = "Resources" bl_space_type = "PROPERTIES"