diff options
Diffstat (limited to 'source/blender/editors/interface/interface_icons.c')
-rw-r--r-- | source/blender/editors/interface/interface_icons.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index 619fb18cd7a..086e9dad895 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -130,6 +130,7 @@ static IconTexture icongltex = {0, 0, 0, 0.0f, 0.0f}; /* **************************************************** */ +#ifndef WITH_HEADLESS static DrawInfo *def_internal_icon(ImBuf *bbuf, int icon_id, int xofs, int yofs, int size, int type) { @@ -469,6 +470,7 @@ static void vicon_move_down_draw(int x, int y, int w, int h, float UNUSED(alpha) } #ifndef WITH_HEADLESS + static void init_brush_icons(void) { @@ -531,7 +533,7 @@ static void icon_verify_datatoc(IconImage *iimg) iimg->datatoc_size, IB_rect, NULL, "<matcap icon>"); /* w and h were set on initialize */ if (bbuf->x != iimg->h && bbuf->y != iimg->w) - IMB_scalefastImBuf(bbuf, iimg->w, iimg->h); + IMB_scaleImBuf(bbuf, iimg->w, iimg->h); iimg->rect = bbuf->rect; bbuf->rect = NULL; @@ -548,7 +550,7 @@ static void init_matcap_icons(void) int size = datatoc_ ##name## _jpg_size; \ DrawInfo *di; \ \ - di = def_internal_icon(NULL, icon_id, 0, 0, 128, ICON_TYPE_BUFFER); \ + di = def_internal_icon(NULL, icon_id, 0, 0, 96, ICON_TYPE_BUFFER); \ di->data.buffer.image->datatoc_rect = rect; \ di->data.buffer.image->datatoc_size = size; \ } (void)0 @@ -569,6 +571,14 @@ static void init_matcap_icons(void) INIT_MATCAP_ICON(ICON_MATCAP_14, mc14); INIT_MATCAP_ICON(ICON_MATCAP_15, mc15); INIT_MATCAP_ICON(ICON_MATCAP_16, mc16); + INIT_MATCAP_ICON(ICON_MATCAP_17, mc17); + INIT_MATCAP_ICON(ICON_MATCAP_18, mc18); + INIT_MATCAP_ICON(ICON_MATCAP_19, mc19); + INIT_MATCAP_ICON(ICON_MATCAP_20, mc20); + INIT_MATCAP_ICON(ICON_MATCAP_21, mc21); + INIT_MATCAP_ICON(ICON_MATCAP_22, mc22); + INIT_MATCAP_ICON(ICON_MATCAP_23, mc23); + INIT_MATCAP_ICON(ICON_MATCAP_24, mc24); #undef INIT_MATCAP_ICON @@ -781,6 +791,8 @@ static void free_iconfile_list(struct ListBase *list) } } +#endif /* WITH_HEADLESS */ + int UI_iconfile_get_index(const char *filename) { IconFile *ifile; @@ -1134,9 +1146,9 @@ static void icon_draw_size(float x, float y, int icon_id, float aspect, float al else if (di->type == ICON_TYPE_BUFFER) { /* it is a builtin icon */ iimg = di->data.buffer.image; - +#ifndef WITH_HEADLESS icon_verify_datatoc(iimg); - +#endif if (!iimg->rect) return; /* something has gone wrong! */ glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); |