Skip to content

Commit

Permalink
propagating changes
Browse files Browse the repository at this point in the history
  • Loading branch information
teh-cmc committed Mar 18, 2024
1 parent 02d5d26 commit 7d6f772
Show file tree
Hide file tree
Showing 27 changed files with 53 additions and 48 deletions.
1 change: 1 addition & 0 deletions crates/re_data_source/src/data_loader/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ impl DataLoaderSettings {
if let Some(timepoint) = timepoint {
if timepoint.is_static() {
args.push("--timeless".to_owned());
args.push("--static".to_owned());
}

for (timeline, time) in timepoint.iter() {
Expand Down
2 changes: 1 addition & 1 deletion crates/re_types/src/archetypes/annotation_context.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/re_types/src/archetypes/asset3d.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/re_types/src/archetypes/segmentation_image.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions crates/re_types/src/archetypes/series_line.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions crates/re_types/src/archetypes/series_point.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/re_types/src/archetypes/view_coordinates.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/snippets/all/annotation-context/example.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Annotation context with two classes, using two labeled classes, of which ones defines a color.
MsgSender::new("masks") // Applies to all entities below "masks".
.with_timeless(true)
.with_static(true)
.with_component(&[AnnotationContext {
class_map: [
ClassDescription {
Expand Down Expand Up @@ -28,7 +28,7 @@ MsgSender::new("masks") // Applies to all entities below "masks".

// Annotation context with simple keypoints & keypoint connections.
MsgSender::new("detections") // Applies to all entities below "detections".
.with_timeless(true)
.with_static(true)
.with_component(&[AnnotationContext {
class_map: std::iter::once((
ClassId(0),
Expand Down
2 changes: 1 addition & 1 deletion docs/snippets/all/annotation_context_connections.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
// Log an annotation context to assign a label and color to each class
// Create a class description with labels and color for each keypoint ID as well as some
// connections between keypoints.
rec.log_timeless(
rec.log_static(
"/",
&rerun::AnnotationContext::new([rerun::ClassDescription {
info: 0.into(),
Expand Down
2 changes: 1 addition & 1 deletion docs/snippets/all/annotation_context_rects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
rerun::RecordingStreamBuilder::new("rerun_example_annotation_context_rects").spawn()?;

// Log an annotation context to assign a label and color to each class
rec.log_timeless(
rec.log_static(
"/",
&rerun::AnnotationContext::new([
(1, "red", rerun::Rgba32::from_rgb(255, 0, 0)),
Expand Down
2 changes: 1 addition & 1 deletion docs/snippets/all/annotation_context_segmentation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
.spawn()?;

// create an annotation context to describe the classes
rec.log_timeless(
rec.log_static(
"segmentation",
&rerun::AnnotationContext::new([
(1, "red", rerun::Rgba32::from_rgb(255, 0, 0)),
Expand Down
2 changes: 1 addition & 1 deletion docs/snippets/all/asset3d_out_of_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ fn main() -> anyhow::Result<()> {

let rec = rerun::RecordingStreamBuilder::new("rerun_example_asset3d_out_of_tree").spawn()?;

rec.log_timeless("world", &rerun::ViewCoordinates::RIGHT_HAND_Z_UP)?; // Set an up-axis
rec.log_static("world", &rerun::ViewCoordinates::RIGHT_HAND_Z_UP)?; // Set an up-axis

rec.set_time_sequence("frame", 0);
rec.log("world/asset", &rerun::Asset3D::from_file(path)?)?;
Expand Down
2 changes: 1 addition & 1 deletion docs/snippets/all/asset3d_simple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fn main() -> anyhow::Result<()> {

let rec = rerun::RecordingStreamBuilder::new("rerun_example_asset3d").spawn()?;

rec.log_timeless("world", &rerun::ViewCoordinates::RIGHT_HAND_Z_UP)?; // Set an up-axis
rec.log_static("world", &rerun::ViewCoordinates::RIGHT_HAND_Z_UP)?; // Set an up-axis
rec.log("world/asset", &rerun::Asset3D::from_file(path)?)?;

Ok(())
Expand Down
2 changes: 1 addition & 1 deletion docs/snippets/all/log-file/example.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

let rec = rerun::RecordingStreamBuilder::new("rerun_example_log_file").spawn()?;

rec.log_file_from_path(&args[1], None /* prefix */, true /* timeless */)?;
rec.log_file_from_path(&args[1], None /* prefix */, true /* static */)?;
8 changes: 4 additions & 4 deletions docs/snippets/all/scalar_multiple_plots.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut lcg_state = 0_i64;

// Set up plot styling:
// They are logged timeless as they don't change over time and apply to all timelines.
// They are logged static as they don't change over time and apply to all timelines.
// Log two lines series under a shared root so that they show in the same plot by default.
rec.log_timeless(
rec.log_static(
"trig/sin",
&rerun::SeriesLine::new()
.with_color([255, 0, 0])
.with_name("sin(0.01t)"),
)?;
rec.log_timeless(
rec.log_static(
"trig/cos",
&rerun::SeriesLine::new()
.with_color([0, 255, 0])
.with_name("cos(0.01t)"),
)?;
// Log scattered points under a different root so that they show in a different plot by default.
rec.log_timeless("scatter/lcg", &rerun::SeriesPoint::new())?;
rec.log_static("scatter/lcg", &rerun::SeriesPoint::new())?;

for t in 0..((std::f32::consts::TAU * 2.0 * 100.0) as i64) {
rec.set_time_sequence("step", t);
Expand Down
2 changes: 1 addition & 1 deletion docs/snippets/all/segmentation_image_simple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
]);

// log the annotation and the image
rec.log_timeless("/", &annotation)?;
rec.log_static("/", &annotation)?;

rec.log("image", &rerun::SegmentationImage::try_from(image)?)?;

Expand Down
6 changes: 3 additions & 3 deletions docs/snippets/all/series_line_style.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
let rec = rerun::RecordingStreamBuilder::new("rerun_example_series_line_style").spawn()?;

// Set up plot styling:
// They are logged timeless as they don't change over time and apply to all timelines.
// They are logged static as they don't change over time and apply to all timelines.
// Log two lines series under a shared root so that they show in the same plot by default.
rec.log_timeless(
rec.log_static(
"trig/sin",
&rerun::SeriesLine::new()
.with_color([255, 0, 0])
.with_name("sin(0.01t)")
.with_width(2.0),
)?;
rec.log_timeless(
rec.log_static(
"trig/cos",
&rerun::SeriesLine::new()
.with_color([0, 255, 0])
Expand Down
6 changes: 3 additions & 3 deletions docs/snippets/all/series_point_style.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
let rec = rerun::RecordingStreamBuilder::new("rerun_example_series_point_style").spawn()?;

// Set up plot styling:
// They are logged timeless as they don't change over time and apply to all timelines.
// They are logged static as they don't change over time and apply to all timelines.
// Log two point series under a shared root so that they show in the same plot by default.
rec.log_timeless(
rec.log_static(
"trig/sin",
&rerun::SeriesPoint::new()
.with_color([255, 0, 0])
.with_name("sin(0.01t)")
.with_marker(rerun::components::MarkerShape::Circle)
.with_marker_size(4.0),
)?;
rec.log_timeless(
rec.log_static(
"trig/cos",
&rerun::SeriesPoint::new()
.with_color([0, 255, 0])
Expand Down
2 changes: 1 addition & 1 deletion docs/snippets/all/view_coordinates_simple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
fn main() -> Result<(), Box<dyn std::error::Error>> {
let rec = rerun::RecordingStreamBuilder::new("rerun_example_view_coordinates").spawn()?;

rec.log_timeless("world", &rerun::ViewCoordinates::RIGHT_HAND_Z_UP)?; // Set an up-axis
rec.log_static("world", &rerun::ViewCoordinates::RIGHT_HAND_Z_UP)?; // Set an up-axis
rec.log(
"world/xyz",
&rerun::Arrows3D::from_vectors(
Expand Down
4 changes: 2 additions & 2 deletions examples/rust/clock/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ fn run(rec: &rerun::RecordingStream, args: &Args) -> anyhow::Result<()> {
const WIDTH_M: f32 = 0.4;
const WIDTH_H: f32 = 0.6;

rec.log_timeless("world", &rerun::ViewCoordinates::RIGHT_HAND_Y_UP)?;
rec.log_static("world", &rerun::ViewCoordinates::RIGHT_HAND_Y_UP)?;

rec.log_timeless(
rec.log_static(
"world/frame",
&rerun::Boxes3D::from_half_sizes([(LENGTH_S, LENGTH_S, 1.0)]),
)?;
Expand Down
10 changes: 7 additions & 3 deletions examples/rust/external_data_loader/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,14 @@ struct Args {
#[argh(option)]
entity_path_prefix: Option<String>,

/// optionally mark data to be logged as timeless
/// deprecated: alias for `--static`
#[argh(switch)]
timeless: bool,

/// optionally mark data to be logged statically
#[argh(arg_name = "static", switch)]
statically: bool,

/// optional timestamps to log at (e.g. `--time sim_time=1709203426`) (repeatable)
#[argh(option)]
time: Vec<String>,
Expand Down Expand Up @@ -99,9 +103,9 @@ fn main() -> anyhow::Result<()> {
.entity_path_prefix
.map_or_else(|| rerun::EntityPath::new(vec![]), rerun::EntityPath::from);

rec.log_with_timeless(
rec.log_with_static(
entity_path_prefix.join(&rerun::EntityPath::from_file_path(&args.filepath)),
args.timeless,
args.statically || args.timeless,
&rerun::TextDocument::new(text).with_media_type(MediaType::MARKDOWN),
)?;

Expand Down
10 changes: 5 additions & 5 deletions examples/rust/incremental_logging/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ let radii = [rerun::Radius(0.1); 10];
// Only log colors and radii once.
rec.set_time_sequence("frame_nr", 0);
rec.log_component_batches("points", false, /* timeless */ [&colors as &dyn rerun::ComponentBatch, &radii])?;
rec.log_component_batches("points", false /* static */, [&colors as &dyn rerun::ComponentBatch, &radii])?;
let mut rng = rand::thread_rng();
let dist = Uniform::new(-5., 5.);
Expand All @@ -56,7 +56,7 @@ Move the time cursor around, and notice how the colors and radii from frame 0 ar
"#;

fn run(rec: &rerun::RecordingStream) -> anyhow::Result<()> {
rec.log_timeless(
rec.log_static(
"readme",
&rerun::TextDocument::new(README).with_media_type(rerun::MediaType::MARKDOWN),
)?;
Expand All @@ -69,13 +69,13 @@ fn run(rec: &rerun::RecordingStream) -> anyhow::Result<()> {
rec.set_time_sequence("frame_nr", 0);
rec.log_component_batches(
"points",
false, /* timeless */
false, /* static */
[&colors as &dyn rerun::ComponentBatch, &radii],
)?;
// Logging timelessly would also work.
// Logging statically would also work.
// rec.log_component_batches(
// "points",
// true, /* timeless */
// true, /* static */
// [&colors as &dyn rerun::ComponentBatch, &radii],
// )?;

Expand Down
4 changes: 2 additions & 2 deletions examples/rust/log_file/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ fn run(rec: &rerun::RecordingStream, args: &Args) -> anyhow::Result<()> {

if !args.from_contents {
// Either log the file using its path…
rec.log_file_from_path(filepath, prefix.clone(), true /* timeless */)?;
rec.log_file_from_path(filepath, prefix.clone(), true /* static */)?;
} else {
// …or using its contents if you already have them loaded for some reason.
if filepath.is_file() {
Expand All @@ -52,7 +52,7 @@ fn run(rec: &rerun::RecordingStream, args: &Args) -> anyhow::Result<()> {
filepath,
std::borrow::Cow::Borrowed(&contents),
prefix.clone(),
true, /* timeless */
true, /* static */
)?;
}
}
Expand Down
6 changes: 3 additions & 3 deletions examples/rust/objectron/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,13 @@ fn log_baseline_objects(

for (id, bbox_half_size, transform, label) in boxes {
let path = format!("world/annotations/box-{id}");
rec.log_timeless(
rec.log_static(
path.clone(),
&rerun::Boxes3D::from_half_sizes([bbox_half_size])
.with_labels([label])
.with_colors([rerun::Color::from_rgb(160, 230, 130)]),
)?;
rec.log_timeless(path, &rerun::Transform3D::new(transform))?;
rec.log_static(path, &rerun::Transform3D::new(transform))?;
}

Ok(())
Expand Down Expand Up @@ -331,7 +331,7 @@ fn run(rec: &rerun::RecordingStream, args: &Args) -> anyhow::Result<()> {
let annotations = read_annotations(&store_info.path_annotations)?;

// See https://github.com/google-research-datasets/Objectron/issues/39 for coordinate systems
rec.log_timeless("world", &rerun::ViewCoordinates::RUB)?;
rec.log_static("world", &rerun::ViewCoordinates::RUB)?;

log_baseline_objects(rec, &annotations.objects)?;

Expand Down
2 changes: 1 addition & 1 deletion examples/rust/raw_mesh/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ fn run(rec: &RecordingStream, args: &Args) -> anyhow::Result<()> {
// Log raw glTF nodes and their transforms with Rerun
for root in nodes {
re_log::info!(scene = root.name, "logging glTF scene");
rec.log_timeless(root.name.as_str(), &rerun::ViewCoordinates::RIGHT_HAND_Y_UP)?;
rec.log_static(root.name.as_str(), &rerun::ViewCoordinates::RIGHT_HAND_Y_UP)?;
log_node(rec, root)?;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/rust/roundtrips/view_coordinates/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ struct Args {
}

fn run(rec: &RecordingStream, _args: &Args) -> anyhow::Result<()> {
rec.log_timeless("/", &ViewCoordinates::RDF)?;
rec.log_static("/", &ViewCoordinates::RDF)?;
Ok(())
}

Expand Down
2 changes: 1 addition & 1 deletion tests/rust/test_api/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ fn test_transforms_3d(rec: &RecordingStream) -> anyhow::Result<()> {
rec: &RecordingStream,
ent_path: impl Into<EntityPath>,
) -> anyhow::Result<()> {
rec.log_timeless(ent_path, &ViewCoordinates::RIGHT_HAND_Z_UP)
rec.log_static(ent_path, &ViewCoordinates::RIGHT_HAND_Z_UP)
.map_err(Into::into)
}
log_coordinate_space(rec, "transforms3d")?;
Expand Down

0 comments on commit 7d6f772

Please sign in to comment.