Split object psets and qto into their own panels for usability

This commit is contained in:
Dion Moult
2020-08-08 13:19:56 +10:00
parent c79ef17a58
commit ec66d7c0b8
2 changed files with 32 additions and 3 deletions
@@ -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,
+30 -3
View File
@@ -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')