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>
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>
Both branches grew from Unhide_with_alt_click and rewrote the same
select operators. This merge makes #7940 an ancestor so both PRs can
coexist in BonsaiPR builds, reconciling intents:
- select_aggregate: #7940 aggregate dedup dict + #8241
keep_current_selection/active-object seeds
- SelectByMaterial: #7940 selection-derived materials + #8241
remove/filter threading (active object only in those modes)
- SelectIfcClass: #7940 concatenated clipboard query + #8241 filter
branch and deselect path
- SelectSimilarContainer: #7940 multi-container derivation and
clipboard + #8241 remove/filter threading (active object only in
those modes)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
CTRL+Click keeps only the already selected objects that match the
criteria (from the active object, or the clicked UI item), selecting
nothing new. Applied to the same operators as SHIFT+Click remove:
select_similar, select_ifc_class, select_similar_type,
select_by_material, select_similar_container,
select_decomposed_elements, select_group_elements, select_aggregate
and select_linked_aggregates, threaded through
Spatial.select_products(filter_selection=...).
Modifier scheme is now uniform: Click selects, SHIFT removes,
CTRL filters, ALT unhides. Legacy plain-CTRL functions moved to
CTRL+SHIFT (one-level-deep, exclude-children, calculate-sum).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Follows the bim.select_similar precedent: SHIFT+Click deselects the
matched objects instead of selecting them, with criteria taken from
the active object only. Applied to select_ifc_class,
select_similar_type, select_by_material, select_similar_container,
select_decomposed_elements, select_group_elements, select_aggregate
and select_linked_aggregates, threaded through
Spatial.select_products(remove=...).
SHIFT bindings this overwrites (to be reworked later):
- select_ifc_class: match Predefined Type
- select_decomposed_elements: select all listed elements
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Previously only the explicit material prop was used. Now all
selected objects' materials are collected, with layer set usages
resolved to the specific layer index matching the clicked material.
Results are joined with " + " in the clipboard query.
Generated with the assistance of an AI coding tool.
All selected objects sharing the same aggregate would produce
duplicate entries in the clipboard query. Aggregates are now
collected into a dict keyed by id before selection and query
generation.
Generated with the assistance of an AI coding tool.
Previously only the active object's container was used.
Now all selected objects' containers are collected and their
decomposed elements selected, with the query copied to the
clipboard as location = "A" + location = "B".
Generated with the assistance of an AI coding tool.
Previously the clipboard was set inside the class loop,
overwriting on each iteration and reporting multiple times.
Now all classes are joined with " + " and the clipboard is
set once after selection completes.
Generated with the assistance of an AI coding tool.
When multiple objects are selected, _generate_clipboard_query
previously only used the first reference value. Now all values
are joined with " + " so the clipboard query reflects every
selected object (e.g. GlobalId = "A" + GlobalId = "B").
Generated with the assistance of an AI coding tool.
When ALT is held, BIM_OT_select_aggregate now clears
hide_viewport and hide_set on matched objects before
selecting, consistent with the pattern used across other
selection operators on this branch.
Generated with the assistance of an AI coding tool.
- Add bim.select_similar_container button to the spatial
decomposition panel, gated behind the new
show_container_tools preference (renamed from
container_hide_show_isolate)
- Fix select_similar_container to resolve container from
the active list item rather than the active object
- Unhide individual objects when showing container
visibility (set_container_visibility SHOW/ISOLATE)
Generated with the assistance of an AI coding tool.
When mode is SHOW or ISOLATE, also unhide individual
objects (hide_viewport and hide_set) within each
container, not just the collection-level visibility.
Generated with the assistance of an AI coding tool.
Moves "select all listed elements" from ALT to SHIFT,
freeing ALT+Click to unhide hidden objects (viewport
and local hide) before selecting.
Generated with the assistance of an AI coding tool.
ALT+Click now unhides hidden objects (viewport and local
hide) before selecting, matching the behavior added to
other select operators.
Generated with the assistance of an AI coding tool.
ALT+Click now unhides hidden objects (viewport and local
hide) before selecting, matching the behavior added to
other select operators.
Generated with the assistance of an AI coding tool.
ALT+Click now unhides hidden objects (viewport and local
hide) before selecting. Also fixes select_products to set
hide_viewport in addition to hide_set when unhiding.
Generated with the assistance of an AI coding tool.
ALT+Click now unhides hidden objects (viewport and local
hide) before selecting, matching the behavior added to
select_ifc_class and select_similar.
Generated with the assistance of an AI coding tool.
ALT+Click now unhides hidden objects (viewport and local
hide) before selecting, matching the same behavior added
to select_ifc_class.
Generated with the assistance of an AI coding tool.
Clear hide_viewport and hide_set on matched objects
when the operator is invoked with Alt held, so hidden
objects of the target IFC class are revealed and selected.
Generated with the assistance of an AI coding tool.
Tests using custom first/last tread runs were not setting
custom_tread_lock=False, so the custom values were silently ignored
since 8f7cf76d9 introduced the lock gate in the calculation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
SyntaxWarning: invalid escape sequence '\/' at line 312.
`\/` in a plain string is treated as `/` by accident; replaced with raw string r"..." to be explicit.