diff --git a/src/ifcblenderexport/blenderbim/bim/operator.py b/src/ifcblenderexport/blenderbim/bim/operator.py index 23562d02b6..baba4cb489 100644 --- a/src/ifcblenderexport/blenderbim/bim/operator.py +++ b/src/ifcblenderexport/blenderbim/bim/operator.py @@ -1122,6 +1122,8 @@ class AddAttribute(bpy.types.Operator): if bpy.context.active_object.BIMObjectProperties.applicable_attributes: attribute = bpy.context.active_object.BIMObjectProperties.attributes.add() attribute.name = bpy.context.active_object.BIMObjectProperties.applicable_attributes + if attribute.name == 'GlobalId': + attribute.string_value = ifcopenshell.guid.new() return {'FINISHED'} diff --git a/src/ifcblenderexport/blenderbim/bim/ui.py b/src/ifcblenderexport/blenderbim/bim/ui.py index 56807491c0..6da710ddeb 100644 --- a/src/ifcblenderexport/blenderbim/bim/ui.py +++ b/src/ifcblenderexport/blenderbim/bim/ui.py @@ -41,10 +41,6 @@ class BIM_PT_object(Panel): if 'Ifc' not in context.active_object.name: return - layout.label(text="Software Identity:") - row = layout.row() - row.operator('bim.generate_global_id') - layout.label(text="Attributes:") row = layout.row(align=True) row.prop(props, 'applicable_attributes', text='') @@ -54,6 +50,8 @@ class BIM_PT_object(Panel): row = layout.row(align=True) row.prop(attribute, 'name', text='') row.prop(attribute, 'string_value', text='') + if attribute.name == 'GlobalId': + row.operator('bim.generate_global_id', icon='FILE_REFRESH', text='') op = row.operator('bim.copy_attributes_to_selection', icon='COPYDOWN', text='') op.prop_base = 'BIMObjectProperties.attributes' op.prop_name = attribute.name