From a43f291411fd3b05da9bc45b91b0478f7922c2fa Mon Sep 17 00:00:00 2001 From: Clement Rey Date: Fri, 15 Mar 2024 16:31:48 +0100 Subject: [PATCH] log_timeless -> log_static --- docs/code-examples/all/annotation_context_connections.cpp | 2 +- docs/code-examples/all/annotation_context_rects.cpp | 2 +- .../code-examples/all/annotation_context_segmentation.cpp | 2 +- docs/code-examples/all/asset3d_out_of_tree.cpp | 2 +- docs/code-examples/all/asset3d_simple.cpp | 2 +- docs/code-examples/all/scalar_multiple_plots.cpp | 8 ++++---- docs/code-examples/all/segmentation_image_simple.cpp | 2 +- docs/code-examples/all/series_line_style.cpp | 6 +++--- docs/code-examples/all/series_point_style.cpp | 6 +++--- docs/code-examples/all/view_coordinates_simple.cpp | 2 +- examples/cpp/clock/main.cpp | 4 ++-- examples/cpp/external_data_loader/main.cpp | 7 ++++--- examples/cpp/incremental_logging/main.cpp | 6 +++--- tests/cpp/roundtrips/view_coordinates/main.cpp | 2 +- 14 files changed, 27 insertions(+), 26 deletions(-) diff --git a/docs/code-examples/all/annotation_context_connections.cpp b/docs/code-examples/all/annotation_context_connections.cpp index 6d734213f8e0..20a69a23c124 100644 --- a/docs/code-examples/all/annotation_context_connections.cpp +++ b/docs/code-examples/all/annotation_context_connections.cpp @@ -9,7 +9,7 @@ int main() { // 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({rerun::ClassDescription{ 0, diff --git a/docs/code-examples/all/annotation_context_rects.cpp b/docs/code-examples/all/annotation_context_rects.cpp index cfc94402829b..4ba4c9150708 100644 --- a/docs/code-examples/all/annotation_context_rects.cpp +++ b/docs/code-examples/all/annotation_context_rects.cpp @@ -7,7 +7,7 @@ int main() { rec.spawn().exit_on_failure(); // Log an annotation context to assign a label and color to each class - rec.log_timeless( + rec.log_static( "/", rerun::AnnotationContext({ rerun::AnnotationInfo(1, "red", rerun::Rgba32(255, 0, 0)), diff --git a/docs/code-examples/all/annotation_context_segmentation.cpp b/docs/code-examples/all/annotation_context_segmentation.cpp index eb071348e42c..7a0b06dff736 100644 --- a/docs/code-examples/all/annotation_context_segmentation.cpp +++ b/docs/code-examples/all/annotation_context_segmentation.cpp @@ -10,7 +10,7 @@ int main() { rec.spawn().exit_on_failure(); // create an annotation context to describe the classes - rec.log_timeless( + rec.log_static( "segmentation", rerun::AnnotationContext({ rerun::AnnotationInfo(1, "red", rerun::Rgba32(255, 0, 0)), diff --git a/docs/code-examples/all/asset3d_out_of_tree.cpp b/docs/code-examples/all/asset3d_out_of_tree.cpp index 86250226238b..4158d9364e8e 100644 --- a/docs/code-examples/all/asset3d_out_of_tree.cpp +++ b/docs/code-examples/all/asset3d_out_of_tree.cpp @@ -15,7 +15,7 @@ int main(int argc, char** argv) { const auto rec = rerun::RecordingStream("rerun_example_asset3d_out_of_tree"); rec.spawn().exit_on_failure(); - 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).value_or_throw()); diff --git a/docs/code-examples/all/asset3d_simple.cpp b/docs/code-examples/all/asset3d_simple.cpp index 036aa254cab3..1689e792ef26 100644 --- a/docs/code-examples/all/asset3d_simple.cpp +++ b/docs/code-examples/all/asset3d_simple.cpp @@ -17,6 +17,6 @@ int main(int argc, char* argv[]) { const auto rec = rerun::RecordingStream("rerun_example_asset3d"); rec.spawn().exit_on_failure(); - 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).value_or_throw()); } diff --git a/docs/code-examples/all/scalar_multiple_plots.cpp b/docs/code-examples/all/scalar_multiple_plots.cpp index 09ea10091599..092f2408b714 100644 --- a/docs/code-examples/all/scalar_multiple_plots.cpp +++ b/docs/code-examples/all/scalar_multiple_plots.cpp @@ -13,18 +13,18 @@ int main() { int64_t lcg_state = 0; // 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().with_color({255, 0, 0}).with_name("sin(0.01t)") ); - rec.log_timeless( + rec.log_static( "trig/cos", rerun::SeriesLine().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()); + rec.log_static("scatter/lcg", rerun::SeriesPoint()); // Log the data on a timeline called "step". for (int t = 0; t < static_cast(TAU * 2.0 * 100.0); ++t) { diff --git a/docs/code-examples/all/segmentation_image_simple.cpp b/docs/code-examples/all/segmentation_image_simple.cpp index 4ab8b6e506a6..d879d13e7263 100644 --- a/docs/code-examples/all/segmentation_image_simple.cpp +++ b/docs/code-examples/all/segmentation_image_simple.cpp @@ -21,7 +21,7 @@ int main() { } // create an annotation context to describe the classes - rec.log_timeless( + rec.log_static( "/", rerun::AnnotationContext({ rerun::AnnotationInfo(1, "red", rerun::Rgba32(255, 0, 0)), diff --git a/docs/code-examples/all/series_line_style.cpp b/docs/code-examples/all/series_line_style.cpp index 0a5242a150a1..00a0d4a31923 100644 --- a/docs/code-examples/all/series_line_style.cpp +++ b/docs/code-examples/all/series_line_style.cpp @@ -11,13 +11,13 @@ int main() { rec.spawn().exit_on_failure(); // 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().with_color({255, 0, 0}).with_name("sin(0.01t)").with_width(2) ); - rec.log_timeless( + rec.log_static( "trig/cos", rerun::SeriesLine().with_color({0, 255, 0}).with_name("cos(0.01t)").with_width(4) ); diff --git a/docs/code-examples/all/series_point_style.cpp b/docs/code-examples/all/series_point_style.cpp index b42b334f1690..21914afbfd25 100644 --- a/docs/code-examples/all/series_point_style.cpp +++ b/docs/code-examples/all/series_point_style.cpp @@ -11,9 +11,9 @@ int main() { rec.spawn().exit_on_failure(); // 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() .with_color({255, 0, 0}) @@ -21,7 +21,7 @@ int main() { .with_marker(rerun::components::MarkerShape::Circle) .with_marker_size(4) ); - rec.log_timeless( + rec.log_static( "trig/cos", rerun::SeriesPoint() .with_color({0, 255, 0}) diff --git a/docs/code-examples/all/view_coordinates_simple.cpp b/docs/code-examples/all/view_coordinates_simple.cpp index 65dac5b8c762..0c5c5a691bcc 100644 --- a/docs/code-examples/all/view_coordinates_simple.cpp +++ b/docs/code-examples/all/view_coordinates_simple.cpp @@ -6,7 +6,7 @@ int main() { const auto rec = rerun::RecordingStream("rerun_example_view_coordinates"); rec.spawn().exit_on_failure(); - 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({{1.0, 0.0, 0.0}, {0.0, 1.0, 0.0}, {0.0, 0.0, 1.0}} diff --git a/examples/cpp/clock/main.cpp b/examples/cpp/clock/main.cpp index 1c9ebe23fc03..863574aa830f 100644 --- a/examples/cpp/clock/main.cpp +++ b/examples/cpp/clock/main.cpp @@ -45,8 +45,8 @@ int main() { const auto rec = rerun::RecordingStream("rerun_example_clock"); rec.spawn().exit_on_failure(); - rec.log_timeless("world", rerun::ViewCoordinates::RIGHT_HAND_Y_UP); - rec.log_timeless("world/frame", rerun::Boxes3D::from_half_sizes({{LENGTH_S, LENGTH_S, 1.0f}})); + rec.log_static("world", rerun::ViewCoordinates::RIGHT_HAND_Y_UP); + rec.log_static("world/frame", rerun::Boxes3D::from_half_sizes({{LENGTH_S, LENGTH_S, 1.0f}})); for (int step = 0; step < num_steps; step++) { log_hand(rec, "seconds", seconds(step), (step % 60) / 60.0f, LENGTH_S, WIDTH_S, 0); diff --git a/examples/cpp/external_data_loader/main.cpp b/examples/cpp/external_data_loader/main.cpp index 0a39a9499db9..eb6acac3e95c 100644 --- a/examples/cpp/external_data_loader/main.cpp +++ b/examples/cpp/external_data_loader/main.cpp @@ -69,7 +69,8 @@ file with Rerun (`rerun file.cpp`). ("application-id", "Optional recommended ID for the application", cxxopts::value()) ("recording-id", "Optional recommended ID for the recording", cxxopts::value()) ("entity-path-prefix", "Optional prefix for all entity paths", cxxopts::value()) - ("timeless", "Optionally mark data to be logged as timeless", cxxopts::value()->default_value("false")) + ("timeless", "Deprecated: alias for `--static`", cxxopts::value()->default_value("false")) + ("static", "Optionally mark data to be logged as static", cxxopts::value()->default_value("false")) ("time", "Optional timestamps to log at (e.g. `--time sim_time=1709203426`) (repeatable)", cxxopts::value>()) ("sequence", "Optional sequences to log at (e.g. `--sequence sim_frame=42`) (repeatable)", cxxopts::value>()) ; @@ -118,9 +119,9 @@ file with Rerun (`rerun file.cpp`). if (args.count("entity-path-prefix")) { entity_path = args["entity-path-prefix"].as() + "/" + filepath; } - rec.log_with_timeless( + rec.log_with_static( entity_path, - args["timeless"].as(), + args["static"].as() || args["timeless"].as(), rerun::TextDocument(text).with_media_type(rerun::MediaType::markdown()) ); } diff --git a/examples/cpp/incremental_logging/main.cpp b/examples/cpp/incremental_logging/main.cpp index ddd33d96e528..3dbd9f62f984 100644 --- a/examples/cpp/incremental_logging/main.cpp +++ b/examples/cpp/incremental_logging/main.cpp @@ -44,7 +44,7 @@ int main() { const auto rec = rerun::RecordingStream("rerun_example_incremental_logging"); rec.spawn().exit_on_failure(); - rec.log_timeless( + rec.log_static( "readme", rerun::TextDocument(README).with_media_type(rerun::components::MediaType::markdown()) ); @@ -56,8 +56,8 @@ int main() { // Only log colors and radii once. rec.set_time_sequence("frame_nr", 0); rec.log("points", colors, radii); - // Logging timelessly with `RecordingStream::log_timeless` would also work. - // rec.log_timeless("points", colors, radii); + // Logging statically with `RecordingStream::log_static` would also work. + // rec.log_static("points", colors, radii); std::default_random_engine gen; std::uniform_real_distribution dist_pos(-5.0f, 5.0f); diff --git a/tests/cpp/roundtrips/view_coordinates/main.cpp b/tests/cpp/roundtrips/view_coordinates/main.cpp index 1841a7fc0b44..84396ecfb395 100644 --- a/tests/cpp/roundtrips/view_coordinates/main.cpp +++ b/tests/cpp/roundtrips/view_coordinates/main.cpp @@ -3,5 +3,5 @@ int main(int, char** argv) { const auto rec = rerun::RecordingStream("rerun_example_roundtrip_view_coordinates"); rec.save(argv[1]).exit_on_failure(); - rec.log_timeless("/", rerun::archetypes::ViewCoordinates::RDF); + rec.log_static("/", rerun::archetypes::ViewCoordinates::RDF); }