From bd3250aff6a14f617ed913024dad4cfe19cb11a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Perdig=C3=A3o?= Date: Wed, 24 Sep 2025 09:43:40 -0300 Subject: [PATCH] See #6883. Keeps each linked aggregate in their original container after refreshing. --- src/bonsai/bonsai/bim/module/geometry/operator.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/bonsai/bonsai/bim/module/geometry/operator.py b/src/bonsai/bonsai/bim/module/geometry/operator.py index a2f9cc8fae..27826d6bad 100644 --- a/src/bonsai/bonsai/bim/module/geometry/operator.py +++ b/src/bonsai/bonsai/bim/module/geometry/operator.py @@ -1478,6 +1478,11 @@ class RefreshLinkedAggregate(bpy.types.Operator, tool.Ifc.Operator): ifc_file.by_id(pset["id"]), properties={"Aggregate_Index": int(original_data[group][index]["Aggregate_Index"])}, ) + bonsai.core.spatial.assign_container( + tool.Ifc, tool.Collector, tool.Spatial, container=original_data[group][index]["Container"], element_obj=obj + ) + for part in ifcopenshell.util.element.get_parts(tool.Ifc.get_entity(obj)): + tool.Collector.assign(tool.Ifc.get_object(part)) assignments = original_data[group][index]["Assignment"] if assignments: assign_to_annotations(obj, assignments)