Spatial.select_products now takes mode="ADD"|"REMOVE"|"FILTER" instead
of the mutually exclusive remove / filter_selection booleans, matching
the regex dialog's action enum; helper.selection_mode() maps each
operator's two flag properties to it. core.select_by_material updated
accordingly. Upstream callers pass only products/unhide and are
unaffected.
select_ifc_class, select_similar_type, select_aggregate and
select_linked_aggregates now collect elements and delegate to
select_products instead of hand-rolling unhide/select/filter loops;
select_aggregate's manual IsDecomposedBy recursion is replaced with
get_parts/get_decomposition. Only select_similar keeps a bespoke loop
(tolerance-based value matching).
Intentional behavior deltas (also in the dev note): remove mode uses
plain select_set(False), so select_ifc_class no longer re-anchors the
active object; select_similar_type drops its O(n^2) visible_objects
gate and can latently select hidden occurrences like the other
operators; select_ifc_class and select_similar_type write the
clipboard query in every mode.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- 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>
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>