Skip to content

Commit

Permalink
Automatically assume arrow transparency for components (#2608)
Browse files Browse the repository at this point in the history
Fixes #2606 
On top of #2603 (requires single-field `Point2D` component)

### What

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested [demo.rerun.io](https://demo.rerun.io/pr/2608) (if
applicable)

- [PR Build Summary](https://build.rerun.io/pr/2608)
- [Docs
preview](https://rerun.io/preview/pr%3Acmc%2Fcomponent_always_arrow_transparent/docs)
- [Examples
preview](https://rerun.io/preview/pr%3Acmc%2Fcomponent_always_arrow_transparent/examples)

---------

Co-authored-by: Antoine Beyeler <antoine@rerun.io>
  • Loading branch information
teh-cmc and abey79 authored Jul 5, 2023
1 parent 59b20e9 commit f99bec5
Show file tree
Hide file tree
Showing 14 changed files with 911 additions and 1,436 deletions.
1 change: 0 additions & 1 deletion crates/re_types/definitions/rerun/components/class_id.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ namespace rerun.components;
///
/// \rs Used to look up a `crate::components::ClassDescription` within the `crate::components::AnnotationContext`.
struct ClassId (
"attr.arrow.transparent",
"attr.python.aliases": "int",
"attr.python.array_aliases": "int, npt.NDArray[np.uint8], npt.NDArray[np.uint16], npt.NDArray[np.uint32], npt.NDArray[np.uint64]",
"attr.rerun.legacy_fqname": "rerun.class_id",
Expand Down
1 change: 0 additions & 1 deletion crates/re_types/definitions/rerun/components/color.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ namespace rerun.components;
/// \py All other colors are assumed to be in 0-255 gamma sRGB space.
/// \py If there is an alpha, we assume it is in linear space, and separate (NOT pre-multiplied).
struct Color (
"attr.arrow.transparent",
"attr.python.aliases": "int, Sequence[int], npt.NDArray[Union[np.uint8, np.float32, np.float64]]",
"attr.python.array_aliases": "Sequence[Sequence[int]], npt.NDArray[Union[np.uint8, np.uint32, np.float32, np.float64]]",
"attr.rerun.legacy_fqname": "rerun.colorrgba",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ namespace rerun.components;
///
/// Draw order for entities with the same draw order is generally undefined.
struct DrawOrder (
"attr.arrow.transparent",
"attr.python.aliases": "float",
"attr.python.array_aliases": "npt.NDArray[np.float32]",
"attr.rerun.legacy_fqname": "rerun.draw_order",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ namespace rerun.components;

/// A unique numeric identifier for each individual instance within a batch.
struct InstanceKey (
"attr.arrow.transparent",
"attr.python.aliases": "int",
"attr.python.array_aliases": "npt.NDArray[np.uint64]",
"attr.rerun.legacy_fqname": "rerun.instance_key",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ namespace rerun.components;
/// \rs
/// \rs Used to look up an `crate::components::AnnotationInfo` for a Keypoint within the `crate::components::AnnotationContext`.
struct KeypointId (
"attr.arrow.transparent",
"attr.python.aliases": "float",
"attr.python.array_aliases": "npt.NDArray[np.uint8], npt.NDArray[np.uint16], npt.NDArray[np.uint32]",
"attr.rerun.legacy_fqname": "rerun.keypoint_id",
Expand Down
1 change: 0 additions & 1 deletion crates/re_types/definitions/rerun/components/label.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ namespace rerun.components;

/// A String label component.
table Label (
"attr.arrow.transparent",
"attr.python.aliases": "str",
"attr.python.array_aliases": "Sequence[str]",
"attr.rerun.legacy_fqname": "rerun.label",
Expand Down
1 change: 0 additions & 1 deletion crates/re_types/definitions/rerun/components/point2d.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ namespace rerun.components;
/// A point in 2D space.
// TODO(cmc): bring back attr.rust.tuple_struct
struct Point2D (
"attr.arrow.transparent",
"attr.python.aliases": "npt.NDArray[np.float32], Sequence[float], Tuple[float, float]",
"attr.python.array_aliases": "npt.NDArray[np.float32], Sequence[float]",
"attr.rerun.legacy_fqname": "rerun.point2d",
Expand Down
1 change: 0 additions & 1 deletion crates/re_types/definitions/rerun/components/radius.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ namespace rerun.components;

/// A Radius component.
struct Radius (
"attr.arrow.transparent",
"attr.python.aliases": "float",
"attr.python.array_aliases": "npt.NDArray[np.float32]",
"attr.rerun.legacy_fqname": "rerun.radius",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,13 @@ namespace rerun.testing.components;
// ---

table AffixFuzzer1 (
"attr.arrow.transparent",
"attr.rust.derive": "Debug, Clone, PartialEq",
order: 100
) {
single_required: rerun.testing.datatypes.AffixFuzzer1 (required);
}

table AffixFuzzer2 (
"attr.arrow.transparent",
"attr.rust.derive": "Debug, Clone, PartialEq",
"attr.rust.tuple_struct",
order: 200
Expand All @@ -33,15 +31,13 @@ table AffixFuzzer3 (
}

table AffixFuzzer4 (
"attr.arrow.transparent",
"attr.rust.derive": "Debug, Clone, PartialEq",
order: 400
) {
single_optional: rerun.testing.datatypes.AffixFuzzer1;
}

table AffixFuzzer5 (
"attr.arrow.transparent",
"attr.rust.derive": "Debug, Clone, PartialEq",
"attr.rust.tuple_struct",
order: 500
Expand Down
2 changes: 1 addition & 1 deletion crates/re_types/source_hash.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This is a sha256 hash for all direct and indirect dependencies of this crate's build script.
# It can be safely removed at anytime to force the build script to run again.
# Check out build.rs to see how it's computed.
dec6b10b9e90c9c95b3e1436c1b53987573319efd121cc5e715c31466163b0bc
57a9b0fe0f20a438034beaa8924a121cc02d6f527d155b8675b182ab3a84acb3
Loading

0 comments on commit f99bec5

Please sign in to comment.