Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions crates/viewer/re_global_context/src/app_options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -41,17 +49,20 @@ pub struct AppOptions {
/// Implementation note: we avoid using `Option<PathBuf>` 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.
Expand All @@ -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<std::path::PathBuf>,
}

Expand Down
4 changes: 4 additions & 0 deletions crates/viewer/re_time_panel/src/time_panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,11 @@ impl From<TimePanelSource> 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.
Expand All @@ -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?
Expand Down Expand Up @@ -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<Item>,

/// If the timestamp is being edited, the current value.
Expand Down
11 changes: 11 additions & 0 deletions crates/viewer/re_viewer/src/app_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<StoreId, RecordingConfig>,

#[serde(default)]
pub blueprint_cfg: RecordingConfig,

/// Maps blueprint id to the current undo state for it.
#[serde(skip)]
pub blueprint_undo_state: HashMap<StoreId, BlueprintUndoState>,

#[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,

Expand All @@ -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)]
Expand Down
Loading