diff --git a/src/bonsai/bonsai/bim/module/attribute/operator.py b/src/bonsai/bonsai/bim/module/attribute/operator.py index 24102a66ef..e04addce81 100644 --- a/src/bonsai/bonsai/bim/module/attribute/operator.py +++ b/src/bonsai/bonsai/bim/module/attribute/operator.py @@ -107,6 +107,9 @@ class EditAttributes(bpy.types.Operator, tool.Ifc.Operator): attributes = bonsai.bim.helper.export_attributes(props.attributes, callback=callback) ifcopenshell.api.run("attribute.edit_attributes", self.file, product=product, attributes=attributes) + + if (name := tool.Loader.get_name(product)) and obj.name != name: + obj.name = name bpy.ops.bim.disable_editing_attributes(obj=obj.name) return {"FINISHED"} diff --git a/src/bonsai/bonsai/bim/module/model/handler.py b/src/bonsai/bonsai/bim/module/model/handler.py index 95a3190ab7..b73e276602 100644 --- a/src/bonsai/bonsai/bim/module/model/handler.py +++ b/src/bonsai/bonsai/bim/module/model/handler.py @@ -26,7 +26,6 @@ from bpy.app.handlers import persistent @persistent def load_post(*args): - ifcopenshell.api.add_pre_listener("attribute.edit_attributes", "Bonsai.Root.SyncName", root.sync_name) ifcopenshell.api.add_pre_listener("style.edit_presentation_style", "Bonsai.Root.SyncStyleName", root.sync_name) ifcopenshell.api.add_post_listener(