File browser - change thumbnails size with a slider

We can now scale from 32px up to 256px (default has been upgraded to 128px).
Thumbnails are now generated as 'large', i.e. 256px.

Previews are scaled up if necessary, unlike icons (for folders or files without preview images).

Note that .blend thumbnails themselves remain in 128px for now (they are embeded in .blend files,
not quite sure we want to make them four times bigger...).

Patch by DMS (Yaron Dames), with final edits by myself.

Reviewers: mont29

Subscribers: Severin, mont29

Differential Revision: https://developer.blender.org/D1260
This commit is contained in:
Bastien Montagne
2015-04-29 21:25:34 +02:00
parent 3de45ee7fe
commit 054aa61f3c
8 changed files with 55 additions and 9 deletions

View File

@@ -53,6 +53,10 @@ class FILEBROWSER_HT_header(Header):
# can be None when save/reload with a file selector open
if params:
layout.prop(params, "display_type", expand=True, text="")
if params.display_type == 'FILE_IMGDISPLAY':
layout.prop(params, "thumbnails_size")
layout.prop(params, "sort_method", expand=True, text="")
layout.prop(params, "show_hidden", text="", icon='FILE_HIDDEN')