From ec66d7c0b8c5fffd01e06abf58de231439317c69 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Sat, 8 Aug 2020 13:19:56 +1000 Subject: [PATCH] Split object psets and qto into their own panels for usability --- .../blenderbim/bim/__init__.py | 2 ++ src/ifcblenderexport/blenderbim/bim/ui.py | 33 +++++++++++++++++-- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/src/ifcblenderexport/blenderbim/bim/__init__.py b/src/ifcblenderexport/blenderbim/bim/__init__.py index f4785b9693..eab5180b59 100644 --- a/src/ifcblenderexport/blenderbim/bim/__init__.py +++ b/src/ifcblenderexport/blenderbim/bim/__init__.py @@ -234,6 +234,8 @@ if bpy is not None: ui.BIM_PT_material, ui.BIM_PT_mesh, ui.BIM_PT_object, + ui.BIM_PT_object_psets, + ui.BIM_PT_object_qto, ui.BIM_PT_representations, ui.BIM_PT_classification_references, ui.BIM_PT_documents, diff --git a/src/ifcblenderexport/blenderbim/bim/ui.py b/src/ifcblenderexport/blenderbim/bim/ui.py index a149f0e0fb..9a0ff7bcae 100644 --- a/src/ifcblenderexport/blenderbim/bim/ui.py +++ b/src/ifcblenderexport/blenderbim/bim/ui.py @@ -13,7 +13,6 @@ class BIM_PT_object(Panel): return context.active_object is not None and hasattr(context.active_object, "BIMObjectProperties") def draw(self, context): - if context.active_object is None: return layout = self.layout @@ -70,8 +69,22 @@ class BIM_PT_object(Panel): row = layout.row() row.prop(props, 'relating_structure') - layout.label(text="Property Sets:") +class BIM_PT_object_psets(Panel): + bl_label = 'IFC Object Property Sets' + bl_idname = 'BIM_PT_object_psets' + bl_space_type = 'PROPERTIES' + bl_region_type = 'WINDOW' + bl_context = 'object' + @classmethod + def poll(cls, context): + return context.active_object is not None and hasattr(context.active_object, "BIMObjectProperties") + + def draw(self, context): + if context.active_object is None: + return + layout = self.layout + props = context.active_object.BIMObjectProperties row = layout.row(align=True) row.prop(props, 'pset_name', text='') row.operator('bim.add_pset') @@ -89,8 +102,22 @@ class BIM_PT_object(Panel): op.prop_name = prop.name op.collection_element = True - layout.label(text="Quantities:") +class BIM_PT_object_qto(Panel): + bl_label = 'IFC Object Quantity Sets' + bl_idname = 'BIM_PT_object_qto' + bl_space_type = 'PROPERTIES' + bl_region_type = 'WINDOW' + bl_context = 'object' + @classmethod + def poll(cls, context): + return context.active_object is not None and hasattr(context.active_object, "BIMObjectProperties") + + def draw(self, context): + if context.active_object is None: + return + layout = self.layout + props = context.active_object.BIMObjectProperties row = layout.row(align=True) row.prop(props, 'qto_name', text='') row.operator('bim.add_qto')