Skip to content

Conversation

@grtlr
Copy link
Member

@grtlr grtlr commented Dec 2, 2025

Related

What

This PR adds target_frame view property to the SpatialInformation archetype.

image

To this this PR open the DNA example and enter tf#/helix/structure into the target_frame field of the view. Now only the beads should be animated when pressing play.

@grtlr grtlr added 📺 re_viewer affects re_viewer itself 🟦 blueprint The data that defines our UI include in changelog 🪵 Log & send APIs Affects the user-facing API for all languages labels Dec 2, 2025
@github-actions
Copy link

github-actions bot commented Dec 2, 2025

Latest documentation preview deployed successfully.

Result Commit Link
95c63b5 https://landing-dje67qb2d-rerun.vercel.app/docs

Note: This comment is updated whenever you push a commit.

@github-actions
Copy link

github-actions bot commented Dec 2, 2025

Web viewer built successfully.

Result Commit Link Manifest
95c63b5 https://rerun.io/viewer/pr/12040 +nightly +main

View image diff on kitdiff.

Note: This comment is updated whenever you push a commit.

@grtlr grtlr requested a review from Wumpf December 2, 2025 09:51
@grtlr grtlr force-pushed the grtlr/tf/space-origin branch from 9a6782d to 1843e70 Compare December 2, 2025 10:03
@Wumpf
Copy link
Member

Wumpf commented Dec 2, 2025

screenshot plz :)

@grtlr grtlr force-pushed the grtlr/tf/space-origin branch from 1843e70 to 01d0063 Compare December 2, 2025 12:28
Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

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

I think we can make this fallback situation still better. If not then we should at least document here why we can't and why this is the best non-insane solution :)

) {
/// The target reference frame for all transformations.
///
/// Defaults to the frame derived from the space origin.
Copy link
Member

Choose a reason for hiding this comment

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

nit: trying to be even more clear :)

Suggested change
/// Defaults to the frame derived from the space origin.
/// Defaults to the coordinate frame used by the space origin entity.

Comment on lines +124 to +137
match target_frame_component {
Ok(target_frame) => {
let target_frame_str = target_frame.as_str();
if !target_frame_str.is_empty() {
TransformFrameIdHash::from_str(target_frame.as_str())
} else {
self.transform_frame_id_for(query.space_origin.hash())
}
}
Err(err) => {
re_log::error_once!("Failed to query target frame: {err}");
self.transform_frame_id_for(query.space_origin.hash())
}
}
Copy link
Member

Choose a reason for hiding this comment

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

Took me a bit that your fallback tries to use a cached value and this is ONLY used when we didn't have a chance yet to do that caching. Should document that better, because my knee-jerk reaction was that the fallback is incomplete.

That said, I do think we can still have all the logic in the fallback and never have the fallback return empty string! We should be able to just do an adhoc query latest_at_with_blueprint_resolved_data on the origin entity

Also, status quo has very surprising behavior when intentionally setting an empty string (which ... is actually a valid name for a transform frame.. interesting 🤔 )


// Target reference frame - fallback to the computed value from view state
//
// An empty string signals that nothing has been set yet.
Copy link
Member

Choose a reason for hiding this comment

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

see comment above, this is pretty ugly since we generally don't want the receiving end to be able to know that something is a fallback

@grtlr grtlr force-pushed the grtlr/tf/space-origin branch from 01d0063 to 95c63b5 Compare December 2, 2025 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🟦 blueprint The data that defines our UI include in changelog 🪵 Log & send APIs Affects the user-facing API for all languages 📺 re_viewer affects re_viewer itself

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants