-
Notifications
You must be signed in to change notification settings - Fork 373
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split the Blueprint into AppBlueprint and ViewportBlueprint (#2358)
### What To continue making it possible to add more data to the blueprint, this PR starts breaking the Blueprint into smaller pieces that are queried as necessary instead of a single monolithic structure. The net result is that we only query the AppBlueprint at the top-level of App, and then limit our query of ViewportBlueprint to inside of AppState.show(). Notably, Blueprint changes are now executed by using a new `SystemCommand::UpdateBlueprint`. This means that any crate that depends on `re_viewer_context` can now instantiate a local `Blueprint` variant directly from the `StoreContext`, and then request updates by issuing the system-command. (This still involves a bit more plumbing than I would like, so we might want to consider adding interior mutability to the StoreContext instead, though the net effect will be the same). The PR additionally splits the `Command` processing into 2 passes: - First we process UICommands, which only have access to StoreContext (and the derived AppBlueprint). - Then we process SystemCommands, which have &mut access to the StoreHub. This lets us do all the work that occurs with the self-consistent StoreView before processing any commands that modify the StoreView (or potentially switch the store all together).
- Loading branch information
Showing
16 changed files
with
723 additions
and
669 deletions.
There are no files selected for viewing
This file contains 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
Oops, something went wrong.