Blender V4.3
interface_icons.cc File Reference
#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

Macros

#define ICON_TYPE_PREVIEW   0
#define ICON_TYPE_SVG_COLOR   1
#define ICON_TYPE_SVG_MONO   2
#define ICON_TYPE_BUFFER   3
#define ICON_TYPE_IMBUF   4
#define ICON_TYPE_VECTOR   5
#define ICON_TYPE_GEOM   6
#define ICON_TYPE_EVENT   7 /* draw keymap entries using custom renderer. */
#define ICON_TYPE_GPLAYER   8
#define ICON_TYPE_BLANK   9
#define DEF_ICON(name)
#define DEF_ICON_COLOR(name)
#define DEF_ICON_SCENE(name)
#define DEF_ICON_COLLECTION(name)
#define DEF_ICON_OBJECT(name)
#define DEF_ICON_OBJECT_DATA(name)
#define DEF_ICON_MODIFIER(name)
#define DEF_ICON_SHADING(name)
#define DEF_ICON_FOLDER(name)
#define DEF_ICON_FUND(name)
#define DEF_ICON_VECTOR(name)
#define DEF_ICON_BLANK(name)
#define DEF_ICON_VECTOR_COLORSET_DRAW_NTH(prefix, index)
#define DEF_ICON_COLLECTION_COLOR_DRAW(index, color)
#define DEF_ICON_STRIP_COLOR_DRAW(index, color)
#define ICON_INDIRECT_DATA_ALPHA   0.6f
#define DEF_ICON_LAYERGROUP_COLOR_DRAW(index, color)
#define INIT_EVENT_ICON(icon_id, type, value)

Typedefs

using VectorDrawFunc = void (*)(int x, int y, int w, int h, float alpha)

Functions

static DrawInfodef_internal_icon (ImBuf *bbuf, int icon_id, int xofs, int yofs, int size, int type, int theme_color)
static void def_internal_vicon (int icon_id, VectorDrawFunc drawFunc)
static void vicon_keytype_draw_wrapper (const int x, const int y, const int w, const int h, const float alpha, const eBezTriple_KeyframeType key_type, const short handle_type)
static void vicon_keytype_keyframe_draw (int x, int y, int w, int h, float alpha)
static void vicon_keytype_breakdown_draw (int x, int y, int w, int h, float alpha)
static void vicon_keytype_extreme_draw (int x, int y, int w, int h, float alpha)
static void vicon_keytype_jitter_draw (int x, int y, int w, int h, float alpha)
static void vicon_keytype_moving_hold_draw (int x, int y, int w, int h, float alpha)
static void vicon_keytype_generated_draw (int x, int y, int w, int h, float alpha)
static void vicon_handletype_free_draw (int x, int y, int w, int h, float alpha)
static void vicon_handletype_aligned_draw (int x, int y, int w, int h, float alpha)
static void vicon_handletype_vector_draw (int x, int y, int w, int h, float alpha)
static void vicon_handletype_auto_draw (int x, int y, int w, int h, float alpha)
static void vicon_handletype_auto_clamp_draw (int x, int y, int w, int h, float alpha)
static void vicon_colorset_draw (int index, int x, int y, int w, int h, float)
static void vicon_collection_color_draw (short color_tag, int x, int y, int w, int, float)
 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)
static void vicon_strip_color_draw (short color_tag, int x, int y, int w, int, float)
 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 void vicon_strip_color_draw_library_data_indirect (int x, int y, int w, int, float alpha)
static void vicon_strip_color_draw_library_data_override_noneditable (int x, int y, int w, int, float alpha)
static void vicon_layergroup_color_draw (short color_tag, int x, int y, int w, int, float)
 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)
static void vicon_gplayer_color_draw (Icon *icon, int x, int y, int w, int h)
int UI_icon_from_event_type (short event_type, short event_value)
int UI_icon_from_keymap_item (const wmKeyMapItem *kmi, int r_icon_mod[4])
static void init_event_icons ()
static void icon_verify_datatoc (IconImage *iimg)
static void init_internal_icons ()
void UI_icons_free ()
void UI_icons_free_drawinfo (void *drawinfo)
static DrawInfoicon_create_drawinfo (Icon *icon)
static DrawInfoicon_ensure_drawinfo (Icon *icon)
bool UI_icon_get_theme_color (int icon_id, uchar color[4])
void UI_icons_init ()
int UI_icon_preview_to_render_size (enum eIconSizes size)
static void icon_create_rect (PreviewImage *prv_img, enum eIconSizes size)
static void ui_id_preview_image_render_size (const bContext *C, Scene *scene, ID *id, PreviewImage *pi, int size, const bool use_job)
static void ui_studiolight_icon_job_exec (void *customdata, wmJobWorkerStatus *)
static void ui_studiolight_kill_icon_preview_job (wmWindowManager *wm, int icon_id)
static void ui_studiolight_free_function (StudioLight *sl, void *data)
static void ui_studiolight_icon_job_end (void *customdata)
void ui_icon_ensure_deferred (const bContext *C, const int icon_id, const bool big)
static void icon_set_image (const bContext *C, Scene *scene, ID *id, PreviewImage *prv_img, enum eIconSizes size, const bool use_job)
PreviewImageUI_icon_to_preview (int icon_id)
static void icon_draw_rect (float x, float y, int w, int h, int rw, int rh, const uint8_t *rect, float alpha, const float desaturate)
static int get_draw_size (enum eIconSizes size)
static void svg_replace_color_attributes (std::string &svg, const std::string &name, const size_t start, const size_t end)
static void icon_source_edit_cb (std::string &svg)
static void icon_draw_size (float x, float y, int icon_id, float aspect, float alpha, enum eIconSizes size, int draw_size, const float desaturate, const uchar mono_rgba[4], const bool mono_border, const IconTextOverlay *text_overlay, const bool inverted=false)
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)
void UI_icon_render_id (const bContext *C, Scene *scene, ID *id, const enum eIconSizes size, const bool use_job)
static void ui_id_icon_render (const bContext *C, ID *id, bool use_jobs)
static int ui_id_screen_get_icon (const bContext *C, ID *id)
int ui_id_icon_get (const bContext *C, ID *id, const bool big)
int UI_icon_from_library (const ID *id)
int UI_icon_from_rnaptr (const bContext *C, PointerRNA *ptr, int rnaicon, const bool big)
int UI_icon_from_idcode (const int idcode)
int UI_icon_from_object_mode (const int mode)
int UI_icon_color_from_collection (const Collection *collection)
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, const IconTextOverlay *text_overlay, const bool inverted)
ImBufUI_svg_icon_bitmap (uint icon_id, float size, bool multicolor)
void UI_icon_text_overlay_init_from_count (IconTextOverlay *text_overlay, const int icon_indicator_number)
ImBufUI_icon_alert_imbuf_get (eAlertIcon icon, float size)

Variables

static const IconType icontypes []
static DrawInfog_di_event_list = nullptr

Macro Definition Documentation

◆ DEF_ICON

#define DEF_ICON ( name)
Value:
#define ICON_TYPE_SVG_MONO

◆ DEF_ICON_BLANK

#define DEF_ICON_BLANK ( name)
Value:
#define ICON_TYPE_BLANK

◆ DEF_ICON_COLLECTION

#define DEF_ICON_COLLECTION ( name)

◆ DEF_ICON_COLLECTION_COLOR_DRAW

#define DEF_ICON_COLLECTION_COLOR_DRAW ( index,
color )
Value:
static void vicon_collection_color_draw_##index(int x, int y, int w, int h, float alpha) \
{ \
vicon_collection_color_draw(color, x, y, w, h, alpha); \
}
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Brightness Control the brightness and contrast of the input color Vector Map input vector components with curves Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert Invert a color
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
Definition btQuadWord.h:119

Definition at line 397 of file interface_icons.cc.

◆ DEF_ICON_COLOR

#define DEF_ICON_COLOR ( name)
Value:
#define ICON_TYPE_SVG_COLOR

◆ DEF_ICON_FOLDER

#define DEF_ICON_FOLDER ( name)

◆ DEF_ICON_FUND

#define DEF_ICON_FUND ( name)

◆ DEF_ICON_LAYERGROUP_COLOR_DRAW

#define DEF_ICON_LAYERGROUP_COLOR_DRAW ( index,
color )
Value:
static void vicon_layergroup_color_draw_##index(int x, int y, int w, int h, float alpha) \
{ \
vicon_layergroup_color_draw(color, x, y, w, h, alpha); \
}

Definition at line 504 of file interface_icons.cc.

◆ DEF_ICON_MODIFIER

#define DEF_ICON_MODIFIER ( name)

◆ DEF_ICON_OBJECT

#define DEF_ICON_OBJECT ( name)

◆ DEF_ICON_OBJECT_DATA

#define DEF_ICON_OBJECT_DATA ( name)

