From 85b3f831dc50987d04a2a7449c9e1725a22215f6 Mon Sep 17 00:00:00 2001 From: Ryan Schultz Date: Tue, 11 Nov 2025 20:17:37 -0600 Subject: [PATCH] copy query for aggregates into clipboard, to align with common UI pattern. --- .../bonsai/bim/module/aggregate/operator.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/bonsai/bonsai/bim/module/aggregate/operator.py b/src/bonsai/bonsai/bim/module/aggregate/operator.py index 54147c9e34..ad7ac65312 100644 --- a/src/bonsai/bonsai/bim/module/aggregate/operator.py +++ b/src/bonsai/bonsai/bim/module/aggregate/operator.py @@ -321,6 +321,21 @@ class BIM_OT_select_aggregate(bpy.types.Operator): aggregate_obj.select_set(True) bpy.context.view_layer.objects.active = aggregate_obj + # copy selection query to clipboard + result = "" + for aggregate in all_parts: + aggregate_class = aggregate.is_a() + aggregate_name = aggregate.Name or "" + query = f'parent = "{aggregate_name}"' + if not result: + result = query + else: + result += f' + {query}' + + if result: + bpy.context.window_manager.clipboard = result + self.report({"INFO"}, f"({result}) was copied to the clipboard.") + self.one_level_deep = False # <-- forcibly reset return {"FINISHED"}