diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-04-10 15:46:17 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-04-10 16:34:31 +0300 |
commit | a36c43fc8cabdaee69df69e9b0d2ee37fd7a8b12 (patch) | |
tree | 9f4e98f6dbf245302e7de1133c7007b225e56053 /source/blender/imbuf/IMB_thumbs.h | |
parent | ec710775cfb314abdd501873aa9f5e790b1c06b6 (diff) |
Thumbnails: some reorganization, decouple actual path of file to preview from 'ref' one.
(Partial) backport from asset-experiments branch.
Reorganization: previously we could recompute name/path of thumb file two or three times,
now added lower-level internal functions that take those as parameters, so in most case
they are computed only once. Very minor optimization, but simple too.
Also, path of file to preview is now decoupled from path used to generate its URI
(and hence thumbnail path). In asset-experiments branch this is needed because
we also handle datablock previews in/as thumbnails (file_path is .blend path,
URI is .blend path + datablock 'path').
Here this will be needed for same kind of reason - once translated, font thumbnails
need to be re-generated when we change current language...
Diffstat (limited to 'source/blender/imbuf/IMB_thumbs.h')
-rw-r--r-- | source/blender/imbuf/IMB_thumbs.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/source/blender/imbuf/IMB_thumbs.h b/source/blender/imbuf/IMB_thumbs.h index 404052f2e8e..c3350ecdc21 100644 --- a/source/blender/imbuf/IMB_thumbs.h +++ b/source/blender/imbuf/IMB_thumbs.h @@ -81,9 +81,7 @@ ImBuf *IMB_thumb_load_blend(const char *path); void IMB_thumb_overlay_blend(unsigned int *thumb, int width, int height, float aspect); /* special function for previewing fonts */ -ImBuf *IMB_thumb_load_font( - const char *filename, - unsigned int x, unsigned int y); +ImBuf *IMB_thumb_load_font(const char *filename, unsigned int x, unsigned int y); #ifdef __cplusplus } |