Repository navigation
Scene panel: scroll the rows - #230
Merged
Merged
Conversation
A scripted editor run now ends with "selected: <name>" (or "(none)") next to its other state lines, so a GUI check can tell what a click picked without reading the inspector. The Scene panel's filter field is the named control treesearch, and the part of the panel the rows are drawn in is treelist.panel, which --scroll-to also takes as a panel. Nothing is drawn differently.
A scene with more objects than the panel fits could not reach its last rows. The rows now scroll with the wheel, clamped to them, with a thin thumb at the right edge as in the inspector that can also be dragged. A row dragged near the top or bottom edge scrolls the list. A selection made anywhere (viewport, a new object, --select) or a new filter brings the selected row into view once; the wheel is not fought otherwise. Rows scrolled out of the list take no drop or dropped file. The scroll arithmetic is in ui/list_scroll.hh with unit tests; treescrollcheck.py runs in CI.
The markers the viewport draws for objects with neither mesh nor children (and the lightbulbs for lights) are now the named controls vp.marker.<object name>, so a scripted check can click one with --click @vp.marker.<name> and select that object the way a user picks it in the view. Nothing is drawn differently.
An object picked in the viewport, added, or given with --select while a group above it is closed had no row to scroll to. The tree now opens every closed group above it, the scene row included, and scrolls to the row on the next frame. It tries once per selection: a selection made by clicking a row in the tree never opens anything, and a group the user closes again afterwards stays closed while the selection is unchanged. treescrollcheck.py picks a child of a closed group from its viewport marker.
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.
The Scene panel now scrolls once the object list is taller than the panel. The wheel scrolls the rows, and a thin thumb at the right edge, like the inspector's, can be dragged. Dragging a row near the top or bottom edge scrolls the list too.
Picking an object in the viewport, adding one, or using
--selectbrings its row into view and opens any closed groups above it. Rows scrolled out of the list take no drops.tests/treescrollcheck.pycovers it with 80 objects plus a nested group, and runs in CI.Fixes #227