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

Screenshot Interaction #1194

Closed
snoyer opened this issue Jan 20, 2024 · 1 comment
Closed

Screenshot Interaction #1194

snoyer opened this issue Jan 20, 2024 · 1 comment
Assignees
Labels
type:enhancement New feature or request
Milestone

Comments

@snoyer
Copy link
Contributor

snoyer commented Jan 20, 2024

Proposed feature:

Provide a key binding to render the current view to a file from within the app.

F3D already has an --output <png file> option to render as an image to a user-defined location, so implementing this feature should 🤞 be a matter of rewiring that to a key-binding and generating an appropriate filename.

Basic requirements:

  • the destination filename should be computed from a configurable string template, eg. F3D-{timestamp}.png
  • the default filename template should include the F3D version and OS (eg. F3D-{version}-{os}-{timestamp}.png) so users are able to communicate their F3D version and OS by just pressing the screenshot key and sending the image, without having to run f3d --version in a terminal..
  • users must be able to find the file without having to know where the executable lives, saving it to the home directory seems sensible

Open questions:

  • {timestamp} could mostly be a unique identifier to avoid overwriting previous images but in which case it does not need to be a human readable date/time. Would be good if it was lexicographically sortable though. Maybe base64 unix timestamp could be nice and short? if using a human readable format it would be best to pick one that wouldn't leak timezone and OS locale info when sharing the file.
  • instead, or in addition to, a timestamp should we check if a file of a given name exists and append some kind of counter to make the new name unique? (F3D-blah.png, F3D-blah(2).png, F3D-blah(3).png, ...)
  • what should the string template syntax be? {foo}, $(bar), %baz?
  • should the full image destination be configurable, or just the filename (with the directory hardcoded)?
  • if the full destination is configurable in the filename template (eg, {TEMP}/F3D-{timestamp}.png, {HOME}/F3D-{version}-{os}-{timestamp}.png) how do we deal with path separators (use / even on Windows? always accept both / and \)?
  • do we need more template variables? eg. {filename} so that F3D-{filename}-{timestamp}.png would expand to F3D-my_model.glb-1234.png
@mwestphal
Copy link
Contributor

any news on that @snoyer ? :)

@github-project-automation github-project-automation bot moved this from In progress to Done in F3D May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement New feature or request
Projects
Status: Done
Development

No branches or pull requests

2 participants