From a36c43fc8cabdaee69df69e9b0d2ee37fd7a8b12 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Fri, 10 Apr 2015 14:46:17 +0200 Subject: 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... --- source/blender/imbuf/IMB_thumbs.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'source/blender/imbuf/IMB_thumbs.h') 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 } -- cgit v1.2.3