-
Notifications
You must be signed in to change notification settings - Fork 388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate SpaceView from a singular Component to an Archetype #4522
Changes from 5 commits
c42955f
289b538
23832a3
efbbe10
3215484
574f0b3
f43a2e5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
include "./blueprint/datatypes/query_expressions.fbs"; | ||
include "./blueprint/datatypes/space_view_component.fbs"; | ||
|
||
include "./blueprint/components/auto_layout.fbs"; | ||
include "./blueprint/components/auto_space_views.fbs"; | ||
include "./blueprint/components/entities_determined_by_user.fbs"; | ||
include "./blueprint/components/entity_properties_component.fbs"; | ||
include "./blueprint/components/name.fbs"; | ||
include "./blueprint/components/panel_view.fbs"; | ||
include "./blueprint/components/query_expressions.fbs"; | ||
include "./blueprint/components/space_view_component.fbs"; | ||
include "./blueprint/components/space_view_maximized.fbs"; | ||
include "./blueprint/components/space_view_origin.fbs"; | ||
include "./blueprint/components/space_view_class.fbs"; | ||
include "./blueprint/components/included_space_views.fbs"; | ||
include "./blueprint/components/included_queries.fbs"; | ||
include "./blueprint/components/viewport_layout.fbs"; | ||
|
||
include "./blueprint/archetypes/space_view_blueprint.fbs"; | ||
include "./blueprint/archetypes/viewport_blueprint.fbs"; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
include "fbs/attributes.fbs"; | ||
include "rust/attributes.fbs"; | ||
|
||
include "rerun/datatypes.fbs"; | ||
|
||
namespace rerun.blueprint.archetypes; | ||
|
||
// --- | ||
|
||
/// The top-level description of the Viewport. | ||
table SpaceViewBlueprint ( | ||
"attr.docs.unreleased", | ||
"attr.rerun.scope": "blueprint", | ||
"attr.rust.derive": "Default" | ||
) { | ||
// --- Required --- | ||
|
||
/// The class of the view. | ||
class_identifier: rerun.blueprint.components.SpaceViewClass ("attr.rerun.component_required", order: 100); | ||
|
||
// --- Optional --- | ||
|
||
/// The name of the view. | ||
display_name: rerun.blueprint.components.Name ("attr.rerun.component_optional", nullable, order: 200); | ||
|
||
/// The "anchor point" of this space view. | ||
/// | ||
/// The transform at this path forms the reference point for all scene->world transforms in this space view. | ||
/// I.e. the position of this entity path in space forms the origin of the coordinate system in this space view. | ||
/// Furthermore, this is the primary indicator for heuristics on what entities we show in this space view. | ||
space_origin: rerun.blueprint.components.SpaceViewOrigin ("attr.rerun.component_optional", nullable, order: 300); | ||
|
||
/// True if the user is has added entities themselves. False otherwise. | ||
entities_determined_by_user: rerun.blueprint.components.EntitiesDeterminedByUser ("attr.rerun.component_optional", nullable, order: 400); | ||
Comment on lines
+33
to
+34
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hum. this look so weird as a public facing property/component. But yeah we have to have something like this. One step at a time ofc, good as is! |
||
|
||
/// `BlueprintId`s of the `DataQuery`s that make up this `SpaceView`. | ||
/// | ||
/// It determines which entities are part of the spaceview. | ||
contents: rerun.blueprint.components.IncludedQueries ("attr.rerun.component_optional", nullable, order: 500); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
include "arrow/attributes.fbs"; | ||
include "python/attributes.fbs"; | ||
include "rust/attributes.fbs"; | ||
|
||
include "rerun/datatypes.fbs"; | ||
include "rerun/attributes.fbs"; | ||
|
||
namespace rerun.blueprint.components; | ||
|
||
// --- | ||
|
||
/// Whether the space view entities were manually edited. | ||
table EntitiesDeterminedByUser ( | ||
"attr.rerun.scope": "blueprint", | ||
"attr.docs.unreleased", | ||
"attr.rust.derive": "Default, PartialEq, Eq, PartialOrd, Ord", | ||
"attr.rust.repr": "transparent" | ||
) { | ||
value: bool (order: 100); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
include "arrow/attributes.fbs"; | ||
include "docs/attributes.fbs"; | ||
include "python/attributes.fbs"; | ||
include "rust/attributes.fbs"; | ||
|
||
include "rerun/attributes.fbs"; | ||
include "rerun/datatypes.fbs"; | ||
include "rerun/attributes.fbs"; | ||
|
||
namespace rerun.blueprint.components; | ||
|
||
// --- | ||
|
||
/// A view of a space. | ||
|
||
/// All the queries belonging to a given `SpaceView`. | ||
/// | ||
/// Unstable. Used for the ongoing blueprint experimentations. | ||
table SpaceViewComponent ( | ||
table IncludedQueries ( | ||
"attr.docs.unreleased", | ||
"attr.rerun.scope": "blueprint", | ||
"attr.docs.unreleased", | ||
"attr.rust.derive_only": "Clone" | ||
"attr.rust.derive": "Default", | ||
"attr.rust.repr": "transparent" | ||
) { | ||
component: rerun.blueprint.datatypes.SpaceViewComponent (order: 100); | ||
query_ids: [rerun.datatypes.Uuid] (order: 100); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
include "arrow/attributes.fbs"; | ||
include "python/attributes.fbs"; | ||
include "rust/attributes.fbs"; | ||
|
||
include "rerun/datatypes.fbs"; | ||
include "rerun/attributes.fbs"; | ||
|
||
namespace rerun.blueprint.components; | ||
|
||
// --- | ||
|
||
/// The name of a blueprint entity. | ||
table Name ( | ||
"attr.rerun.scope": "blueprint", | ||
"attr.docs.unreleased", | ||
"attr.rust.derive": "PartialEq, Eq, PartialOrd, Ord", | ||
"attr.rust.repr": "transparent" | ||
) { | ||
value: string (order: 100); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
include "arrow/attributes.fbs"; | ||
include "python/attributes.fbs"; | ||
include "rust/attributes.fbs"; | ||
|
||
include "rerun/datatypes.fbs"; | ||
include "rerun/attributes.fbs"; | ||
|
||
namespace rerun.blueprint.components; | ||
|
||
// --- | ||
|
||
/// The class of a `SpaceView`. | ||
table SpaceViewClass ( | ||
"attr.rerun.scope": "blueprint", | ||
"attr.docs.unreleased", | ||
"attr.rust.derive": "Default, PartialEq, Eq, PartialOrd, Ord", | ||
"attr.rust.repr": "transparent" | ||
) { | ||
value: string (order: 100); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
include "arrow/attributes.fbs"; | ||
include "python/attributes.fbs"; | ||
include "rust/attributes.fbs"; | ||
|
||
include "rerun/datatypes.fbs"; | ||
include "rerun/attributes.fbs"; | ||
|
||
namespace rerun.blueprint.components; | ||
|
||
// --- | ||
|
||
/// The origin of a `SpaceView`. | ||
table SpaceViewOrigin ( | ||
"attr.rerun.scope": "blueprint", | ||
"attr.docs.unreleased", | ||
"attr.rust.derive": "PartialEq, Eq, PartialOrd, Ord", | ||
"attr.rust.repr": "transparent" | ||
) { | ||
value: rerun.datatypes.EntityPath (order: 100); | ||
} |
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the more I see this the more I wish this would be enforced by being in the blueprint folder. Don't know how to do that nicely though yet. Tbd