From 4829c4c02bb27cb18798f78c72eadfed736423f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Perdig=C3=A3o?= Date: Sat, 16 Mar 2024 15:27:04 -0300 Subject: [PATCH] fix: when subaggregate that is a linked aggregate is unassinged from the main aggregate, it remains a linked aggregate. --- .../blenderbim/bim/module/aggregate/operator.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/blenderbim/blenderbim/bim/module/aggregate/operator.py b/src/blenderbim/blenderbim/bim/module/aggregate/operator.py index bf336ad69b..9e26e78db0 100644 --- a/src/blenderbim/blenderbim/bim/module/aggregate/operator.py +++ b/src/blenderbim/blenderbim/bim/module/aggregate/operator.py @@ -91,10 +91,11 @@ class BIM_OT_aggregate_unassign_object(bpy.types.Operator, Operator): ) # Removes Pset related to Linked Aggregates - pset = ifcopenshell.util.element.get_pset(element, 'BBIM_Linked_Aggregate') - if pset: - pset = tool.Ifc.get().by_id(pset["id"]) - ifcopenshell.api.run("pset.remove_pset", tool.Ifc.get(), pset=pset) + if not element.is_a('IfcElementAssembly'): + pset = ifcopenshell.util.element.get_pset(element, 'BBIM_Linked_Aggregate') + if pset: + pset = tool.Ifc.get().by_id(pset["id"]) + ifcopenshell.api.run("pset.remove_pset", tool.Ifc.get(), pset=pset) class BIM_OT_enable_editing_aggregate(bpy.types.Operator, Operator):