Imbuf: Change thumbnail caching location #107298
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Asset System
Module
Asset System
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#107298
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "ankitm/blender:ankitm/thumbn"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
New paths are in decreasing order of priority.
Windows
Old: %CSIDL_PROFILE%.thumbnails
New: note the removal of leading period
%USERPROFILE%\AppData\Local\Blender Foundation\Blender\Cache\thumbnails
BKE_tempdir_base\Blender Foundation\Blender\Cache\thumbnails
Linux
Old: $XDG_CACHE_HOME/thumbnails or $HOME/.cache/thumbnails
New:
$XDG_CACHE_HOME/thumbnails
$HOME/.cache/blender/thumbnails
BKE_tempdir_base/blender/thumbnails/
macOS
Old: $HOME/.thumbnails
New: note the removal of leading period: makes the folder user visible
~/Library/Cache/Blender/thumbnails
BKE_tempdir_base/Blender/thumbnails
BKE_appdir_folder_caches added recently replaces the manual cache
folder finding done here.
Simplify char array handling also.
It was previously at https://archive.blender.org/developer/differential/0013/0013214/index.html
This time undefined thumbnail also and put it in BLI_path_join call.
Also the return len < dir_len has been added
@blender-bot build
I do like the idea of moving us away from using the standard we are currently using. By no longer sharing these folders with other apps we are freed to use it in new ways.
We could decide to one day save the previews as EXR instead of PNG, so they are both smaller and faster to read and write. Or save our previews in a size that is larger than that supported by the standard: 512x512 for example.
It might be nice to (possibly) support more than one location at a time. So a shared network location might also contain a read-only cache of previews. It might also be nice to make this location overridable via command-line argument and/or environment variable.
We could support file arguments to provide multiple preview types. So a preview of "this.ttf" would give the regular preview, while a preview of "this.ttf?format=2" could be a horizontal string that we could use in lists.
We could support multiple preview types at once. We could show a PNG thumbnail of a video in the File Browser list but then show a tiny low-res video file in the tooltip.
We could support textual previews of some things. For example many users have complained that while directory listings are instant, browsing inside blends can take forever on slow connections. But we could cache a listing of the blend contents to speed that up.
There is no motivation for this outlined here, so I don't quite understand where this is coming from. On Linux and macOS these locations are standardized, so why would we want to deviate? (Although I think on macOS we use a non-standard location now and this patch corrects that?) On Linux the file browser system thumbnails would stop working I guess. I bet there are tools to cleanup such temporary data, and they wouldn't work with Blender thumbnails anymore.
On win, Ray and Harley approved the location change. Plus I don't think any other system is dependent on the location of blender thumbnail cache. Plus the original comment " /* Yes, applications shouldn't store data there, but so does GIMP :). */"
For mac, ccache recently moved from ~/.cache to ~/Library/Caches/ccache. I frequently delete ~/Library/Caches folder if it gets big. Apple has an API for getting the path https://developer.apple.com/documentation/foundation/nssearchpathdirectory/nscachesdirectory
So the patch simplifies code and improves app behaviour for these two platforms.
For linux, I was not aware of this and indeed it's a major downgrade. Would it be fine if I keep the behaviour on linux same and still make code changes ?
Just please make sure that your PRs always include a motivation, this is arguably the most important part of the description (also see https://wiki.blender.org/wiki/Process/Contributing_Code#Ingredients_of_a_Pull_Request)
NSCachesDirectory
then?Ah never mind, I see this patch does that in fact.
Checkout
From your project repository, check out a new branch and test the changes.