Skip to content
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

Codegen for space view python blueprint classes #6100

Merged
merged 14 commits into from
Apr 25, 2024
Merged

Conversation

Wumpf
Copy link
Member

@Wumpf Wumpf commented Apr 24, 2024

What

Extends our codegen to accept a fourth object type, space views (in addition to datatypes/components/archetypes). Meaning we can do special codegen for space views now, making it easy to set them up consistently and define what properties a space view can be constructed from. Building up on the previous PR that exposed background3d color, this generates almost identical code now.

Doesn't add yet any new view properties - this is going to happen in a follow-up PR since it requires getting a few more things serializable and subsequently also testing.

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested the web demo (if applicable):
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG
  • If applicable, add a new check to the release checklist!

To run all checks from main, comment on the PR with @rerun-bot full-check.

@@ -0,0 +1,4 @@
# DO NOT EDIT! This file is generated by crates/re_types_builder/src/lib.rs

.gitattributes linguist-generated=true
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's no tests in here, this is silly

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not the only one though. not bothering with this right now

crates/re_types_builder/src/codegen/cpp/mod.rs Outdated Show resolved Hide resolved
crates/re_types_builder/src/codegen/python/space_views.rs Outdated Show resolved Hide resolved
@@ -68,28 +68,34 @@ impl Objects {
objects: resolved_enums.into_iter().chain(resolved_objs).collect(),
};

// Validate fields types: Archetype consist of components, everything else consists of datatypes.
// Validate fields types: Archetype consist of components, Space Views consist of archetypes, everything else consists of datatypes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't help but wonder if "SuperArchetypes" (structured collections of archetype) are a generic things of which SpaceViews just happen to be the first example.

crates/re_types_builder/src/objects.rs Outdated Show resolved Hide resolved
@Wumpf Wumpf merged commit 17e646e into main Apr 25, 2024
34 checks passed
@Wumpf Wumpf deleted the andreas/spaceview-codegen branch April 25, 2024 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Codegen for SpaceView blueprint types + properties
2 participants