Skip to content

Conversation

jleibs
Copy link
Member

@jleibs jleibs commented Jun 11, 2024

What

New blueprint APIs focus on overriding components rather than requiring that things be Archetypes.

However, using mono components directly was somewhat inconvenient. This lets you now pass in a component instance anywhere you would expect to pass in a ComponentBatchLike.

This component knows it's own batch type and uses it to construct the correct wrapper for a mono batch type.

This had the side effect that you can also do things now like:

rr.log("points", rr.Points3D(positions))
rr.log("points", [rr.components.Color([255, 0, 0])])

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.

@jleibs jleibs marked this pull request as ready for review June 11, 2024 21:01
@jleibs jleibs changed the title Make it possible to use any python component as a batch Python Components now implement the ComponentBatchLike interface Jun 11, 2024
@teh-cmc
Copy link
Member

teh-cmc commented Jun 12, 2024

@rerun-bot full-check

Copy link

@Wumpf
Copy link
Member

Wumpf commented Jun 12, 2024

@jleibs jleibs merged commit b12df49 into main Jun 12, 2024
@jleibs jleibs deleted the jleibs/python_component_mixin branch June 12, 2024 17:17
jleibs added a commit that referenced this pull request Jun 12, 2024
### What
- Resolves: #6539
- Builds on top of: #6543
(no-merge until that lands)

Just a bit of plumbing to write all the provided defaults to the correct
location in the blueprint.

### 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 the web demo (if applicable):
* Using examples from latest `main` build:
[rerun.io/viewer](https://rerun.io/viewer/pr/6545?manifest_url=https://app.rerun.io/version/main/examples_manifest.json)
* Using full set of examples from `nightly` build:
[rerun.io/viewer](https://rerun.io/viewer/pr/6545?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json)
* [x] The PR title and labels are set such as to maximize their
usefulness for the next release's CHANGELOG
* [x] If applicable, add a new check to the [release
checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)!

- [PR Build Summary](https://build.rerun.io/pr/6545)
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)

To run all checks from `main`, comment on the PR with `@rerun-bot
full-check`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

log_components and log's extra argument should take single components/component batches
3 participants