|
Blender V4.3
|
Go to the source code of this file.
Classes | |
| struct | IconTextOverlay |
Macros | |
| #define | UI_NO_ICON_OVERLAY_TEXT NULL |
| #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 |
Enumerations | |
| enum | eAlertIcon { ALERT_ICON_NONE = -1 , ALERT_ICON_WARNING = 0 , ALERT_ICON_QUESTION = 1 , ALERT_ICON_ERROR = 2 , ALERT_ICON_INFO = 3 , ALERT_ICON_MAX } |
Functions | |
| ImBuf * | UI_icon_alert_imbuf_get (eAlertIcon icon, float size) |
| void | UI_icons_init () |
| bool | UI_icon_get_theme_color (int icon_id, unsigned char color[4]) |
| void | UI_icon_render_id (const bContext *C, Scene *scene, ID *id, enum eIconSizes size, bool use_job) |
| 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) |
| 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], bool mono_border, const IconTextOverlay *text_overlay, const bool inverted=false) |
| ImBuf * | UI_svg_icon_bitmap (uint icon_id, float size, bool multicolor=false) |
| void | UI_icons_free () |
| void | UI_icons_free_drawinfo (void *drawinfo) |
| PreviewImage * | UI_icon_to_preview (int icon_id) |
| int | UI_icon_from_rnaptr (const bContext *C, PointerRNA *ptr, int rnaicon, bool big) |
| int | UI_icon_from_idcode (int idcode) |
| int | UI_icon_from_library (const ID *id) |
| int | UI_icon_from_object_mode (int mode) |
| int | UI_icon_color_from_collection (const Collection *collection) |
| void | UI_icon_text_overlay_init_from_count (IconTextOverlay *text_overlay, const int icon_indicator_number) |
| #define ICON_DEFAULT_HEIGHT 16 |
Definition at line 31 of file UI_interface_icons.hh.
Referenced by button2d_draw_intern(), draw_icon_centered(), get_draw_size(), icon_draw_icon(), icon_draw_size(), blender::ed::outliner::tselem_draw_icon(), ui_draw_menu_item(), widget_draw_icon(), widget_draw_icon_centered(), widget_draw_submenu_tria(), and widget_draw_text_icon().
Definition at line 36 of file UI_interface_icons.hh.
Referenced by file_draw_list().
| #define ICON_DEFAULT_HEIGHT_TOOLBAR 32 |
Definition at line 34 of file UI_interface_icons.hh.
Referenced by icon_draw_size(), and widget_draw_text_icon().
| #define ICON_DEFAULT_WIDTH 16 |
Definition at line 32 of file UI_interface_icons.hh.
Referenced by button2d_draw_intern(), screen_draw_area_drag_tip(), 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(), and widget_draw_submenu_tria().
Definition at line 37 of file UI_interface_icons.hh.
Referenced by file_draw_list().
| #define PREVIEW_DEFAULT_HEIGHT 128 |
Definition at line 39 of file UI_interface_icons.hh.
Referenced by get_draw_size().
Definition at line 29 of file UI_interface_icons.hh.
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(), ui_draw_menu_item(), UI_icon_draw(), UI_icon_draw_alpha(), UI_icon_draw_preview(), 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(), and wm_drag_draw_icon().
| enum eAlertIcon |
| Enumerator | |
|---|---|
| ALERT_ICON_NONE | |
| ALERT_ICON_WARNING | |
| ALERT_ICON_QUESTION | |
| ALERT_ICON_ERROR | |
| ALERT_ICON_INFO | |
| ALERT_ICON_MAX | |
Definition at line 41 of file UI_interface_icons.hh.
| 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], | ||
| bool | mono_border, | ||
| const IconTextOverlay * | text_overlay, | ||
| const bool | inverted = false ) |
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 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().
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, | ||
| 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().
| bool UI_icon_get_theme_color | ( | int | icon_id, |
| unsigned char | color[4] ) |
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 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().