diff --git a/crates/viewer/re_global_context/src/app_options.rs b/crates/viewer/re_global_context/src/app_options.rs index 29c3ee864baf..66c17f714714 100644 --- a/crates/viewer/re_global_context/src/app_options.rs +++ b/crates/viewer/re_global_context/src/app_options.rs @@ -8,29 +8,37 @@ const MAPBOX_ACCESS_TOKEN_ENV_VAR: &str = "RERUN_MAPBOX_ACCESS_TOKEN"; #[serde(default)] pub struct AppOptions { /// Warn if the e2e latency exceeds this value. + #[serde(default)] pub warn_e2e_latency: f32, /// Show milliseconds, RAM usage, etc. + #[serde(default)] pub show_metrics: bool, /// Include the "Welcome screen" application in the recordings panel? #[serde(alias = "include_welcome_screen_button_in_recordings_panel")] + #[serde(default)] pub include_rerun_examples_button_in_recordings_panel: bool, /// Displays an overlay for debugging picking. + #[serde(default)] pub show_picking_debug_overlay: bool, /// Inspect the blueprint timeline. + #[serde(default)] pub inspect_blueprint_timeline: bool, /// Disable garbage collection of the blueprint. + #[serde(default)] pub blueprint_gc: bool, /// What time zone to display timestamps in. #[serde(rename = "timestamp_format")] + #[serde(default)] pub timestamp_format: TimestampFormat, /// Preferred method for video decoding on web. + #[serde(default)] pub video_decoder_hw_acceleration: DecodeHardwareAcceleration, /// Override the path to the FFmpeg binary. @@ -41,17 +49,20 @@ pub struct AppOptions { /// Implementation note: we avoid using `Option` here to avoid losing the user-defined /// path when disabling the override. #[allow(clippy::doc_markdown)] + #[serde(default)] pub video_decoder_override_ffmpeg_path: bool, /// Custom path to the FFmpeg binary. /// /// Don't use this field directly, use [`AppOptions::video_decoder_settings`] instead. #[allow(clippy::doc_markdown)] + #[serde(default)] pub video_decoder_ffmpeg_path: String, /// Mapbox API key (used to enable Mapbox-based map view backgrounds). /// /// Can also be set using the `RERUN_MAPBOX_ACCESS_TOKEN` environment variable. + #[serde(default)] pub mapbox_access_token: String, /// Path to the directory suitable for storing cache data. @@ -62,6 +73,7 @@ pub struct AppOptions { /// *NOTE*: subsystems making use of the cache directory should use a unique sub-directory name, /// see [`AppOptions::cache_subdirectory`]. #[cfg(not(target_arch = "wasm32"))] + #[serde(default)] pub cache_directory: Option, } diff --git a/crates/viewer/re_time_panel/src/time_panel.rs b/crates/viewer/re_time_panel/src/time_panel.rs index f276645b3d8a..cdd95734b961 100644 --- a/crates/viewer/re_time_panel/src/time_panel.rs +++ b/crates/viewer/re_time_panel/src/time_panel.rs @@ -97,9 +97,11 @@ impl From for re_log_types::StoreKind { #[derive(serde::Deserialize, serde::Serialize)] #[serde(default)] pub struct TimePanel { + #[serde(skip)] data_density_graph_painter: data_density_graph::DataDensityGraphPainter, /// Width of the entity name columns previous frame. + #[serde(skip)] prev_col_width: f32, /// The right side of the entity name column; updated during its painting. @@ -111,6 +113,7 @@ pub struct TimePanel { time_ranges_ui: TimeRangesUi, /// Ui elements for controlling time. + #[serde(skip)] time_control_ui: TimeControlUi, /// Which source is the time panel controlling? @@ -138,6 +141,7 @@ pub struct TimePanel { /// /// IMPORTANT: Always make sure that the item will be drawn this or next frame when setting this /// to `Some`, so that this flag is immediately consumed. + #[serde(skip)] scroll_to_me_item: Option, /// If the timestamp is being edited, the current value. diff --git a/crates/viewer/re_viewer/src/app_state.rs b/crates/viewer/re_viewer/src/app_state.rs index c9e94031fd89..c8cf1f725e5a 100644 --- a/crates/viewer/re_viewer/src/app_state.rs +++ b/crates/viewer/re_viewer/src/app_state.rs @@ -34,19 +34,29 @@ const WATERMARK: bool = false; // Nice for recording media material #[serde(default)] pub struct AppState { /// Global options for the whole viewer. + #[serde(default)] pub(crate) app_options: AppOptions, /// Configuration for the current recording (found in [`EntityDb`]). + #[serde(default)] pub recording_configs: HashMap, + + #[serde(default)] pub blueprint_cfg: RecordingConfig, /// Maps blueprint id to the current undo state for it. #[serde(skip)] pub blueprint_undo_state: HashMap, + #[serde(default)] selection_panel: re_selection_panel::SelectionPanel, + + #[serde(default)] time_panel: re_time_panel::TimePanel, + + #[serde(default)] blueprint_time_panel: re_time_panel::TimePanel, + #[serde(skip)] blueprint_tree: re_blueprint_tree::BlueprintTree, @@ -57,6 +67,7 @@ pub struct AppState { datastore_ui: re_chunk_store_ui::DatastoreUi, /// Redap server catalogs and browser UI + #[serde(default)] pub(crate) redap_servers: RedapServers, #[serde(skip)]