diff --git a/src/ifcblenderexport/blenderbim/bim/__init__.py b/src/ifcblenderexport/blenderbim/bim/__init__.py index 131cf813d2..ff988a16cb 100644 --- a/src/ifcblenderexport/blenderbim/bim/__init__.py +++ b/src/ifcblenderexport/blenderbim/bim/__init__.py @@ -242,6 +242,7 @@ if bpy is not None: ui.BIM_PT_classification_references, ui.BIM_PT_documents, ui.BIM_PT_constraint_relations, + ui.BIM_PT_object_structural, ui.BIM_PT_camera, ui.BIM_PT_text, ui.BIM_UL_generic, diff --git a/src/ifcblenderexport/blenderbim/bim/ui.py b/src/ifcblenderexport/blenderbim/bim/ui.py index 72c3294c69..56807491c0 100644 --- a/src/ifcblenderexport/blenderbim/bim/ui.py +++ b/src/ifcblenderexport/blenderbim/bim/ui.py @@ -72,22 +72,6 @@ class BIM_PT_object(Panel): row = layout.row() row.prop(props, 'material_type') - layout.label(text='Structural Boundary Condition:') - - row = layout.row() - row.prop(props, 'has_boundary_condition') - - if bpy.context.active_object.BIMObjectProperties.has_boundary_condition: - row = layout.row() - row.prop(props.boundary_condition, 'name') - for index, attribute in enumerate(props.boundary_condition.attributes): - row = layout.row(align=True) - row.prop(attribute, 'name', text='') - row.prop(attribute, 'string_value', text='') - - row = layout.row() - row.prop(props, 'structural_member_connection') - class BIM_PT_object_psets(Panel): bl_label = 'IFC Object Property Sets' @@ -168,6 +152,38 @@ class BIM_PT_object_qto(Panel): op.prop_index = index2 +class BIM_PT_object_structural(Panel): + bl_label = 'IFC Structural Relationships' + bl_idname = 'BIM_PT_object_structural' + bl_options = {'DEFAULT_CLOSED'} + 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() + row.prop(props, 'has_boundary_condition') + + if bpy.context.active_object.BIMObjectProperties.has_boundary_condition: + row = layout.row() + row.prop(props.boundary_condition, 'name') + for index, attribute in enumerate(props.boundary_condition.attributes): + row = layout.row(align=True) + row.prop(attribute, 'name', text='') + row.prop(attribute, 'string_value', text='') + + row = layout.row() + row.prop(props, 'structural_member_connection') + + class BIM_PT_document_information(Panel): bl_label = 'IFC Documents' bl_idname = 'BIM_PT_document_information'