Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
teh-cmc committed Mar 4, 2024
1 parent 8790e6f commit c5edd3a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
3 changes: 3 additions & 0 deletions crates/re_data_source/src/data_loader/loader_external.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ impl crate::DataLoader for ExternalLoader {
re_tracing::profile_function!(exe.to_string_lossy());

let child = Command::new(exe)
// Make sure the child dataloader doesn't think it's a Rerun Viewer, otherwise
// it's never gonna be able to log anything.
.env_remove("RERUN_APP_ONLY")
.arg(filepath.clone())
.args(args)
.stdout(Stdio::piped())
Expand Down
12 changes: 8 additions & 4 deletions docs/content/howto/open-any-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ title: Open any file
order: -10
---

The Rerun Viewer has built-in support for opening many kinds of files, and can be extended to open any other file type without needing to modify the Rerun codebase itself.
The Rerun Viewer and SDK have built-in support for opening many kinds of files, and can be extended to support any other file type without needing to modify the Rerun codebase itself.

The viewer can load files in 3 different ways:
The Viewer can load files in 3 different ways:
- via CLI arguments (e.g. `rerun myfile.jpeg`),
- using drag-and-drop,
- using the open dialog in the Rerun Viewer.
Expand All @@ -14,9 +14,13 @@ All these file loading methods support loading a single file, many files at once

⚠ Drag-and-drop of folders does [not yet work](https://github.com/rerun-io/rerun/issues/4528) on the web version of the Rerun Viewer ⚠

The following file types have built-in support in the Rerun Viewer:
As for the SDK, check out the `log_file_from_path` and `log_file_from_contents` methods ([C++](https://ref.rerun.io/docs/cpp/stable/classrerun_1_1RecordingStream.html#SOME_HASH_TBD?speculative-link), [Python](https://ref.rerun.io/docs/python/stable/common/other_classes_and_functions/#rerun.log_file_from_path?speculative-link), [Rust](https://docs.rs/rerun/latest/rerun/struct.RecordingStream.html#method.log_file_from_path)) and the associated example ([C++](https://github.com/rerun-io/rerun/blob/main/examples/cpp/log_file/main.cpp?speculative-link), [Python](https://github.com/rerun-io/rerun/blob/main/examples/python/log_file/main.py?speculative-link), [Rust](https://github.com/rerun-io/rerun/blob/main/examples/rust/log_file/main.rs?speculative-link)).

Note: when calling these APIs from the SDK, the data will be loaded by the process running the SDK, not the Viewer!

The following file types have built-in support in the Rerun Viewer and SDK:
- Native Rerun files: `rrd`
- 3D models: `gltf`, `glb`, `obj`
- 3D models: `gltf`, `glb`, `obj`, `stl`
- Images: `avif`, `bmp`, `dds`, `exr`, `farbfeld`, `ff`, `gif`, `hdr`, `ico`, `jpeg`, `jpg`, `pam`, `pbm`, `pgm`, `png`, `ppm`, `tga`, `tif`, `tiff`, `webp`.
- Point clouds: `ply`.
- Text files: `md`, `txt`.
Expand Down

0 comments on commit c5edd3a

Please sign in to comment.