Skip to content

Conversation

@050011-code
Copy link
Contributor

Used code from Blender's source code for extracting thumbnail, modified it and added special entry for .blend in the thumbnail renderer, to then use those functions

@CyanVoxel CyanVoxel added Type: Enhancement New feature or request Type: QoL A quality of life (QoL) enhancement or suggestion Type: UI/UX User interface and/or user experience Priority: Low Doesn't require immediate attention labels Jun 11, 2024
Changed where imports are according to feedback
Changed blender thumbnail function name to reduce ambiguity
Updated function name
@050011-code 050011-code marked this pull request as ready for review June 12, 2024 05:36
@CyanVoxel CyanVoxel added the Status: Review Needed A review of this is needed label Jun 12, 2024
Copy link
Member

@CyanVoxel CyanVoxel left a comment

Choose a reason for hiding this comment

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

Great work on this, it's super exciting to have blend support! 😁

I've got some suggested changes commented above - mostly optimizations and cleanup. Also, I noticed you were running into issues with the image being flipped when it was exported from the blend_extract_thumb function. If you wanted, you could import PIL into that file and do the image flipping there, letting you export a PIL Image object instead of the image_buffer, x, y list. This would also clean up the image creation process on the thumb_renderer side of things.

@CyanVoxel CyanVoxel added Status: Changes Requested Changes are quested to this and removed Status: Review Needed A review of this is needed labels Jun 14, 2024
@050011-code 050011-code requested a review from CyanVoxel June 19, 2024 23:34
@CyanVoxel CyanVoxel added Status: Review Needed A review of this is needed and removed Status: Changes Requested Changes are quested to this labels Jul 3, 2024
@CyanVoxel CyanVoxel self-assigned this Jul 3, 2024
@CyanVoxel CyanVoxel added Status: Mergeable The code is ready to be merged and removed Status: Review Needed A review of this is needed labels Jul 3, 2024
Copy link
Member

@CyanVoxel CyanVoxel left a comment

Choose a reason for hiding this comment

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

Awesome work on this, thank you so much!! 😁

I'm marking this as ready to merge and will target the 9.4 branch. If any conflicts come up I'll fix those real quick.

@CyanVoxel CyanVoxel changed the base branch from main to Alpha-v9.4 July 3, 2024 23:49
@CyanVoxel CyanVoxel merged commit 883354b into TagStudioDev:Alpha-v9.4 Jul 3, 2024
CarterPillow pushed a commit to CarterPillow/TagStudio that referenced this pull request Sep 7, 2024
* Update thumb_renderer.py

Included support for rendering blender thumbnails

* Add files via upload

Add functions that get the thumbnail's data

* Update thumb_renderer.py

* Update blender_thumbnailer.py

* Update thumb_renderer.py

* Update thumb_renderer.py

Changed where imports are according to feedback

* Update thumb_renderer.py

Changed blender thumbnail function name to reduce ambiguity

* Update blender_thumbnailer.py

Updated function name

* Update blender_thumbnailer.py

* Update blender_thumbnailer.py

Ruff format

* Update thumb_renderer.py

Ruff format

* Update constants.py

Add .blend1, 2, 3 etc file support

* Update blender_thumbnailer.py

Refactor to follow requested changes

* Update thumb_renderer.py

More refactoring

* Update blender_thumbnailer.py

Ruff format

* Update thumb_renderer.py

Ruff format
CyanVoxel added a commit that referenced this pull request Sep 22, 2024
Ports the following thumbnail and related PRs from the `Alpha-v9.4` branch to `main` (v9.5+):
- (#273) Blender thumbnail support
- (#307) Add font thumbnail preview support
- (#331) refactor: move type constants to new media classes
- (#390) feat(ui): expanded thumbnail and preview features
- (#370) ui: "open in explorer" action follows os name
- (#373) feat(ui): preview support for source engine files
- (#274) Refactor video_player.py (Fix #270)
- (#430) feat(ui): show file creation/modified dates + restyle path label
- (#471) fix(ui): use default audio icon if ffmpeg is absent
- (#472) fix(ui): use birthtime for creation time on mac & win

Co-Authored-By: Ethnogeny <[email protected]>
Co-Authored-By: Theasacraft <[email protected]>
Co-Authored-By: SupKittyMeow <[email protected]>
Co-Authored-By: EJ Stinson <[email protected]>
Co-Authored-By: Sean Krueger <[email protected]>
CyanVoxel added a commit that referenced this pull request Oct 7, 2024
* feat: port v9.4 thumbnail + related feats to v9.5

Ports the following thumbnail and related PRs from the `Alpha-v9.4` branch to `main` (v9.5+):
- (#273) Blender thumbnail support
- (#307) Add font thumbnail preview support
- (#331) refactor: move type constants to new media classes
- (#390) feat(ui): expanded thumbnail and preview features
- (#370) ui: "open in explorer" action follows os name
- (#373) feat(ui): preview support for source engine files
- (#274) Refactor video_player.py (Fix #270)
- (#430) feat(ui): show file creation/modified dates + restyle path label
- (#471) fix(ui): use default audio icon if ffmpeg is absent
- (#472) fix(ui): use birthtime for creation time on mac & win

Co-Authored-By: Ethnogeny <[email protected]>
Co-Authored-By: Theasacraft <[email protected]>
Co-Authored-By: SupKittyMeow <[email protected]>
Co-Authored-By: EJ Stinson <[email protected]>
Co-Authored-By: Sean Krueger <[email protected]>

* remove vscode exceptions from `.gitignore`

* delete .vscode directory

* style: format for `ruff check`

* fix(tests): update `test_update_widgets_not_selected` test

* remove Send2Trash dependency

* refactor: use dataclass for MediaCateogry

* refactor: use enums for UI colors

* docs: add file docstring for silent_Popen

* refactor: replace logger with structlog

* use early return inside `ResourceManager.get()`

* add `is_ext_in_category()` method to `MediaCategory`

Add method to check if an extension is a member of a given MediaCategory.

* style: fix docstring style, missing type hints, rename `afm`

* fix: use structlog vars in logging

* refactor: move platform-dependent strings to PlatformStrings

* refactor: move `parents[2]` path to variable

* fix: undo logger regressions

---------

Co-authored-by: Ethnogeny <[email protected]>
Co-authored-by: Theasacraft <[email protected]>
Co-authored-by: SupKittyMeow <[email protected]>
Co-authored-by: EJ Stinson <[email protected]>
Co-authored-by: Sean Krueger <[email protected]>
@Computerdores Computerdores moved this to ✅ Done in TagStudio Development Sep 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority: Low Doesn't require immediate attention Status: Mergeable The code is ready to be merged Type: Enhancement New feature or request Type: QoL A quality of life (QoL) enhancement or suggestion Type: UI/UX User interface and/or user experience

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

3 participants