Thumbnails: Always use cached thumbnails for offline files #112101

Merged
Julian Eisel merged 1 commits from JulianEisel/blender:temp-offline-file-thumbnail into main 2023-09-08 16:41:52 +02:00

1 Commits

Author SHA1 Message Date
Julian Eisel 17b491f7db Thumbnails: Use cached thumbnails for offline files, don't access file
bd9f94e917 made it so the file browser doesn't bring files online for
the purpuse of creating their thumbnail, because that can take a while.
Instead it uses a previously cached thumbnail if available. This should
be the behavior for all cases thumbnails are requested, it's not only
the file browser that does this.

In fact it makes sense to move this into the normal function to "manage"
thumbnails (that is, load and if necessary (re)create cached
thumbnails).

Also, seems like the previous solution didn't work when loading ID
previews from offline .blend files. For that we need to use the path to
the .blend file to check the offline status, not the full path to the ID.

Found while working on #109234 (Use UI preview system for async loading of
file/asset previews).
2023-09-07 20:29:02 +02:00