diff --git a/src/blenderbim/blenderbim/bim/__init__.py b/src/blenderbim/blenderbim/bim/__init__.py index c82c820201..61744b71ef 100644 --- a/src/blenderbim/blenderbim/bim/__init__.py +++ b/src/blenderbim/blenderbim/bim/__init__.py @@ -142,7 +142,6 @@ classes = [ ui.BIM_PT_object_metadata, ui.BIM_PT_geometry_object, ui.BIM_PT_services_object, - ui.BIM_PT_utilities_object, ui.BIM_PT_misc_object, ] diff --git a/src/blenderbim/blenderbim/bim/module/brick/ui.py b/src/blenderbim/blenderbim/bim/module/brick/ui.py index 0f1983da8d..18dba36b29 100644 --- a/src/blenderbim/blenderbim/bim/module/brick/ui.py +++ b/src/blenderbim/blenderbim/bim/module/brick/ui.py @@ -26,14 +26,13 @@ from blenderbim.tool.brick import BrickStore class BIM_PT_brickschema(Panel): bl_label = "Brickschema Project" bl_idname = "BIM_PT_brickschema" - bl_options = {"DEFAULT_CLOSED"} bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "scene" @classmethod def poll(cls, context): - return tool.Blender.is_tab(context, "OTHER") + return tool.Blender.is_tab(context, "FM") def draw(self, context): if not BrickschemaData.is_loaded: diff --git a/src/blenderbim/blenderbim/bim/module/cobie/ui.py b/src/blenderbim/blenderbim/bim/module/cobie/ui.py index 333925fd29..65396d7fed 100644 --- a/src/blenderbim/blenderbim/bim/module/cobie/ui.py +++ b/src/blenderbim/blenderbim/bim/module/cobie/ui.py @@ -16,6 +16,7 @@ # You should have received a copy of the GNU General Public License # along with BlenderBIM Add-on. If not, see . +import blenderbim.tool as tool from bpy.types import Panel from blenderbim.bim.ifc import IfcStore @@ -23,11 +24,13 @@ from blenderbim.bim.ifc import IfcStore class BIM_PT_cobie(Panel): bl_label = "COBie" bl_idname = "BIM_PT_cobie" - bl_options = {"DEFAULT_CLOSED"} bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "scene" - bl_parent_id = "BIM_PT_collaboration" + + @classmethod + def poll(cls, context): + return tool.Blender.is_tab(context, "FM") def draw(self, context): layout = self.layout diff --git a/src/blenderbim/blenderbim/bim/module/group/ui.py b/src/blenderbim/blenderbim/bim/module/group/ui.py index ff5acd2c12..10b33693ce 100644 --- a/src/blenderbim/blenderbim/bim/module/group/ui.py +++ b/src/blenderbim/blenderbim/bim/module/group/ui.py @@ -76,7 +76,7 @@ class BIM_PT_object_groups(Panel): bl_region_type = "WINDOW" bl_context = "object" bl_order = 1 - bl_parent_id = "BIM_PT_utilities_object" + bl_parent_id = "BIM_PT_misc_object" @classmethod def poll(cls, context): diff --git a/src/blenderbim/blenderbim/bim/module/material/ui.py b/src/blenderbim/blenderbim/bim/module/material/ui.py index 139a19f9ff..2cce58c0a6 100644 --- a/src/blenderbim/blenderbim/bim/module/material/ui.py +++ b/src/blenderbim/blenderbim/bim/module/material/ui.py @@ -17,6 +17,7 @@ # along with BlenderBIM Add-on. If not, see . import blenderbim.bim.helper +import blenderbim.tool as tool from bpy.types import Panel, UIList from blenderbim.bim.ifc import IfcStore from blenderbim.bim.helper import draw_attributes @@ -115,11 +116,12 @@ class BIM_PT_object_material(Panel): bl_idname = "BIM_PT_object_material" bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" - bl_context = "object" - bl_parent_id = "BIM_PT_object_metadata" + bl_context = "scene" @classmethod def poll(cls, context): + if not tool.Blender.is_tab(context, "GEOMETRY"): + return False if not context.active_object: return False props = context.active_object.BIMObjectProperties diff --git a/src/blenderbim/blenderbim/bim/module/pset/ui.py b/src/blenderbim/blenderbim/bim/module/pset/ui.py index 105e9824f2..932c89d6bc 100644 --- a/src/blenderbim/blenderbim/bim/module/pset/ui.py +++ b/src/blenderbim/blenderbim/bim/module/pset/ui.py @@ -544,7 +544,7 @@ class BIM_PT_bulk_property_editor(Panel): bl_region_type = "WINDOW" bl_context = "object" bl_options = {"DEFAULT_CLOSED"} - bl_parent_id = "BIM_PT_utilities_object" + bl_parent_id = "BIM_PT_misc_object" def draw(self, context): pass diff --git a/src/blenderbim/blenderbim/bim/prop.py b/src/blenderbim/blenderbim/bim/prop.py index fcd2140ec9..cf8c806b38 100644 --- a/src/blenderbim/blenderbim/bim/prop.py +++ b/src/blenderbim/blenderbim/bim/prop.py @@ -345,13 +345,13 @@ def get_tab(self, context): return [ ("PROJECT", "Project Overview", "", blenderbim.bim.icons["IFC"].icon_id, 0), ("OBJECT", "Object Information", "", "FILE_3D", 1), - ("MATERIALS", "Materials and Styles", "", "MATERIAL", 2), + ("GEOMETRY", "Geometry and Materials", "", "MATERIAL", 2), ("DRAWINGS", "Drawings and Documents", "", "DOCUMENTS", 3), ("SERVICES", "Services and Systems", "", "NETWORK_DRIVE", 4), ("STRUCTURE", "Structural Analysis", "", "EDITMODE_HLT", 5), ("SCHEDULING", "Construction Scheduling", "", "NLA", 6), ("FM", "Facility Management", "", "PACKAGE", 7), - ("OTHER", "Other Utilities", "", "COLLAPSEMENU", 8), + ("QUALITY", "Quality and Coordination", "", "COMMUNITY", 8), ("BLENDER", "Blender Properties", "", "BLENDER", 9), ] diff --git a/src/blenderbim/blenderbim/bim/ui.py b/src/blenderbim/blenderbim/bim/ui.py index 92c3686a21..368b1b26e1 100644 --- a/src/blenderbim/blenderbim/bim/ui.py +++ b/src/blenderbim/blenderbim/bim/ui.py @@ -288,13 +288,13 @@ class BIM_PT_root(Panel): "bim.set_tab", text="", emboss=False, icon_value=blenderbim.bim.icons["IFC"].icon_id ).tab = "PROJECT" row.operator("bim.set_tab", text="", emboss=False, icon="FILE_3D").tab = "OBJECT" - row.operator("bim.set_tab", text="", emboss=False, icon="MATERIAL").tab = "MATERIALS" + row.operator("bim.set_tab", text="", emboss=False, icon="MATERIAL").tab = "GEOMETRY" row.operator("bim.set_tab", text="", emboss=False, icon="DOCUMENTS").tab = "DRAWINGS" row.operator("bim.set_tab", text="", emboss=False, icon="NETWORK_DRIVE").tab = "SERVICES" row.operator("bim.set_tab", text="", emboss=False, icon="EDITMODE_HLT").tab = "STRUCTURE" row.operator("bim.set_tab", text="", emboss=False, icon="NLA").tab = "SCHEDULING" row.operator("bim.set_tab", text="", emboss=False, icon="PACKAGE").tab = "FM" - row.operator("bim.set_tab", text="", emboss=False, icon="COLLAPSEMENU").tab = "OTHER" + row.operator("bim.set_tab", text="", emboss=False, icon="COMMUNITY").tab = "QUALITY" row.operator("bim.set_tab", text="", emboss=False, icon="BLENDER").tab = "BLENDER" row.operator("bim.switch_tab", text="", emboss=False, icon="UV_SYNC_SELECT") @@ -304,13 +304,13 @@ class BIM_PT_root(Panel): for tab in [ "PROJECT", "OBJECT", - "MATERIALS", + "GEOMETRY", "DRAWINGS", "SERVICES", "STRUCTURE", "SCHEDULING", "FM", - "OTHER", + "QUALITY", "BLENDER", "SWITCH", ]: @@ -360,11 +360,10 @@ class BIM_PT_collaboration(Panel): bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "scene" - bl_options = {"DEFAULT_CLOSED"} @classmethod def poll(cls, context): - return tool.Blender.is_tab(context, "OTHER") + return tool.Blender.is_tab(context, "QUALITY") def draw(self, context): pass @@ -390,7 +389,6 @@ class BIM_PT_geometry(Panel): bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "scene" - bl_options = {"DEFAULT_CLOSED"} @classmethod def poll(cls, context): @@ -405,7 +403,6 @@ class BIM_PT_4D5D(Panel): bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "scene" - bl_options = {"DEFAULT_CLOSED"} @classmethod def poll(cls, context): @@ -420,7 +417,6 @@ class BIM_PT_structural(Panel): bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "scene" - bl_options = {"DEFAULT_CLOSED"} @classmethod def poll(cls, context): @@ -435,7 +431,6 @@ class BIM_PT_services(Panel): bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "scene" - bl_options = {"DEFAULT_CLOSED"} @classmethod def poll(cls, context): @@ -450,11 +445,10 @@ class BIM_PT_quality_control(Panel): bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "scene" - bl_options = {"DEFAULT_CLOSED"} @classmethod def poll(cls, context): - return tool.Blender.is_tab(context, "OTHER") + return tool.Blender.is_tab(context, "QUALITY") def draw(self, context): pass @@ -469,7 +463,7 @@ class BIM_PT_integrations(Panel): @classmethod def poll(cls, context): - return tool.Blender.is_tab(context, "OTHER") + return tool.Blender.is_tab(context, "QUALITY") def draw(self, context): pass @@ -497,11 +491,10 @@ class BIM_PT_geometry_object(Panel): bl_region_type = "WINDOW" bl_context = "scene" bl_order = 1 - bl_options = {"DEFAULT_CLOSED"} @classmethod def poll(cls, context): - return tool.Blender.is_tab(context, "OBJECT") and tool.Ifc.get() + return tool.Blender.is_tab(context, "GEOMETRY") and tool.Ifc.get() def draw(self, context): pass @@ -513,27 +506,10 @@ class BIM_PT_services_object(Panel): bl_region_type = "WINDOW" bl_context = "scene" bl_order = 1 - bl_options = {"DEFAULT_CLOSED"} @classmethod def poll(cls, context): - return tool.Blender.is_tab(context, "OBJECT") and tool.Ifc.get() - - def draw(self, context): - pass - - -class BIM_PT_utilities_object(Panel): - bl_label = "Utilities" - bl_space_type = "PROPERTIES" - bl_region_type = "WINDOW" - bl_context = "scene" - bl_order = 1 - bl_options = {"DEFAULT_CLOSED"} - - @classmethod - def poll(cls, context): - return tool.Blender.is_tab(context, "OBJECT") and tool.Ifc.get() + return tool.Blender.is_tab(context, "SERVICES") and tool.Ifc.get() def draw(self, context): pass