rerun icon indicating copy to clipboard operation
rerun copied to clipboard

Batch selections should not preview single-element non-splats

Open jleibs opened this issue 2 years ago • 3 comments

Although it's not easy to do with our APIs at the moment, it's theoretically possible to log a non-splatted element with a single instance-key.

For example, a future API that allows us to log colors directly:

rr.log_points("points", [[1,2],[3,4]], instance_keys=[1, 2])
rr.log_colors("points", [RED], instance_keys=[2])

In this case, color is not a splat, but if you hover on the batch of points in the UI, it will display as if RED applies to the whole batch rather than only applying to the 2nd point.

jleibs avatar Jan 31 '23 19:01 jleibs

This should be irrelevant now that splats are handled in independent rows? @jleibs

teh-cmc avatar Feb 28 '23 16:02 teh-cmc

This should be irrelevant now that splats are handled in independent rows? @jleibs

Nope, still an issue. This snippet is actually runnable:

import rerun as rr

rr.init("point_test", spawn=True)
rr.log_points("points", positions=[[1, 2], [3, 4]], identifiers=[1, 2])
rr.log_points("points", positions=None, colors=[[255, 0, 0]], identifiers=[2])

Produces this data UI: image

The selection UI makes it look like all the points should be red, but since the 2nd log-value is not a splat, only the second point is actualy red (which is correct)

I think the issue is basically here, where we should explicitly check for a splat instead of a length of 1. https://github.com/rerun-io/rerun/blob/jleibs/tensor_view_without_classic/crates/re_viewer/src/ui/data_ui/component.rs#L52

jleibs avatar Feb 28 '23 16:02 jleibs

Should be fixed by ~~#1619~~ #1893

teh-cmc avatar Mar 21 '23 14:03 teh-cmc