From 3abe5edd21c19d553a11320a8e60a6dee7064daf Mon Sep 17 00:00:00 2001 From: myoualid Date: Tue, 10 Sep 2024 17:16:09 +0100 Subject: [PATCH] Fix generating 3D view drawing when IFC elements don't exist in the Blender scene ( such as IfcDistributionPort) --- src/bonsai/bonsai/tool/drawing.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bonsai/bonsai/tool/drawing.py b/src/bonsai/bonsai/tool/drawing.py index de4c983495..cdf5fbc49d 100644 --- a/src/bonsai/bonsai/tool/drawing.py +++ b/src/bonsai/bonsai/tool/drawing.py @@ -1855,6 +1855,8 @@ class Drawing(bonsai.core.tool.Drawing): element_obj_names = set() for element in filtered_elements: obj = tool.Ifc.get_object(element) + if not obj: + continue current_representation = tool.Geometry.get_active_representation(obj) if current_representation: subcontext = current_representation.ContextOfItems