-
Notifications
You must be signed in to change notification settings - Fork 373
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
Space view screenshotting in native viewer #8258
Conversation
Web viewer built successfully. If applicable, you should also test it:
Note: This comment is updated whenever you push a commit. |
77188ca
to
9ef9022
Compare
right click on the tab unfortunately selects the view, meaning that one can't have selection highlights on the screenshot |
Co-authored-by: Andreas Reich <[email protected]>
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.
Looks all good and straight forward.
the only thing that I didn't quite get is what removes the SpaceViewRectPublisher
again from the cache for a view that's hidden. But it works 🤷
@@ -249,12 +246,6 @@ impl SpatialSpaceView2D { | |||
|
|||
// ------------------------------------------------------------------------ |
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.
for later consideration: it was actually nice to have a context menu inside the view.
@@ -35,58 +35,59 @@ mod viewer_context; | |||
// TODO(andreas): Move to its own crate? | |||
pub mod gpu_bridge; | |||
|
|||
pub use annotations::{ | |||
AnnotationMap, Annotations, ResolvedAnnotationInfo, ResolvedAnnotationInfos, | |||
pub use self::{ |
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.
your ide went off the rails here? Doesn't make sense to group things under pub use self::
.
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.
I think it makes sense - it makes it obvious that these are public exports of things in this crate, rather than e.g. re-exports from some other crate
egui does is for us :) |
Related
egui::util::cache
toegui::cache
; addFramePublisher
emilk/egui#5426What
Right-click the name of any space view to get the option to copy its contents as a screenshot, or save it to disk:
->
Details
The implementation simply takes a full-screen screenshot and crops the result.
The previous attempt (behind a feature-flag) only captured things that were rendered with
re_renderer
, i.e. did not include any egui elements, like labels. So it also only worked on spatial views. This PR work on all space views, and could also be extended to work on containers etc.Limitations
Not yet implemented on web. See #8264
TODO
master