◆ DEF_ICON_SCENE

#define DEF_ICON_SCENE ( name)

◆ DEF_ICON_SHADING

#define DEF_ICON_SHADING ( name)

◆ DEF_ICON_STRIP_COLOR_DRAW

#define DEF_ICON_STRIP_COLOR_DRAW ( index,
color )
Value:
static void vicon_strip_color_draw_##index(int x, int y, int w, int h, float alpha) \
{ \
vicon_strip_color_draw(color, x, y, w, h, alpha); \
}

Definition at line 433 of file interface_icons.cc.

◆ DEF_ICON_VECTOR

#define DEF_ICON_VECTOR ( name)
Value:
#define ICON_TYPE_VECTOR

◆ DEF_ICON_VECTOR_COLORSET_DRAW_NTH

#define DEF_ICON_VECTOR_COLORSET_DRAW_NTH ( prefix,
index )
Value:
static void vicon_colorset_draw_##prefix(int x, int y, int w, int h, float alpha) \
{ \
vicon_colorset_draw(index, x, y, w, h, alpha); \
}

Definition at line 349 of file interface_icons.cc.

◆ ICON_INDIRECT_DATA_ALPHA

#define ICON_INDIRECT_DATA_ALPHA   0.6f

◆ ICON_TYPE_BLANK

#define ICON_TYPE_BLANK   9

Definition at line 73 of file interface_icons.cc.

◆ ICON_TYPE_BUFFER

◆ ICON_TYPE_EVENT

#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().

◆ ICON_TYPE_GEOM

#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().

◆ ICON_TYPE_GPLAYER

#define ICON_TYPE_GPLAYER   8

Definition at line 72 of file interface_icons.cc.

Referenced by icon_create_drawinfo(), and icon_draw_size().

◆ ICON_TYPE_IMBUF

#define ICON_TYPE_IMBUF   4

Definition at line 68 of file interface_icons.cc.

Referenced by icon_create_drawinfo(), and icon_draw_size().

◆ ICON_TYPE_PREVIEW

#define ICON_TYPE_PREVIEW   0

◆ ICON_TYPE_SVG_COLOR

#define ICON_TYPE_SVG_COLOR   1

Definition at line 65 of file interface_icons.cc.

Referenced by icon_draw_size(), and init_internal_icons().

◆ ICON_TYPE_SVG_MONO

#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().

◆ ICON_TYPE_VECTOR

#define ICON_TYPE_VECTOR   5

Definition at line 69 of file interface_icons.cc.

Referenced by def_internal_vicon(), and icon_draw_size().

◆ INIT_EVENT_ICON

#define INIT_EVENT_ICON ( icon_id,
type,
value )
Value:
{ \
DrawInfo *di = def_internal_icon(nullptr, icon_id, 0, 0, w, ICON_TYPE_EVENT, 0); \
di->data.input.event_type = type; \
di->data.input.event_value = value; \
di->data.input.icon = icon_id; \
di->data.input.next = di_next; \
di_next = di; \
} \
((void)0)
static DrawInfo * def_internal_icon(ImBuf *bbuf, int icon_id, int xofs, int yofs, int size, int type, int theme_color)
#define ICON_TYPE_EVENT
short event_value
DrawInfo * next
struct DrawInfo::@260101342222167342067021017126021335210111345054::@244304217060310343225106273140376370131167310156 input
union DrawInfo::@260101342222167342067021017126021335210111345054 data

Referenced by init_event_icons().

Typedef Documentation

◆ VectorDrawFunc

using VectorDrawFunc = void (*)(int x, int y, int w, int h, float alpha)

Definition at line 62 of file interface_icons.cc.

Function Documentation

◆ DEF_ICON_COLLECTION_COLOR_DRAW() [1/8]

DEF_ICON_COLLECTION_COLOR_DRAW ( 01 ,
COLLECTION_COLOR_01  )

References COLLECTION_COLOR_01.

◆ DEF_ICON_COLLECTION_COLOR_DRAW() [2/8]

DEF_ICON_COLLECTION_COLOR_DRAW ( 02 ,
COLLECTION_COLOR_02  )

References COLLECTION_COLOR_02.

◆ DEF_ICON_COLLECTION_COLOR_DRAW() [3/8]

DEF_ICON_COLLECTION_COLOR_DRAW ( 03 ,
COLLECTION_COLOR_03  )

References COLLECTION_COLOR_03.

◆ DEF_ICON_COLLECTION_COLOR_DRAW() [4/8]

