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 <noreply@anthropic.com>
This commit is contained in:
Ryan Schultz
2026-08-05 19:39:33 -05:00
parent c699c01e91
commit a6f2396476
+4
View File
@@ -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)."""