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

Fix broken 2D space view heuristics in Python Notebooks #5674

Merged
merged 4 commits into from
Mar 26, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ impl MaxImageDimensions {
}

#[derive(Default)]
struct MaxImageDimensionSubscriber {
pub struct MaxImageDimensionSubscriber {
max_dimensions: HashMap<StoreId, MaxImageDimensions>,
}

Expand Down
5 changes: 3 additions & 2 deletions crates/re_space_view_spatial/src/space_view_2d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ impl SpaceViewClass for SpatialSpaceView2D {
&self,
system_registry: &mut re_viewer_context::SpaceViewSystemRegistrator<'_>,
) -> Result<(), SpaceViewClassRegistryError> {
// Ensure spatial topology is registered.
// Ensure spatial topology & max image dimension is registered.
crate::spatial_topology::SpatialTopologyStoreSubscriber::subscription_handle();
crate::max_image_dimension_subscriber::MaxImageDimensionSubscriber::subscription_handle();

register_spatial_contexts(system_registry)?;
register_2d_spatial_visualizers(system_registry)?;
Expand Down Expand Up @@ -410,7 +411,7 @@ fn recommended_space_views_with_image_splits(
}
}
} else {
// Otherwise we can use the space as it is
// Otherwise we can use the space as it is.
recommended.push(RecommendedSpaceView::new_subtree(recommended_root.clone()));
}
}
3 changes: 2 additions & 1 deletion crates/re_space_view_spatial/src/spatial_topology.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ bitflags::bitflags! {
/// Within the tree of all subspaces, every entity is contained in exactly one subspace.
/// The subtree at (and including) the `origin` minus the
/// subtrees of all child spaces are considered to be contained in a subspace.
#[derive(Debug)]
pub struct SubSpace {
/// The transform root of this subspace.
///
Expand Down Expand Up @@ -166,7 +167,7 @@ impl StoreSubscriber for SpatialTopologyStoreSubscriber {
}
}

/// Spatial toopological information about a store.
/// Spatial topological information about a store.
///
/// Describes how 2D & 3D spaces are connected/disconnected.
///
Expand Down
2 changes: 1 addition & 1 deletion crates/re_viewer/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,7 @@ impl App {
store_hub.set_active_recording_id(store_id.clone());
}
StoreKind::Blueprint => {
// We wait with activaing blueprints until they are fully loaded,
// We wait with activating blueprints until they are fully loaded,
// so that we don't run heuristics on half-loaded blueprints.
// TODO(#5297): heed special "end-of-blueprint" message to activate blueprint.
// Otherwise on a mixed connection (SDK sending both blueprint and recording)
Expand Down
29 changes: 19 additions & 10 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,23 +46,32 @@ rerun-release = "cargo run --package rerun-cli --no-default-features --features
#
# This installs the `wasm32-unknown-unknown` rust target if it's not already installed.
# (this looks heavy but takes typically below 0.1s!)
rerun-web = """
rustup target add wasm32-unknown-unknown
&& cargo run -p re_build_web_viewer -- --debug
&& cargo run --package rerun-cli --no-default-features --features web_viewer -- --web-viewer
"""
rerun-web = { cmd = "cargo run --package rerun-cli --no-default-features --features web_viewer -- --web-viewer", depends_on = [
"rerun-build-web",
] }

# Compile the web-viewer wasm, does not include the cli.
#
# This installs the `wasm32-unknown-unknown` rust target if it's not already installed.
# (this looks heavy but takes typically below 0.1s!)
rerun-build-web = "rustup target add wasm32-unknown-unknown && cargo run -p re_build_web_viewer -- --debug"

# Compile and run the web-viewer in release mode via rerun-cli.
#
# You can also give an argument for what to view (e.g. an .rrd file).
#
# This installs the `wasm32-unknown-unknown` rust target if it's not already installed.
# (this looks heavy but takes typically below 0.1s!)
rerun-release-web = """
rustup target add wasm32-unknown-unknown
&& cargo run -p re_build_web_viewer -- --release
&& cargo run --package rerun-cli --no-default-features --features web_viewer --release -- --web-viewer
"""
rerun-web-release = { cmd = "cargo run --package rerun-cli --no-default-features --features web_viewer --release -- --web-viewer", depends_on = [
"rerun-build-web-release",
] }

# Compile the web-viewer wasm in release mode, doe not include the cli.
#
# This installs the `wasm32-unknown-unknown` rust target if it's not already installed.
# (this looks heavy but takes typically below 0.1s!)
rerun-build-web-release = "rustup target add wasm32-unknown-unknown && cargo run -p re_build_web_viewer -- --release"


build-examples = "cargo run -q --locked -p re_build_examples --"

Expand Down