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.<Attribute>" (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 <noreply@anthropic.com>
This commit is contained in:
Ryan Schultz
2026-07-15 09:30:59 -05:00
parent e6697d0956
commit 03b3d3f627
2 changed files with 10 additions and 1 deletions
@@ -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.<Attribute>"` — 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
+2 -1
View File
@@ -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):