From 7cc832ea158d0d7b85fa90aaba2e3ddb432c5e1c Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Sun, 22 Nov 2020 09:29:33 +1100 Subject: [PATCH] Fix warnings in new simplified copy attribute to selection operator --- src/ifcblenderexport/blenderbim/bim/__init__.py | 2 +- src/ifcblenderexport/blenderbim/bim/ui.py | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/ifcblenderexport/blenderbim/bim/__init__.py b/src/ifcblenderexport/blenderbim/bim/__init__.py index 4c306d2aa9..43b4f4cbd9 100644 --- a/src/ifcblenderexport/blenderbim/bim/__init__.py +++ b/src/ifcblenderexport/blenderbim/bim/__init__.py @@ -146,7 +146,6 @@ if bpy is not None: operator.SwitchContext, operator.RemoveContext, operator.OpenUpstream, - operator.BIM_OT_CopyAttributesToSelection, operator.BIM_OT_ChangeClassificationLevel, operator.AddPropertySetTemplate, operator.RemovePropertySetTemplate, @@ -213,6 +212,7 @@ if bpy is not None: operator.AddDrawingStyleAttribute, operator.RemoveDrawingStyleAttribute, operator.CopyPropertyToSelection, + operator.CopyAttributeToSelection, operator.CreateShapeFromStepId, operator.SelectHighPolygonMeshes, operator.InspectFromStepId, diff --git a/src/ifcblenderexport/blenderbim/bim/ui.py b/src/ifcblenderexport/blenderbim/bim/ui.py index 6cdd48f1ee..6c8dbc2ab7 100644 --- a/src/ifcblenderexport/blenderbim/bim/ui.py +++ b/src/ifcblenderexport/blenderbim/bim/ui.py @@ -58,10 +58,9 @@ class BIM_PT_object(Panel): 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 - op.collection_element = True + op = row.operator("bim.copy_attribute_to_selection", icon="COPYDOWN", text="") + op.attribute_name = attribute.name + op.attribute_value = attribute.string_value row.operator("bim.remove_attribute", icon="X", text="").attribute_index = index row = layout.row()