Blender
V3.3
|
#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 } |
#define ICON_DEFAULT_HEIGHT 16 |
Definition at line 30 of file UI_interface_icons.h.
Definition at line 35 of file UI_interface_icons.h.
#define ICON_DEFAULT_HEIGHT_TOOLBAR 32 |
Definition at line 33 of file UI_interface_icons.h.
#define ICON_DEFAULT_WIDTH 16 |
Definition at line 31 of file UI_interface_icons.h.
Definition at line 36 of file UI_interface_icons.h.
#define PREVIEW_DEFAULT_HEIGHT 128 |
Definition at line 38 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 40 of file UI_interface_icons.h.
struct ImBuf* UI_icon_alert_imbuf_get | ( | eAlertIcon | icon | ) |
Definition at line 2465 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, NULL, and UNUSED_VARS.
Referenced by uiDefButAlert().
int UI_icon_color_from_collection | ( | const struct Collection * | collection | ) |
Draws icon with DPI scale factor.
Definition at line 2426 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_asset_library_hint(), file_draw_invalid_library_hint(), ui_searchbox_region_draw_cb__operator(), and ui_searchbox_region_draw_fn().
Definition at line 2431 of file interface_icons.c.
References NULL, UI_icon_draw_ex(), x, and y.
Referenced by button2d_draw_intern(), and outliner_draw_tree_element().
Definition at line 1585 of file interface_icons.c.
References BLI_assert, and g_icon_draw_cache.
Referenced by UI_block_draw().
Definition at line 1649 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], | ||
bool | mono_border | ||
) |
Definition at line 2441 of file interface_icons.c.
References get_draw_size(), icon_draw_size(), ICON_SIZE_ICON, x, and y.
Referenced by area_draw_azone_fullscreen(), blender::ed::space_node::draw_draglink_tooltip(), 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(), vicon_strip_color_draw(), vicon_strip_color_draw_library_data_indirect(), vicon_strip_color_draw_library_data_override_noneditable(), widget_draw_icon(), and wm_drag_draw_icon().
Definition at line 2436 of file interface_icons.c.
References icon_draw_size(), ICON_SIZE_PREVIEW, NULL, size(), x, and y.
Referenced by widget_draw_preview().
int UI_icon_from_idcode | ( | int | idcode | ) |
Definition at line 2299 of file interface_icons.c.
References ID_AC, ID_AR, ID_BR, ID_CA, ID_CF, ID_CU_LEGACY, ID_CV, ID_GD, ID_GR, 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 | ( | int | mode | ) |
Definition at line 2385 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_CURVES, 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 | ( | const struct bContext * | C, |
struct PointerRNA * | ptr, | ||
int | rnaicon, | ||
bool | big | ||
) |
Referenced by ui_template_list_layout_draw().
int UI_icon_get_height | ( | int | icon_id | ) |
Definition at line 1220 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 1238 of file interface_icons.c.
References BKE_icon_get(), color, 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 | ) |
NOTE: returns unscaled by DPI.
Definition at line 1201 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 | ) |
Render size for preview images and icons
Definition at line 1260 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, | ||
enum eIconSizes | size, | ||
bool | use_job | ||
) |
Render a PreviewImage for the data block.
Note that if an ID doesn't support jobs for preview creation, use_job will be ignored.
Referenced by ED_asset_generate_preview(), ED_preview_restart_queue_work(), lib_id_generate_preview_exec(), and previews_id_ensure().
void UI_icon_render_id_ex | ( | const struct bContext * | C, |
struct Scene * | scene, | ||
struct ID * | id_to_render, | ||
const enum eIconSizes | size, | ||
const bool | use_job, | ||
struct PreviewImage * | r_preview_image | ||
) |
Render the data block into the provided PreviewImage.
Referenced by lib_id_generate_preview_from_object_exec().
struct PreviewImage* UI_icon_to_preview | ( | int | icon_id | ) |
Definition at line 1449 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 1104 of file interface_icons.c.
References BLI_path_cmp, IconFile::filename, ListBase::first, iconfilelist, IconFile::index, and IconFile::next.
Definition at line 1118 of file interface_icons.c.
References iconfilelist.
Definition at line 1125 of file interface_icons.c.
References BKE_icons_free(), free_iconfile_list(), free_icons_textures(), and iconfilelist.
Referenced by ui_resources_free().
Definition at line 1134 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().
Resizable Icons for Blender
Definition at line 1249 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().
Reload the textures for internal icons. This function will release the previous textures.
Definition at line 847 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(), and wm_userpref_read_exec().