diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2010-07-26 02:23:40 +0400 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2010-07-26 02:23:40 +0400 |
commit | cc061d075f4368f7a8d380becb0688bbea14832a (patch) | |
tree | d0e0255b36c4cbf7b1e5ec418b1a274d9c5caa55 /source/blender/editors | |
parent | ba30ac1230c400a0aab0515cd4d39c546f90c96a (diff) |
== Sculpt ==
More icon work
* Added icon defines for all the brushes
* Load all the brush icons after loading regular Blender icons
* Added the brush icons to their respective tool enums in RNA
* Fixed a couple unused-variable warnings
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/include/UI_icons.h | 35 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_icons.c | 46 |
2 files changed, 79 insertions, 2 deletions
diff --git a/source/blender/editors/include/UI_icons.h b/source/blender/editors/include/UI_icons.h index fd459def112..6a139b124a6 100644 --- a/source/blender/editors/include/UI_icons.h +++ b/source/blender/editors/include/UI_icons.h @@ -27,8 +27,8 @@ */ /* Note: this is included twice with different #defines for DEF_ICON - once from UI_resources.h for the internal icon enum and once fro interface_api.c for - definition of the RNA enum for he icons */ + once from UI_resources.h for the internal icon enum and + once for interface_api.c for the definition of the RNA enum for the icons */ DEF_ICON(ICON_BLENDER) DEF_ICON(ICON_QUESTION) @@ -869,6 +869,37 @@ DEF_ICON(ICON_BLANK345) DEF_ICON(ICON_BLANK346) DEF_ICON(ICON_BLANK346b) + /* brush icons */ + +DEF_ICON(ICON_BRUSH_ADD) +DEF_ICON(ICON_BRUSH_BLOB) +DEF_ICON(ICON_BRUSH_BLUR) +DEF_ICON(ICON_BRUSH_CLAY) +DEF_ICON(ICON_BRUSH_CLONE) +DEF_ICON(ICON_BRUSH_CREASE) +DEF_ICON(ICON_BRUSH_DARKEN) +DEF_ICON(ICON_BRUSH_FILL) +DEF_ICON(ICON_BRUSH_FLATTEN) +DEF_ICON(ICON_BRUSH_GRAB) +DEF_ICON(ICON_BRUSH_INFLATE) +DEF_ICON(ICON_BRUSH_LAYER) +DEF_ICON(ICON_BRUSH_LIGHTEN) +DEF_ICON(ICON_BRUSH_MIX) +DEF_ICON(ICON_BRUSH_MULTIPLY) +DEF_ICON(ICON_BRUSH_NUDGE) +DEF_ICON(ICON_BRUSH_PINCH) +DEF_ICON(ICON_BRUSH_SCRAPE) +DEF_ICON(ICON_BRUSH_SCULPT_DRAW) +DEF_ICON(ICON_BRUSH_SMEAR) +DEF_ICON(ICON_BRUSH_SMOOTH) +DEF_ICON(ICON_BRUSH_SNAKE_HOOK) +DEF_ICON(ICON_BRUSH_SOFTEN) +DEF_ICON(ICON_BRUSH_SUBTRACT) +DEF_ICON(ICON_BRUSH_TEXDRAW) +DEF_ICON(ICON_BRUSH_THUMB) +DEF_ICON(ICON_BRUSH_ROTATE) +DEF_ICON(ICON_BRUSH_VERTEXDRAW) + /* vector icons */ DEF_ICON(VICO_VIEW3D_VEC) diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index b0dd3aac61d..8db5724cf20 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -453,6 +453,51 @@ static void vicon_move_down_draw(int x, int y, int w, int h, float alpha) glDisable(GL_LINE_SMOOTH); } +static void init_brush_icons() +{ + +#define INIT_BRUSH_ICON(icon_id, name) \ + bbuf = IMB_ibImageFromMemory((unsigned char*)datatoc_ ##name## _png, \ + datatoc_ ##name## _png_size, IB_rect); \ + def_internal_icon(bbuf, icon_id, 0, 0, w, ICON_TYPE_BUFFER); \ + IMB_freeImBuf(bbuf); + // end INIT_BRUSH_ICON + + ImBuf *bbuf; + const int w = 96; + + INIT_BRUSH_ICON(ICON_BRUSH_ADD, add); + INIT_BRUSH_ICON(ICON_BRUSH_BLOB, blob); + INIT_BRUSH_ICON(ICON_BRUSH_BLUR, blur); + INIT_BRUSH_ICON(ICON_BRUSH_CLAY, clay); + INIT_BRUSH_ICON(ICON_BRUSH_CLONE, clone); + INIT_BRUSH_ICON(ICON_BRUSH_CREASE, crease); + INIT_BRUSH_ICON(ICON_BRUSH_DARKEN, darken); + INIT_BRUSH_ICON(ICON_BRUSH_SCULPT_DRAW, draw); + INIT_BRUSH_ICON(ICON_BRUSH_FILL, fill); + INIT_BRUSH_ICON(ICON_BRUSH_FLATTEN, flatten); + INIT_BRUSH_ICON(ICON_BRUSH_GRAB, grab); + INIT_BRUSH_ICON(ICON_BRUSH_INFLATE, inflate); + INIT_BRUSH_ICON(ICON_BRUSH_LAYER, layer); + INIT_BRUSH_ICON(ICON_BRUSH_LIGHTEN, lighten); + INIT_BRUSH_ICON(ICON_BRUSH_MIX, mix); + INIT_BRUSH_ICON(ICON_BRUSH_MULTIPLY, multiply); + INIT_BRUSH_ICON(ICON_BRUSH_NUDGE, nudge); + INIT_BRUSH_ICON(ICON_BRUSH_PINCH, pinch); + INIT_BRUSH_ICON(ICON_BRUSH_SCRAPE, scrape); + INIT_BRUSH_ICON(ICON_BRUSH_SMEAR, smear); + INIT_BRUSH_ICON(ICON_BRUSH_SMOOTH, smooth); + INIT_BRUSH_ICON(ICON_BRUSH_SNAKE_HOOK, snake_hook); + INIT_BRUSH_ICON(ICON_BRUSH_SOFTEN, soften); + INIT_BRUSH_ICON(ICON_BRUSH_SUBTRACT, subtract); + INIT_BRUSH_ICON(ICON_BRUSH_TEXDRAW, texdraw); + INIT_BRUSH_ICON(ICON_BRUSH_THUMB, thumb); + INIT_BRUSH_ICON(ICON_BRUSH_ROTATE, twist); + INIT_BRUSH_ICON(ICON_BRUSH_VERTEXDRAW, vertexdraw); + +#undef INIT_BRUSH_ICON +} + static void init_internal_icons() { bTheme *btheme= U.themes.first; @@ -740,6 +785,7 @@ void UI_icons_init(int first_dyn_id) init_iconfile_list(&iconfilelist); BKE_icons_init(first_dyn_id); init_internal_icons(); + init_brush_icons(); } /* Render size for preview images at level miplevel */ |