mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-28 19:27:10 +00:00
New feature to unassign/reassign IFC class easily
This commit is contained in:
@@ -20,20 +20,26 @@ class BIM_PT_object(Panel):
|
||||
props = context.active_object.BIMObjectProperties
|
||||
bim_properties = context.scene.BIMProperties
|
||||
|
||||
row = layout.row()
|
||||
row.prop(bim_properties, "ifc_product")
|
||||
row = layout.row()
|
||||
row.prop(bim_properties, "ifc_class")
|
||||
if bim_properties.ifc_predefined_type:
|
||||
row = layout.row()
|
||||
row.prop(bim_properties, "ifc_predefined_type")
|
||||
if bim_properties.ifc_predefined_type == 'USERDEFINED':
|
||||
row = layout.row()
|
||||
row.prop(bim_properties, "ifc_userdefined_type")
|
||||
row = layout.row(align=True)
|
||||
if 'Ifc' not in context.active_object.name:
|
||||
row = layout.row()
|
||||
row.prop(bim_properties, "ifc_product")
|
||||
row = layout.row()
|
||||
row.prop(bim_properties, "ifc_class")
|
||||
if bim_properties.ifc_predefined_type:
|
||||
row = layout.row()
|
||||
row.prop(bim_properties, "ifc_predefined_type")
|
||||
if bim_properties.ifc_predefined_type == 'USERDEFINED':
|
||||
row = layout.row()
|
||||
row.prop(bim_properties, "ifc_userdefined_type")
|
||||
row = layout.row()
|
||||
op = row.operator("bim.assign_class")
|
||||
op.object_name = context.active_object.name
|
||||
else:
|
||||
op = row.operator("bim.assign_class", text='Reassign IFC Class')
|
||||
op.object_name = context.active_object.name
|
||||
op = row.operator("bim.unassign_class", icon='X', text='')
|
||||
op.object_name = context.active_object.name
|
||||
|
||||
if 'Ifc' not in context.active_object.name:
|
||||
return
|
||||
|
||||
layout.label(text="Software Identity:")
|
||||
@@ -845,9 +851,11 @@ class BIM_PT_bim(Panel):
|
||||
if bim_properties.ifc_predefined_type == 'USERDEFINED':
|
||||
row = layout.row()
|
||||
row.prop(bim_properties, "ifc_userdefined_type")
|
||||
row = layout.row()
|
||||
row = layout.row(align=True)
|
||||
op = row.operator("bim.assign_class")
|
||||
op.object_name = ''
|
||||
op = row.operator("bim.unassign_class", icon='X', text='')
|
||||
op.object_name = ''
|
||||
|
||||
row = layout.row(align=True)
|
||||
row.operator("bim.select_class")
|
||||
|
||||
Reference in New Issue
Block a user