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

add 'Dump datastore' command to palette #2564

Merged
merged 2 commits into from
Jun 29, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
9 changes: 9 additions & 0 deletions crates/re_ui/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ pub enum UICommand {
// Dev-tools:
#[cfg(not(target_arch = "wasm32"))]
ScreenshotWholeApp,
#[cfg(not(target_arch = "wasm32"))]
DumpDatastore,
teh-cmc marked this conversation as resolved.
Show resolved Hide resolved
}

impl UICommand {
Expand Down Expand Up @@ -143,6 +145,11 @@ impl UICommand {
"Screenshot",
"Copy screenshot of the whole app to clipboard",
),
#[cfg(not(target_arch = "wasm32"))]
UICommand::DumpDatastore => (
"Dump datastore",
"Dumps the current state of the datastore to the console",
teh-cmc marked this conversation as resolved.
Show resolved Hide resolved
),
}
}

Expand Down Expand Up @@ -207,6 +214,8 @@ impl UICommand {

#[cfg(not(target_arch = "wasm32"))]
UICommand::ScreenshotWholeApp => None,
#[cfg(not(target_arch = "wasm32"))]
UICommand::DumpDatastore => None,
}
}

Expand Down
8 changes: 8 additions & 0 deletions crates/re_viewer/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,14 @@ impl App {
UICommand::ScreenshotWholeApp => {
self.screenshotter.request_screenshot();
}
#[cfg(not(target_arch = "wasm32"))]
UICommand::DumpDatastore => {
if let Some(ctx) = store_context {
if let Some(recording) = ctx.recording {
eprintln!("{}", recording.entity_db.data_store);
}
}
}
}
}

Expand Down