Skip to content

Commit 6bc19f3

Browse files
committed
Cleanup mentions of #3381
1 parent cf16d20 commit 6bc19f3

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
lines changed

crates/viewer/re_viewport_blueprint/src/container.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use re_log_types::EntityPath;
77
use re_types::blueprint::archetypes as blueprint_archetypes;
88
use re_types::blueprint::components::{ContainerKind, GridColumns};
99
use re_types::components::Name;
10+
use re_types::Loggable as _;
1011
use re_types::{blueprint::components::Visible, Archetype as _};
1112
use re_viewer_context::{ContainerId, Contents, ContentsName, ViewId, ViewerContext};
1213

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

209212
ctx.save_blueprint_archetype(&id.as_entity_path(), &arch);

examples/python/detect_and_track_objects/detect_and_track_objects.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ def log_tracked(self) -> None:
213213
),
214214
)
215215
else:
216-
rr.log(f"video/tracked/{self.tracking_id}", rr.Clear(recursive=False)) # TODO(#3381)
216+
rr.log(f"video/tracked/{self.tracking_id}", rr.Boxes2D.clear_fields())
217217

218218
def update_with_detection(self, detection: Detection, bgr: cv2.typing.MatLike) -> None:
219219
self.num_recent_undetected_frames = 0

rerun_py/rerun_sdk/rerun/_baseclasses.py

-2
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,6 @@ def as_component_batches(self) -> Iterable[ComponentBatchLike]:
203203
for fld in fields(type(self)):
204204
if "component" in fld.metadata:
205205
comp = getattr(self, fld.name)
206-
# TODO(#3381): Depending on what we decide
207-
# to do with optional components, we may need to make this instead call `_empty_pa_array`
208206
if comp is not None:
209207
descr = ComponentDescriptor(
210208
comp.component_descriptor().component_name,

tests/rust/test_api/src/main.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -191,11 +191,7 @@ fn test_rects(rec: &RecordingStream) -> anyhow::Result<()> {
191191

192192
// Clear the rectangles by logging an empty set
193193
rec.set_time_seconds("sim_time", 3f64);
194-
rec.log(
195-
"rects_test/rects",
196-
// TODO(#3381): Should be &Boxes2D::empty()
197-
&Boxes2D::from_half_sizes(std::iter::empty::<HalfSize2D>()),
198-
)?;
194+
rec.log("rects_test/rects", &Boxes2D::clear_fields())?;
199195

200196
Ok(())
201197
}

0 commit comments

Comments
 (0)