mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-24 05:17:58 +00:00
Move object structural properties to its own panel
This commit is contained in:
@@ -242,6 +242,7 @@ if bpy is not None:
|
|||||||
ui.BIM_PT_classification_references,
|
ui.BIM_PT_classification_references,
|
||||||
ui.BIM_PT_documents,
|
ui.BIM_PT_documents,
|
||||||
ui.BIM_PT_constraint_relations,
|
ui.BIM_PT_constraint_relations,
|
||||||
|
ui.BIM_PT_object_structural,
|
||||||
ui.BIM_PT_camera,
|
ui.BIM_PT_camera,
|
||||||
ui.BIM_PT_text,
|
ui.BIM_PT_text,
|
||||||
ui.BIM_UL_generic,
|
ui.BIM_UL_generic,
|
||||||
|
|||||||
@@ -72,22 +72,6 @@ class BIM_PT_object(Panel):
|
|||||||
row = layout.row()
|
row = layout.row()
|
||||||
row.prop(props, 'material_type')
|
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):
|
class BIM_PT_object_psets(Panel):
|
||||||
bl_label = 'IFC Object Property Sets'
|
bl_label = 'IFC Object Property Sets'
|
||||||
@@ -168,6 +152,38 @@ class BIM_PT_object_qto(Panel):
|
|||||||
op.prop_index = index2
|
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):
|
class BIM_PT_document_information(Panel):
|
||||||
bl_label = 'IFC Documents'
|
bl_label = 'IFC Documents'
|
||||||
bl_idname = 'BIM_PT_document_information'
|
bl_idname = 'BIM_PT_document_information'
|
||||||
|
|||||||
Reference in New Issue
Block a user