From a6f2396476f1a40ff612342272010f15a77e48ea Mon Sep 17 00:00:00 2001 From: Ryan Schultz Date: Wed, 5 Aug 2026 19:39:33 -0500 Subject: [PATCH] Add missing is_manual_drawing_reference getter to Drawing tool set_manual_drawing_reference existed but the corresponding getter was absent, causing an AttributeError in ui.py line 560. Co-Authored-By: Claude Sonnet 4.6 --- src/bonsai/bonsai/tool/drawing.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bonsai/bonsai/tool/drawing.py b/src/bonsai/bonsai/tool/drawing.py index 708f5b6c7b..023a413dcb 100644 --- a/src/bonsai/bonsai/tool/drawing.py +++ b/src/bonsai/bonsai/tool/drawing.py @@ -2027,6 +2027,10 @@ class Drawing(bonsai.core.tool.Drawing): pset = ifcopenshell.api.pset.add_pset(ifc_file, product=element, name="EPset_Annotation") ifcopenshell.api.pset.edit_pset(ifc_file, pset=pset, properties={"IsManualDrawingReference": True}) + @classmethod + def is_manual_drawing_reference(cls, element: ifcopenshell.entity_instance) -> bool: + return bool(ifcopenshell.util.element.get_pset(element, "EPset_Annotation", "IsManualDrawingReference")) + @classmethod def is_document_reference(cls, element: ifcopenshell.entity_instance) -> bool: """Return True if this annotation links to an external document (not a Bonsai drawing camera)."""