Blender V4.5
IMB_thumbs.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2024 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11#include <cstdint>
12
13struct ImBuf;
14
20
26
34
38#define THUMB_SIZE_MAX (100 * 1024 * 1024)
39
40#define PREVIEW_RENDER_DEFAULT_HEIGHT 128
41#define PREVIEW_RENDER_LARGE_HEIGHT 256
42
48#define THUMB_DEFAULT_HASH "00000000000000000000000000000000"
49
54ImBuf *IMB_thumb_create(const char *filepath, ThumbSize size, ThumbSource source, ImBuf *img);
55
61ImBuf *IMB_thumb_read(const char *file_or_lib_path, ThumbSize size);
62
68void IMB_thumb_delete(const char *file_or_lib_path, ThumbSize size);
69
78ImBuf *IMB_thumb_manage(const char *file_or_lib_path, ThumbSize size, ThumbSource source);
79
84
88ImBuf *IMB_thumb_load_blend(const char *blen_path, const char *blen_group, const char *blen_id);
89
93ImBuf *IMB_thumb_load_font(const char *filepath, unsigned int x, unsigned int y);
94bool IMB_thumb_load_font_get_hash(char *r_hash);
95
96ImBuf *IMB_font_preview(const char *filepath, unsigned int width, const float color[4]);
97
98/* Threading */
99
102void IMB_thumb_path_lock(const char *path);
103void IMB_thumb_path_unlock(const char *path);
ImBuf * IMB_thumb_create(const char *filepath, ThumbSize size, ThumbSource source, ImBuf *img)
Definition thumbs.cc:486
ImBuf * IMB_font_preview(const char *filepath, unsigned int width, const float color[4])
ImBuf * IMB_thumb_read(const char *file_or_lib_path, ThumbSize size)
Definition thumbs.cc:500
void IMB_thumb_delete(const char *file_or_lib_path, ThumbSize size)
Definition thumbs.cc:516
ThumbSize
Definition IMB_thumbs.hh:21
@ THB_FAIL
Definition IMB_thumbs.hh:24
@ THB_NORMAL
Definition IMB_thumbs.hh:22
@ THB_LARGE
Definition IMB_thumbs.hh:23
bool IMB_thumb_load_font_get_hash(char *r_hash)
void IMB_thumb_path_unlock(const char *path)
Definition thumbs.cc:719
ThumbSource
Definition IMB_thumbs.hh:27
@ THB_SOURCE_IMAGE
Definition IMB_thumbs.hh:28
@ THB_SOURCE_FONT
Definition IMB_thumbs.hh:31
@ THB_SOURCE_BLEND
Definition IMB_thumbs.hh:30
@ THB_SOURCE_MOVIE
Definition IMB_thumbs.hh:29
@ THB_SOURCE_OBJECT_IO
Definition IMB_thumbs.hh:32
void IMB_thumb_locks_acquire()
Definition thumbs.cc:672
ImBuf * IMB_thumb_manage(const char *file_or_lib_path, ThumbSize size, ThumbSource source)
Definition thumbs.cc:534
void IMB_thumb_path_lock(const char *path)
Definition thumbs.cc:703
ImBuf * IMB_thumb_load_blend(const char *blen_path, const char *blen_group, const char *blen_id)
ImBuf * IMB_thumb_load_font(const char *filepath, unsigned int x, unsigned int y)
void IMB_thumb_locks_release()
Definition thumbs.cc:688
void IMB_thumb_makedirs()
Definition thumbs.cc:299
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Definition btDbvt.cpp:52
char filepath[IMB_FILEPATH_SIZE]