Skip to content

Commit

Permalink
Cleanup mentions of #3381
Browse files Browse the repository at this point in the history
  • Loading branch information
Wumpf authored and teh-cmc committed Jan 24, 2025
1 parent 061ce27 commit b1f1d6d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
7 changes: 5 additions & 2 deletions crates/viewer/re_viewport_blueprint/src/container.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use re_log_types::EntityPath;
use re_types::blueprint::archetypes as blueprint_archetypes;
use re_types::blueprint::components::{ContainerKind, GridColumns};
use re_types::components::Name;
use re_types::Loggable as _;
use re_types::{blueprint::components::Visible, Archetype as _};
use re_viewer_context::{ContainerId, Contents, ContentsName, ViewId, ViewerContext};

Expand Down Expand Up @@ -202,8 +203,10 @@ impl ContainerBlueprint {
if let Some(cols) = grid_columns {
arch = arch.with_grid_columns(*cols);
} else {
// TODO(#3381): Archetypes should provide a convenience API for this
ctx.save_empty_blueprint_component::<GridColumns>(&id.as_entity_path());
arch.grid_columns = Some(re_types::SerializedComponentBatch::new(
re_types::blueprint::components::ContainerKind::arrow_empty(),
re_types::blueprint::archetypes::ContainerBlueprint::descriptor_container_kind(),
));
}

ctx.save_blueprint_archetype(&id.as_entity_path(), &arch);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def log_tracked(self) -> None:
),
)
else:
rr.log(f"video/tracked/{self.tracking_id}", rr.Clear(recursive=False)) # TODO(#3381)
rr.log(f"video/tracked/{self.tracking_id}", rr.Boxes2D.clear_fields())

def update_with_detection(self, detection: Detection, bgr: cv2.typing.MatLike) -> None:
self.num_recent_undetected_frames = 0
Expand Down
2 changes: 0 additions & 2 deletions rerun_py/rerun_sdk/rerun/_baseclasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,6 @@ def as_component_batches(self) -> Iterable[ComponentBatchLike]:
for fld in fields(type(self)):
if "component" in fld.metadata:
comp = getattr(self, fld.name)
# TODO(#3381): Depending on what we decide
# to do with optional components, we may need to make this instead call `_empty_pa_array`
if comp is not None:
descr = ComponentDescriptor(
comp.component_descriptor().component_name,
Expand Down
6 changes: 1 addition & 5 deletions tests/rust/test_api/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,7 @@ fn test_rects(rec: &RecordingStream) -> anyhow::Result<()> {

// Clear the rectangles by logging an empty set
rec.set_time_seconds("sim_time", 3f64);
rec.log(
"rects_test/rects",
// TODO(#3381): Should be &Boxes2D::empty()
&Boxes2D::from_half_sizes(std::iter::empty::<HalfSize2D>()),
)?;
rec.log("rects_test/rects", &Boxes2D::clear_fields())?;

Ok(())
}
Expand Down

0 comments on commit b1f1d6d

Please sign in to comment.