From 0e4f2fada1435bfafefd54dfd6b8af1e69252274 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Sun, 25 Jan 2026 14:16:35 +1100 Subject: [PATCH] Fix #7519. Do not import parametrically locked item attributes. The previous fix by @theoryshaw had the correct conclusion but had some issues: 1. Don't implement anything that fetches IFC data in the UI draw calls. This historically has lead to race conditions and crashes. The data classes are much preferred. 2. Rather than load the inapplicable attribute then selectively omit it in the UI, it's preferred to just never load it in the first place. --- src/bonsai/bonsai/tool/geometry.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bonsai/bonsai/tool/geometry.py b/src/bonsai/bonsai/tool/geometry.py index e10b2de832..51ff6bfcf3 100644 --- a/src/bonsai/bonsai/tool/geometry.py +++ b/src/bonsai/bonsai/tool/geometry.py @@ -1797,6 +1797,10 @@ class Geometry(bonsai.core.tool.Geometry): def import_item_attributes(cls, obj: bpy.types.Object) -> None: props = tool.Geometry.get_mesh_props(obj.data) props.item_attributes.clear() + element = tool.Ifc.get_entity(tool.Geometry.get_geometry_props().representation_obj) + if tool.Model.get_usage_type(element) == "LAYER3": + return # All LAYER3 attributes are parametrically determined from the IfcMaterialLayerSet + item = tool.Ifc.get().by_id(props.ifc_definition_id) allowed_attributes = [ a.name()