|
Blender
V2.93
|
Go to the source code of this file.
Macros | |
| #define | THUMB_SIZE_MAX (100 * 1024 * 1024) |
| #define | PREVIEW_RENDER_DEFAULT_HEIGHT 128 |
| #define | THUMB_DEFAULT_HASH "00000000000000000000000000000000" |
Typedefs | |
| typedef enum ThumbSize | ThumbSize |
| typedef enum ThumbSource | ThumbSource |
Enumerations | |
| enum | ThumbSize { THB_NORMAL , THB_LARGE , THB_FAIL } |
| enum | ThumbSource { THB_SOURCE_IMAGE , THB_SOURCE_MOVIE , THB_SOURCE_BLEND , THB_SOURCE_FONT } |
Functions | |
| struct ImBuf * | IMB_thumb_create (const char *path, ThumbSize size, ThumbSource source, struct ImBuf *img) |
| struct ImBuf * | IMB_thumb_read (const char *path, ThumbSize size) |
| void | IMB_thumb_delete (const char *path, ThumbSize size) |
| struct ImBuf * | IMB_thumb_manage (const char *path, ThumbSize size, ThumbSource source) |
| void | IMB_thumb_makedirs (void) |
| struct ImBuf * | IMB_thumb_load_blend (const char *blen_path, const char *blen_group, const char *blen_id) |
| struct ImBuf * | IMB_thumb_load_font (const char *filename, unsigned int x, unsigned int y) |
| bool | IMB_thumb_load_font_get_hash (char *r_hash) |
| void | IMB_thumb_clear_translations (void) |
| void | IMB_thumb_ensure_translations (void) |
| void | IMB_thumb_locks_acquire (void) |
| void | IMB_thumb_locks_release (void) |
| void | IMB_thumb_path_lock (const char *path) |
| void | IMB_thumb_path_unlock (const char *path) |
| #define PREVIEW_RENDER_DEFAULT_HEIGHT 128 |
Definition at line 54 of file IMB_thumbs.h.
| #define THUMB_DEFAULT_HASH "00000000000000000000000000000000" |
Definition at line 59 of file IMB_thumbs.h.
| #define THUMB_SIZE_MAX (100 * 1024 * 1024) |
Definition at line 52 of file IMB_thumbs.h.
Thumbnail creation and retrieval according to the 'Thumbnail Management Standard' supported by Gimp, Gnome (Nautilus), KDE etc. Reference: http://jens.triq.net/thumbnail-spec/index.html
| typedef enum ThumbSource ThumbSource |
| enum ThumbSize |
Thumbnail creation and retrieval according to the 'Thumbnail Management Standard' supported by Gimp, Gnome (Nautilus), KDE etc. Reference: http://jens.triq.net/thumbnail-spec/index.html
| Enumerator | |
|---|---|
| THB_NORMAL | |
| THB_LARGE | |
| THB_FAIL | |
Definition at line 38 of file IMB_thumbs.h.
| enum ThumbSource |
| Enumerator | |
|---|---|
| THB_SOURCE_IMAGE | |
| THB_SOURCE_MOVIE | |
| THB_SOURCE_BLEND | |
| THB_SOURCE_FONT | |
Definition at line 44 of file IMB_thumbs.h.
| void IMB_thumb_clear_translations | ( | void | ) |
Definition at line 44 of file thumbs_font.c.
References ARRAY_SIZE, i18n_thumb_str, NULL, and thumb_str.
Referenced by BLT_lang_set(), and WM_init().
| struct ImBuf* IMB_thumb_create | ( | const char * | path, |
| ThumbSize | size, | ||
| ThumbSource | source, | ||
| struct ImBuf * | img | ||
| ) |
Definition at line 512 of file thumbs.c.
References NULL, size(), thumb_create_ex(), THUMB_DEFAULT_HASH, thumbname_from_uri(), uri_from_filename(), and URI_MAX.
Referenced by wm_file_write().
| void IMB_thumb_delete | ( | const char * | path, |
| ThumbSize | size | ||
| ) |
Definition at line 544 of file thumbs.c.
References BLI_delete(), BLI_exists(), BLI_path_ncmp, FILE_MAX, size(), thumbpath_from_uri(), uri_from_filename(), and URI_MAX.
Referenced by IMB_thumb_manage(), and wm_file_write().
| void IMB_thumb_ensure_translations | ( | void | ) |
Definition at line 51 of file thumbs_font.c.
References ARRAY_SIZE, BLT_I18NCONTEXT_DEFAULT, BLT_translate_do(), i18n_thumb_str, and thumb_str.
Referenced by filelist_cache_init().
| struct ImBuf* IMB_thumb_load_blend | ( | const char * | blen_path, |
| const char * | blen_group, | ||
| const char * | blen_id | ||
| ) |
Definition at line 44 of file thumbs_blend.c.
References BKE_idtype_idcode_from_name(), BKE_main_thumbnail_to_imbuf(), BKE_previewimg_freefunc(), BKE_previewimg_to_imbuf(), BLI_linklist_free(), BLI_linklist_freeN(), BLO_blendhandle_close(), BLO_blendhandle_from_file(), BLO_blendhandle_get_datablock_names(), BLO_blendhandle_get_previews(), BLO_thumbnail_from_file(), data, ICON_SIZE_PREVIEW, LinkNode::link, MEM_freeN, names, LinkNode::next, NULL, and STREQ.
Referenced by thumb_create_ex().
| struct ImBuf* IMB_thumb_load_font | ( | const char * | filename, |
| unsigned int | x, | ||
| unsigned int | y | ||
| ) |
Definition at line 58 of file thumbs_font.c.
References ARRAY_SIZE, BLF_thumb_preview(), ImBuf::channels, i18n_thumb_str, IB_metadata, IB_rect, IMB_allocImBuf(), IMB_rectfill(), ImBuf::rect, thumb_str, x, ImBuf::x, y, and ImBuf::y.
Referenced by thumb_create_ex().
| bool IMB_thumb_load_font_get_hash | ( | char * | r_hash | ) |
Definition at line 91 of file thumbs_font.c.
References ARRAY_SIZE, BLI_hash_md5_buffer(), BLI_hash_md5_to_hexdigest(), BLI_strncpy_rlen(), i18n_thumb_str, len, NULL, str, THUMB_DEFAULT_HASH, and thumb_str.
Referenced by thumbhash_from_path().
| void IMB_thumb_locks_acquire | ( | void | ) |
Definition at line 686 of file thumbs.c.
References BLI_assert, BLI_condition_init(), BLI_gset_str_new(), BLI_thread_lock(), BLI_thread_unlock(), IMBThumbLocks::cond, IMBThumbLocks::lock_counter, LOCK_IMAGE, IMBThumbLocks::locked_paths, NULL, and thumb_locks.
Referenced by filelist_cache_preview_ensure_running().
| void IMB_thumb_locks_release | ( | void | ) |
Definition at line 702 of file thumbs.c.
References BLI_assert, BLI_condition_end(), BLI_gset_free(), BLI_thread_lock(), BLI_thread_unlock(), IMBThumbLocks::cond, IMBThumbLocks::lock_counter, LOCK_IMAGE, IMBThumbLocks::locked_paths, MEM_freeN, NULL, and thumb_locks.
Referenced by filelist_cache_previews_free().
| void IMB_thumb_makedirs | ( | void | ) |
Definition at line 305 of file thumbs.c.
References BLI_dir_create_recursive(), FILE_MAX, get_thumb_dir(), THB_FAIL, THB_LARGE, and THB_NORMAL.
Referenced by ED_file_init().
| struct ImBuf* IMB_thumb_manage | ( | const char * | path, |
| ThumbSize | size, | ||
| ThumbSource | source | ||
| ) |
Definition at line 563 of file thumbs.c.
References BLI_delete(), BLI_exists(), BLI_file_older(), BLI_path_ncmp, BLI_stat(), BLO_library_path_explode(), FILE_MAX, FILE_MAX_LIBEXTRA, IB_metadata, IB_rect, IMB_freeImBuf(), imb_freerectfloatImBuf(), IMB_loadiffname(), IMB_metadata_get_field(), IMB_rect_from_float(), IMB_thumb_delete(), ImBuf::metadata, NULL, size(), STREQ, THB_FAIL, THB_LARGE, THB_NORMAL, THB_SOURCE_BLEND, thumb_create_or_fail(), thumbhash_from_path(), thumbpath_from_uri(), thumbpathname_from_uri(), uri_from_filename(), and URI_MAX.
Referenced by BKE_previewimg_ensure(), filelist_cache_preview_runf(), and icon_preview_startjob().
| void IMB_thumb_path_lock | ( | const char * | path | ) |
Definition at line 717 of file thumbs.c.
References BLI_assert, BLI_condition_wait_global_mutex(), BLI_gset_add(), BLI_strdup(), BLI_thread_lock(), BLI_thread_unlock(), IMBThumbLocks::cond, IMBThumbLocks::lock_counter, LOCK_IMAGE, IMBThumbLocks::locked_paths, NULL, and thumb_locks.
Referenced by filelist_cache_preview_runf().
| void IMB_thumb_path_unlock | ( | const char * | path | ) |
Definition at line 733 of file thumbs.c.
References BLI_assert, BLI_assert_unreachable, BLI_condition_notify_all(), BLI_gset_remove(), BLI_thread_lock(), BLI_thread_unlock(), IMBThumbLocks::cond, IMBThumbLocks::lock_counter, LOCK_IMAGE, IMBThumbLocks::locked_paths, MEM_freeN, NULL, and thumb_locks.
Referenced by filelist_cache_preview_runf().
Definition at line 527 of file thumbs.c.
References FILE_MAX, IB_metadata, IB_rect, IMB_loadiffname(), NULL, size(), thumbpath_from_uri(), uri_from_filename(), and URI_MAX.