DEF_ICON_COLLECTION_COLOR_DRAW ( 04 ,
COLLECTION_COLOR_04  )

References COLLECTION_COLOR_04.

◆ DEF_ICON_COLLECTION_COLOR_DRAW() [5/8]

DEF_ICON_COLLECTION_COLOR_DRAW ( 05 ,
COLLECTION_COLOR_05  )

References COLLECTION_COLOR_05.

◆ DEF_ICON_COLLECTION_COLOR_DRAW() [6/8]

DEF_ICON_COLLECTION_COLOR_DRAW ( 06 ,
COLLECTION_COLOR_06  )

References COLLECTION_COLOR_06.

◆ DEF_ICON_COLLECTION_COLOR_DRAW() [7/8]

DEF_ICON_COLLECTION_COLOR_DRAW ( 07 ,
COLLECTION_COLOR_07  )

References COLLECTION_COLOR_07.

◆ DEF_ICON_COLLECTION_COLOR_DRAW() [8/8]

DEF_ICON_COLLECTION_COLOR_DRAW ( 08 ,
COLLECTION_COLOR_08  )

References COLLECTION_COLOR_08.

◆ DEF_ICON_LAYERGROUP_COLOR_DRAW() [1/8]

DEF_ICON_LAYERGROUP_COLOR_DRAW ( 01 ,
LAYERGROUP_COLOR_01  )

References LAYERGROUP_COLOR_01.

◆ DEF_ICON_LAYERGROUP_COLOR_DRAW() [2/8]

DEF_ICON_LAYERGROUP_COLOR_DRAW ( 02 ,
LAYERGROUP_COLOR_02  )

References LAYERGROUP_COLOR_02.

◆ DEF_ICON_LAYERGROUP_COLOR_DRAW() [3/8]

DEF_ICON_LAYERGROUP_COLOR_DRAW ( 03 ,
LAYERGROUP_COLOR_03  )

References LAYERGROUP_COLOR_03.

◆ DEF_ICON_LAYERGROUP_COLOR_DRAW() [4/8]

DEF_ICON_LAYERGROUP_COLOR_DRAW ( 04 ,
LAYERGROUP_COLOR_04  )

References LAYERGROUP_COLOR_04.

◆ DEF_ICON_LAYERGROUP_COLOR_DRAW() [5/8]

DEF_ICON_LAYERGROUP_COLOR_DRAW ( 05 ,
LAYERGROUP_COLOR_05  )

References LAYERGROUP_COLOR_05.

◆ DEF_ICON_LAYERGROUP_COLOR_DRAW() [6/8]

DEF_ICON_LAYERGROUP_COLOR_DRAW ( 06 ,
LAYERGROUP_COLOR_06  )

References LAYERGROUP_COLOR_06.

◆ DEF_ICON_LAYERGROUP_COLOR_DRAW() [7/8]

DEF_ICON_LAYERGROUP_COLOR_DRAW ( 07 ,
LAYERGROUP_COLOR_07  )

References LAYERGROUP_COLOR_07.

◆ DEF_ICON_LAYERGROUP_COLOR_DRAW() [8/8]

DEF_ICON_LAYERGROUP_COLOR_DRAW ( 08 ,
LAYERGROUP_COLOR_08  )

References LAYERGROUP_COLOR_08.

◆ DEF_ICON_STRIP_COLOR_DRAW() [1/9]

DEF_ICON_STRIP_COLOR_DRAW ( 01 ,
SEQUENCE_COLOR_01  )

References SEQUENCE_COLOR_01.

◆ DEF_ICON_STRIP_COLOR_DRAW() [2/9]

DEF_ICON_STRIP_COLOR_DRAW ( 02 ,
SEQUENCE_COLOR_02  )

References SEQUENCE_COLOR_02.

◆ DEF_ICON_STRIP_COLOR_DRAW() [3/9]

DEF_ICON_STRIP_COLOR_DRAW ( 03 ,
SEQUENCE_COLOR_03  )

References SEQUENCE_COLOR_03.

◆ DEF_ICON_STRIP_COLOR_DRAW() [4/9]

DEF_ICON_STRIP_COLOR_DRAW ( 04 ,
SEQUENCE_COLOR_04  )

References SEQUENCE_COLOR_04.

◆ DEF_ICON_STRIP_COLOR_DRAW() [5/9]

DEF_ICON_STRIP_COLOR_DRAW ( 05 ,
SEQUENCE_COLOR_05  )

References SEQUENCE_COLOR_05.

