Skip to content

feat(ui): filter the layer tree by name and node type - #29

Merged
jeffamstutz merged 3 commits into
mainfrom
feat/layer-tree-filters
Nov 10, 2026
Merged

jeffamstutz merged 3 commits into
mainfrom
feat/layer-tree-filters

Conversation

@jeffamstutz

@jeffamstutz jeffamstutz commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Why

In classroom2.glb (~900 top-level nodes), there seemed to be no defaultLights node. The scene brings its own directional light through KHR_lights_punctual, so the viewer skips the default light, as intended. The scene's light is in the layer tree but hard to find among its siblings.

What

Layer tree filters (LayerTree.cpp/.h)

  • A name filter that ignores case. For object nodes without their own name, it matches on the object's name.
  • "Show only" checkboxes for surfaces, volumes and lights.
  • A node is shown when it passes the checkboxes and it or a parent matches the name. Every parent above a shown node stays visible.
  • Changing the filter opens every shown node. A reset button clears the filter.
  • Shift-click range selection skips hidden nodes.

Bring the selected node into view (LayerTree.cpp/.h)

  • When the selection changes outside the tree (for example a viewport pick), the tree switches to the node's layer, opens its parents and scrolls the row to the middle of the panel if it isn't already fully visible.
  • Selecting in the tree itself never scrolls it. A node hidden by the filter stays hidden.
  • With several nodes selected, only the first is brought into view.

Log line: vsrViewer and vsrMultiDeviceViewer log ...scene has lights, skipping default light when they skip the default light.

Notes

  • The filter works out which nodes to show again on every frame while it is on. Caching it would help very large scenes.
  • The filter settings are not saved in UI State.

Testing

  • vsrViewer and vsrMultiDeviceViewer build cleanly.
  • The filters have not been tried in the running UI yet.
  • Bringing a viewport pick into view was checked by hand in vsrViewer.

In large scenes a node such as a glTF-authored light is hard to find among
hundreds of siblings. The layer tree now has a case-insensitive name filter
and "show only" checkboxes for surface, volume and light nodes. A node is
shown when it passes the type checkboxes and it or an ancestor matches the
name; the parents of every shown node stay visible for context. Changing
the filter expands the shown nodes, and shift-click range selection skips
hidden nodes.

vsrViewer and vsrMultiDeviceViewer also log when a scene brings its own
lights and the default light is skipped, so a missing "defaultLights" node
is explained.
Picking an object in the viewport selected its layer node, but the tree
only highlighted the row: it stayed collapsed or scrolled out of sight.
When the first selected node changes outside the widget, the layer tree
now switches to that node's layer, opens its ancestors and scrolls the row
to the middle of the panel if it is not already fully visible. Selections
made in the tree itself do not scroll it, and a node hidden by the filter
is left hidden.
lua.org/ftp often times out on CI runners, failing the configure step.
Fetch the v5.4.8 tag from the lua/lua GitHub mirror instead (sources live
at the archive root, so the source paths go through VELA_LUA_SRC) and
cache <source>/.anari_deps in both CI jobs so later runs skip the network.
@jeffamstutz
jeffamstutz merged commit 54e158d into main Nov 10, 2026
12 checks passed
@jeffamstutz
jeffamstutz deleted the feat/layer-tree-filters branch November 10, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant