diff --git a/src/blenderbim/blenderbim/bim/__init__.py b/src/blenderbim/blenderbim/bim/__init__.py index a97d6fc9b1..21ac08d6b2 100644 --- a/src/blenderbim/blenderbim/bim/__init__.py +++ b/src/blenderbim/blenderbim/bim/__init__.py @@ -126,23 +126,36 @@ classes = [ ui.BIM_UL_generic, ui.BIM_UL_topics, ui.BIM_ADDON_preferences, - # Scene panel groups - ui.BIM_PT_root, + # Project overview ui.BIM_PT_project_info, ui.BIM_PT_project_setup, - ui.BIM_PT_collaboration, - ui.BIM_PT_selection, ui.BIM_PT_geometry, - ui.BIM_PT_services, - ui.BIM_PT_structural, - ui.BIM_PT_4D5D, - ui.BIM_PT_quality_control, - ui.BIM_PT_integrations, - # Object panel groups - ui.BIM_PT_object_metadata, - ui.BIM_PT_geometry_object, - ui.BIM_PT_services_object, - ui.BIM_PT_misc_object, + ui.BIM_PT_selection, + # Tabs panel + ui.BIM_PT_tabs, + # Object information + ui.BIM_PT_tab_object_metadata, + ui.BIM_PT_tab_misc, + # Geometry and materials + ui.BIM_PT_tab_representations, + ui.BIM_PT_tab_geometric_relationships, + ui.BIM_PT_tab_materials, + ui.BIM_PT_tab_styles, + # Drawings and documents + # Services and systems + ui.BIM_PT_tab_services, + ui.BIM_PT_tab_services_object, + # Structural analysis + ui.BIM_PT_tab_structural, + # Construction scheduling + ui.BIM_PT_tab_4D5D, + # Facility management + ui.BIM_PT_tab_handover, + ui.BIM_PT_tab_operations, + # Quality and coordination + ui.BIM_PT_tab_quality_control, + ui.BIM_PT_tab_collaboration, + ui.BIM_PT_tab_integrations, ] for mod in modules.values(): diff --git a/src/blenderbim/blenderbim/bim/ifc.py b/src/blenderbim/blenderbim/bim/ifc.py index c94fb009a3..4af2d0453f 100644 --- a/src/blenderbim/blenderbim/bim/ifc.py +++ b/src/blenderbim/blenderbim/bim/ifc.py @@ -190,6 +190,13 @@ class IfcStore: @staticmethod def link_element(element, obj): + # Please use tool.Ifc.link() instead of this method. We want to + # refactor this class and deprecate usage of IfcStore in favour of + # tools. + if isinstance(obj, bpy.types.Mesh): + obj.BIMMeshProperties.ifc_definition_id = element.id() + return + existing_obj = IfcStore.id_map.get(element.id(), None) if existing_obj == obj: return diff --git a/src/blenderbim/blenderbim/bim/module/aggregate/ui.py b/src/blenderbim/blenderbim/bim/module/aggregate/ui.py index b7ae5a84d2..6d5404c057 100644 --- a/src/blenderbim/blenderbim/bim/module/aggregate/ui.py +++ b/src/blenderbim/blenderbim/bim/module/aggregate/ui.py @@ -28,7 +28,7 @@ class BIM_PT_aggregate(Panel): bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "object" - bl_parent_id = "BIM_PT_object_metadata" + bl_parent_id = "BIM_PT_tab_object_metadata" @classmethod def poll(cls, context): diff --git a/src/blenderbim/blenderbim/bim/module/attribute/ui.py b/src/blenderbim/blenderbim/bim/module/attribute/ui.py index b3c807cfb7..7ffd360c19 100644 --- a/src/blenderbim/blenderbim/bim/module/attribute/ui.py +++ b/src/blenderbim/blenderbim/bim/module/attribute/ui.py @@ -59,7 +59,7 @@ class BIM_PT_object_attributes(Panel): bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "object" - bl_parent_id = "BIM_PT_object_metadata" + bl_parent_id = "BIM_PT_tab_object_metadata" @classmethod def poll(cls, context): diff --git a/src/blenderbim/blenderbim/bim/module/augin/ui.py b/src/blenderbim/blenderbim/bim/module/augin/ui.py index 896a8e5386..4daed80129 100644 --- a/src/blenderbim/blenderbim/bim/module/augin/ui.py +++ b/src/blenderbim/blenderbim/bim/module/augin/ui.py @@ -26,7 +26,7 @@ class BIM_PT_augin(bpy.types.Panel): bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "scene" - bl_parent_id = "BIM_PT_integrations" + bl_parent_id = "BIM_PT_tab_integrations" def draw(self, context): layout = self.layout diff --git a/src/blenderbim/blenderbim/bim/module/bcf/ui.py b/src/blenderbim/blenderbim/bim/module/bcf/ui.py index 821d028dbb..58f3c0a858 100644 --- a/src/blenderbim/blenderbim/bim/module/bcf/ui.py +++ b/src/blenderbim/blenderbim/bim/module/bcf/ui.py @@ -29,7 +29,7 @@ class BIM_PT_bcf(Panel): bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "scene" - bl_parent_id = "BIM_PT_collaboration" + bl_parent_id = "BIM_PT_tab_collaboration" def draw(self, context): layout = self.layout diff --git a/src/blenderbim/blenderbim/bim/module/bimtester/ui.py b/src/blenderbim/blenderbim/bim/module/bimtester/ui.py index 9b58f29b12..5c0843d618 100644 --- a/src/blenderbim/blenderbim/bim/module/bimtester/ui.py +++ b/src/blenderbim/blenderbim/bim/module/bimtester/ui.py @@ -27,7 +27,7 @@ class BIM_PT_qa(Panel): bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "scene" - bl_parent_id = "BIM_PT_quality_control" + bl_parent_id = "BIM_PT_tab_quality_control" def draw(self, context): self.layout.use_property_split = True diff --git a/src/blenderbim/blenderbim/bim/module/boundary/ui.py b/src/blenderbim/blenderbim/bim/module/boundary/ui.py index a62b6d5a8e..1e1068077f 100644 --- a/src/blenderbim/blenderbim/bim/module/boundary/ui.py +++ b/src/blenderbim/blenderbim/bim/module/boundary/ui.py @@ -50,7 +50,7 @@ class BIM_PT_Boundary(Panel): bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "object" - bl_parent_id = "BIM_PT_geometry_object" + bl_parent_id = "BIM_PT_tab_geometric_relationships" @classmethod def poll(cls, context): @@ -124,7 +124,7 @@ class BIM_PT_SpaceBoundaries(Panel): bl_region_type = "WINDOW" bl_context = "object" bl_order = 1 - bl_parent_id = "BIM_PT_geometry_object" + bl_parent_id = "BIM_PT_tab_geometric_relationships" @classmethod def poll(cls, context): diff --git a/src/blenderbim/blenderbim/bim/module/brick/ui.py b/src/blenderbim/blenderbim/bim/module/brick/ui.py index 18dba36b29..2303ac6498 100644 --- a/src/blenderbim/blenderbim/bim/module/brick/ui.py +++ b/src/blenderbim/blenderbim/bim/module/brick/ui.py @@ -29,10 +29,7 @@ class BIM_PT_brickschema(Panel): bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "scene" - - @classmethod - def poll(cls, context): - return tool.Blender.is_tab(context, "FM") + bl_parent_id = "BIM_PT_tab_operations" def draw(self, context): if not BrickschemaData.is_loaded: diff --git a/src/blenderbim/blenderbim/bim/module/clash/ui.py b/src/blenderbim/blenderbim/bim/module/clash/ui.py index 48a04eda4e..26c32321c4 100644 --- a/src/blenderbim/blenderbim/bim/module/clash/ui.py +++ b/src/blenderbim/blenderbim/bim/module/clash/ui.py @@ -27,7 +27,7 @@ class BIM_PT_ifcclash(Panel): bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "scene" - bl_parent_id = "BIM_PT_quality_control" + bl_parent_id = "BIM_PT_tab_quality_control" def draw(self, context): layout = self.layout diff --git a/src/blenderbim/blenderbim/bim/module/classification/ui.py b/src/blenderbim/blenderbim/bim/module/classification/ui.py index c49957f3b3..5a4de6bf65 100644 --- a/src/blenderbim/blenderbim/bim/module/classification/ui.py +++ b/src/blenderbim/blenderbim/bim/module/classification/ui.py @@ -162,7 +162,7 @@ class BIM_PT_classification_references(Panel, ReferenceUI): bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "object" - bl_parent_id = "BIM_PT_object_metadata" + bl_parent_id = "BIM_PT_tab_object_metadata" @classmethod def poll(cls, context): diff --git a/src/blenderbim/blenderbim/bim/module/cobie/ui.py b/src/blenderbim/blenderbim/bim/module/cobie/ui.py index 65396d7fed..a78cff2b62 100644 --- a/src/blenderbim/blenderbim/bim/module/cobie/ui.py +++ b/src/blenderbim/blenderbim/bim/module/cobie/ui.py @@ -27,10 +27,7 @@ class BIM_PT_cobie(Panel): bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "scene" - - @classmethod - def poll(cls, context): - return tool.Blender.is_tab(context, "FM") + bl_parent_id = "BIM_PT_tab_handover" def draw(self, context): layout = self.layout diff --git a/src/blenderbim/blenderbim/bim/module/constraint/ui.py b/src/blenderbim/blenderbim/bim/module/constraint/ui.py index 29b68a00de..2b017e89c3 100644 --- a/src/blenderbim/blenderbim/bim/module/constraint/ui.py +++ b/src/blenderbim/blenderbim/bim/module/constraint/ui.py @@ -75,7 +75,7 @@ class BIM_PT_object_constraints(Panel): bl_region_type = "WINDOW" bl_context = "object" bl_order = 1 - bl_parent_id = "BIM_PT_misc_object" + bl_parent_id = "BIM_PT_tab_misc" @classmethod def poll(cls, context): diff --git a/src/blenderbim/blenderbim/bim/module/cost/ui.py b/src/blenderbim/blenderbim/bim/module/cost/ui.py index 142e3f814a..c083331c76 100644 --- a/src/blenderbim/blenderbim/bim/module/cost/ui.py +++ b/src/blenderbim/blenderbim/bim/module/cost/ui.py @@ -30,7 +30,7 @@ class BIM_PT_cost_schedules(Panel): bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "scene" - bl_parent_id = "BIM_PT_4D5D" + bl_parent_id = "BIM_PT_tab_4D5D" @classmethod def poll(cls, context): diff --git a/src/blenderbim/blenderbim/bim/module/covetool/ui.py b/src/blenderbim/blenderbim/bim/module/covetool/ui.py index f74aa1a97b..4c055db03e 100644 --- a/src/blenderbim/blenderbim/bim/module/covetool/ui.py +++ b/src/blenderbim/blenderbim/bim/module/covetool/ui.py @@ -26,7 +26,7 @@ class BIM_PT_covetool(bpy.types.Panel): bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "scene" - bl_parent_id = "BIM_PT_integrations" + bl_parent_id = "BIM_PT_tab_integrations" def draw(self, context): layout = self.layout diff --git a/src/blenderbim/blenderbim/bim/module/csv/ui.py b/src/blenderbim/blenderbim/bim/module/csv/ui.py index a242039712..9f690a762a 100644 --- a/src/blenderbim/blenderbim/bim/module/csv/ui.py +++ b/src/blenderbim/blenderbim/bim/module/csv/ui.py @@ -27,7 +27,7 @@ class BIM_PT_ifccsv(Panel): bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "scene" - bl_parent_id = "BIM_PT_collaboration" + bl_parent_id = "BIM_PT_tab_collaboration" def draw(self, context): layout = self.layout diff --git a/src/blenderbim/blenderbim/bim/module/debug/ui.py b/src/blenderbim/blenderbim/bim/module/debug/ui.py index 91fd3e1024..1ca48978be 100644 --- a/src/blenderbim/blenderbim/bim/module/debug/ui.py +++ b/src/blenderbim/blenderbim/bim/module/debug/ui.py @@ -27,7 +27,7 @@ class BIM_PT_debug(Panel): bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "scene" - bl_parent_id = "BIM_PT_quality_control" + bl_parent_id = "BIM_PT_tab_quality_control" def draw(self, context): layout = self.layout diff --git a/src/blenderbim/blenderbim/bim/module/diff/ui.py b/src/blenderbim/blenderbim/bim/module/diff/ui.py index edb64be484..a0343e2042 100644 --- a/src/blenderbim/blenderbim/bim/module/diff/ui.py +++ b/src/blenderbim/blenderbim/bim/module/diff/ui.py @@ -30,7 +30,7 @@ class BIM_PT_diff(Panel): bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "scene" - bl_parent_id = "BIM_PT_quality_control" + bl_parent_id = "BIM_PT_tab_quality_control" def draw(self, context): if not DiffData.is_loaded: diff --git a/src/blenderbim/blenderbim/bim/module/document/ui.py b/src/blenderbim/blenderbim/bim/module/document/ui.py index d45f7b6792..a656f4f576 100644 --- a/src/blenderbim/blenderbim/bim/module/document/ui.py +++ b/src/blenderbim/blenderbim/bim/module/document/ui.py @@ -83,7 +83,7 @@ class BIM_PT_object_documents(Panel): bl_region_type = "WINDOW" bl_context = "object" bl_order = 1 - bl_parent_id = "BIM_PT_misc_object" + bl_parent_id = "BIM_PT_tab_misc" @classmethod def poll(cls, context): diff --git a/src/blenderbim/blenderbim/bim/module/geometry/ui.py b/src/blenderbim/blenderbim/bim/module/geometry/ui.py index d8ec59b274..4725373914 100644 --- a/src/blenderbim/blenderbim/bim/module/geometry/ui.py +++ b/src/blenderbim/blenderbim/bim/module/geometry/ui.py @@ -17,6 +17,7 @@ # along with BlenderBIM Add-on. If not, see . import bpy +import blenderbim.tool as tool from bpy.types import Panel from blenderbim.bim.ifc import IfcStore from blenderbim.bim.helper import prop_with_search @@ -29,19 +30,21 @@ def object_menu(self, context): self.layout.operator("bim.override_object_delete", icon="PLUGIN") self.layout.operator("bim.override_paste_buffer", icon="PLUGIN") + def outliner_menu(self, context): self.layout.separator() - self.layout.operator("bim.override_outliner_delete", icon='X') + self.layout.operator("bim.override_outliner_delete", icon="X") + class BIM_PT_representations(Panel): bl_label = "Representations" bl_idname = "BIM_PT_representations" - bl_options = {"DEFAULT_CLOSED"} bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" - bl_context = "object" + bl_context = "scene" bl_order = 1 - bl_parent_id = "BIM_PT_geometry_object" + bl_parent_id = "BIM_PT_tab_representations" + bl_options = {"HIDE_HEADER"} @classmethod def poll(cls, context): @@ -58,20 +61,24 @@ class BIM_PT_representations(Panel): layout = self.layout props = context.active_object.BIMObjectProperties - if not RepresentationsData.data["representations"]: - layout.label(text="No representations found") - row = layout.row(align=True) prop_with_search(row, context.active_object.BIMGeometryProperties, "contexts", text="") row.operator("bim.add_representation", icon="ADD", text="") + if not RepresentationsData.data["representations"]: + layout.label(text="No Representations Found") + for representation in RepresentationsData.data["representations"]: row = self.layout.row(align=True) row.label(text=representation["ContextType"]) row.label(text=representation["ContextIdentifier"]) row.label(text=representation["TargetView"]) row.label(text=representation["RepresentationType"]) - op = row.operator("bim.switch_representation", icon="FILE_REFRESH" if representation["is_active"] else "OUTLINER_DATA_MESH", text="") + op = row.operator( + "bim.switch_representation", + icon="FILE_REFRESH" if representation["is_active"] else "OUTLINER_DATA_MESH", + text="", + ) op.should_switch_all_meshes = True op.should_reload = True op.ifc_definition_id = representation["id"] @@ -87,7 +94,7 @@ class BIM_PT_connections(Panel): bl_region_type = "WINDOW" bl_context = "object" bl_order = 1 - bl_parent_id = "BIM_PT_geometry_object" + bl_parent_id = "BIM_PT_tab_geometric_relationships" @classmethod def poll(cls, context): diff --git a/src/blenderbim/blenderbim/bim/module/gis/ui.py b/src/blenderbim/blenderbim/bim/module/gis/ui.py index 83325ad097..a57b8d2c1c 100644 --- a/src/blenderbim/blenderbim/bim/module/gis/ui.py +++ b/src/blenderbim/blenderbim/bim/module/gis/ui.py @@ -26,7 +26,7 @@ class BIM_PT_cityjson_converter(Panel): bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "scene" - bl_parent_id = "BIM_PT_collaboration" + bl_parent_id = "BIM_PT_tab_collaboration" 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 10b33693ce..a2d6d8a362 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_misc_object" + bl_parent_id = "BIM_PT_tab_misc" @classmethod def poll(cls, context): diff --git a/src/blenderbim/blenderbim/bim/module/layer/ui.py b/src/blenderbim/blenderbim/bim/module/layer/ui.py index 698bd448ab..218fd4046d 100644 --- a/src/blenderbim/blenderbim/bim/module/layer/ui.py +++ b/src/blenderbim/blenderbim/bim/module/layer/ui.py @@ -28,7 +28,7 @@ class BIM_PT_layers(Panel): bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "scene" - bl_parent_id = "BIM_PT_geometry_object" + bl_parent_id = "BIM_PT_tab_geometric_relationships" @classmethod def poll(cls, context): diff --git a/src/blenderbim/blenderbim/bim/module/lca/ui.py b/src/blenderbim/blenderbim/bim/module/lca/ui.py index a76b38d8f8..5e06fd0098 100644 --- a/src/blenderbim/blenderbim/bim/module/lca/ui.py +++ b/src/blenderbim/blenderbim/bim/module/lca/ui.py @@ -27,7 +27,7 @@ class BIM_PT_lca(Panel): bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "scene" - bl_parent_id = "BIM_PT_integrations" + bl_parent_id = "BIM_PT_tab_integrations" def draw(self, context): props = context.scene.BIMLCAProperties diff --git a/src/blenderbim/blenderbim/bim/module/library/ui.py b/src/blenderbim/blenderbim/bim/module/library/ui.py index feffc02cbd..c963203cd7 100644 --- a/src/blenderbim/blenderbim/bim/module/library/ui.py +++ b/src/blenderbim/blenderbim/bim/module/library/ui.py @@ -101,7 +101,7 @@ class BIM_PT_library_references(Panel): bl_region_type = "WINDOW" bl_context = "object" bl_order = 1 - bl_parent_id = "BIM_PT_misc_object" + bl_parent_id = "BIM_PT_tab_misc" @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 2cce58c0a6..773a3e14db 100644 --- a/src/blenderbim/blenderbim/bim/module/material/ui.py +++ b/src/blenderbim/blenderbim/bim/module/material/ui.py @@ -117,6 +117,7 @@ class BIM_PT_object_material(Panel): bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "scene" + bl_parent_id = "BIM_PT_tab_materials" @classmethod def poll(cls, context): diff --git a/src/blenderbim/blenderbim/bim/module/owner/ui.py b/src/blenderbim/blenderbim/bim/module/owner/ui.py index fb515deb58..622808c6f0 100644 --- a/src/blenderbim/blenderbim/bim/module/owner/ui.py +++ b/src/blenderbim/blenderbim/bim/module/owner/ui.py @@ -291,7 +291,7 @@ class BIM_PT_object_actor(bpy.types.Panel): bl_region_type = "WINDOW" bl_context = "object" bl_order = 1 - bl_parent_id = "BIM_PT_misc_object" + bl_parent_id = "BIM_PT_tab_misc" @classmethod def poll(cls, context): diff --git a/src/blenderbim/blenderbim/bim/module/patch/ui.py b/src/blenderbim/blenderbim/bim/module/patch/ui.py index 3a843da8f0..c5013c31ff 100644 --- a/src/blenderbim/blenderbim/bim/module/patch/ui.py +++ b/src/blenderbim/blenderbim/bim/module/patch/ui.py @@ -29,7 +29,7 @@ class BIM_PT_patch(bpy.types.Panel): bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "scene" - bl_parent_id = "BIM_PT_quality_control" + bl_parent_id = "BIM_PT_tab_quality_control" def draw(self, context): layout = self.layout diff --git a/src/blenderbim/blenderbim/bim/module/pset/ui.py b/src/blenderbim/blenderbim/bim/module/pset/ui.py index 932c89d6bc..56ff428e00 100644 --- a/src/blenderbim/blenderbim/bim/module/pset/ui.py +++ b/src/blenderbim/blenderbim/bim/module/pset/ui.py @@ -175,7 +175,7 @@ class BIM_PT_object_psets(Panel): bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "object" - bl_parent_id = "BIM_PT_object_metadata" + bl_parent_id = "BIM_PT_tab_object_metadata" @classmethod def poll(cls, context): @@ -217,7 +217,7 @@ class BIM_PT_object_qtos(Panel): bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "object" - bl_parent_id = "BIM_PT_object_metadata" + bl_parent_id = "BIM_PT_tab_object_metadata" @classmethod def poll(cls, context): @@ -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_misc_object" + bl_parent_id = "BIM_PT_tab_misc" def draw(self, context): pass diff --git a/src/blenderbim/blenderbim/bim/module/resource/ui.py b/src/blenderbim/blenderbim/bim/module/resource/ui.py index a3ecdc92d9..4ce36e12bf 100644 --- a/src/blenderbim/blenderbim/bim/module/resource/ui.py +++ b/src/blenderbim/blenderbim/bim/module/resource/ui.py @@ -29,7 +29,7 @@ class BIM_PT_resources(Panel): bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "scene" - bl_parent_id = "BIM_PT_4D5D" + bl_parent_id = "BIM_PT_tab_4D5D" @classmethod def poll(cls, context): diff --git a/src/blenderbim/blenderbim/bim/module/root/ui.py b/src/blenderbim/blenderbim/bim/module/root/ui.py index 1db3a14e9b..76f5546594 100644 --- a/src/blenderbim/blenderbim/bim/module/root/ui.py +++ b/src/blenderbim/blenderbim/bim/module/root/ui.py @@ -30,7 +30,7 @@ class BIM_PT_class(Panel): bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "object" - bl_parent_id = "BIM_PT_object_metadata" + bl_parent_id = "BIM_PT_tab_object_metadata" bl_options = {"HIDE_HEADER"} @classmethod diff --git a/src/blenderbim/blenderbim/bim/module/sequence/ui.py b/src/blenderbim/blenderbim/bim/module/sequence/ui.py index 8d8d9f7afd..eb0ccc477d 100644 --- a/src/blenderbim/blenderbim/bim/module/sequence/ui.py +++ b/src/blenderbim/blenderbim/bim/module/sequence/ui.py @@ -31,7 +31,7 @@ class BIM_PT_work_plans(Panel): bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "scene" - bl_parent_id = "BIM_PT_4D5D" + bl_parent_id = "BIM_PT_tab_4D5D" @classmethod def poll(cls, context): @@ -103,7 +103,7 @@ class BIM_PT_work_schedules(Panel): bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "scene" - bl_parent_id = "BIM_PT_4D5D" + bl_parent_id = "BIM_PT_tab_4D5D" @classmethod def poll(cls, context): @@ -817,7 +817,7 @@ class BIM_PT_work_calendars(Panel): bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "scene" - bl_parent_id = "BIM_PT_4D5D" + bl_parent_id = "BIM_PT_tab_4D5D" @classmethod def poll(cls, context): diff --git a/src/blenderbim/blenderbim/bim/module/spatial/ui.py b/src/blenderbim/blenderbim/bim/module/spatial/ui.py index ec66b77248..8f73b18a4f 100644 --- a/src/blenderbim/blenderbim/bim/module/spatial/ui.py +++ b/src/blenderbim/blenderbim/bim/module/spatial/ui.py @@ -28,7 +28,7 @@ class BIM_PT_spatial(Panel): bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "object" - bl_parent_id = "BIM_PT_object_metadata" + bl_parent_id = "BIM_PT_tab_object_metadata" @classmethod def poll(cls, context): diff --git a/src/blenderbim/blenderbim/bim/module/structural/ui.py b/src/blenderbim/blenderbim/bim/module/structural/ui.py index cfb3559c9f..b828c124f4 100644 --- a/src/blenderbim/blenderbim/bim/module/structural/ui.py +++ b/src/blenderbim/blenderbim/bim/module/structural/ui.py @@ -93,7 +93,7 @@ class BIM_PT_structural_boundary_conditions(Panel): bl_region_type = "WINDOW" bl_context = "object" bl_order = 1 - bl_parent_id = "BIM_PT_misc_object" + bl_parent_id = "BIM_PT_tab_misc" @classmethod def poll(cls, context): @@ -128,7 +128,7 @@ class BIM_PT_connected_structural_members(Panel): bl_region_type = "WINDOW" bl_context = "object" bl_order = 1 - bl_parent_id = "BIM_PT_misc_object" + bl_parent_id = "BIM_PT_tab_misc" @classmethod def poll(cls, context): @@ -181,7 +181,7 @@ class BIM_PT_structural_member(Panel): bl_region_type = "WINDOW" bl_context = "object" bl_order = 1 - bl_parent_id = "BIM_PT_misc_object" + bl_parent_id = "BIM_PT_tab_misc" @classmethod def poll(cls, context): @@ -224,7 +224,7 @@ class BIM_PT_structural_connection(Panel): bl_region_type = "WINDOW" bl_context = "object" bl_order = 1 - bl_parent_id = "BIM_PT_misc_object" + bl_parent_id = "BIM_PT_tab_misc" @classmethod def poll(cls, context): @@ -283,7 +283,7 @@ class BIM_PT_structural_analysis_models(Panel): bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "scene" - bl_parent_id = "BIM_PT_structural" + bl_parent_id = "BIM_PT_tab_structural" @classmethod def poll(cls, context): @@ -358,7 +358,7 @@ class BIM_PT_structural_load_cases(Panel): bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "scene" - bl_parent_id = "BIM_PT_structural" + bl_parent_id = "BIM_PT_tab_structural" @classmethod def poll(cls, context): @@ -454,7 +454,7 @@ class BIM_PT_structural_loads(Panel): bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "scene" - bl_parent_id = "BIM_PT_structural" + bl_parent_id = "BIM_PT_tab_structural" @classmethod def poll(cls, context): @@ -524,7 +524,7 @@ class BIM_PT_boundary_conditions(Panel): bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "scene" - bl_parent_id = "BIM_PT_structural" + bl_parent_id = "BIM_PT_tab_structural" @classmethod def poll(cls, context): diff --git a/src/blenderbim/blenderbim/bim/module/system/ui.py b/src/blenderbim/blenderbim/bim/module/system/ui.py index 7436b71c4a..9aea14b027 100644 --- a/src/blenderbim/blenderbim/bim/module/system/ui.py +++ b/src/blenderbim/blenderbim/bim/module/system/ui.py @@ -30,7 +30,7 @@ class BIM_PT_systems(Panel): bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "scene" - bl_parent_id = "BIM_PT_services" + bl_parent_id = "BIM_PT_tab_services" @classmethod def poll(cls, context): @@ -81,7 +81,7 @@ class BIM_PT_object_systems(Panel): bl_region_type = "WINDOW" bl_context = "object" bl_order = 1 - bl_parent_id = "BIM_PT_services_object" + bl_parent_id = "BIM_PT_tab_services_object" @classmethod def poll(cls, context): @@ -137,7 +137,7 @@ class BIM_PT_ports(Panel): bl_region_type = "WINDOW" bl_context = "object" bl_order = 1 - bl_parent_id = "BIM_PT_services_object" + bl_parent_id = "BIM_PT_tab_services_object" @classmethod def poll(cls, context): @@ -170,7 +170,7 @@ class BIM_PT_port(Panel): bl_region_type = "WINDOW" bl_context = "object" bl_order = 1 - bl_parent_id = "BIM_PT_services_object" + bl_parent_id = "BIM_PT_tab_services_object" @classmethod def poll(cls, context): diff --git a/src/blenderbim/blenderbim/bim/module/tester/ui.py b/src/blenderbim/blenderbim/bim/module/tester/ui.py index 59a0d12281..f956b28f59 100644 --- a/src/blenderbim/blenderbim/bim/module/tester/ui.py +++ b/src/blenderbim/blenderbim/bim/module/tester/ui.py @@ -27,7 +27,7 @@ class BIM_PT_tester(Panel): bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "scene" - bl_parent_id = "BIM_PT_quality_control" + bl_parent_id = "BIM_PT_tab_quality_control" def draw(self, context): self.layout.use_property_split = True diff --git a/src/blenderbim/blenderbim/bim/module/type/ui.py b/src/blenderbim/blenderbim/bim/module/type/ui.py index ad3fdd92ce..7be2c50897 100644 --- a/src/blenderbim/blenderbim/bim/module/type/ui.py +++ b/src/blenderbim/blenderbim/bim/module/type/ui.py @@ -30,7 +30,7 @@ class BIM_PT_type(Panel): bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "object" - bl_parent_id = "BIM_PT_object_metadata" + bl_parent_id = "BIM_PT_tab_object_metadata" @classmethod def poll(cls, context): diff --git a/src/blenderbim/blenderbim/bim/module/void/ui.py b/src/blenderbim/blenderbim/bim/module/void/ui.py index f9630af001..4197189a61 100644 --- a/src/blenderbim/blenderbim/bim/module/void/ui.py +++ b/src/blenderbim/blenderbim/bim/module/void/ui.py @@ -30,7 +30,7 @@ class BIM_PT_voids(Panel): bl_region_type = "WINDOW" bl_context = "object" bl_order = 1 - bl_parent_id = "BIM_PT_geometry_object" + bl_parent_id = "BIM_PT_tab_geometric_relationships" @classmethod def poll(cls, context): diff --git a/src/blenderbim/blenderbim/bim/ui.py b/src/blenderbim/blenderbim/bim/ui.py index 368b1b26e1..0b44a28256 100644 --- a/src/blenderbim/blenderbim/bim/ui.py +++ b/src/blenderbim/blenderbim/bim/ui.py @@ -270,7 +270,7 @@ class BIM_ADDON_preferences(bpy.types.AddonPreferences): # Scene panel groups -class BIM_PT_root(Panel): +class BIM_PT_tabs(Panel): bl_label = "BlenderBIM Add-on" bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" @@ -283,7 +283,6 @@ class BIM_PT_root(Panel): aprops = context.screen.BIMAreaProperties[context.screen.areas[:].index(context.area)] row = self.layout.row() - row.scale_y = 0.75 # Yes, we actually do this. row.operator( "bim.set_tab", text="", emboss=False, icon_value=blenderbim.bim.icons["IFC"].icon_id ).tab = "PROJECT" @@ -298,7 +297,7 @@ class BIM_PT_root(Panel): row.operator("bim.set_tab", text="", emboss=False, icon="BLENDER").tab = "BLENDER" row.operator("bim.switch_tab", text="", emboss=False, icon="UV_SYNC_SELECT") - # Yes, that's right, we're still doing this. + # Yes, that's right. row = self.layout.row() row.scale_y = 0.2 for tab in [ @@ -355,7 +354,7 @@ class BIM_PT_project_setup(Panel): pass -class BIM_PT_collaboration(Panel): +class BIM_PT_tab_collaboration(Panel): bl_label = "Collaboration" bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" @@ -398,7 +397,7 @@ class BIM_PT_geometry(Panel): pass -class BIM_PT_4D5D(Panel): +class BIM_PT_tab_4D5D(Panel): bl_label = "Costing and Scheduling" bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" @@ -412,7 +411,7 @@ class BIM_PT_4D5D(Panel): pass -class BIM_PT_structural(Panel): +class BIM_PT_tab_structural(Panel): bl_label = "Structural" bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" @@ -426,7 +425,7 @@ class BIM_PT_structural(Panel): pass -class BIM_PT_services(Panel): +class BIM_PT_tab_services(Panel): bl_label = "Services" bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" @@ -440,7 +439,7 @@ class BIM_PT_services(Panel): pass -class BIM_PT_quality_control(Panel): +class BIM_PT_tab_quality_control(Panel): bl_label = "Quality Control" bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" @@ -454,7 +453,7 @@ class BIM_PT_quality_control(Panel): pass -class BIM_PT_integrations(Panel): +class BIM_PT_tab_integrations(Panel): bl_label = "BIM Integrations" bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" @@ -470,7 +469,7 @@ class BIM_PT_integrations(Panel): # Object panel groups -class BIM_PT_object_metadata(Panel): +class BIM_PT_tab_object_metadata(Panel): bl_label = "Object Metadata" bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" @@ -485,8 +484,8 @@ class BIM_PT_object_metadata(Panel): pass -class BIM_PT_geometry_object(Panel): - bl_label = "Geometry" +class BIM_PT_tab_representations(Panel): + bl_label = "Representations" bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "scene" @@ -500,7 +499,52 @@ class BIM_PT_geometry_object(Panel): pass -class BIM_PT_services_object(Panel): +class BIM_PT_tab_geometric_relationships(Panel): + bl_label = "Geometric Relationships" + bl_space_type = "PROPERTIES" + bl_region_type = "WINDOW" + bl_context = "scene" + bl_order = 1 + + @classmethod + def poll(cls, context): + return tool.Blender.is_tab(context, "GEOMETRY") and tool.Ifc.get() + + def draw(self, context): + pass + + +class BIM_PT_tab_materials(Panel): + bl_label = "Materials" + bl_space_type = "PROPERTIES" + bl_region_type = "WINDOW" + bl_context = "scene" + bl_order = 1 + + @classmethod + def poll(cls, context): + return tool.Blender.is_tab(context, "GEOMETRY") and tool.Ifc.get() + + def draw(self, context): + pass + + +class BIM_PT_tab_styles(Panel): + bl_label = "Styles" + bl_space_type = "PROPERTIES" + bl_region_type = "WINDOW" + bl_context = "scene" + bl_order = 1 + + @classmethod + def poll(cls, context): + return tool.Blender.is_tab(context, "GEOMETRY") and tool.Ifc.get() + + def draw(self, context): + pass + + +class BIM_PT_tab_services_object(Panel): bl_label = "Services" bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" @@ -515,7 +559,7 @@ class BIM_PT_services_object(Panel): pass -class BIM_PT_misc_object(Panel): +class BIM_PT_tab_misc(Panel): bl_label = "Misc." bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" @@ -531,6 +575,36 @@ class BIM_PT_misc_object(Panel): pass +class BIM_PT_tab_handover(Panel): + bl_label = "Commissioning and Handover" + bl_space_type = "PROPERTIES" + bl_region_type = "WINDOW" + bl_context = "scene" + bl_order = 1 + + @classmethod + def poll(cls, context): + return tool.Blender.is_tab(context, "FM") and tool.Ifc.get() + + def draw(self, context): + pass + + +class BIM_PT_tab_operations(Panel): + bl_label = "Operations and Maintenance" + bl_space_type = "PROPERTIES" + bl_region_type = "WINDOW" + bl_context = "scene" + bl_order = 2 + + @classmethod + def poll(cls, context): + return tool.Blender.is_tab(context, "FM") and tool.Ifc.get() + + def draw(self, context): + pass + + class UIData: data = {} is_loaded = False