Blender V5.3
IMB_thumbs.hh File Reference
#include <atomic>
#include <cstdint>

Go to the source code of this file.

Classes

struct  blender::ThumbCancellationToken

Namespaces

namespace  blender
 BMesh Iterators.

Macros

#define THUMB_SIZE_MAX   (100 * 1024 * 1024)
#define PREVIEW_RENDER_DEFAULT_HEIGHT   128
#define PREVIEW_RENDER_LARGE_HEIGHT   256
#define THUMB_DEFAULT_HASH   "00000000000000000000000000000000"

Enumerations

enum  blender::ThumbSize { blender::THB_NORMAL , blender::THB_LARGE , blender::THB_FAIL }
enum  blender::ThumbSource : int8_t {
  blender::THB_SOURCE_IMAGE , blender::THB_SOURCE_MOVIE , blender::THB_SOURCE_BLEND , blender::THB_SOURCE_FONT ,
  blender::THB_SOURCE_OBJECT_IO , blender::THB_SOURCE_DIRECT
}

Functions

ImBuf * blender::IMB_thumb_create (const char *filepath, ThumbSize size, ThumbSource source, ImBuf *img)
ImBuf * blender::IMB_thumb_read (const char *file_or_lib_path, ThumbSize size)
void blender::IMB_thumb_delete (const char *file_or_lib_path, ThumbSize size)
ImBuf * blender::IMB_thumb_manage (const char *file_or_lib_path, ThumbSize size, ThumbSource source, const ThumbCancellationToken *cancel_token=nullptr)
void blender::IMB_thumb_makedirs ()
ImBuf * blender::IMB_thumb_load_blend (const char *blen_path, const char *blen_group, const char *blen_id)
ImBuf * blender::IMB_thumb_load_font (const char *filepath, unsigned int x, unsigned int y)
bool blender::IMB_thumb_load_font_get_hash (char *r_hash)
ImBuf * blender::IMB_font_preview (const char *filepath, unsigned int width, const float color[4], const char *sample_text=nullptr)
void blender::IMB_thumb_locks_acquire ()
void blender::IMB_thumb_locks_release ()
void blender::IMB_thumb_path_lock (const char *path)
void blender::IMB_thumb_path_unlock (const char *path)

Macro Definition Documentation

◆ PREVIEW_RENDER_DEFAULT_HEIGHT

#define PREVIEW_RENDER_DEFAULT_HEIGHT   128

◆ PREVIEW_RENDER_LARGE_HEIGHT

#define PREVIEW_RENDER_LARGE_HEIGHT   256

◆ THUMB_DEFAULT_HASH

#define THUMB_DEFAULT_HASH   "00000000000000000000000000000000"

Note this can also be used as versioning system, to force refreshing all thumbnails if e.g. we change some thumb generating code or so. Only used by fonts so far.

Definition at line 84 of file IMB_thumbs.hh.

Referenced by blender::IMB_thumb_create().

◆ THUMB_SIZE_MAX

#define THUMB_SIZE_MAX   (100 * 1024 * 1024)

Don't generate thumbs for images bigger than this (100mb).

Definition at line 74 of file IMB_thumbs.hh.

Referenced by blender::IMB_thumb_load_image().