26#include "RNA_prototypes.hh"
52#include "fmt/format.h"
64#define ICON_TYPE_PREVIEW 0
65#define ICON_TYPE_SVG_COLOR 1
66#define ICON_TYPE_SVG_MONO 2
67#define ICON_TYPE_BUFFER 3
68#define ICON_TYPE_IMBUF 4
69#define ICON_TYPE_VECTOR 5
70#define ICON_TYPE_GEOM 6
71#define ICON_TYPE_EVENT 7
72#define ICON_TYPE_GPLAYER 8
73#define ICON_TYPE_BLANK 9
112# define DEF_ICON(name) {ICON_TYPE_SVG_MONO, 0},
113# define DEF_ICON_COLOR(name) {ICON_TYPE_SVG_COLOR, 0},
114# define DEF_ICON_SCENE(name) {ICON_TYPE_SVG_MONO, TH_ICON_SCENE},
115# define DEF_ICON_COLLECTION(name) {ICON_TYPE_SVG_MONO, TH_ICON_COLLECTION},
116# define DEF_ICON_OBJECT(name) {ICON_TYPE_SVG_MONO, TH_ICON_OBJECT},
117# define DEF_ICON_OBJECT_DATA(name) {ICON_TYPE_SVG_MONO, TH_ICON_OBJECT_DATA},
118# define DEF_ICON_MODIFIER(name) {ICON_TYPE_SVG_MONO, TH_ICON_MODIFIER},
119# define DEF_ICON_SHADING(name) {ICON_TYPE_SVG_MONO, TH_ICON_SHADING},
120# define DEF_ICON_FOLDER(name) {ICON_TYPE_SVG_MONO, TH_ICON_FOLDER},
121# define DEF_ICON_FUND(name) {ICON_TYPE_SVG_MONO, TH_ICON_FUND},
122# define DEF_ICON_VECTOR(name) {ICON_TYPE_VECTOR, 0},
123# define DEF_ICON_BLANK(name) {ICON_TYPE_BLANK, 0},
130 ImBuf *bbuf,
int icon_id,
int xofs,
int yofs,
int size,
int type,
int theme_color)
132 Icon *new_icon = MEM_cnew<Icon>(__func__);
134 new_icon->
obj =
nullptr;
137 DrawInfo *di = MEM_cnew<DrawInfo>(__func__);
144 IconImage *iimg = MEM_cnew<IconImage>(__func__);
155 if (size == bbuf->
x && size == bbuf->
y && xofs == 0 && yofs == 0) {
161 for (y = 0; y <
size; y++) {
162 memcpy(&iimg->
rect[y * size],
181 Icon *new_icon = MEM_cnew<Icon>(
"texicon");
183 new_icon->
obj =
nullptr;
186 DrawInfo *di = MEM_cnew<DrawInfo>(
"drawinfo");
206 const short handle_type)
217 const float xco = x +
w / 2 + 0.5f;
218 const float yco = y + h / 2 + 0.5f;
325 const int a = x +
w / 3;
326 const int b = x +
w / 3 * 2;
349# define DEF_ICON_VECTOR_COLORSET_DRAW_NTH(prefix, index) \
350 static void vicon_colorset_draw_##prefix(int x, int y, int w, int h, float alpha) \
352 vicon_colorset_draw(index, x, y, w, h, alpha); \
376# undef DEF_ICON_VECTOR_COLORSET_DRAW_NTH
379 short color_tag,
int x,
int y,
int w,
int ,
float )
388 ICON_OUTLINER_COLLECTION,
392 collection_color->
color,
397# define DEF_ICON_COLLECTION_COLOR_DRAW(index, color) \
398 static void vicon_collection_color_draw_##index(int x, int y, int w, int h, float alpha) \
400 vicon_collection_color_draw(color, x, y, w, h, alpha); \
412# undef DEF_ICON_COLLECTION_COLOR_DRAW
415 short color_tag,
int x,
int y,
int w,
int ,
float )
433# define DEF_ICON_STRIP_COLOR_DRAW(index, color) \
434 static void vicon_strip_color_draw_##index(int x, int y, int w, int h, float alpha) \
436 vicon_strip_color_draw(color, x, y, w, h, alpha); \
449# undef DEF_ICON_STRIP_COLOR_DRAW
451# define ICON_INDIRECT_DATA_ALPHA 0.6f
454 int x,
int y,
int w,
int ,
float alpha)
460 ICON_LIBRARY_DATA_DIRECT,
470 int x,
int y,
int w,
int ,
float alpha)
476 ICON_LIBRARY_DATA_OVERRIDE,
486 short color_tag,
int x,
int y,
int w,
int ,
float )
495 ICON_GREASEPENCIL_LAYER_GROUP,
499 layergroup_color->
color,
504# define DEF_ICON_LAYERGROUP_COLOR_DRAW(index, color) \
505 static void vicon_layergroup_color_draw_##index(int x, int y, int w, int h, float alpha) \
507 vicon_layergroup_color_draw(color, x, y, w, h, alpha); \
519# undef DEF_ICON_LAYERGROUP_COLOR_DRAW
565 return ICON_MOUSE_LMB_2X;
567 return (event_value ==
KM_CLICK_DRAG) ? ICON_MOUSE_LMB_DRAG : ICON_MOUSE_LMB;
570 return (event_value ==
KM_CLICK_DRAG) ? ICON_MOUSE_MMB_DRAG : ICON_MOUSE_MMB;
573 return (event_value ==
KM_CLICK_DRAG) ? ICON_MOUSE_MMB_DRAG : ICON_MOUSE_RMB;
582 memset(r_icon_mod, 0x0,
sizeof(
int[4]));
585 r_icon_mod[i++] = ICON_EVENT_CTRL;
588 r_icon_mod[i++] = ICON_EVENT_ALT;
591 r_icon_mod[i++] = ICON_EVENT_SHIFT;
594 r_icon_mod[i++] = ICON_EVENT_OS;
604# define INIT_EVENT_ICON(icon_id, type, value) \
606 DrawInfo *di = def_internal_icon(nullptr, icon_id, 0, 0, w, ICON_TYPE_EVENT, 0); \
607 di->data.input.event_type = type; \
608 di->data.input.event_value = value; \
609 di->data.input.icon = icon_id; \
610 di->data.input.next = di_next; \
787# undef INIT_EVENT_ICON
801 if (bbuf->
x != iimg->
h && bbuf->
y != iimg->
w) {
813 for (
int x = ICON_NONE; x < ICON_BLANK_LAST_SVG_ITEM; x++) {
928 const int icon_data_type = icon->
obj_type;
930 DrawInfo *di = MEM_cnew<DrawInfo>(
"di_icon");
968 if (icon ==
nullptr) {
1004 printf(
"%s, error: requested preview image does not exist", __func__);
1007 else if (!prv_img->
rect[size]) {
1008 prv_img->
w[
size] = render_size;
1009 prv_img->
h[
size] = render_size;
1034 icon->
obj =
nullptr;
1042 if (wm ==
nullptr) {
1073 if (icon ==
nullptr) {
1079 if (di ==
nullptr) {
1085 ID *
id = (icon->
id_type != 0) ?
static_cast<ID *
>(icon->
obj) :
nullptr;
1090 const bool use_jobs = !
id || (
GS(id->name) !=
ID_SCR);
1095 if (
id || prv->
runtime->deferred_loading_data) {
1107 IconImage *img = MEM_cnew<IconImage>(__func__);
1113 memset(img->
rect, 0, size);
1122 Icon **tmp = MEM_cnew<Icon *>(__func__);
1151 printf(
"%s: no preview image for this ID: %s\n", __func__, id->name);
1161 const bool delay = prv_img->
rect[
size] !=
nullptr;
1181 if (icon ==
nullptr) {
1187 if (di ==
nullptr) {
1212 prv->
w[0] = bbuf->
x;
1213 prv->
h[0] = bbuf->
y;
1232 const float desaturate)
1241 if (
w <= 0 || h <= 0 || w > 2000 || h > 2000) {
1242 printf(
"%s: icons are %i x %i pixels?\n", __func__,
w, h);
1247 const float col[4] = {alpha, alpha, alpha, alpha};
1249 float scale_x = 1.0f;
1250 float scale_y = 1.0f;
1252 if (rw !=
w || rh != h) {
1256 draw_h =
int((
float(rh) /
float(rw)) *
float(
w));
1257 draw_y += (h - draw_h) / 2;
1260 draw_w =
int((
float(rw) /
float(rh)) *
float(h));
1262 draw_x += (
w - draw_w) / 2;
1264 scale_x = draw_w /
float(rw);
1265 scale_y = draw_h /
float(rh);
1271 if (desaturate != 0.0f) {
1284 &
state, draw_x, draw_y, rw, rh,
GPU_RGBA8,
true, rect, scale_x, scale_y, 1.0f, 1.0f,
col);
1301 const std::string &name,
1307 uchar white[] = {255, 255, 255, 255};
1308 uchar black[] = {0, 0, 0, 255};
1309 uchar logo_orange[] = {232, 125, 13, 255};
1310 uchar logo_blue[] = {38, 87, 135, 255};
1313 uchar tool_add[] = {117, 255, 175, 255};
1314 uchar tool_remove[] = {245, 107, 91, 255};
1315 uchar tool_select[] = {255, 176, 43, 255};
1316 uchar tool_transform[] = {217, 175, 245, 255};
1317 uchar tool_white[] = {255, 255, 255, 255};
1318 uchar tool_red[] = {214, 45, 48, 255};
1326 {
"blender_white", white},
1327 {
"blender_black", black},
1328 {
"blender_logo_orange", logo_orange},
1329 {
"blender_logo_blue", logo_blue},
1332 {
"blender_back",
nullptr,
TH_BACK},
1333 {
"blender_text",
nullptr,
TH_TEXT},
1348 {
"blender_tool_add", tool_add},
1349 {
"blender_tool_remove", tool_remove},
1350 {
"blender_tool_select", tool_select},
1351 {
"blender_tool_transform", tool_transform},
1352 {
"blender_tool_white", tool_white},
1353 {
"blender_tool_red", tool_red},
1356 for (
const ColorItem &item : items) {
1357 if (name != item.name) {
1363 memcpy(color, item.col,
sizeof(color));
1377 std::string hexcolor = fmt::format(
1378 "{:02x}{:02x}{:02x}{:02x}", color[0], color[1], color[2], color[3]);
1380 size_t att_start = start;
1383 att_start = svg.
find(key, att_start);
1384 if (att_start == std::string::npos || att_start > end) {
1387 const size_t att_end = svg.find(
"\"", att_start + key.
size());
1388 if (att_end != std::string::npos && att_end < end) {
1389 svg.replace(att_start, att_end - att_start, key +
"#" + hexcolor);
1397 att_start = svg.
find(key, att_start);
1398 if (att_start == std::string::npos || att_start > end) {
1401 const size_t att_end = svg.find(
";", att_start + key.
size());
1402 if (att_end != std::string::npos && att_end - att_start < end) {
1403 svg.replace(att_start, att_end - att_start, key +
"#" + hexcolor);
1419 const size_t id_start = svg.
find(key +
"blender_", g_start);
1420 if (id_start == std::string::npos) {
1425 g_start = svg.rfind(
"<g", id_start);
1426 if (g_start == std::string::npos) {
1432 const size_t g_end = svg.find(
"</g>", id_start);
1433 if (g_end == std::string::npos) {
1439 const size_t id_end = svg.find(
"\"", id_start + key.
size());
1440 if (id_end != std::string::npos) {
1441 std::string
id_name = svg.substr(id_start + key.
size(), id_end - id_start - key.
size());
1457 const float desaturate,
1458 const uchar mono_rgba[4],
1459 const bool mono_border,
1461 const bool inverted =
false)
1463 if (icon_id == ICON_NONE) {
1468 const float fdraw_size =
float(draw_size);
1473 if (icon ==
nullptr) {
1475 printf(
"%s: Internal error, no icon for icon ID: %d\n", __func__, icon_id);
1481 int w =
int(fdraw_size / aspect + 0.5f);
1482 int h =
int(fdraw_size / aspect + 0.5f);
1502#ifdef USE_UI_TOOLBAR_HACK
1507 y = (y + (h / 2)) - ((h * scale) / 2);
1520 if ((ibuf ==
nullptr) || (ibuf->
x !=
w) || (ibuf->
y != h) || (
invert != geom_inverted)) {
1524 if (
invert != geom_inverted) {
1558 float(draw_size) / aspect,
1568 float(draw_size) / aspect,
1575 if (text_overlay && text_overlay->
text[0] !=
'\0') {
1577 uchar text_color[4];
1578 if (text_overlay->
color[3]) {
1587 fstyle_small.
points *= zoom_factor * 0.8f;
1589 fstyle_small.
shadx = 0;
1590 fstyle_small.
shady = 0;
1596 sizeof(text_overlay->
text),
1605#ifndef WITH_HEADLESS
1621 if (!pi->rect[size]) {
1634 reinterpret_cast<const uint8_t *
>(pi->rect[size]),
1644#ifndef WITH_HEADLESS
1654 if ((pi->flag[size] &
PRV_CHANGED) || !pi->rect[size]) {
1658 pi->flag[
size] &= ~PRV_CHANGED;
1676 if (pi ==
nullptr) {
1680 ID *id_to_render = id;
1686 id_to_render =
static_cast<ID *
>(ob->
data);
1724 switch (
GS(id->name)) {
1751 return ICON_LIBRARY_DATA_BROKEN;
1754 return ICON_LIBRARY_DATA_INDIRECT;
1756 return ICON_LIBRARY_DATA_DIRECT;
1762 return ICON_LIBRARY_DATA_OVERRIDE_NONEDITABLE;
1764 return ICON_LIBRARY_DATA_OVERRIDE;
1767 return ICON_ASSET_MANAGER;
1798 return ICON_SHADING_TEXTURE;
1801 return ICON_OUTLINER_DATA_MESH;
1804 return ICON_FILE_IMAGE;
1824 return icon ? icon : rnaicon;
1836 return ICON_ARMATURE_DATA;
1838 return ICON_BRUSH_DATA;
1840 return ICON_CAMERA_DATA;
1844 return ICON_CURVE_DATA;
1846 return ICON_OUTLINER_DATA_GREASEPENCIL;
1848 return ICON_OUTLINER_COLLECTION;
1850 return ICON_IMAGE_DATA;
1852 return ICON_LIGHT_DATA;
1854 return ICON_LINE_DATA;
1856 return ICON_LATTICE_DATA;
1858 return ICON_MATERIAL_DATA;
1860 return ICON_META_DATA;
1862 return ICON_TRACKER;
1864 return ICON_MESH_DATA;
1866 return ICON_MOD_MASK;
1868 return ICON_NODETREE;
1870 return ICON_OBJECT_DATA;
1872 return ICON_PARTICLE_DATA;
1876 return ICON_CURVE_BEZCURVE;
1878 return ICON_OUTLINER_DATA_LIGHTPROBE;
1880 return ICON_SCENE_DATA;
1882 return ICON_SPEAKER;
1886 return ICON_TEXTURE_DATA;
1890 return ICON_FONT_DATA;
1892 return ICON_CURVES_DATA;
1894 return ICON_POINTCLOUD_DATA;
1896 return ICON_VOLUME_DATA;
1898 return ICON_WORLD_DATA;
1900 return ICON_WORKSPACE;
1902 return ICON_OUTLINER_DATA_GREASEPENCIL;
1919 return ICON_OBJECT_DATAMODE;
1922 return ICON_EDITMODE_HLT;
1926 return ICON_SCULPTMODE_HLT;
1929 return ICON_VPAINT_HLT;
1932 return ICON_WPAINT_HLT;
1934 return ICON_TPAINT_HLT;
1936 return ICON_PARTICLEMODE;
1938 return ICON_POSE_HLT;
1940 return ICON_GREASEPENCIL;
1947 int icon = ICON_OUTLINER_COLLECTION;
1950 icon = ICON_COLLECTION_COLOR_01 + collection->color_tag;
1989 const uchar mono_color[4],
1990 const bool mono_border,
1992 const bool inverted)
2011 if (icon_id >= ICON_BLANK_LAST_SVG_ITEM) {
2015 ImBuf *ibuf =
nullptr;
2042 const int icon_indicator_number)
2045 if (icon_indicator_number < 2) {
2046 text_overlay->
text[0] =
'\0';
2061 int icon_id = ICON_NONE;
2064 icon_id = ICON_WARNING_LARGE;
2067 icon_id = ICON_QUESTION_LARGE;
2070 icon_id = ICON_CANCEL_LARGE;
2073 icon_id = ICON_INFO_LARGE;
2076 icon_id = ICON_NONE;
2079 if (icon_id == ICON_NONE) {
void immDrawPixelsTexScaledFullSize(const IMMDrawPixelsTexState *state, float x, float y, int img_w, int img_h, eGPUTextureFormat gpu_format, bool use_filter, const void *rect, float scaleX, float scaleY, float xzoom, float yzoom, const float color[4])
IMMDrawPixelsTexState immDrawPixelsTexSetup(int builtin)
wmWindow * CTX_wm_window(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
wmWindowManager * CTX_wm_manager(const bContext *C)
#define ICON_RENDER_DEFAULT_HEIGHT
void BKE_icon_set(int icon_id, struct Icon *icon)
void BKE_icons_free(void)
struct Icon * BKE_icon_get(int icon_id)
struct ImBuf * BKE_icon_geom_rasterize(const struct Icon_Geom *geom, unsigned int size_x, unsigned int size_y)
void BKE_icon_geom_invert_lightness(struct Icon_Geom *geom)
int BKE_icon_id_ensure(struct ID *id)
PreviewImage * BKE_previewimg_create()
bool BKE_previewimg_id_supports_jobs(const ID *id)
PreviewImage * BKE_previewimg_id_ensure(ID *id)
void BKE_preview_images_free()
PreviewImage * BKE_previewimg_copy(const PreviewImage *prv)
@ STUDIOLIGHT_TYPE_MATCAP
@ STUDIOLIGHT_TYPE_STUDIO
#define STUDIOLIGHT_ICON_SIZE
void BKE_studiolight_set_free_function(StudioLight *sl, StudioLightFreeFunction *free_function, void *data)
#define STUDIOLIGHT_FLAG_ORIENTATIONS
void BKE_studiolight_preview(uint *icon_buffer, StudioLight *sl, int icon_id_type)
void BLF_draw_svg_icon(uint icon_id, float x, float y, float size, const float color[4]=nullptr, float outline_alpha=1.0f, bool multicolor=false, blender::FunctionRef< void(std::string &)> edit_source_cb=nullptr)
blender::Array< uchar > BLF_svg_icon_bitmap(uint icon_id, float size, int *r_width, int *r_height, bool multicolor=false, blender::FunctionRef< void(std::string &)> edit_source_cb=nullptr)
#define BLI_assert_msg(a, msg)
MINLINE int round_fl_to_int(float a)
MINLINE unsigned char rgb_to_grayscale_byte(const unsigned char rgb[3])
void rgba_uchar_to_float(float r_col[4], const unsigned char col_ub[4])
MINLINE void copy_v4_v4_uchar(unsigned char r[4], const unsigned char a[4])
void BLI_str_format_integer_unit(char dst[BLI_STR_FORMAT_INT32_INTEGER_UNIT_SIZE], int number_to_format) ATTR_NONNULL(1)
#define ID_IS_OVERRIDE_LIBRARY_REAL(_id)
#define ID_IS_LINKED(_id)
@ LIBOVERRIDE_FLAG_SYSTEM_DEFINED
#define ID_IS_OVERRIDE_LIBRARY(_id)
Object groups, one object can be in many groups at once.
@ MOD_DPAINT_SURFACE_F_PTEX
@ MOD_DPAINT_SURFACE_F_VERTEX
@ MOD_DPAINT_SURFACE_F_IMAGESEQ
@ OB_MODE_VERTEX_GREASE_PENCIL
@ OB_MODE_EDIT_GPENCIL_LEGACY
@ OB_MODE_PAINT_GREASE_PENCIL
@ OB_MODE_SCULPT_GREASE_PENCIL
@ OB_MODE_WEIGHT_GREASE_PENCIL
@ KEYFRAME_HANDLE_AUTO_CLAMP
@ KEYFRAME_HANDLE_ALIGNED
bool ED_preview_id_is_supported(const ID *id, const char **r_disabled_hint=nullptr)
void ED_preview_icon_job(const bContext *C, PreviewImage *prv_img, ID *id, enum eIconSizes icon_size, bool delay)
void ED_preview_icon_render(const bContext *C, Scene *scene, PreviewImage *prv_img, ID *id, enum eIconSizes icon_size)
@ GPU_SHADER_KEYFRAME_SHAPE
@ GPU_SHADER_2D_IMAGE_DESATURATE_COLOR
@ GPU_SHADER_3D_UNIFORM_COLOR
@ GPU_SHADER_3D_IMAGE_COLOR
void GPU_program_point_size(bool enable)
@ GPU_BLEND_ALPHA_PREMULT
void GPU_blend(eGPUBlend blend)
void IMB_flipy(ImBuf *ibuf)
void IMB_premultiply_alpha(ImBuf *ibuf)
uint8_t * IMB_steal_byte_buffer(ImBuf *ibuf)
bool IMB_scale(ImBuf *ibuf, unsigned int newx, unsigned int newy, IMBScaleFilter filter, bool threaded=true)
#define PREVIEW_RENDER_DEFAULT_HEIGHT
Read Guarded memory(de)allocation.
void UI_fontstyle_draw(const uiFontStyle *fs, const rcti *rect, const char *str, size_t str_len, const uchar col[4], const uiFontStyleDraw_Params *fs_params)
void UI_widgetbase_draw_cache_flush()
#define ICON_DEFAULT_HEIGHT
#define ICON_DEFAULT_HEIGHT_TOOLBAR
#define PREVIEW_DEFAULT_HEIGHT
#define UI_NO_ICON_OVERLAY_TEXT
#define ICON_DEFAULT_WIDTH
void UI_Theme_Store(bThemeState *theme_state)
void UI_Theme_Restore(const bThemeState *theme_state)
void UI_GetThemeColorType4ubv(int colorid, int spacetype, unsigned char col[4])
void UI_GetThemeColor4fv(int colorid, float col[4])
bool UI_GetIconThemeColor4ubv(int colorid, unsigned char col[4])
void UI_SetTheme(int spacetype, int regionid)
void UI_GetThemeColor4ubv(int colorid, unsigned char col[4])
@ WM_JOB_TYPE_STUDIOLIGHT
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
constexpr int64_t find(char c, int64_t pos=0) const
constexpr int64_t size() const
std::string id_name(void *id)
local_group_size(16, 16) .push_constant(Type b
draw_view in_light_buf[] float
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
RAYTRACE_GROUP_SIZE additional_info("eevee_shared", "eevee_gbuffer_data", "eevee_global_ubo", "eevee_sampling_data", "eevee_utility_texture", "eevee_hiz_data", "draw_view") .specialization_constant(Type RAYTRACE_GROUP_SIZE in_sh_0_tx in_sh_2_tx screen_normal_tx GPU_RGBA8
struct ImBuf * IMB_ibImageFromMemory(const unsigned char *, size_t, int, char[IM_MAX_SPACE], const char *)
struct ImBuf * IMB_allocFromBuffer(const uint8_t *, const float *, unsigned int, unsigned int, unsigned int)
void IMB_freeImBuf(ImBuf *)
void UI_icons_free_drawinfo(void *drawinfo)
int UI_icon_from_object_mode(const int mode)
static void vicon_collection_color_draw(short color_tag, int x, int y, int w, int, float)
static void init_event_icons()
static void ui_id_preview_image_render_size(const bContext *C, Scene *scene, ID *id, PreviewImage *pi, int size, const bool use_job)
#define DEF_ICON_VECTOR_COLORSET_DRAW_NTH(prefix, index)
static void vicon_handletype_aligned_draw(int x, int y, int w, int h, float alpha)
PreviewImage * UI_icon_to_preview(int icon_id)
#define DEF_ICON_COLLECTION_COLOR_DRAW(index, color)
void UI_icon_text_overlay_init_from_count(IconTextOverlay *text_overlay, const int icon_indicator_number)
int UI_icon_from_rnaptr(const bContext *C, PointerRNA *ptr, int rnaicon, const bool big)
static void vicon_strip_color_draw(short color_tag, int x, int y, int w, int, float)
static DrawInfo * icon_ensure_drawinfo(Icon *icon)
static DrawInfo * def_internal_icon(ImBuf *bbuf, int icon_id, int xofs, int yofs, int size, int type, int theme_color)
static void vicon_handletype_auto_clamp_draw(int x, int y, int w, int h, float alpha)
ImBuf * UI_svg_icon_bitmap(uint icon_id, float size, bool multicolor)
static void vicon_keytype_keyframe_draw(int x, int y, int w, int h, float alpha)
static void vicon_strip_color_draw_library_data_override_noneditable(int x, int y, int w, int, float alpha)
void ui_icon_ensure_deferred(const bContext *C, const int icon_id, const bool big)
static const IconType icontypes[]
#define ICON_INDIRECT_DATA_ALPHA
int UI_icon_from_idcode(const int idcode)
void UI_icon_draw_alpha(float x, float y, int icon_id, float alpha)
static void init_internal_icons()
static void vicon_gplayer_color_draw(Icon *icon, int x, int y, int w, int h)
static void svg_replace_color_attributes(std::string &svg, const std::string &name, const size_t start, const size_t end)
static void vicon_keytype_jitter_draw(int x, int y, int w, int h, float alpha)
void UI_icon_draw(float x, float y, int icon_id)
static void icon_draw_rect(float x, float y, int w, int h, int rw, int rh, const uint8_t *rect, float alpha, const float desaturate)
static void vicon_keytype_generated_draw(int x, int y, int w, int h, float alpha)
#define ICON_TYPE_SVG_MONO
static void vicon_colorset_draw(int index, int x, int y, int w, int h, float)
static void vicon_handletype_vector_draw(int x, int y, int w, int h, float alpha)
void UI_icon_draw_ex(float x, float y, int icon_id, float aspect, float alpha, float desaturate, const uchar mono_color[4], const bool mono_border, const IconTextOverlay *text_overlay, const bool inverted)
static void vicon_keytype_draw_wrapper(const int x, const int y, const int w, const int h, const float alpha, const eBezTriple_KeyframeType key_type, const short handle_type)
static void vicon_strip_color_draw_library_data_indirect(int x, int y, int w, int, float alpha)
static void icon_verify_datatoc(IconImage *iimg)
static void vicon_handletype_free_draw(int x, int y, int w, int h, float alpha)
static void ui_studiolight_icon_job_end(void *customdata)
void UI_icon_render_id(const bContext *C, Scene *scene, ID *id, const enum eIconSizes size, const bool use_job)
int ui_id_icon_get(const bContext *C, ID *id, const bool big)
#define DEF_ICON_LAYERGROUP_COLOR_DRAW(index, color)
static int ui_id_screen_get_icon(const bContext *C, ID *id)
int UI_icon_from_keymap_item(const wmKeyMapItem *kmi, int r_icon_mod[4])
static void icon_create_rect(PreviewImage *prv_img, enum eIconSizes size)
bool UI_icon_get_theme_color(int icon_id, uchar color[4])
static void vicon_keytype_moving_hold_draw(int x, int y, int w, int h, float alpha)
void UI_icon_render_id_ex(const bContext *C, Scene *scene, ID *id_to_render, const enum eIconSizes size, const bool use_job, PreviewImage *r_preview_image)
static void icon_draw_size(float x, float y, int icon_id, float aspect, float alpha, enum eIconSizes size, int draw_size, const float desaturate, const uchar mono_rgba[4], const bool mono_border, const IconTextOverlay *text_overlay, const bool inverted=false)
static void vicon_handletype_auto_draw(int x, int y, int w, int h, float alpha)
static void def_internal_vicon(int icon_id, VectorDrawFunc drawFunc)
#define ICON_TYPE_SVG_COLOR
int UI_icon_from_library(const ID *id)
static void ui_studiolight_free_function(StudioLight *sl, void *data)
static void icon_source_edit_cb(std::string &svg)
static void vicon_layergroup_color_draw(short color_tag, int x, int y, int w, int, float)
int UI_icon_from_event_type(short event_type, short event_value)
int UI_icon_color_from_collection(const Collection *collection)
void(*)(int x, int y, int w, int h, float alpha) VectorDrawFunc
static DrawInfo * icon_create_drawinfo(Icon *icon)
void UI_icon_draw_preview(float x, float y, int icon_id, float aspect, float alpha, int size)
#define ICON_TYPE_GPLAYER
static void vicon_keytype_extreme_draw(int x, int y, int w, int h, float alpha)
#define DEF_ICON_STRIP_COLOR_DRAW(index, color)
#define ICON_TYPE_PREVIEW
static int get_draw_size(enum eIconSizes size)
int UI_icon_preview_to_render_size(enum eIconSizes size)
ImBuf * UI_icon_alert_imbuf_get(eAlertIcon icon, float size)
static DrawInfo * g_di_event_list
static void ui_studiolight_kill_icon_preview_job(wmWindowManager *wm, int icon_id)
static void vicon_keytype_breakdown_draw(int x, int y, int w, int h, float alpha)
#define INIT_EVENT_ICON(icon_id, type, value)
static void ui_studiolight_icon_job_exec(void *customdata, wmJobWorkerStatus *)
static void ui_id_icon_render(const bContext *C, ID *id, bool use_jobs)
static void icon_set_image(const bContext *C, Scene *scene, ID *id, PreviewImage *prv_img, enum eIconSizes size, const bool use_job)
void icon_draw_rect_input(const float x, const float y, const int w, const int h, const int icon_id, const float aspect, const float alpha, const bool inverted)
CCL_NAMESPACE_BEGIN ccl_device float invert(float color, float factor)
void draw_keyframe_shape(const float x, const float y, float size, const bool sel, const eBezTriple_KeyframeType key_type, const eKeyframeShapeDrawOpts mode, const float alpha, const KeyframeShaderBindings *sh_bindings, const short handle_type, const short extreme_type)
void *(* MEM_mallocN)(size_t len, const char *str)
void MEM_freeN(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
bool RNA_struct_is_a(const StructRNA *type, const StructRNA *srna)
PointerRNA RNA_pointer_get(PointerRNA *ptr, const char *name)
bool RNA_struct_is_ID(const StructRNA *type)
int RNA_int_get(PointerRNA *ptr, const char *name)
struct DrawInfo::@387::@391 texture
struct DrawInfo::@387::@390 buffer
struct DrawInfo::@387::@392 input
struct DrawInfo::@387::@388 vector
struct DrawInfo::@387::@389 geom
union DrawInfo::@387 data
const uchar * datatoc_rect
DrawInfoFreeFP drawinfo_free
ImBufByteBuffer byte_buffer
PreviewImageRuntimeHandle * runtime
short changed_timestamp[2]
int icon_id_matcap_flipped
unsigned char vertex_select[4]
float icon_border_intensity
uiWidgetColors wcol_regular
uiWidgetColors wcol_toolbar_item
ThemeStripColor strip_color[9]
ThemeCollectionColor collection_color[8]
ccl_device_inline bool is_light(const ccl_global KernelLightTreeEmitter *kemitter)
void WM_jobs_timer(wmJob *wm_job, double time_step, uint note, uint endnote)
void WM_jobs_start(wmWindowManager *wm, wmJob *wm_job)
void WM_jobs_kill_type(wmWindowManager *wm, const void *owner, int job_type)
wmJob * WM_jobs_get(wmWindowManager *wm, wmWindow *win, const void *owner, const char *name, const eWM_JobFlag flag, const eWM_JobType job_type)
void WM_jobs_callbacks(wmJob *wm_job, wm_jobs_start_callback startjob, void(*initjob)(void *), void(*update)(void *), void(*endjob)(void *))
void WM_jobs_customdata_set(wmJob *wm_job, void *customdata, void(*free)(void *customdata))