Commit Graph

3 Commits

Author SHA1 Message Date
Ryan Schultz 69486b7d1d Refactor select operators onto shared scaffolding in bim.helper
- RegexSelectMixin owns the CTRL+ALT+Click regex dialog (properties,
  draw, pattern compilation, verb/clipboard/report tail) with two
  strategies: apply_regex_by_value for per-object matching and
  select_regex_products for union-of-products operators. The five
  regex operators now implement only apply_regex, get_regex_prefill
  and their clipboard key / count noun.
- decode_select_click(event) centralizes the modifier scheme (unhide /
  remove / filter / legacy / regex_dialog); all nine select operators
  use it. Per-operator LEFTMOUSE type guards were dropped, so keyboard
  invocation now honors modifiers uniformly.
- Tooltips compose from shared constants, fixing casing drift;
  SelectIfcClass and SelectSimilarType switch from docstrings to
  bl_description to allow composition.
- Delete core.select_similar_container, dead since the #7940 merge
  made SelectSimilarContainer call Spatial.select_products directly.

No behavior changes besides the keyboard-invocation and tooltip-text
normalization noted above.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-15 08:52:58 -05:00
Ryan Schultz 7a7bc75cba Add CTRL+ALT+Click regex-search dialog to five select operators
Opens a props dialog prefilled with the active object's value (key
value, type name, material name, group name, or aggregate name), then
matches it as an unanchored Python regex (entering foo behaves like
.*foo.*) with an Add / Remove / Filter action dropdown and an "Also
Unhide Hidden Objects" checkbox. Applied to select_similar,
select_similar_type, select_by_material, select_group_elements and
select_aggregate.

Multi-match operators (groups, aggregates) union their matches before
a single Spatial.select_products call so Filter cannot wrongly
intersect per-match. select_aggregate matches only IfcElement
aggregates, excluding spatial decomposition, and exposes Also Select
Parts / One Level Deep in the dialog. The equivalent selector query
(e.g. material = /.*foo.*/) is copied to the clipboard.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-15 08:21:27 -05:00
Ryan Schultz 6c97b6fa5e Add dev-notes doc for Additional_Selection_and_Deselection_Tools
Generated with the assistance of an AI coding tool.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 21:38:58 -05:00