From 365393aa0747ec503576fe673a914d9d22e2a623 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Mon, 24 Feb 2025 14:00:13 +0500 Subject: [PATCH] Fix #6209 after 67bac44 --- src/bonsai/bonsai/tool/geometry.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/bonsai/bonsai/tool/geometry.py b/src/bonsai/bonsai/tool/geometry.py index 6fb121766c..dd14e9791a 100644 --- a/src/bonsai/bonsai/tool/geometry.py +++ b/src/bonsai/bonsai/tool/geometry.py @@ -268,10 +268,9 @@ class Geometry(bonsai.core.tool.Geometry): bonsai.core.system.remove_port(tool.Ifc, tool.System, port=port) ifcopenshell.api.run("root.remove_product", tool.Ifc.get(), product=element) - mesh = obj.data - assert isinstance(mesh, bpy.types.Mesh) - if not tool.Ifc.get_entity_by_id(tool.Geometry.get_mesh_props(mesh).ifc_definition_id): - tool.Blender.remove_data_block(mesh) + data = obj.data + if data and tool.Geometry.get_data_representation(data): + tool.Blender.remove_data_block(data) if is_spatial: bonsai.core.spatial.import_spatial_decomposition(tool.Spatial)