Conversation
7dfcbd5 to
f3aa344
Compare
f3aa344 to
eac1789
Compare
emilk
left a comment
There was a problem hiding this comment.
Looks amazing, except for the FromStr stuff
| .as_component_batches() | ||
| .into_iter() | ||
| .map(|comp_batch| { | ||
| let comp_batch = comp_batch.as_ref(); | ||
| Ok(DataCell::from_arrow( | ||
| comp_batch.name(), | ||
| comp_batch | ||
| .try_to_arrow() | ||
| .map_err(|err| anyhow::anyhow!("serialization failed: {err}"))?, | ||
| )) | ||
| }) | ||
| .collect(); |
There was a problem hiding this comment.
This code is identical – we could have a helper for this, e.g. in trait Archetype
There was a problem hiding this comment.
I wanted to, but that would require a dependency on re_log_types for DataCell, which is circular :(
I'll add a comment/issue.
UPDATE: #3414
| let (scale, rotation, translation) = | ||
| glam::Affine3A::from(transform.0).to_scale_rotation_translation(); | ||
| let transform = | ||
| glam::Affine3A::from_scale_rotation_translation(scale, rotation, translation); |
There was a problem hiding this comment.
this extra dance should be justified. Why are we throwing away shearing?
There was a problem hiding this comment.
That's copy pasted as-is from the original code... I don't know why we're throwing the shear 🤷♂️
There was a problem hiding this comment.
Huh strange! To me this looks like from before we allowed general affine transforms - for a quite a while we only had rigid + uniform scale, but nowadays we do the correct thing to the normals (https://github.com/rerun-io/rerun/blob/main/crates/re_renderer/src/renderer/mesh_renderer.rs#L228).
Away with it! :)
| return MediaType(MediaTypeExt.TEXT) | ||
|
|
||
| @staticmethod | ||
| def markdown() -> MediaType: |
There was a problem hiding this comment.
What is more pythonic - users typing MediaType.markdown() or MediaType.MARKDOWN? 🤔
I don't think we need to support both just because we do so in e.g. Rust (where we need to for technical reasons)
There was a problem hiding this comment.
They're not the same though. I would love to get rid of these methods, but it's the only way I can think of to actually provide a properly type constant without ending up in circular import hell.
a562155 to
4a74e1f
Compare
Everything that's needed for
Asset3D.☝️ You get the idea!
Asset3Dmesh migration to archetypes #3354Missing unit tests for cpp & py; I'll add them tomorrow.
Here's some out-of-tree fun.
23-09-21_19.54.26.patched.mp4
What
Checklist