◆ DEF_ICON_STRIP_COLOR_DRAW() [6/9]

DEF_ICON_STRIP_COLOR_DRAW ( 06 ,
SEQUENCE_COLOR_06  )

References SEQUENCE_COLOR_06.

◆ DEF_ICON_STRIP_COLOR_DRAW() [7/9]

DEF_ICON_STRIP_COLOR_DRAW ( 07 ,
SEQUENCE_COLOR_07  )

References SEQUENCE_COLOR_07.

◆ DEF_ICON_STRIP_COLOR_DRAW() [8/9]

DEF_ICON_STRIP_COLOR_DRAW ( 08 ,
SEQUENCE_COLOR_08  )

References SEQUENCE_COLOR_08.

◆ DEF_ICON_STRIP_COLOR_DRAW() [9/9]

DEF_ICON_STRIP_COLOR_DRAW ( 09 ,
SEQUENCE_COLOR_09  )

References SEQUENCE_COLOR_09.

◆ def_internal_icon()

◆ def_internal_vicon()

void def_internal_vicon ( int icon_id,
VectorDrawFunc drawFunc )
static

◆ get_draw_size()

int get_draw_size ( enum eIconSizes size)
static

◆ icon_create_drawinfo()

◆ icon_create_rect()

◆ icon_draw_rect()

void icon_draw_rect ( float x,
float y,
int w,
int h,
int rw,
int rh,
const uint8_t * rect,
float alpha,
const float desaturate )
static

◆ icon_draw_size()

void icon_draw_size ( float x,
float y,
int icon_id,
float aspect,
float alpha,
enum eIconSizes size,
int draw_size,
const float desaturate,
const uchar mono_rgba[4],
const bool mono_border,
const IconTextOverlay * text_overlay,
const bool inverted = false )
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, color, 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, size(), 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, x, ImBuf::y, and y.

Referenced by UI_icon_draw_ex(), and UI_icon_draw_preview().

◆ icon_ensure_drawinfo()

◆ icon_set_image()

void icon_set_image ( const bContext * C,
Scene * scene,
ID * id,
PreviewImage * prv_img,
enum eIconSizes size,
const bool use_job )
static
  • Only call with valid pointer from UI_icon_draw.
  • Only called when icon has changed.

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(), C, CTX_data_scene(), ED_preview_icon_job(), ED_preview_icon_render(), PreviewImage::flag, G, G_DEBUG, icon_create_rect(), ID::name, printf, PRV_USER_EDITED, PreviewImage::rect, and size().

Referenced by ui_id_preview_image_render_size().

◆ icon_source_edit_cb()

void icon_source_edit_cb ( std::string & svg)
static

◆ icon_verify_datatoc()

◆ init_event_icons()

void init_event_icons ( )
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().

◆ init_internal_icons()

◆ svg_replace_color_attributes()

◆ UI_icon_alert_imbuf_get()

ImBuf * UI_icon_alert_imbuf_get ( eAlertIcon icon,
float size )

◆ UI_icon_color_from_collection()

◆ UI_icon_draw()

◆ UI_icon_draw_alpha()

void UI_icon_draw_alpha ( float x,
float y,
int icon_id,
float alpha )

◆ UI_icon_draw_ex()

◆ UI_icon_draw_preview()

void UI_icon_draw_preview ( float x,
float y,
int icon_id,
float aspect,
float alpha,
int size )

Definition at line 1968 of file interface_icons.cc.

References icon_draw_size(), ICON_SIZE_PREVIEW, size(), UI_NO_ICON_OVERLAY_TEXT, x, and y.

Referenced by widget_draw_preview().

◆ ui_icon_ensure_deferred()

◆ UI_icon_from_event_type()

◆ UI_icon_from_idcode()

int UI_icon_from_idcode ( const int idcode)

◆ UI_icon_from_keymap_item()

◆ UI_icon_from_library()

◆ UI_icon_from_object_mode()

◆ UI_icon_from_rnaptr()

◆ UI_icon_get_theme_color()

◆ UI_icon_preview_to_render_size()

int UI_icon_preview_to_render_size ( enum eIconSizes size)

◆ UI_icon_render_id()

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(), C, Object::data, ED_preview_id_is_supported(), GS, ID_OB, ID::name, size(), 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().

◆ UI_icon_render_id_ex()

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 C, size(), and ui_id_preview_image_render_size().

Referenced by lib_id_generate_preview_from_object_exec(), and UI_icon_render_id().

