|
Blender V4.3
|
#include "MEM_guardedalloc.h"#include "GPU_immediate.hh"#include "BLF_api.hh"#include "BLI_blenlib.h"#include "DNA_collection_types.h"#include "DNA_dynamicpaint_types.h"#include "DNA_gpencil_legacy_types.h"#include "DNA_grease_pencil_types.h"#include "DNA_screen_types.h"#include "DNA_sequence_types.h"#include "DNA_space_types.h"#include "RNA_access.hh"#include "RNA_prototypes.hh"#include "BKE_context.hh"#include "BKE_global.hh"#include "BKE_icons.h"#include "BKE_paint.hh"#include "BKE_preview_image.hh"#include "BKE_studiolight.h"#include "IMB_imbuf.hh"#include "IMB_thumbs.hh"#include "BIF_glutil.hh"#include "ED_datafiles.h"#include "ED_keyframes_draw.hh"#include "ED_keyframes_keylist.hh"#include "ED_render.hh"#include "UI_interface.hh"#include "UI_interface_icons.hh"#include "WM_api.hh"#include "interface_intern.hh"#include "fmt/format.h"#include "UI_icons.hh"Go to the source code of this file.
Classes | |
| struct | IconImage |
| struct | DrawInfo |
| struct | IconType |
Typedefs | |
| using | VectorDrawFunc = void (*)(int x, int y, int w, int h, float alpha) |
Variables | |
| static const IconType | icontypes [] |
| static DrawInfo * | g_di_event_list = nullptr |
| #define DEF_ICON | ( | name | ) | {ICON_TYPE_SVG_MONO, 0}, |
| #define DEF_ICON_BLANK | ( | name | ) | {ICON_TYPE_BLANK, 0}, |
| #define DEF_ICON_COLLECTION | ( | name | ) | {ICON_TYPE_SVG_MONO, TH_ICON_COLLECTION}, |
| #define DEF_ICON_COLLECTION_COLOR_DRAW | ( | index, | |
| color ) |
Definition at line 397 of file interface_icons.cc.
| #define DEF_ICON_COLOR | ( | name | ) | {ICON_TYPE_SVG_COLOR, 0}, |
| #define DEF_ICON_FOLDER | ( | name | ) | {ICON_TYPE_SVG_MONO, TH_ICON_FOLDER}, |
| #define DEF_ICON_FUND | ( | name | ) | {ICON_TYPE_SVG_MONO, TH_ICON_FUND}, |
| #define DEF_ICON_LAYERGROUP_COLOR_DRAW | ( | index, | |
| color ) |
Definition at line 504 of file interface_icons.cc.
| #define DEF_ICON_MODIFIER | ( | name | ) | {ICON_TYPE_SVG_MONO, TH_ICON_MODIFIER}, |
| #define DEF_ICON_OBJECT | ( | name | ) | {ICON_TYPE_SVG_MONO, TH_ICON_OBJECT}, |
| #define DEF_ICON_OBJECT_DATA | ( | name | ) | {ICON_TYPE_SVG_MONO, TH_ICON_OBJECT_DATA}, |
| #define DEF_ICON_SCENE | ( | name | ) | {ICON_TYPE_SVG_MONO, TH_ICON_SCENE}, |
| #define DEF_ICON_SHADING | ( | name | ) | {ICON_TYPE_SVG_MONO, TH_ICON_SHADING}, |
| #define DEF_ICON_STRIP_COLOR_DRAW | ( | index, | |
| color ) |
Definition at line 433 of file interface_icons.cc.
| #define DEF_ICON_VECTOR | ( | name | ) | {ICON_TYPE_VECTOR, 0}, |
| #define DEF_ICON_VECTOR_COLORSET_DRAW_NTH | ( | prefix, | |
| index ) |
Definition at line 349 of file interface_icons.cc.
| #define ICON_INDIRECT_DATA_ALPHA 0.6f |
Definition at line 451 of file interface_icons.cc.
Referenced by vicon_strip_color_draw_library_data_indirect(), and vicon_strip_color_draw_library_data_override_noneditable().
| #define ICON_TYPE_BLANK 9 |
Definition at line 73 of file interface_icons.cc.
| #define ICON_TYPE_BUFFER 3 |
Definition at line 67 of file interface_icons.cc.
Referenced by def_internal_icon(), icon_create_drawinfo(), icon_draw_size(), ui_icon_ensure_deferred(), and UI_icons_free_drawinfo().
| #define ICON_TYPE_EVENT 7 /* draw keymap entries using custom renderer. */ |
Definition at line 71 of file interface_icons.cc.
Referenced by icon_draw_size().
| #define ICON_TYPE_GEOM 6 |
Definition at line 70 of file interface_icons.cc.
Referenced by icon_create_drawinfo(), icon_draw_size(), and UI_icons_free_drawinfo().
| #define ICON_TYPE_GPLAYER 8 |
Definition at line 72 of file interface_icons.cc.
Referenced by icon_create_drawinfo(), and icon_draw_size().
| #define ICON_TYPE_IMBUF 4 |
Definition at line 68 of file interface_icons.cc.
Referenced by icon_create_drawinfo(), and icon_draw_size().
| #define ICON_TYPE_PREVIEW 0 |
Definition at line 64 of file interface_icons.cc.
Referenced by icon_create_drawinfo(), icon_draw_size(), ui_icon_ensure_deferred(), and UI_icon_to_preview().
| #define ICON_TYPE_SVG_COLOR 1 |
Definition at line 65 of file interface_icons.cc.
Referenced by icon_draw_size(), and init_internal_icons().
| #define ICON_TYPE_SVG_MONO 2 |
Definition at line 66 of file interface_icons.cc.
Referenced by def_internal_icon(), icon_draw_size(), and init_internal_icons().
| #define ICON_TYPE_VECTOR 5 |
Definition at line 69 of file interface_icons.cc.
Referenced by def_internal_vicon(), and icon_draw_size().
| #define INIT_EVENT_ICON | ( | icon_id, | |
| type, | |||
| value ) |
Referenced by init_event_icons().
Definition at line 62 of file interface_icons.cc.
| DEF_ICON_COLLECTION_COLOR_DRAW | ( | 01 | , |
| COLLECTION_COLOR_01 | ) |
| DEF_ICON_COLLECTION_COLOR_DRAW | ( | 02 | , |
| COLLECTION_COLOR_02 | ) |
| DEF_ICON_COLLECTION_COLOR_DRAW | ( | 03 | , |
| COLLECTION_COLOR_03 | ) |
| DEF_ICON_COLLECTION_COLOR_DRAW | ( | 04 | , |
| COLLECTION_COLOR_04 | ) |
| DEF_ICON_COLLECTION_COLOR_DRAW | ( | 05 | , |
| COLLECTION_COLOR_05 | ) |
| DEF_ICON_COLLECTION_COLOR_DRAW | ( | 06 | , |
| COLLECTION_COLOR_06 | ) |
| DEF_ICON_COLLECTION_COLOR_DRAW | ( | 07 | , |
| COLLECTION_COLOR_07 | ) |
| DEF_ICON_COLLECTION_COLOR_DRAW | ( | 08 | , |
| COLLECTION_COLOR_08 | ) |
| DEF_ICON_LAYERGROUP_COLOR_DRAW | ( | 01 | , |
| LAYERGROUP_COLOR_01 | ) |
| DEF_ICON_LAYERGROUP_COLOR_DRAW | ( | 02 | , |
| LAYERGROUP_COLOR_02 | ) |
| DEF_ICON_LAYERGROUP_COLOR_DRAW | ( | 03 | , |
| LAYERGROUP_COLOR_03 | ) |
| DEF_ICON_LAYERGROUP_COLOR_DRAW | ( | 04 | , |
| LAYERGROUP_COLOR_04 | ) |
| DEF_ICON_LAYERGROUP_COLOR_DRAW | ( | 05 | , |
| LAYERGROUP_COLOR_05 | ) |
| DEF_ICON_LAYERGROUP_COLOR_DRAW | ( | 06 | , |
| LAYERGROUP_COLOR_06 | ) |
| DEF_ICON_LAYERGROUP_COLOR_DRAW | ( | 07 | , |
| LAYERGROUP_COLOR_07 | ) |
| DEF_ICON_LAYERGROUP_COLOR_DRAW | ( | 08 | , |
| LAYERGROUP_COLOR_08 | ) |
| DEF_ICON_STRIP_COLOR_DRAW | ( | 01 | , |
| SEQUENCE_COLOR_01 | ) |
| DEF_ICON_STRIP_COLOR_DRAW | ( | 02 | , |
| SEQUENCE_COLOR_02 | ) |
| DEF_ICON_STRIP_COLOR_DRAW | ( | 03 | , |
| SEQUENCE_COLOR_03 | ) |
| DEF_ICON_STRIP_COLOR_DRAW | ( | 04 | , |
| SEQUENCE_COLOR_04 | ) |
| DEF_ICON_STRIP_COLOR_DRAW | ( | 05 | , |
| SEQUENCE_COLOR_05 | ) |
| DEF_ICON_STRIP_COLOR_DRAW | ( | 06 | , |
| SEQUENCE_COLOR_06 | ) |
| DEF_ICON_STRIP_COLOR_DRAW | ( | 07 | , |
| SEQUENCE_COLOR_07 | ) |
| DEF_ICON_STRIP_COLOR_DRAW | ( | 08 | , |
| SEQUENCE_COLOR_08 | ) |
| DEF_ICON_STRIP_COLOR_DRAW | ( | 09 | , |
| SEQUENCE_COLOR_09 | ) |
|
static |
Definition at line 129 of file interface_icons.cc.
References BKE_icon_set(), DrawInfo::buffer, ImBuf::byte_buffer, DrawInfo::data, ImBufByteBuffer::data, Icon::drawinfo, Icon::drawinfo_free, IconImage::h, ICON_TYPE_BUFFER, ICON_TYPE_SVG_MONO, Icon::id_type, DrawInfo::image, MEM_mallocN, Icon::obj, IconImage::rect, size(), DrawInfo::texture, DrawInfo::theme_color, DrawInfo::type, UI_icons_free_drawinfo(), IconImage::w, ImBuf::x, ImBuf::y, and y.
Referenced by init_internal_icons().
|
static |
Definition at line 179 of file interface_icons.cc.
References BKE_icon_set(), DrawInfo::data, Icon::drawinfo, Icon::drawinfo_free, DrawInfo::func, ICON_TYPE_VECTOR, Icon::id_type, Icon::obj, DrawInfo::type, and DrawInfo::vector.
Referenced by init_internal_icons().
|
static |
Definition at line 1288 of file interface_icons.cc.
References ICON_DEFAULT_HEIGHT, ICON_SIZE_ICON, ICON_SIZE_PREVIEW, and PREVIEW_DEFAULT_HEIGHT.
Referenced by UI_icon_draw_ex().
#Icon.data_type and Icon.obj
Definition at line 926 of file interface_icons.cc.
References BLI_assert, ELEM, ICON_DATA_GEOM, ICON_DATA_GPLAYER, ICON_DATA_ID, ICON_DATA_IMBUF, ICON_DATA_PREVIEW, ICON_DATA_STUDIOLIGHT, ICON_TYPE_BUFFER, ICON_TYPE_GEOM, ICON_TYPE_GPLAYER, ICON_TYPE_IMBUF, ICON_TYPE_PREVIEW, Icon::obj_type, and DrawInfo::type.
Referenced by icon_ensure_drawinfo().
|
static |
Definition at line 998 of file interface_icons.cc.
References PreviewImage::changed_timestamp, PreviewImage::flag, G, G_DEBUG, PreviewImage::h, MEM_callocN, printf, PRV_CHANGED, PreviewImage::rect, size(), UI_icon_preview_to_render_size(), and PreviewImage::w.
Referenced by icon_set_image().
|
static |
Definition at line 1224 of file interface_icons.cc.
References BLI_assert_msg, col, float, GPU_RGBA8, GPU_SHADER_2D_IMAGE_DESATURATE_COLOR, GPU_SHADER_3D_IMAGE_COLOR, immDrawPixelsTexScaledFullSize(), immDrawPixelsTexSetup(), immUniform1f(), int, printf, round_fl_to_int(), state, w(), and x.
Referenced by icon_draw_size().
|
static |
Definition at line 1450 of file interface_icons.cc.
References BKE_icon_geom_invert_lightness(), BKE_icon_geom_rasterize(), BKE_icon_get(), BKE_previewimg_id_ensure(), BLF_draw_svg_icon(), BLI_assert, DrawInfo::buffer, ImBuf::byte_buffer, IconTextOverlay::color, copy_v4_v4_uchar(), DrawInfo::data, ImBufByteBuffer::data, ELEM, float, DrawInfo::func, G, G_DEBUG, DrawInfo::geom, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_ALPHA_PREMULT, IconImage::h, ThemeUI::icon_alpha, ThemeUI::icon_border_intensity, ICON_DEFAULT_HEIGHT, ICON_DEFAULT_HEIGHT_TOOLBAR, icon_draw_rect(), icon_draw_rect_input(), icon_ensure_drawinfo(), icon_source_edit_cb(), ICON_TYPE_BUFFER, ICON_TYPE_EVENT, ICON_TYPE_GEOM, ICON_TYPE_GPLAYER, ICON_TYPE_IMBUF, ICON_TYPE_PREVIEW, ICON_TYPE_SVG_COLOR, ICON_TYPE_SVG_MONO, ICON_TYPE_VECTOR, icon_verify_datatoc(), Icon::id_type, DrawInfo::image, DrawInfo::image_cache, IMB_freeImBuf(), uiWidgetColors::inner, int, invert(), DrawInfo::inverted, is_light(), None, Icon::obj, Outline, params, uiFontStyle::points, printf, IconImage::rect, rgb_to_grayscale_byte(), rgba_uchar_to_float(), uiFontStyle::shadow, uiFontStyle::shadx, uiFontStyle::shady, IconTextOverlay::text, TH_TEXT, bTheme::tui, DrawInfo::type, UI_fontstyle_draw(), UI_FSTYLE_WIDGET, UI_GetTheme(), UI_GetThemeColor4fv(), UI_GetThemeColor4ubv(), UI_ICON_SIZE, UI_STYLE_TEXT_RIGHT, UI_UNIT_X, UI_widgetbase_draw_cache_flush(), DrawInfo::vector, vicon_gplayer_color_draw(), IconImage::w, w(), ThemeUI::wcol_toolbar_item, ImBuf::x, and ImBuf::y.
Referenced by UI_icon_draw_ex(), and UI_icon_draw_preview().
Definition at line 954 of file interface_icons.cc.
References Icon::drawinfo, Icon::drawinfo_free, icon_create_drawinfo(), and UI_icons_free_drawinfo().
Referenced by icon_draw_size(), ui_icon_ensure_deferred(), UI_icon_get_theme_color(), and ui_studiolight_icon_job_exec().
|
static |
Note that if an ID doesn't support jobs for preview creation, use_job will be ignored.
Definition at line 1142 of file interface_icons.cc.
References BKE_previewimg_id_supports_jobs(), CTX_data_scene(), ED_preview_icon_job(), ED_preview_icon_render(), PreviewImage::flag, G, G_DEBUG, icon_create_rect(), printf, PRV_USER_EDITED, PreviewImage::rect, and size().
Referenced by ui_id_preview_image_render_size().
|
static |
Definition at line 1410 of file interface_icons.cc.
References blender::StringRefBase::find(), id_name(), blender::StringRefBase::size(), and svg_replace_color_attributes().
Referenced by icon_draw_size(), and UI_svg_icon_bitmap().
|
static |
Definition at line 790 of file interface_icons.cc.
References Box, IconImage::datatoc_rect, IconImage::datatoc_size, IconImage::h, IB_rect, IMB_freeImBuf(), IMB_ibImageFromMemory(), IMB_scale(), IMB_steal_byte_buffer(), IconImage::rect, IconImage::w, ImBuf::x, and ImBuf::y.
Referenced by icon_draw_size().
|
static |
Definition at line 600 of file interface_icons.cc.
References BUTTON4MOUSE, BUTTON5MOUSE, BUTTON6MOUSE, BUTTON7MOUSE, EVT_ACCENTGRAVEKEY, EVT_AKEY, EVT_APPKEY, EVT_BACKSLASHKEY, EVT_BACKSPACEKEY, EVT_BKEY, EVT_CAPSLOCKKEY, EVT_CKEY, EVT_COMMAKEY, EVT_DELKEY, EVT_DKEY, EVT_DOWNARROWKEY, EVT_EIGHTKEY, EVT_EKEY, EVT_ENDKEY, EVT_EQUALKEY, EVT_ESCKEY, EVT_F10KEY, EVT_F11KEY, EVT_F12KEY, EVT_F13KEY, EVT_F14KEY, EVT_F15KEY, EVT_F16KEY, EVT_F17KEY, EVT_F18KEY, EVT_F19KEY, EVT_F1KEY, EVT_F20KEY, EVT_F21KEY, EVT_F22KEY, EVT_F23KEY, EVT_F24KEY, EVT_F2KEY, EVT_F3KEY, EVT_F4KEY, EVT_F5KEY, EVT_F6KEY, EVT_F7KEY, EVT_F8KEY, EVT_F9KEY, EVT_FIVEKEY, EVT_FKEY, EVT_FOURKEY, EVT_GKEY, EVT_GRLESSKEY, EVT_HKEY, EVT_HOMEKEY, EVT_IKEY, EVT_INSERTKEY, EVT_JKEY, EVT_KKEY, EVT_LEFTALTKEY, EVT_LEFTARROWKEY, EVT_LEFTBRACKETKEY, EVT_LEFTCTRLKEY, EVT_LEFTSHIFTKEY, EVT_LKEY, EVT_MEDIAFIRST, EVT_MEDIALAST, EVT_MEDIAPLAY, EVT_MEDIASTOP, EVT_MINUSKEY, EVT_MKEY, EVT_NINEKEY, EVT_NKEY, EVT_OKEY, EVT_ONEKEY, EVT_OSKEY, EVT_PAD0, EVT_PAD1, EVT_PAD2, EVT_PAD3, EVT_PAD4, EVT_PAD5, EVT_PAD6, EVT_PAD7, EVT_PAD8, EVT_PAD9, EVT_PADASTERKEY, EVT_PADENTER, EVT_PADMINUS, EVT_PADPERIOD, EVT_PADPLUSKEY, EVT_PADSLASHKEY, EVT_PAGEDOWNKEY, EVT_PAGEUPKEY, EVT_PAUSEKEY, EVT_PERIODKEY, EVT_PKEY, EVT_PLUSKEY, EVT_QKEY, EVT_QUOTEKEY, EVT_RETKEY, EVT_RIGHTARROWKEY, EVT_RIGHTBRACKETKEY, EVT_RKEY, EVT_SEMICOLONKEY, EVT_SEVENKEY, EVT_SIXKEY, EVT_SKEY, EVT_SLASHKEY, EVT_SPACEKEY, EVT_TABKEY, EVT_THREEKEY, EVT_TKEY, EVT_TWOKEY, EVT_UKEY, EVT_UNKNOWNKEY, EVT_UPARROWKEY, EVT_VKEY, EVT_WKEY, EVT_XKEY, EVT_YKEY, EVT_ZEROKEY, EVT_ZKEY, g_di_event_list, INIT_EVENT_ICON, KM_ANY, NDOF_BUTTON_1, NDOF_BUTTON_10, NDOF_BUTTON_11, NDOF_BUTTON_12, NDOF_BUTTON_2, NDOF_BUTTON_3, NDOF_BUTTON_4, NDOF_BUTTON_5, NDOF_BUTTON_6, NDOF_BUTTON_7, NDOF_BUTTON_8, NDOF_BUTTON_9, NDOF_BUTTON_BACK, NDOF_BUTTON_BOTTOM, NDOF_BUTTON_DOMINANT, NDOF_BUTTON_FIT, NDOF_BUTTON_FRONT, NDOF_BUTTON_ISO1, NDOF_BUTTON_ISO2, NDOF_BUTTON_LEFT, NDOF_BUTTON_MENU, NDOF_BUTTON_MINUS, NDOF_BUTTON_PANZOOM, NDOF_BUTTON_PLUS, NDOF_BUTTON_RIGHT, NDOF_BUTTON_ROLL_CCW, NDOF_BUTTON_ROLL_CW, NDOF_BUTTON_ROTATE, NDOF_BUTTON_SAVE_V1, NDOF_BUTTON_SAVE_V2, NDOF_BUTTON_SAVE_V3, NDOF_BUTTON_SPIN_CCW, NDOF_BUTTON_SPIN_CW, NDOF_BUTTON_TILT_CCW, NDOF_BUTTON_TILT_CW, NDOF_BUTTON_TOP, NDOF_BUTTON_V1, NDOF_BUTTON_V2, NDOF_BUTTON_V3, TABLET_ERASER, TABLET_STYLUS, and w().
Referenced by UI_icons_init().
|
static |
Definition at line 810 of file interface_icons.cc.
References def_internal_icon(), def_internal_vicon(), ELEM, ICON_TYPE_SVG_COLOR, ICON_TYPE_SVG_MONO, icontypes, IconType::theme_color, IconType::type, vicon_handletype_aligned_draw(), vicon_handletype_auto_clamp_draw(), vicon_handletype_auto_draw(), vicon_handletype_free_draw(), vicon_handletype_vector_draw(), vicon_keytype_breakdown_draw(), vicon_keytype_extreme_draw(), vicon_keytype_generated_draw(), vicon_keytype_jitter_draw(), vicon_keytype_keyframe_draw(), vicon_keytype_moving_hold_draw(), vicon_strip_color_draw_library_data_indirect(), vicon_strip_color_draw_library_data_override_noneditable(), and x.
Referenced by UI_icons_init().
|
static |
Definition at line 1300 of file interface_icons.cc.
References col, blender::StringRefBase::find(), uiWidgetColors::inner, blender::StringRefBase::size(), SPACE_INFO, SPACE_TYPE_ANY, bTheme::space_view3d, TH_BACK, TH_ICON_AUTOKEY, TH_ICON_COLLECTION, TH_ICON_FOLDER, TH_ICON_FUND, TH_ICON_MODIFIER, TH_ICON_OBJECT, TH_ICON_OBJECT_DATA, TH_ICON_SCENE, TH_ICON_SHADING, TH_INFO_ERROR, TH_INFO_INFO, TH_INFO_WARNING, TH_REDALERT, TH_TEXT, TH_TEXT_HI, TH_UNDEFINED, bTheme::tui, UI_GetTheme(), UI_GetThemeColor4ubv(), UI_GetThemeColorType4ubv(), ThemeSpace::vertex_select, and ThemeUI::wcol_regular.
Referenced by icon_source_edit_cb().
| ImBuf * UI_icon_alert_imbuf_get | ( | eAlertIcon | icon, |
| float | size ) |
Definition at line 2054 of file interface_icons.cc.
References ALERT_ICON_ERROR, ALERT_ICON_INFO, ALERT_ICON_QUESTION, ALERT_ICON_WARNING, UI_svg_icon_bitmap(), and UNUSED_VARS.
Referenced by uiDefButAlert().
| int UI_icon_color_from_collection | ( | const Collection * | collection | ) |
Definition at line 1945 of file interface_icons.cc.
References COLLECTION_COLOR_NONE.
Referenced by blender::ed::object::collection_object_active_itemf(), blender::ed::object::move_to_collection_menu_create(), blender::ed::object::move_to_collection_menus_items(), rna_id_itemf(), and ui_id_icon_get().
Draws icon with DPI scale factor.
Definition at line 1956 of file interface_icons.cc.
References UI_icon_draw_ex(), UI_INV_SCALE_FAC, and UI_NO_ICON_OVERLAY_TEXT.
Referenced by ANIM_channel_draw(), ANIM_channel_draw_widgets(), 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 1962 of file interface_icons.cc.
References UI_icon_draw_ex(), UI_INV_SCALE_FAC, and UI_NO_ICON_OVERLAY_TEXT.
Referenced by button2d_draw_intern(), and blender::ed::outliner::outliner_draw_tree_element().
| 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 ) |
Definition at line 1983 of file interface_icons.cc.
References get_draw_size(), icon_draw_size(), and ICON_SIZE_ICON.
Referenced by area_draw_azone_fullscreen(), blender::ed::space_node::draw_draglink_tooltip(), draw_icon_centered(), draw_marker(), file_draw_preview(), panel_draw_aligned_widgets(), screen_draw_area_drag_tip(), textview_draw_string(), blender::ed::outliner::tselem_draw_icon(), ui_draw_menu_item(), UI_icon_draw(), UI_icon_draw_alpha(), vicon_collection_color_draw(), vicon_layergroup_color_draw(), vicon_strip_color_draw(), vicon_strip_color_draw_library_data_indirect(), vicon_strip_color_draw_library_data_override_noneditable(), widget_draw_icon(), widget_draw_icon_centered(), and wm_drag_draw_icon().
Definition at line 1968 of file interface_icons.cc.
References icon_draw_size(), ICON_SIZE_PREVIEW, and UI_NO_ICON_OVERLAY_TEXT.
Referenced by widget_draw_preview().
Definition at line 1069 of file interface_icons.cc.
References BKE_icon_get(), BKE_previewimg_id_ensure(), BKE_studiolight_set_free_function(), DrawInfo::buffer, CTX_wm_manager(), CTX_wm_window(), DrawInfo::data, GS, IconImage::h, ICON_DATA_STUDIOLIGHT, icon_ensure_drawinfo(), ICON_SIZE_ICON, ICON_SIZE_PREVIEW, ICON_TYPE_BUFFER, ICON_TYPE_PREVIEW, ID_SCR, Icon::id_type, DrawInfo::image, MEM_freeN(), MEM_mallocN, NC_WINDOW, Icon::obj, Icon::obj_type, IconImage::rect, PreviewImage::runtime, STUDIOLIGHT_ICON_SIZE, DrawInfo::type, ui_id_preview_image_render_size(), ui_studiolight_free_function(), ui_studiolight_icon_job_end(), ui_studiolight_icon_job_exec(), IconImage::w, WM_JOB_TYPE_STUDIOLIGHT, WM_jobs_callbacks(), WM_jobs_customdata_set(), WM_jobs_get(), WM_jobs_start(), and WM_jobs_timer().
Referenced by ui_def_but_icon(), and ui_searchbox_region_draw_fn().
| int UI_icon_from_event_type | ( | short | event_type, |
| short | event_value ) |
Definition at line 544 of file interface_icons.cc.
References DrawInfo::data, DrawInfo::event_type, EVT_LEFTALTKEY, EVT_LEFTCTRLKEY, EVT_LEFTSHIFTKEY, EVT_RIGHTALTKEY, EVT_RIGHTCTRLKEY, EVT_RIGHTSHIFTKEY, g_di_event_list, DrawInfo::icon, DrawInfo::input, KM_CLICK_DRAG, KM_DBL_CLICK, LEFTMOUSE, MIDDLEMOUSE, DrawInfo::next, and RIGHTMOUSE.
Referenced by WorkspaceStatus::opmodal(), and UI_icon_from_keymap_item().
Definition at line 1830 of file interface_icons.cc.
References ID_AC, ID_AR, ID_BR, ID_CA, ID_CF, ID_CU_LEGACY, ID_CV, ID_GD_LEGACY, ID_GP, 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_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_keymap_item | ( | const wmKeyMapItem * | kmi, |
| int | r_icon_mod[4] ) |
Definition at line 579 of file interface_icons.cc.
References wmKeyMapItem::alt, wmKeyMapItem::ctrl, ELEM, KM_ANY, KM_NOTHING, wmKeyMapItem::oskey, wmKeyMapItem::shift, wmKeyMapItem::type, UI_icon_from_event_type(), and wmKeyMapItem::val.
Referenced by uiTemplateEventFromKeymapItem(), and uiTemplateStatusBarModalItem().
Definition at line 1747 of file interface_icons.cc.
References ID_IS_ASSET, ID_IS_LINKED, ID_IS_OVERRIDE_LIBRARY, ID_IS_OVERRIDE_LIBRARY_REAL, ID_TAG_INDIRECT, ID_TAG_MISSING, and LIBOVERRIDE_FLAG_SYSTEM_DEFINED.
Referenced by add_collection_search_item(), id_search_add(), and blender::ed::outliner::outliner_draw_tree_element().
Definition at line 1915 of file interface_icons.cc.
References OB_MODE_EDIT, OB_MODE_EDIT_GPENCIL_LEGACY, OB_MODE_OBJECT, OB_MODE_PAINT_GREASE_PENCIL, OB_MODE_PARTICLE_EDIT, OB_MODE_POSE, OB_MODE_SCULPT, OB_MODE_SCULPT_CURVES, OB_MODE_SCULPT_GREASE_PENCIL, OB_MODE_TEXTURE_PAINT, OB_MODE_VERTEX_GREASE_PENCIL, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_GREASE_PENCIL, and OB_MODE_WEIGHT_PAINT.
Referenced by blender::ed::outliner::outliner_draw_mode_column_toggle().
| int UI_icon_from_rnaptr | ( | const bContext * | C, |
| PointerRNA * | ptr, | ||
| int | rnaicon, | ||
| const bool | big ) |
Definition at line 1773 of file interface_icons.cc.
References 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, PointerRNA::owner_id, ptr, RNA_int_get(), RNA_pointer_get(), RNA_struct_is_a(), RNA_struct_is_ID(), STUDIOLIGHT_FLAG_ORIENTATIONS, STUDIOLIGHT_TYPE_MATCAP, STUDIOLIGHT_TYPE_STUDIO, STUDIOLIGHT_TYPE_WORLD, PointerRNA::type, and ui_id_icon_get().
Referenced by ui_template_list_layout_draw().
Definition at line 965 of file interface_icons.cc.
References BKE_icon_get(), DrawInfo::data, icon_ensure_drawinfo(), DrawInfo::texture, DrawInfo::theme_color, and UI_GetIconThemeColor4ubv().
Referenced by blender::ed::outliner::tselem_draw_icon(), widget_draw_icon(), and widget_draw_icon_centered().
| int UI_icon_preview_to_render_size | ( | enum eIconSizes | size | ) |
Render size for preview images and icons
Definition at line 984 of file interface_icons.cc.
References ICON_RENDER_DEFAULT_HEIGHT, ICON_SIZE_ICON, ICON_SIZE_PREVIEW, and PREVIEW_RENDER_DEFAULT_HEIGHT.
Referenced by bpy_app_preview_render_size_get(), and icon_create_rect().
| void UI_icon_render_id | ( | const bContext * | C, |
| Scene * | scene, | ||
| 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.
Definition at line 1672 of file interface_icons.cc.
References BKE_previewimg_id_ensure(), Object::data, ED_preview_id_is_supported(), GS, ID_OB, and UI_icon_render_id_ex().
Referenced by ED_preview_restart_queue_work(), blender::ed::asset::generate_preview(), lib_id_generate_preview_exec(), previews_id_ensure(), and ui_id_icon_get().
| 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 ) |
Render the data block into the provided PreviewImage.
Definition at line 1662 of file interface_icons.cc.
References ui_id_preview_image_render_size().
Referenced by lib_id_generate_preview_from_object_exec(), and UI_icon_render_id().
| void UI_icon_text_overlay_init_from_count | ( | IconTextOverlay * | text_overlay, |
| const int | icon_indicator_number ) |
Definition at line 2041 of file interface_icons.cc.
References BLI_str_format_integer_unit(), and IconTextOverlay::text.
Referenced by blender::ed::outliner::tselem_draw_icon(), and UI_but_icon_indicator_number_set().
| PreviewImage * UI_icon_to_preview | ( | int | icon_id | ) |
Definition at line 1177 of file interface_icons.cc.
References BKE_icon_get(), BKE_previewimg_copy(), BKE_previewimg_create(), BKE_previewimg_id_ensure(), DrawInfo::buffer, DrawInfo::data, IconImage::datatoc_rect, IconImage::datatoc_size, Icon::drawinfo, PreviewImage::h, IB_rect, ICON_TYPE_PREVIEW, Icon::id_type, DrawInfo::image, IMB_freeImBuf(), IMB_ibImageFromMemory(), IMB_steal_byte_buffer(), Icon::obj, PreviewImage::rect, DrawInfo::type, PreviewImage::w, ImBuf::x, and ImBuf::y.
| void UI_icons_free | ( | ) |
Definition at line 892 of file interface_icons.cc.
References BKE_icons_free(), and BKE_preview_images_free().
Referenced by ui_resources_free().
| void UI_icons_free_drawinfo | ( | void * | drawinfo | ) |
Definition at line 898 of file interface_icons.cc.
References DrawInfo::buffer, DrawInfo::data, DrawInfo::geom, ICON_TYPE_BUFFER, ICON_TYPE_GEOM, DrawInfo::image, DrawInfo::image_cache, IMB_freeImBuf(), MEM_freeN(), IconImage::rect, and DrawInfo::type.
Referenced by def_internal_icon(), and icon_ensure_drawinfo().
| void UI_icons_init | ( | ) |
Resizable Icons for Blender
Definition at line 976 of file interface_icons.cc.
References init_event_icons(), and init_internal_icons().
Referenced by ui_resources_init().
Definition at line 1719 of file interface_icons.cc.
References BKE_icon_id_ensure(), GS, ICON_SIZE_ICON, ICON_SIZE_PREVIEW, ID_GR, ID_IM, ID_LA, ID_MA, ID_SCR, ID_TE, ID_WO, UI_icon_color_from_collection(), UI_icon_render_id(), and ui_id_screen_get_icon().
Referenced by id_search_add(), template_add_button_search_menu(), UI_icon_from_rnaptr(), and ui_rna_collection_search_update_fn().
Definition at line 1697 of file interface_icons.cc.
References BKE_previewimg_id_ensure(), NUM_ICON_SIZES, and ui_id_preview_image_render_size().
Referenced by ui_id_screen_get_icon().
|
static |
Definition at line 1650 of file interface_icons.cc.
References icon_set_image(), PRV_CHANGED, and size().
Referenced by ui_icon_ensure_deferred(), UI_icon_render_id_ex(), and ui_id_icon_render().
Definition at line 1710 of file interface_icons.cc.
References BKE_icon_id_ensure(), and ui_id_icon_render().
Referenced by ui_id_icon_get().
|
static |
Definition at line 1037 of file interface_icons.cc.
References data, StudioLight::icon_id_irradiance, StudioLight::icon_id_matcap, StudioLight::icon_id_matcap_flipped, StudioLight::icon_id_radiance, and ui_studiolight_kill_icon_preview_job().
Referenced by ui_icon_ensure_deferred(), and ui_studiolight_icon_job_end().
|
static |
Definition at line 1061 of file interface_icons.cc.
References BKE_studiolight_set_free_function(), Icon::obj, and ui_studiolight_free_function().
Referenced by ui_icon_ensure_deferred().
|
static |
Definition at line 1020 of file interface_icons.cc.
References BKE_studiolight_preview(), DrawInfo::buffer, DrawInfo::data, icon_ensure_drawinfo(), Icon::id_type, DrawInfo::image, Icon::obj, and IconImage::rect.
Referenced by ui_icon_ensure_deferred().
|
static |
Definition at line 1030 of file interface_icons.cc.
References BKE_icon_get(), Icon::obj, WM_JOB_TYPE_STUDIOLIGHT, and WM_jobs_kill_type().
Referenced by ui_studiolight_free_function().
Definition at line 2009 of file interface_icons.cc.
References BLF_svg_icon_bitmap(), blender::Array< T, InlineBufferCapacity, Allocator >::data(), icon_source_edit_cb(), IMB_allocFromBuffer(), IMB_flipy(), IMB_premultiply_alpha(), and blender::Array< T, InlineBufferCapacity, Allocator >::is_empty().
Referenced by filelist_ensure_special_file_image(), UI_icon_alert_imbuf_get(), and wm_block_about_create().
|
static |
Definition at line 378 of file interface_icons.cc.
References bTheme::collection_color, ThemeCollectionColor::color, float, ThemeUI::icon_border_intensity, ICON_DEFAULT_WIDTH, bTheme::tui, UI_GetTheme(), UI_icon_draw_ex(), UI_NO_ICON_OVERLAY_TEXT, and w().
Definition at line 315 of file interface_icons.cc.
References ThemeWireColor::active, b, GPU_COMP_I32, GPU_FETCH_INT_TO_FLOAT, GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), immBindBuiltinProgram(), immRecti(), immUnbindProgram(), immUniformColor3ubv(), immVertexFormat(), pos, ThemeWireColor::select, ThemeWireColor::solid, bTheme::tarm, UI_GetTheme(), and w().
Definition at line 524 of file interface_icons.cc.
References bGPDlayer::color, GPU_COMP_I32, GPU_FETCH_INT_TO_FLOAT, GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), immBindBuiltinProgram(), immRecti(), immUnbindProgram(), immUniformColor3fv(), immVertexFormat(), Icon::obj, pos, and w().
Referenced by icon_draw_size().
Definition at line 295 of file interface_icons.cc.
References BEZT_KEYTYPE_KEYFRAME, KEYFRAME_HANDLE_ALIGNED, vicon_keytype_draw_wrapper(), and w().
Referenced by init_internal_icons().
Definition at line 310 of file interface_icons.cc.
References BEZT_KEYTYPE_KEYFRAME, KEYFRAME_HANDLE_AUTO_CLAMP, vicon_keytype_draw_wrapper(), and w().
Referenced by init_internal_icons().
Definition at line 305 of file interface_icons.cc.
References BEZT_KEYTYPE_KEYFRAME, KEYFRAME_HANDLE_AUTO, vicon_keytype_draw_wrapper(), and w().
Referenced by init_internal_icons().
Definition at line 290 of file interface_icons.cc.
References BEZT_KEYTYPE_KEYFRAME, KEYFRAME_HANDLE_FREE, vicon_keytype_draw_wrapper(), and w().
Referenced by init_internal_icons().
Definition at line 300 of file interface_icons.cc.
References BEZT_KEYTYPE_KEYFRAME, KEYFRAME_HANDLE_VECTOR, vicon_keytype_draw_wrapper(), and w().
Referenced by init_internal_icons().
Definition at line 265 of file interface_icons.cc.
References BEZT_KEYTYPE_BREAKDOWN, KEYFRAME_HANDLE_NONE, vicon_keytype_draw_wrapper(), and w().
Referenced by init_internal_icons().
|
static |
Definition at line 200 of file interface_icons.cc.
References KeyframeShaderBindings::color_id, draw_keyframe_shape(), KeyframeShaderBindings::flags_id, GPU_COMP_F32, GPU_COMP_U32, GPU_COMP_U8, GPU_FETCH_FLOAT, GPU_FETCH_INT, GPU_FETCH_INT_TO_FLOAT_UNIT, GPU_PRIM_POINTS, GPU_program_point_size(), GPU_SHADER_KEYFRAME_SHAPE, GPU_vertformat_attr_add(), immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniform1f(), immUniform2f(), immVertexFormat(), KEYFRAME_EXTREME_NONE, KEYFRAME_HANDLE_NONE, KEYFRAME_SHAPE_BOTH, KeyframeShaderBindings::outline_color_id, KeyframeShaderBindings::pos_id, RGN_TYPE_WINDOW, KeyframeShaderBindings::size_id, SPACE_ACTION, UI_SetTheme(), UI_Theme_Restore(), UI_Theme_Store(), and w().
Referenced by vicon_handletype_aligned_draw(), vicon_handletype_auto_clamp_draw(), vicon_handletype_auto_draw(), vicon_handletype_free_draw(), vicon_handletype_vector_draw(), vicon_keytype_breakdown_draw(), vicon_keytype_extreme_draw(), vicon_keytype_generated_draw(), vicon_keytype_jitter_draw(), vicon_keytype_keyframe_draw(), and vicon_keytype_moving_hold_draw().
Definition at line 270 of file interface_icons.cc.
References BEZT_KEYTYPE_EXTREME, KEYFRAME_HANDLE_NONE, vicon_keytype_draw_wrapper(), and w().
Referenced by init_internal_icons().
Definition at line 285 of file interface_icons.cc.
References BEZT_KEYTYPE_GENERATED, KEYFRAME_HANDLE_NONE, vicon_keytype_draw_wrapper(), and w().
Referenced by init_internal_icons().
Definition at line 275 of file interface_icons.cc.
References BEZT_KEYTYPE_JITTER, KEYFRAME_HANDLE_NONE, vicon_keytype_draw_wrapper(), and w().
Referenced by init_internal_icons().
Definition at line 260 of file interface_icons.cc.
References BEZT_KEYTYPE_KEYFRAME, KEYFRAME_HANDLE_NONE, vicon_keytype_draw_wrapper(), and w().
Referenced by init_internal_icons().
Definition at line 280 of file interface_icons.cc.
References BEZT_KEYTYPE_MOVEHOLD, KEYFRAME_HANDLE_NONE, vicon_keytype_draw_wrapper(), and w().
Referenced by init_internal_icons().
|
static |
Definition at line 485 of file interface_icons.cc.
References bTheme::collection_color, ThemeCollectionColor::color, float, ThemeUI::icon_border_intensity, ICON_DEFAULT_WIDTH, bTheme::tui, UI_GetTheme(), UI_icon_draw_ex(), UI_NO_ICON_OVERLAY_TEXT, and w().
Definition at line 414 of file interface_icons.cc.
References ThemeStripColor::color, float, ThemeUI::icon_border_intensity, ICON_DEFAULT_WIDTH, bTheme::strip_color, bTheme::tui, UI_GetTheme(), UI_icon_draw_ex(), UI_NO_ICON_OVERLAY_TEXT, and w().
|
static |
Definition at line 453 of file interface_icons.cc.
References float, ICON_DEFAULT_WIDTH, ICON_INDIRECT_DATA_ALPHA, UI_icon_draw_ex(), UI_NO_ICON_OVERLAY_TEXT, and w().
Referenced by init_internal_icons().
|
static |
Definition at line 469 of file interface_icons.cc.
References float, ICON_DEFAULT_WIDTH, ICON_INDIRECT_DATA_ALPHA, UI_icon_draw_ex(), UI_NO_ICON_OVERLAY_TEXT, and w().
Referenced by init_internal_icons().
|
static |
Definition at line 542 of file interface_icons.cc.
Referenced by init_event_icons(), and UI_icon_from_event_type().
|
static |
Definition at line 111 of file interface_icons.cc.
Referenced by init_internal_icons().