New feature to read pset template files

This commit is contained in:
Dion Moult
2020-04-24 17:14:07 +10:00
parent a90ad6e16c
commit 9ad57d658e
8 changed files with 268 additions and 19 deletions
+44
View File
@@ -162,6 +162,50 @@ class BIM_PT_classification_references(Panel):
row.prop(props, 'classifications')
class BIM_PT_psets(Panel):
bl_label = 'Psets'
bl_idname = 'BIM_PT_psets'
bl_options = {'DEFAULT_CLOSED'}
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = 'scene'
def draw(self, context):
layout = self.layout
props = context.scene.BIMProperties
row = layout.row(align=True)
row.prop(props, 'pset_template_files', text='')
row = layout.row(align=True)
row.prop(props, 'property_set_templates', text='')
row.operator('bim.add_property_set_template', text='', icon='ADD')
row.operator('bim.delete_property_set_template', text='', icon='PANEL_CLOSE')
row.operator('bim.edit_property_set_template', text='', icon='IMPORT')
row.operator('bim.save_property_set_template', text='', icon='EXPORT')
row = layout.row(align=True)
row.prop(props.active_property_set_template, 'name')
row = layout.row(align=True)
row.prop(props.active_property_set_template, 'description')
row = layout.row(align=True)
row.prop(props.active_property_set_template, 'template_type')
row = layout.row(align=True)
row.prop(props.active_property_set_template, 'applicable_entity')
layout.label(text='Property Templates:')
row = layout.row(align=True)
row.operator('bim.add_property_template')
for index, template in enumerate(props.property_templates):
row = layout.row(align=True)
row.prop(template, 'name', text='')
row.prop(template, 'description', text='')
row.prop(template, 'primary_measure_type', text='')
row.operator('bim.remove_classification', icon='X', text='').classification_index = index
class BIM_PT_classifications(Panel):
bl_label = 'Classifications'
bl_idname = 'BIM_PT_classifications'