◆ UI_icon_text_overlay_init_from_count()

void UI_icon_text_overlay_init_from_count ( IconTextOverlay * text_overlay,
const int icon_indicator_number )

◆ UI_icon_to_preview()

◆ UI_icons_free()

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().

◆ UI_icons_free_drawinfo()

◆ UI_icons_init()

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().

◆ ui_id_icon_get()

◆ ui_id_icon_render()

void ui_id_icon_render ( const bContext * C,
ID * id,
bool use_jobs )
static

◆ ui_id_preview_image_render_size()

void ui_id_preview_image_render_size ( const bContext * C,
Scene * scene,
ID * id,
PreviewImage * pi,
int size,
const bool use_job )
static

◆ ui_id_screen_get_icon()

int ui_id_screen_get_icon ( const bContext * C,
ID * id )
static

Definition at line 1710 of file interface_icons.cc.

References BKE_icon_id_ensure(), C, and ui_id_icon_render().

Referenced by ui_id_icon_get().

◆ ui_studiolight_free_function()

◆ ui_studiolight_icon_job_end()

void ui_studiolight_icon_job_end ( void * customdata)
static

◆ ui_studiolight_icon_job_exec()

void ui_studiolight_icon_job_exec ( void * customdata,
wmJobWorkerStatus *  )
static

◆ ui_studiolight_kill_icon_preview_job()

void ui_studiolight_kill_icon_preview_job ( wmWindowManager * wm,
int icon_id )
static

◆ UI_svg_icon_bitmap()

◆ vicon_collection_color_draw()

void vicon_collection_color_draw ( short color_tag,
int x,
int y,
int w,
int ,
float  )
static

◆ vicon_colorset_draw()

◆ vicon_gplayer_color_draw()

◆ vicon_handletype_aligned_draw()

void vicon_handletype_aligned_draw ( int x,
int y,
int w,
int h,
float alpha )
static

◆ vicon_handletype_auto_clamp_draw()

void vicon_handletype_auto_clamp_draw ( int x,
int y,
int w,
int h,
float alpha )
static

◆ vicon_handletype_auto_draw()

void vicon_handletype_auto_draw ( int x,
int y,
int w,
int h,
float alpha )
static

◆ vicon_handletype_free_draw()

void vicon_handletype_free_draw ( int x,
int y,
int w,
int h,
float alpha )
static

◆ vicon_handletype_vector_draw()

void vicon_handletype_vector_draw ( int x,
int y,
int w,
int h,
float alpha )
static

◆ vicon_keytype_breakdown_draw()

void vicon_keytype_breakdown_draw ( int x,
int y,
int w,
int h,
float alpha )
static

◆ vicon_keytype_draw_wrapper()

◆ vicon_keytype_extreme_draw()

void vicon_keytype_extreme_draw ( int x,
int y,
int w,
int h,
float alpha )
static

◆ vicon_keytype_generated_draw()

void vicon_keytype_generated_draw ( int x,
int y,
int w,
int h,
float alpha )
static

◆ vicon_keytype_jitter_draw()

void vicon_keytype_jitter_draw ( int x,
int y,
int w,
int h,
float alpha )
static

◆ vicon_keytype_keyframe_draw()

void vicon_keytype_keyframe_draw ( int x,
int y,
int w,
int h,
float alpha )
static

◆ vicon_keytype_moving_hold_draw()

void vicon_keytype_moving_hold_draw ( int x,
int y,
int w,
int h,
float alpha )
static

◆ vicon_layergroup_color_draw()

void vicon_layergroup_color_draw ( short color_tag,
int x,
int y,
int w,
int ,
float  )
static

◆ vicon_strip_color_draw()

void vicon_strip_color_draw ( short color_tag,
int x,
int y,
int w,
int ,
float  )
static

◆ vicon_strip_color_draw_library_data_indirect()

void vicon_strip_color_draw_library_data_indirect ( int x,
int y,
int w,
int ,
float alpha )
static

◆ vicon_strip_color_draw_library_data_override_noneditable()

void vicon_strip_color_draw_library_data_override_noneditable ( int x,
int y,
int w,
int ,
float alpha )
static

Variable Documentation

◆ g_di_event_list

DrawInfo* g_di_event_list = nullptr
static

Definition at line 542 of file interface_icons.cc.

Referenced by init_event_icons(), and UI_icon_from_event_type().

◆ icontypes

const IconType icontypes[]
static

Definition at line 111 of file interface_icons.cc.

Referenced by init_internal_icons().