Open
Conversation
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.
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.
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. 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 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.
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.
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.
- 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.
7624ced to
9de8661
Compare
Member
Author
|
Summary of rebase
The next build should merge both PRs in order — Unhide first (it's older, lower PR number), then Concatenate on top — with no conflicts. |
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.
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.
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.
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.
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 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.
9de8661 to
7e3a9e4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Branch:
Concatenate_selectionsOverview
This branch standardizes how Bonsai's "select similar" operators handle multiple selected objects. Previously, most operators either used only the active/first object, ignored duplicates, or built clipboard queries inside loops (producing overwrites or single-item output). All affected operators now collect their relevant entities from the full selection, deduplicate by entity id, and write a single clipboard query joining all values with
+— consistent with IFC selector query syntax.bim.select_similar— search/operator.pyPreviously only
reference_values[0]was passed to_generate_clipboard_query, so only the first selected object's value appeared in the clipboard.Now all reference values are passed and joined with
+.Example: Select two walls and click "Select Similar" on
GlobalId:bim.select_ifc_class— search/operator.pyThe clipboard was set and reported inside the per-class loop, overwriting on each iteration. The separator was also
,rather than+.Now the clipboard is written once after the loop with
+as the separator.Example: Select an
IfcWalland anIfcSlab, then click "Select IFC Class":bim.select_similar_container— spatial/operator.pyOnly
context.active_object's container was used. No clipboard output existed at all.Now all selected objects are iterated, containers are deduplicated by entity id, elements from all containers are selected, and a clipboard query is generated.
Example: Select objects from Level 1 and Level 2, then click "Select Similar Container":
bim.select_aggregate— aggregate/operator.pyWhen multiple parts of the same aggregate were selected, the aggregate was appended to a plain list multiple times, producing duplicate entries in the clipboard query.
Aggregates are now collected into a dict keyed by entity id before selection and query generation.
Example: Select three parts all belonging to the same
IfcElementAssembly "Truss-A":bim.select_by_material— material/operator.pyThe most involved change. The operator only used the explicit
materialprop (a single material ID set by the UI button), with no awareness of other selected objects. Layer set usages were not resolved to specific layers.Now the operator derives materials from all selected objects. When the clicked material is an
IfcMaterialwithin a layer set, its layer index is detected and the corresponding layer material is pulled from each other selected object's layer set. Falls back to the explicit prop if selection yields nothing.Example 1 — simple materials: Select a concrete wall and a steel column, click "Select By Material" on either:
Example 2 — layer sets: Select two walls, click "Select By Material" on Layer 1 (the exterior CMU layer). Wall A has
[CMU, Air, GWB], Wall B has[Brick, Air, GWB]:The layer index from the clicked material is used to look up the matching layer on every other selected object's layer set.