|
Blender
V2.93
|
#include "DNA_ID_enums.h"Go to the source code of this file.
Classes | |
| struct | IconFile |
Macros | |
| #define | ICON_DEFAULT_HEIGHT 16 |
| #define | ICON_DEFAULT_WIDTH 16 |
| #define | ICON_DEFAULT_HEIGHT_TOOLBAR 32 |
| #define | ICON_DEFAULT_HEIGHT_SCALE ((int)(UI_UNIT_Y * 0.8f)) |
| #define | ICON_DEFAULT_WIDTH_SCALE ((int)(UI_UNIT_X * 0.8f)) |
| #define | PREVIEW_DEFAULT_HEIGHT 128 |
Typedefs | |
| typedef struct IconFile | IconFile |
| typedef enum eAlertIcon | eAlertIcon |
Enumerations | |
| enum | eAlertIcon { ALERT_ICON_WARNING = 0 , ALERT_ICON_QUESTION = 1 , ALERT_ICON_ERROR = 2 , ALERT_ICON_INFO = 3 , ALERT_ICON_BLENDER = 4 , ALERT_ICON_MAX } |
Functions | |
| struct ImBuf * | UI_icon_alert_imbuf_get (eAlertIcon icon) |
| void | UI_icons_init (void) |
| void | UI_icons_reload_internal_textures (void) |
| int | UI_icon_get_width (int icon_id) |
| int | UI_icon_get_height (int icon_id) |
| bool | UI_icon_get_theme_color (int icon_id, unsigned char color[4]) |
| void | UI_icon_render_id (const struct bContext *C, struct Scene *scene, struct ID *id, const enum eIconSizes size, const bool use_job) |
| int | UI_icon_preview_to_render_size (enum eIconSizes size) |
| void | UI_icon_draw (float x, float y, int icon_id) |
| void | UI_icon_draw_alpha (float x, float y, int icon_id, float alpha) |
| void | UI_icon_draw_preview (float x, float y, int icon_id, float aspect, float alpha, int size) |
| 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) |
| void | UI_icons_free (void) |
| void | UI_icons_free_drawinfo (void *drawinfo) |
| void | UI_icon_draw_cache_begin (void) |
| void | UI_icon_draw_cache_end (void) |
| struct ListBase * | UI_iconfile_list (void) |
| int | UI_iconfile_get_index (const char *filename) |
| struct PreviewImage * | UI_icon_to_preview (int icon_id) |
| int | UI_icon_from_rnaptr (struct bContext *C, struct PointerRNA *ptr, int rnaicon, const bool big) |
| int | UI_icon_from_idcode (const int idcode) |
| int | UI_icon_from_library (const struct ID *id) |
| int | UI_icon_from_object_mode (const int mode) |
| int | UI_icon_color_from_collection (const struct Collection *collection) |
| #define ICON_DEFAULT_HEIGHT 16 |
Definition at line 46 of file UI_interface_icons.h.
| #define ICON_DEFAULT_HEIGHT_SCALE ((int)(UI_UNIT_Y * 0.8f)) |
Definition at line 51 of file UI_interface_icons.h.
| #define ICON_DEFAULT_HEIGHT_TOOLBAR 32 |
Definition at line 49 of file UI_interface_icons.h.
| #define ICON_DEFAULT_WIDTH 16 |
Definition at line 47 of file UI_interface_icons.h.
| #define ICON_DEFAULT_WIDTH_SCALE ((int)(UI_UNIT_X * 0.8f)) |
Definition at line 52 of file UI_interface_icons.h.
| #define PREVIEW_DEFAULT_HEIGHT 128 |
Definition at line 54 of file UI_interface_icons.h.
| typedef enum eAlertIcon eAlertIcon |
| enum eAlertIcon |
| Enumerator | |
|---|---|
| ALERT_ICON_WARNING | |
| ALERT_ICON_QUESTION | |
| ALERT_ICON_ERROR | |
| ALERT_ICON_INFO | |
| ALERT_ICON_BLENDER | |
| ALERT_ICON_MAX | |
Definition at line 56 of file UI_interface_icons.h.
| struct ImBuf* UI_icon_alert_imbuf_get | ( | eAlertIcon | icon | ) |
Definition at line 2427 of file interface_icons.c.
References ALERT_ICON_MAX, datatoc_alert_icons_png, datatoc_alert_icons_png_size, IB_rect, IMB_ibImageFromMemory(), IMB_premultiply_alpha(), IMB_rect_crop(), left, MIN2, and NULL.
Referenced by uiDefButAlert().
| int UI_icon_color_from_collection | ( | const struct Collection * | collection | ) |
Definition at line 2388 of file interface_icons.c.
References NULL, UI_icon_draw_ex(), x, and y.
Referenced by ANIM_channel_draw(), draw_marker(), drawAutoKeyWarning(), file_draw_invalid_library_hint(), ui_searchbox_region_draw_cb(), and ui_searchbox_region_draw_cb__operator().
Definition at line 2393 of file interface_icons.c.
References alpha, NULL, UI_icon_draw_ex(), x, and y.
Referenced by button2d_draw_intern(), and outliner_draw_tree_element().
| void UI_icon_draw_cache_begin | ( | void | ) |
Definition at line 1577 of file interface_icons.c.
References BLI_assert, and g_icon_draw_cache.
Referenced by UI_block_draw().
| void UI_icon_draw_cache_end | ( | void | ) |
Definition at line 1638 of file interface_icons.c.
References BLI_assert, g_icon_draw_cache, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, and icon_draw_cache_flush_ex().
Referenced by UI_block_draw().
| 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 | ||
| ) |
Definition at line 2403 of file interface_icons.c.
References alpha, get_draw_size(), icon_draw_size(), ICON_SIZE_ICON, x, and y.
Referenced by area_draw_azone_fullscreen(), file_draw_preview(), panel_draw_aligned_widgets(), textview_draw_string(), tselem_draw_icon(), ui_draw_menu_item(), UI_icon_draw(), UI_icon_draw_alpha(), vicon_collection_color_draw(), widget_draw_icon(), and wm_drags_draw().
Definition at line 2398 of file interface_icons.c.
References alpha, icon_draw_size(), ICON_SIZE_PREVIEW, NULL, size(), x, and y.
Referenced by widget_draw_preview().
| int UI_icon_from_idcode | ( | const int | idcode | ) |
Definition at line 2261 of file interface_icons.c.
References ID_AC, ID_AR, ID_BR, ID_CA, ID_CF, ID_CU, ID_GD, ID_GR, ID_HA, ID_IM, ID_IP, ID_KE, ID_LA, ID_LI, ID_LP, ID_LS, ID_LT, ID_MA, ID_MB, ID_MC, ID_ME, ID_MSK, ID_NT, ID_OB, ID_PA, ID_PAL, ID_PC, ID_PT, ID_SCE, ID_SCR, ID_SIM, ID_SO, ID_SPK, ID_TE, ID_TXT, ID_VF, ID_VO, ID_WM, ID_WO, and ID_WS.
Referenced by filelist_geticon_ex().
| int UI_icon_from_library | ( | const struct ID * | id | ) |
Referenced by add_collection_search_item(), id_search_add(), and outliner_draw_tree_element().
| int UI_icon_from_object_mode | ( | const int | mode | ) |
Definition at line 2347 of file interface_icons.c.
References OB_MODE_EDIT, OB_MODE_EDIT_GPENCIL, OB_MODE_OBJECT, OB_MODE_PAINT_GPENCIL, OB_MODE_PARTICLE_EDIT, OB_MODE_POSE, OB_MODE_SCULPT, OB_MODE_SCULPT_GPENCIL, OB_MODE_TEXTURE_PAINT, OB_MODE_VERTEX_GPENCIL, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_GPENCIL, and OB_MODE_WEIGHT_PAINT.
Referenced by outliner_draw_mode_column_toggle().
| int UI_icon_from_rnaptr | ( | struct bContext * | C, |
| struct PointerRNA * | ptr, | ||
| int | rnaicon, | ||
| const bool | big | ||
| ) |
Definition at line 2204 of file interface_icons.c.
References C, PointerRNA::data, StudioLight::flag, StudioLight::icon_id_irradiance, StudioLight::icon_id_matcap, StudioLight::icon_id_radiance, MOD_DPAINT_SURFACE_F_IMAGESEQ, MOD_DPAINT_SURFACE_F_PTEX, MOD_DPAINT_SURFACE_F_VERTEX, NULL, PointerRNA::owner_id, ptr, RNA_DynamicPaintSurface, RNA_FileBrowserFSMenuEntry, RNA_int_get(), RNA_MaterialSlot, RNA_pointer_get(), RNA_struct_is_a(), RNA_struct_is_ID(), RNA_StudioLight, RNA_TextureSlot, STUDIOLIGHT_FLAG_ORIENTATIONS, STUDIOLIGHT_TYPE_MATCAP, STUDIOLIGHT_TYPE_STUDIO, STUDIOLIGHT_TYPE_WORLD, surface, PointerRNA::type, and ui_id_icon_get().
Referenced by uiTemplateList().
| int UI_icon_get_height | ( | int | icon_id | ) |
Definition at line 1203 of file interface_icons.c.
References BKE_icon_get(), G, G_DEBUG, ICON_DEFAULT_HEIGHT, icon_ensure_drawinfo(), and NULL.
| bool UI_icon_get_theme_color | ( | int | icon_id, |
| unsigned char | color[4] | ||
| ) |
Definition at line 1221 of file interface_icons.c.
References BKE_icon_get(), DrawInfo::data, icon_ensure_drawinfo(), NULL, DrawInfo::texture, and UI_GetIconThemeColor4ubv().
Referenced by tselem_draw_icon(), and widget_draw_icon().
| int UI_icon_get_width | ( | int | icon_id | ) |
Definition at line 1184 of file interface_icons.c.
References BKE_icon_get(), G, G_DEBUG, ICON_DEFAULT_WIDTH, icon_ensure_drawinfo(), and NULL.
| int UI_icon_preview_to_render_size | ( | enum eIconSizes | size | ) |
Definition at line 1245 of file interface_icons.c.
References ICON_RENDER_DEFAULT_HEIGHT, ICON_SIZE_ICON, ICON_SIZE_PREVIEW, PREVIEW_RENDER_DEFAULT_HEIGHT, and size().
Referenced by bpy_app_preview_render_size_get(), and icon_create_rect().
| void UI_icon_render_id | ( | const struct bContext * | C, |
| struct Scene * | scene, | ||
| struct ID * | id, | ||
| const enum eIconSizes | size, | ||
| const bool | use_job | ||
| ) |
Referenced by ED_asset_mark_id(), lib_id_generate_preview_exec(), and previews_id_ensure().
| struct PreviewImage* UI_icon_to_preview | ( | int | icon_id | ) |
Definition at line 1435 of file interface_icons.c.
References BKE_icon_get(), BKE_previewimg_copy(), BKE_previewimg_create(), BKE_previewimg_id_ensure(), DrawInfo::buffer, DrawInfo::data, Icon::drawinfo, PreviewImage::h, IB_rect, ICON_TYPE_PREVIEW, Icon::id_type, if(), IMB_freeImBuf(), IMB_ibImageFromMemory(), NULL, Icon::obj, ImBuf::rect, PreviewImage::rect, DrawInfo::type, PreviewImage::w, ImBuf::x, and ImBuf::y.
| int UI_iconfile_get_index | ( | const char * | filename | ) |
Definition at line 1086 of file interface_icons.c.
References BLI_path_cmp, IconFile::filename, ListBase::first, iconfilelist, IconFile::index, and IconFile::next.
| struct ListBase* UI_iconfile_list | ( | void | ) |
Definition at line 1100 of file interface_icons.c.
References iconfilelist.
| void UI_icons_free | ( | void | ) |
Definition at line 1107 of file interface_icons.c.
References BKE_icons_free(), free_iconfile_list(), free_icons_textures(), and iconfilelist.
Referenced by ui_resources_free().
| void UI_icons_free_drawinfo | ( | void * | drawinfo | ) |
Definition at line 1116 of file interface_icons.c.
References DrawInfo::buffer, DrawInfo::data, DrawInfo::geom, ICON_TYPE_BUFFER, ICON_TYPE_GEOM, IMB_freeImBuf(), MEM_freeN, NULL, and DrawInfo::type.
Referenced by def_internal_icon(), and icon_ensure_drawinfo().
| void UI_icons_init | ( | void | ) |
Definition at line 1232 of file interface_icons.c.
References iconfilelist, init_brush_icons(), init_event_icons(), init_iconfile_list(), init_internal_icons(), and UI_icons_reload_internal_textures().
Referenced by ui_resources_init().
| void UI_icons_reload_internal_textures | ( | void | ) |
Definition at line 841 of file interface_icons.c.
References create_mono_icon_with_border(), datatoc_blender_icons16_png, datatoc_blender_icons16_png_size, datatoc_blender_icons32_png, datatoc_blender_icons32_png_size, free_icons_textures(), GPU_DATA_UBYTE, GPU_RGBA8, GPU_texture_create_2d(), GPU_texture_update_mipmap(), IconTexture::h, IB_rect, ThemeUI::icon_border_intensity, icongltex, IMB_freeImBuf(), IMB_ibImageFromMemory(), IMB_premultiply_alpha(), IconTexture::invh, IconTexture::invw, NULL, IconTexture::num_textures, ImBuf::rect, IconTexture::tex, bTheme::tui, UI_GetTheme(), and IconTexture::w.
Referenced by UI_icons_init().