Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show layout in blueprint tree view #2465

Merged
merged 20 commits into from
Jun 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 7 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"args": [
"build",
"--package=rerun-cli",
"--no-default-features",
"--features=native_viewer"
],
"filter": {
Expand All @@ -49,7 +50,9 @@
"cargo": {
"args": [
"build",
"--package=rerun-cli"
"--package=rerun-cli",
"--no-default-features",
"--features=native_viewer"
],
"filter": {
"name": "rerun",
Expand All @@ -68,7 +71,9 @@
"cargo": {
"args": [
"build",
"--package=rerun-cli"
"--package=rerun-cli",
"--no-default-features",
"--features=native_viewer"
],
"filter": {
"name": "rerun",
Expand Down
64 changes: 35 additions & 29 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ glam = "0.22"
gltf = "1.1"
half = "2.0"
image = { version = "0.24", default-features = false }
itertools = "0.10"
itertools = "0.11"
lazy_static = "1.4"
macaw = "0.18"
mimalloc = "0.1.29"
Expand Down Expand Up @@ -143,3 +143,5 @@ debug = true
# If that is not possible, patch to a branch that has a PR open on the upstream repo.
# As a last resport, patch with a commit to our own repository.
# ALWAYS document what PR the commit hash is part of, or when it was merged into the upstream trunk.

egui_tiles = { git = "https://github.com/rerun-io/egui_tiles.git", rev = "0127ad5eeed91beefd03b0ff1733200b32fb9a12" }
5 changes: 4 additions & 1 deletion crates/re_data_ui/src/component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ impl DataUi for EntityComponentWithInstances {
ui.label(ctx.re_ui.error_text("Error: missing instance key"));
}
} else if one_line {
ui.label(format!("{num_instances} values"));
ui.label(format!(
"{} values",
re_format::format_large_number(num_instances as _)
));
} else {
egui_extras::TableBuilder::new(ui)
.resizable(false)
Expand Down
10 changes: 4 additions & 6 deletions crates/re_viewer/src/ui/rerun_menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,12 +278,10 @@ fn egui_debug_options_ui(ui: &mut egui::Ui) {
)
.on_hover_text("Show an overlay on all interactive widgets.")
.changed();

// This option currently causes the viewer to hang.
// any_clicked |= ui
// .checkbox(&mut debug.show_blocking_widget, "Show blocking widgets")
// .on_hover_text("Show what widget blocks the interaction of another widget.")
// .changed();
any_clicked |= ui
.checkbox(&mut debug.show_blocking_widget, "Show blocking widgets")
.on_hover_text("Show what widget blocks the interaction of another widget.")
.changed();

if any_clicked {
let mut style = (*ui.ctx().style()).clone();
Expand Down
2 changes: 0 additions & 2 deletions crates/re_viewport/src/auto_layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,11 @@ enum SplitDirection {
pub(crate) fn tree_from_space_views(
ctx: &mut ViewerContext<'_>,
viewport_size: egui::Vec2,
visible: &std::collections::BTreeSet<SpaceViewId>,
space_views: &BTreeMap<SpaceViewId, SpaceViewBlueprint>,
space_view_states: &HashMap<SpaceViewId, Box<dyn re_viewer_context::SpaceViewState>>,
) -> egui_tiles::Tree<SpaceViewId> {
let mut space_make_infos = space_views
.iter()
.filter(|(space_view_id, _space_view)| visible.contains(space_view_id))
// Sort for determinism:
.sorted_by_key(|(space_view_id, space_view)| {
(
Expand Down
4 changes: 1 addition & 3 deletions crates/re_viewport/src/blueprint_components/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@ mod space_view;
mod viewport;

pub use space_view::SpaceViewComponent;
pub use viewport::{
AutoSpaceViews, SpaceViewMaximized, SpaceViewVisibility, ViewportLayout, VIEWPORT_PATH,
};
pub use viewport::{AutoSpaceViews, SpaceViewMaximized, ViewportLayout, VIEWPORT_PATH};