From 0bd4451ce9ae68ff6a80f2a6f5eef4fa7bdd461f Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Mon, 24 Feb 2025 19:30:40 +0500 Subject: [PATCH] Fix issue not cleaning up the mesh after 76277c35d2 --- src/bonsai/bonsai/tool/geometry.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/bonsai/bonsai/tool/geometry.py b/src/bonsai/bonsai/tool/geometry.py index 446b51dd7b..4947666bd6 100644 --- a/src/bonsai/bonsai/tool/geometry.py +++ b/src/bonsai/bonsai/tool/geometry.py @@ -269,8 +269,9 @@ class Geometry(bonsai.core.tool.Geometry): ifcopenshell.api.run("root.remove_product", tool.Ifc.get(), product=element) data = obj.data - if tool.Geometry.has_mesh_properties(data) and tool.Ifc.get_entity_by_id( - tool.Geometry.get_mesh_props(data).ifc_definition_id + if ( + tool.Geometry.has_mesh_properties(data) + and tool.Ifc.get_entity_by_id(tool.Geometry.get_mesh_props(data).ifc_definition_id) is None ): tool.Blender.remove_data_block(data)