From 03b3d3f6274cca7bb3cca425a5cdf760ce7067ea Mon Sep 17 00:00:00 2001 From: Ryan Schultz Date: Wed, 15 Jul 2026 09:30:59 -0500 Subject: [PATCH] Make Type Attributes panel values select_similar buttons Each attribute value in BIM_PT_type_attributes is now a bim.select_similar button with key "type." (the selector walks type. natively), mirroring the object Attributes panel pattern. This gives type attributes the full modifier scheme - select, SHIFT remove, CTRL filter, CTRL+SHIFT sum, ALT unhide, CTRL+ALT regex dialog - with no operator changes. Co-Authored-By: Claude Fable 5 --- .../Additional_Selection_and_Deselection_Tools.md | 8 ++++++++ src/bonsai/bonsai/bim/module/type/ui.py | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/dev-notes/Additional_Selection_and_Deselection_Tools.md b/docs/dev-notes/Additional_Selection_and_Deselection_Tools.md index 6776bc5959..a6915564f0 100644 --- a/docs/dev-notes/Additional_Selection_and_Deselection_Tools.md +++ b/docs/dev-notes/Additional_Selection_and_Deselection_Tools.md @@ -134,6 +134,14 @@ value — values containing regex metacharacters (e.g. `(`) need escaping before Overriding `draw()` for the dialog means the F9 redo panel no longer auto-lists the operator's internal properties for normal runs (it was exposing internals anyway). +### Type Attributes panel hooks into the scheme + +`BIM_PT_type_attributes` (type/ui.py) now renders each attribute value as a +`bim.select_similar` button with `key = "type."` — the same +label-as-button pattern the object Attributes panel uses (attribute/ui.py). The +selector walks `type.` natively, so the full scheme (SHIFT/CTRL/CTRL+SHIFT +sum/ALT/CTRL+ALT regex) applies to type attributes with no operator changes. + ### Deliberately overwritten SHIFT bindings (to be reworked later) Two operators already used SHIFT; the owner chose to overwrite them and revisit with diff --git a/src/bonsai/bonsai/bim/module/type/ui.py b/src/bonsai/bonsai/bim/module/type/ui.py index fbd1edd446..e66d1dc365 100644 --- a/src/bonsai/bonsai/bim/module/type/ui.py +++ b/src/bonsai/bonsai/bim/module/type/ui.py @@ -151,7 +151,8 @@ class BIM_PT_type_attributes(Panel): row = layout.row(align=True) row.label(text=attribute["name"]) value = get_display_value(attribute["value"]) - row.label(text=value) + op = row.operator("bim.select_similar", text=value, icon="NONE", emboss=False) + op.key = f"type.{attribute['name']}" def add_object_button(self, context):