80 # define ICON_GRID_COLS 26
81 # define ICON_GRID_ROWS 30
83 # define ICON_MONO_BORDER_OUTSET 2
84 # define ICON_GRID_MARGIN 10
85 # define ICON_GRID_W 32
86 # define ICON_GRID_H 32
99 #define ICON_TYPE_PREVIEW 0
100 #define ICON_TYPE_COLOR_TEXTURE 1
101 #define ICON_TYPE_MONO_TEXTURE 2
102 #define ICON_TYPE_BUFFER 3
103 #define ICON_TYPE_IMBUF 4
104 #define ICON_TYPE_VECTOR 5
105 #define ICON_TYPE_GEOM 6
106 #define ICON_TYPE_EVENT 7
107 #define ICON_TYPE_GPLAYER 8
108 #define ICON_TYPE_BLANK 9
160 #ifndef WITH_HEADLESS
163 # define DEF_ICON(name) {ICON_TYPE_MONO_TEXTURE, 0},
164 # define DEF_ICON_SCENE(name) {ICON_TYPE_MONO_TEXTURE, TH_ICON_SCENE},
165 # define DEF_ICON_COLLECTION(name) {ICON_TYPE_MONO_TEXTURE, TH_ICON_COLLECTION},
166 # define DEF_ICON_OBJECT(name) {ICON_TYPE_MONO_TEXTURE, TH_ICON_OBJECT},
167 # define DEF_ICON_OBJECT_DATA(name) {ICON_TYPE_MONO_TEXTURE, TH_ICON_OBJECT_DATA},
168 # define DEF_ICON_MODIFIER(name) {ICON_TYPE_MONO_TEXTURE, TH_ICON_MODIFIER},
169 # define DEF_ICON_SHADING(name) {ICON_TYPE_MONO_TEXTURE, TH_ICON_SHADING},
170 # define DEF_ICON_FOLDER(name) {ICON_TYPE_MONO_TEXTURE, TH_ICON_FOLDER},
171 # define DEF_ICON_FUND(name) {ICON_TYPE_MONO_TEXTURE, TH_ICON_FUND},
172 # define DEF_ICON_VECTOR(name) {ICON_TYPE_VECTOR, 0},
173 # define DEF_ICON_COLOR(name) {ICON_TYPE_COLOR_TEXTURE, 0},
174 # define DEF_ICON_BLANK(name) {ICON_TYPE_BLANK, 0},
181 ImBuf *bbuf,
int icon_id,
int xofs,
int yofs,
int size,
int type,
int theme_color)
210 if (
size == bbuf->
x &&
size == bbuf->
y && xofs == 0 && yofs == 0) {
263 const int cx =
x +
w / 2 - 4;
264 const int cy =
y +
w / 2;
265 const int d =
w / 5, d2 =
w / 7;
286 int x,
int y,
int w,
int h,
float alpha,
short key_type,
short handle_type)
300 const float xco =
x +
w / 2 + 0.5f;
301 const float yco =
y + h / 2 + 0.5f;
406 const int a =
x +
w / 3;
407 const int b =
x +
w / 3 * 2;
430 # define DEF_ICON_VECTOR_COLORSET_DRAW_NTH(prefix, index) \
431 static void vicon_colorset_draw_##prefix(int x, int y, int w, int h, float alpha) \
433 vicon_colorset_draw(index, x, y, w, h, alpha); \
457 # undef DEF_ICON_VECTOR_COLORSET_DRAW_NTH
468 x,
y, ICON_OUTLINER_COLLECTION, aspect, 1.0f, 0.0f, collection_color->
color,
true);
471 # define DEF_ICON_COLLECTION_COLOR_DRAW(index, color) \
472 static void vicon_collection_color_draw_##index(int x, int y, int w, int h, float alpha) \
474 vicon_collection_color_draw(color, x, y, w, h, alpha); \
486 # undef DEF_ICON_COLLECTION_COLOR_DRAW
513 # define INIT_BRUSH_ICON(icon_id, name) \
515 uchar *rect = (uchar *)datatoc_##name##_png; \
516 const int size = datatoc_##name##_png_size; \
519 di = def_internal_icon(NULL, icon_id, 0, 0, w, ICON_TYPE_BUFFER, 0); \
520 di->data.buffer.image->datatoc_rect = rect; \
521 di->data.buffer.image->datatoc_size = size; \
581 # undef INIT_BRUSH_ICON
612 if (di->
data.
input.event_type == event_type) {
633 memset(r_icon_mod, 0x0,
sizeof(
int[4]));
636 r_icon_mod[i++] = ICON_EVENT_CTRL;
639 r_icon_mod[i++] = ICON_EVENT_ALT;
642 r_icon_mod[i++] = ICON_EVENT_SHIFT;
645 r_icon_mod[i++] = ICON_EVENT_OS;
655 # define INIT_EVENT_ICON(icon_id, type, value) \
657 DrawInfo *di = def_internal_icon(NULL, icon_id, 0, 0, w, ICON_TYPE_EVENT, 0); \
658 di->data.input.event_type = type; \
659 di->data.input.event_value = value; \
660 di->data.input.icon = icon_id; \
661 di->data.input.next = di_next; \
720 # undef INIT_EVENT_ICON
734 if (bbuf->
x != iimg->
h && bbuf->
y != iimg->
w) {
745 int resolution_divider,
746 float border_intensity)
749 const float border_sharpness = 16.0 / (resolution_divider * resolution_divider);
765 sx = sx / resolution_divider;
766 sy = sy / resolution_divider;
769 const int blur_size = 2 / resolution_divider;
770 for (
int bx = 0; bx < icon_width; bx++) {
771 const int asx =
MAX2(bx - blur_size, 0);
772 const int aex =
MIN2(bx + blur_size + 1, icon_width);
773 for (
int by = 0; by < icon_height; by++) {
774 const int asy =
MAX2(by - blur_size, 0);
775 const int aey =
MIN2(by + blur_size + 1, icon_height);
779 float alpha_accum = 0.0;
780 uint alpha_samples = 0;
781 for (
int ax = asx; ax < aex; ax++) {
782 for (
int ay = asy; ay < aey; ay++) {
783 const int offset_read = (sy + ay) * buf->
x + (sx + ax);
784 const uint color_read = buf->
rect[offset_read];
785 const float alpha_read = ((color_read & 0xff000000) >> 24) / 255.0;
786 alpha_accum += alpha_read;
790 blurred_alpha_buffer[write_offset] = alpha_accum / alpha_samples;
795 for (
int bx = 0; bx < icon_width; bx++) {
796 for (
int by = 0; by < icon_height; by++) {
798 const int offset_write = (sy + by) * buf->
x + (sx + bx);
799 const float blurred_alpha = blurred_alpha_buffer[blurred_alpha_offset];
800 const float border_srgb[4] = {
801 0, 0, 0,
MIN2(1.0, blurred_alpha * border_sharpness) * border_intensity};
803 const uint color_read = buf->
rect[offset_write];
804 const uchar *orig_color = (
uchar *)&color_read;
806 float border_rgba[4];
816 const uint alpha_mask = ((
uint)(dest_srgb[3] * 255)) << 24;
817 const uint cpack =
rgb_to_cpack(dest_srgb[0], dest_srgb[1], dest_srgb[2]) | alpha_mask;
818 result->rect[offset_write] = cpack;
829 for (
int i = 0; i < 2; i++) {
846 const bool need_icons_with_border = icon_border_intensity > 0.0f;
848 if (b16buf ==
NULL) {
856 if (need_icons_with_border) {
863 if (b32buf ==
NULL) {
871 if (need_icons_with_border) {
878 if (b16buf && b32buf) {
900 "icons_border", b32buf_border->x, b32buf_border->y, 2,
GPU_RGBA8,
NULL);
915 if ((btheme !=
NULL) && btheme->tui.iconfile[0]) {
920 BLI_join_dirfile(iconfilestr,
sizeof(iconfilestr), icondir, btheme->tui.iconfile);
925 if (bbuf && (bbuf->x < ICON_IMAGE_W || bbuf->y < ICON_IMAGE_H)) {
928 "Icons file '%s' too small.\n"
929 "Using built-in Icons instead\n",
936 printf(
"%s: 'icons' data path not found, continuing\n", __func__);
1010 if (icondir ==
NULL) {
1018 for (
int i = 0; i < totfile; i++) {
1019 if ((dir[i].
type & S_IFREG)) {
1020 const char *filename = dir[i].
relname;
1041 ifilex = ifiley = 0;
1045 if ((ifilex != ICON_IMAGE_W) || (ifiley != ICON_IMAGE_H)) {
1046 printf(
"icon '%s' is wrong size %dx%d\n", iconfilestr, ifilex, ifiley);
1055 ifile->
index = index;
1072 for (ifile = list->
first; ifile; ifile = next_ifile) {
1073 next_ifile = ifile->
next;
1091 for (ifile = list->
first; ifile; ifile = ifile->
next) {
1093 return ifile->
index;
1109 #ifndef WITH_HEADLESS
1146 const int icon_data_type = icon->
obj_type;
1190 printf(
"%s: Internal error, no icon for icon ID: %d\n", __func__, icon_id);
1208 printf(
"%s: Internal error, no icon for icon ID: %d\n", __func__, icon_id);
1234 #ifndef WITH_HEADLESS
1265 printf(
"%s, error: requested preview image does not exist", __func__);
1269 prv_img->
w[
size] = render_size;
1270 prv_img->
h[
size] = render_size;
1282 short *
UNUSED(do_update),
1408 printf(
"%s: no preview image for this ID: %s\n", __func__,
id->
name);
1470 prv->
w[0] = bbuf->
x;
1471 prv->
h[0] = bbuf->
y;
1492 const float desaturate)
1501 if (
w <= 0 || h <= 0 || w > 2000 || h > 2000) {
1502 printf(
"%s: icons are %i x %i pixels?\n", __func__,
w, h);
1510 if (rw !=
w || rh != h) {
1514 draw_h = (int)(((
float)rh / (
float)rw) * (
float)
w);
1515 draw_y += (h - draw_h) / 2;
1518 draw_w = (int)(((
float)rw / (
float)rh) * (
float)h);
1520 draw_x += (
w - draw_w) / 2;
1526 memcpy(ima->
rect, rect, rw * rh *
sizeof(
uint));
1533 if (desaturate != 0.0f) {
1546 &
state, draw_x, draw_y, draw_w, draw_h,
GPU_RGBA8,
false, rect, 1.0f, 1.0f,
col);
1558 #define ICON_DRAW_CACHE_SIZE 16
1586 if (texture_draw_calls->
calls == 0) {
1606 texture_draw_calls->
calls = 0;
1611 bool should_draw =
false;
1612 if (only_full_caches) {
1673 texture_call->
calls++;
1676 call->
pos.
xmin =
x * mvp[0][0] +
y * mvp[1][0] + mvp[3][0];
1677 call->
pos.
ymin =
x * mvp[0][1] +
y * mvp[1][1] + mvp[3][1];
1711 icon_draw_texture_cached(
x,
y,
w, h, ix, iy, iw, ih,
alpha, rgb, with_border);
1776 const float desaturate,
1777 const uchar mono_rgba[4],
1778 const bool mono_border)
1781 const float fdraw_size = (
float)draw_size;
1788 printf(
"%s: Internal error, no icon for icon ID: %d\n", __func__, icon_id);
1794 int w = (int)(fdraw_size / aspect + 0.5f);
1795 int h = (int)(fdraw_size / aspect + 0.5f);
1815 #ifdef USE_UI_TOOLBAR_HACK
1820 y = (
y + (h / 2)) - ((h * scale) / 2);
1828 const bool geom_inverted = di->
data.
geom.inverted;
1833 if ((ibuf ==
NULL) || (ibuf->
x !=
w) || (ibuf->
y != h) || (
invert != geom_inverted)) {
1837 if (
invert != geom_inverted) {
1850 const short event_type = di->
data.
input.event_type;
1851 const short event_value = di->
data.
input.event_value;
1881 float border_outset = 0.0;
1882 uint border_texel = 0;
1883 #ifndef WITH_HEADLESS
1892 (
float)
w + 2 * border_outset,
1893 (
float)h + 2 * border_outset,
1906 #ifndef WITH_HEADLESS
1938 #ifndef WITH_HEADLESS
1997 char space_type =
area->spacetype;
2022 if (
area->spacetype == space_type) {
2064 br->
id.
icon_id = ICON_GPBRUSH_ERASE_SOFT;
2067 br->
id.
icon_id = ICON_GPBRUSH_ERASE_HARD;
2070 br->
id.
icon_id = ICON_GPBRUSH_ERASE_STROKE;
2094 br->
id.
icon_id = ICON_GPBRUSH_THICKNESS;
2100 br->
id.
icon_id = ICON_GPBRUSH_RANDOMIZE;
2187 return ICON_LIBRARY_DATA_BROKEN;
2190 return ICON_LIBRARY_DATA_INDIRECT;
2192 return ICON_LIBRARY_DATA_DIRECT;
2195 return ICON_LIBRARY_DATA_OVERRIDE;
2198 return ICON_ASSET_MANAGER;
2229 return ICON_SHADING_TEXTURE;
2232 return ICON_OUTLINER_DATA_MESH;
2235 return ICON_FILE_IMAGE;
2255 return icon ? icon : rnaicon;
2267 return ICON_ARMATURE_DATA;
2269 return ICON_BRUSH_DATA;
2271 return ICON_CAMERA_DATA;
2275 return ICON_CURVE_DATA;
2277 return ICON_OUTLINER_DATA_GREASEPENCIL;
2279 return ICON_OUTLINER_COLLECTION;
2281 return ICON_IMAGE_DATA;
2283 return ICON_LIGHT_DATA;
2285 return ICON_LINE_DATA;
2287 return ICON_LATTICE_DATA;
2289 return ICON_MATERIAL_DATA;
2291 return ICON_META_DATA;
2293 return ICON_TRACKER;
2295 return ICON_MESH_DATA;
2297 return ICON_MOD_MASK;
2299 return ICON_NODETREE;
2301 return ICON_OBJECT_DATA;
2303 return ICON_PARTICLE_DATA;
2307 return ICON_CURVE_BEZCURVE;
2309 return ICON_OUTLINER_DATA_LIGHTPROBE;
2311 return ICON_SCENE_DATA;
2313 return ICON_SPEAKER;
2317 return ICON_TEXTURE_DATA;
2321 return ICON_FONT_DATA;
2323 return ICON_HAIR_DATA;
2325 return ICON_POINTCLOUD_DATA;
2327 return ICON_VOLUME_DATA;
2329 return ICON_WORLD_DATA;
2331 return ICON_WORKSPACE;
2334 return ICON_PHYSICS;
2351 return ICON_OBJECT_DATAMODE;
2354 return ICON_EDITMODE_HLT;
2357 return ICON_SCULPTMODE_HLT;
2360 return ICON_VPAINT_HLT;
2363 return ICON_WPAINT_HLT;
2365 return ICON_TPAINT_HLT;
2367 return ICON_PARTICLEMODE;
2369 return ICON_POSE_HLT;
2371 return ICON_GREASEPENCIL;
2378 int icon = ICON_OUTLINER_COLLECTION;
2381 icon = ICON_COLLECTION_COLOR_01 + collection->
color_tag;
2409 const uchar mono_color[4],
2410 const bool mono_border)
2429 #ifdef WITH_HEADLESS
2432 const int ALERT_IMG_SIZE = 256;
2434 const int left = icon * ALERT_IMG_SIZE;
2435 const rcti crop = {
left,
left + ALERT_IMG_SIZE - 1, 0, ALERT_IMG_SIZE - 1};
typedef float(TangentPoint)[2]
void immDrawPixelsTex(IMMDrawPixelsTexState *state, float x, float y, int img_w, int img_h, eGPUTextureFormat gpu_format, bool use_filter, void *rect, float xzoom, float yzoom, const float color[4])
IMMDrawPixelsTexState immDrawPixelsTexSetup(int builtin)
const char * BKE_appdir_folder_id(const int folder_id, const char *subfolder)
struct ScrArea * CTX_wm_area(const bContext *C)
struct Scene * CTX_data_scene(const bContext *C)
struct wmWindowManager * CTX_wm_manager(const bContext *C)
struct Object * CTX_data_active_object(const bContext *C)
struct wmWindow * CTX_wm_window(const bContext *C)
struct PreviewImage * BKE_previewimg_id_ensure(struct ID *id)
bool BKE_previewimg_id_supports_jobs(const struct ID *id)
struct PreviewImage * BKE_previewimg_create(void)
#define ICON_RENDER_DEFAULT_HEIGHT
void BKE_icon_set(const int icon_id, struct Icon *icon)
struct PreviewImage * BKE_previewimg_copy(const struct PreviewImage *prv)
void BKE_icons_free(void)
void BKE_icon_geom_invert_lightness(struct Icon_Geom *geom)
struct Icon * BKE_icon_get(const int icon_id)
int BKE_icon_id_ensure(struct ID *id)
struct ImBuf * BKE_icon_geom_rasterize(const struct Icon_Geom *geom, const unsigned int size_x, const unsigned int size_y)
uint BKE_paint_get_brush_tool_offset_from_paintmode(const ePaintMode mode)
const struct EnumPropertyItem * BKE_paint_get_tool_enum_from_paintmode(ePaintMode mode)
@ 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 BLI_filelist_free(struct direntry *filelist, const unsigned int nrentries)
unsigned int BLI_filelist_dir_contents(const char *dir, struct direntry **r_filelist)
Some types for dealing with directories.
void BLI_freelinkN(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
BLI_INLINE void BLI_listbase_clear(struct ListBase *lb)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
MINLINE unsigned char rgb_to_grayscale_byte(const unsigned char rgb[3])
unsigned int rgb_to_cpack(float r, float g, float b)
MINLINE void srgb_to_linearrgb_uchar4(float linear[4], const unsigned char srgb[4])
MINLINE void srgb_to_linearrgb_v4(float linear[4], const float srgb[4])
void rgba_uchar_to_float(float r_col[4], const unsigned char col_ub[4])
MINLINE void linearrgb_to_srgb_v4(float srgb[4], const float linear[4])
MINLINE void blend_color_interpolate_float(float dst[4], const float src1[4], const float src2[4], float t)
MINLINE void mul_v4_fl(float r[4], float f)
MINLINE void copy_v4_fl4(float v[4], float x, float y, float z, float w)
MINLINE void copy_v4_fl(float r[4], float f)
void BLI_join_dirfile(char *__restrict dst, const size_t maxlen, const char *__restrict dir, const char *__restrict file) ATTR_NONNULL()
bool BLI_path_extension_check(const char *str, const char *ext) ATTR_NONNULL() ATTR_WARN_UNUSED_RESULT
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, const size_t maxncpy) ATTR_NONNULL()
#define POINTER_OFFSET(v, ofs)
#define ID_IS_LINKED(_id)
#define ID_IS_OVERRIDE_LIBRARY(_id)
@ GP_BRUSH_ICON_ERASE_SOFT
@ GP_BRUSH_ICON_GPBRUSH_RANDOMIZE
@ GP_BRUSH_ICON_VERTEX_BLUR
@ GP_BRUSH_ICON_GPBRUSH_GRAB
@ GP_BRUSH_ICON_GPBRUSH_STRENGTH
@ GP_BRUSH_ICON_GPBRUSH_TWIST
@ GP_BRUSH_ICON_VERTEX_REPLACE
@ GP_BRUSH_ICON_VERTEX_DRAW
@ GP_BRUSH_ICON_GPBRUSH_WEIGHT
@ GP_BRUSH_ICON_GPBRUSH_PINCH
@ GP_BRUSH_ICON_VERTEX_SMEAR
@ GP_BRUSH_ICON_GPBRUSH_THICKNESS
@ GP_BRUSH_ICON_GPBRUSH_CLONE
@ GP_BRUSH_ICON_ERASE_STROKE
@ GP_BRUSH_ICON_ERASE_HARD
@ GP_BRUSH_ICON_GPBRUSH_SMOOTH
@ GP_BRUSH_ICON_GPBRUSH_PUSH
@ GP_BRUSH_ICON_VERTEX_AVERAGE
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
Object is a sort of wrapper for general info.
char datatoc_blender_icons16_png[]
int datatoc_blender_icons32_png_size
int datatoc_blender_icons16_png_size
char datatoc_alert_icons_png[]
int datatoc_alert_icons_png_size
char datatoc_blender_icons32_png[]
@ KEYFRAME_HANDLE_AUTO_CLAMP
@ KEYFRAME_HANDLE_ALIGNED
void ED_preview_icon_job(const struct bContext *C, void *owner, struct ID *id, unsigned int *rect, int sizex, int sizey, const bool delay)
void ED_preview_icon_render(const struct bContext *C, struct Scene *scene, struct ID *id, unsigned int *rect, int sizex, int sizey)
void GPU_batch_draw_instanced(GPUBatch *batch, int i_count)
void GPU_batch_set_shader(GPUBatch *batch, GPUShader *shader)
void GPU_batch_draw(GPUBatch *batch)
struct GPUBatch * GPU_batch_preset_quad(void)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble y1
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble x2
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
#define GPU_matrix_model_view_projection_get(x)
int GPU_shader_get_uniform(GPUShader *shader, const char *name)
struct GPUShader GPUShader
void GPU_shader_uniform_vector(GPUShader *shader, int location, int length, int arraysize, const float *value)
GPUShader * GPU_shader_get_builtin_shader(eGPUBuiltinShader shader)
void GPU_shader_bind(GPUShader *shader)
@ GPU_SHADER_2D_IMAGE_DESATURATE_COLOR
@ GPU_SHADER_2D_IMAGE_MULTI_RECT_COLOR
@ GPU_SHADER_2D_UNIFORM_COLOR
@ GPU_SHADER_2D_IMAGE_RECT_COLOR
@ GPU_SHADER_KEYFRAME_DIAMOND
@ GPU_SHADER_2D_IMAGE_COLOR
int GPU_shader_get_texture_binding(GPUShader *shader, const char *name)
int GPU_shader_get_builtin_uniform(GPUShader *shader, int builtin)
void GPU_program_point_size(bool enable)
@ GPU_BLEND_ALPHA_PREMULT
void GPU_blend(eGPUBlend blend)
void GPU_texture_update_mipmap(GPUTexture *tex, int miplvl, eGPUDataFormat gpu_data_format, const void *pixels)
void GPU_texture_bind_ex(GPUTexture *tex, eGPUSamplerState state, int unit, const bool set_number)
struct GPUTexture GPUTexture
void GPU_texture_free(GPUTexture *tex)
void GPU_texture_unbind(GPUTexture *tex)
GPUTexture * GPU_texture_create_2d(const char *name, int w, int h, int mip_len, eGPUTextureFormat format, const float *data)
bool IMB_scaleImBuf(struct ImBuf *ibuf, unsigned int newx, unsigned int newy)
struct ImBuf * IMB_allocImBuf(unsigned int x, unsigned int y, unsigned char planes, unsigned int flags)
struct ImBuf * IMB_dupImBuf(const struct ImBuf *ibuf1)
void IMB_rect_crop(struct ImBuf *ibuf, const struct rcti *crop)
void IMB_freeImBuf(struct ImBuf *ibuf)
struct ImBuf * IMB_loadiffname(const char *filepath, int flags, char colorspace[IM_MAX_SPACE])
void IMB_premultiply_alpha(struct ImBuf *ibuf)
struct ImBuf * IMB_ibImageFromMemory(const unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE], const char *descr)
Contains defines and structs used throughout the imbuf module.
#define PREVIEW_RENDER_DEFAULT_HEIGHT
Read Guarded memory(de)allocation.
StructRNA RNA_MaterialSlot
StructRNA RNA_StudioLight
StructRNA RNA_DynamicPaintSurface
StructRNA RNA_FileBrowserFSMenuEntry
StructRNA RNA_TextureSlot
void UI_widgetbase_draw_cache_flush(void)
#define ICON_DEFAULT_HEIGHT
#define ICON_DEFAULT_HEIGHT_TOOLBAR
#define PREVIEW_DEFAULT_HEIGHT
#define ICON_DEFAULT_WIDTH
void UI_Theme_Restore(struct bThemeState *theme_state)
struct bTheme * UI_GetTheme(void)
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_Theme_Store(struct bThemeState *theme_state)
@ WM_JOB_TYPE_STUDIOLIGHT
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
static CCL_NAMESPACE_BEGIN const double alpha
struct @203::@204 surface
static struct @395 g_icon_draw_cache
void UI_icons_free_drawinfo(void *drawinfo)
static struct ListBase iconfilelist
static void vicon_collection_color_draw(short color_tag, int x, int y, int w, int UNUSED(h), float UNUSED(alpha))
int UI_icon_from_object_mode(const int mode)
void UI_icon_draw_cache_end(void)
static void vicon_keytype_draw_wrapper(int x, int y, int w, int h, float alpha, short key_type, short handle_type)
#define ICON_TYPE_MONO_TEXTURE
static void ui_studiolight_icon_job_exec(void *customdata, short *UNUSED(stop), short *UNUSED(do_update), float *UNUSED(progress))
static void icon_draw_cache_flush_ex(bool only_full_caches)
#define ICON_TYPE_COLOR_TEXTURE
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)
#define DEF_ICON_COLLECTION_COLOR_DRAW(index, color)
struct IconImage IconImage
static DrawInfo * icon_ensure_drawinfo(Icon *icon)
static IconTexture icongltex
void(* VectorDrawFunc)(int x, int y, int w, int h, float alpha)
static void init_iconfile_list(struct ListBase *list)
static void icon_draw_texture(float x, float y, float w, float h, int ix, int iy, int iw, int ih, float alpha, const float rgb[3], bool with_border)
static void vicon_handletype_auto_clamp_draw(int x, int y, int w, int h, float alpha)
static void vicon_keytype_keyframe_draw(int x, int y, int w, int h, float alpha)
void UI_icons_reload_internal_textures(void)
void ui_icon_ensure_deferred(const bContext *C, const int icon_id, const bool big)
static const IconType icontypes[]
int UI_icon_from_idcode(const int idcode)
void UI_icon_draw_alpha(float x, float y, int icon_id, float alpha)
static void vicon_gplayer_color_draw(Icon *icon, int x, int y, int w, int h)
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)
int UI_icon_from_rnaptr(bContext *C, PointerRNA *ptr, int rnaicon, const bool big)
static void vicon_handletype_vector_draw(int x, int y, int w, int h, float alpha)
static void vicon_colorset_draw(int index, int x, int y, int w, int h, float UNUSED(alpha))
#define INIT_BRUSH_ICON(icon_id, name)
static void free_icons_textures(void)
void UI_icon_draw_cache_begin(void)
static void free_iconfile_list(struct ListBase *list)
static void icon_verify_datatoc(IconImage *iimg)
IconTextureDrawCall normal
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)
struct IconTextureDrawCall IconTextureDrawCall
void UI_icon_render_id(const bContext *C, Scene *scene, ID *id, const enum eIconSizes size, const bool use_job)
struct IconTexture IconTexture
PreviewImage * UI_icon_to_preview(int icon_id)
int ui_id_icon_get(const bContext *C, ID *id, const bool big)
static int ui_id_screen_get_icon(const bContext *C, ID *id)
static void init_brush_icons(void)
int UI_icon_from_keymap_item(const wmKeyMapItem *kmi, int r_icon_mod[4])
int UI_icon_get_height(int icon_id)
static void viconutil_set_point(int pt[2], int x, int y)
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)
static DrawInfo * icon_create_drawinfo(Icon *icon)
ImBuf * UI_icon_alert_imbuf_get(eAlertIcon icon)
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)
int UI_icon_from_library(const ID *id)
static void ui_studiolight_free_function(StudioLight *sl, void *data)
static ImBuf * create_mono_icon_with_border(ImBuf *buf, int resolution_divider, float border_intensity)
int UI_iconfile_get_index(const char *filename)
#define ICON_MONO_BORDER_OUTSET
#define ICON_DRAW_CACHE_SIZE
int UI_icon_from_event_type(short event_type, short event_value)
int UI_icon_color_from_collection(const Collection *collection)
static DrawInfo * def_internal_icon(ImBuf *bbuf, int icon_id, int xofs, int yofs, int size, int type, int theme_color)
ListBase * UI_iconfile_list(void)
static void icon_draw_rect(float x, float y, int w, int h, float UNUSED(aspect), int rw, int rh, uint *rect, float alpha, const float desaturate)
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)
static int ui_id_brush_get_icon(const bContext *C, ID *id)
static void init_internal_icons(void)
#define ICON_TYPE_PREVIEW
struct IconDrawCall IconDrawCall
static int get_draw_size(enum eIconSizes size)
int UI_icon_preview_to_render_size(enum eIconSizes size)
static DrawInfo * g_di_event_list
int UI_icon_get_width(int icon_id)
static void vicon_small_tri_right_draw(int x, int y, int w, int UNUSED(h), float alpha)
static void icon_draw_texture_cached(float x, float y, float w, float h, int ix, int iy, int UNUSED(iw), int ih, float alpha, const float rgb[3], bool with_border)
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 init_event_icons(void)
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)
static void icon_draw_cache_texture_flush_ex(GPUTexture *texture, IconTextureDrawCall *texture_draw_calls)
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)
static void icon_create_rect(struct PreviewImage *prv_img, enum eIconSizes size)
IconTextureDrawCall border
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(float x, float y, int w, int h, float UNUSED(alpha), short event_type, short UNUSED(event_value))
void KERNEL_FUNCTION_FULL_NAME() shader(KernelGlobals *kg, uint4 *input, float4 *output, int type, int filter, int i, int offset, int sample)
void draw_keyframe_shape(float x, float y, float size, bool sel, short key_type, short mode, float alpha, uint pos_id, uint size_id, uint color_id, uint outline_color_id, uint flags_id, short handle_type, short extreme_type)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_mallocN)(size_t len, const char *str)
static void area(int d1, int d2, int e1, int e2, float weights[2])
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)
bool RNA_enum_icon_from_value(const EnumPropertyItem *item, int value, int *r_icon)
int RNA_int_get(PointerRNA *ptr, const char *name)
struct BrushGpencilSettings * gpencil_settings
struct DrawInfo::@396::@400 texture
struct DrawInfo::@396::@397 vector
struct DrawInfo::@396::@398 geom
struct DrawInfo::@396::@399 buffer
union DrawInfo::@396 data
struct DrawInfo::@396::@401 input
const uchar * datatoc_rect
IconDrawCall drawcall_cache[ICON_DRAW_CACHE_SIZE]
struct GPUTexture * tex[2]
DrawInfoFreeFP drawinfo_free
short changed_timestamp[2]
int icon_id_matcap_flipped
float icon_border_intensity
uiWidgetColors wcol_toolbar_item
ThemeCollectionColor collection_color[8]
CCL_NAMESPACE_BEGIN ccl_device float invert(float color, float factor)
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
void WM_jobs_start(wmWindowManager *wm, wmJob *wm_job)
wmJob * WM_jobs_get(wmWindowManager *wm, wmWindow *win, void *owner, const char *name, int flag, int 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_kill_type(struct wmWindowManager *wm, void *owner, int job_type)
void WM_jobs_customdata_set(wmJob *wm_job, void *customdata, void(*free)(void *))
void WM_jobs_timer(wmJob *wm_job, double timestep, unsigned int note, unsigned int endnote)