diff options
author | Ton Roosendaal <ton@blender.org> | 2013-02-05 20:16:07 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2013-02-05 20:16:07 +0400 |
commit | 134c656878f63e597b250fa2a89eaf9196120d57 (patch) | |
tree | f077a8e4bb202a7167bf655bad1a8beafe020f69 /source/blender/editors | |
parent | c8e0f993cdc04a5b05c3fb0e7bb5ee13e5fd13c3 (diff) |
New matcap collection for default in release. It's now 24 images, ordered
from regular diffuse to more shiny, stone, wax, eflective, glass and two non-realistic ones.
The menu now shows it in 3 rows. I made the previews a bit smaller, 96 pixels,
like the brushes for painting.
Thanks everyone for submitting pics! I updated the credit file too, but name
from one person is missing still, will be added next.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/datafiles/CMakeLists.txt | 8 | ||||
-rw-r--r-- | source/blender/editors/datafiles/SConscript | 8 | ||||
-rw-r--r-- | source/blender/editors/include/ED_datafiles.h | 24 | ||||
-rw-r--r-- | source/blender/editors/include/UI_icons.h | 8 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_icons.c | 12 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 7 |
6 files changed, 62 insertions, 5 deletions
diff --git a/source/blender/editors/datafiles/CMakeLists.txt b/source/blender/editors/datafiles/CMakeLists.txt index ed3088696b1..8d108644470 100644 --- a/source/blender/editors/datafiles/CMakeLists.txt +++ b/source/blender/editors/datafiles/CMakeLists.txt @@ -100,6 +100,14 @@ if(WITH_BLENDER) data_to_c_simple(../../../../release/datafiles/matcaps/mc14.jpg SRC) data_to_c_simple(../../../../release/datafiles/matcaps/mc15.jpg SRC) data_to_c_simple(../../../../release/datafiles/matcaps/mc16.jpg SRC) + data_to_c_simple(../../../../release/datafiles/matcaps/mc17.jpg SRC) + data_to_c_simple(../../../../release/datafiles/matcaps/mc18.jpg SRC) + data_to_c_simple(../../../../release/datafiles/matcaps/mc19.jpg SRC) + data_to_c_simple(../../../../release/datafiles/matcaps/mc20.jpg SRC) + data_to_c_simple(../../../../release/datafiles/matcaps/mc21.jpg SRC) + data_to_c_simple(../../../../release/datafiles/matcaps/mc22.jpg SRC) + data_to_c_simple(../../../../release/datafiles/matcaps/mc23.jpg SRC) + data_to_c_simple(../../../../release/datafiles/matcaps/mc24.jpg SRC) endif() diff --git a/source/blender/editors/datafiles/SConscript b/source/blender/editors/datafiles/SConscript index fb1f9f37975..c17ab386fe6 100644 --- a/source/blender/editors/datafiles/SConscript +++ b/source/blender/editors/datafiles/SConscript @@ -95,6 +95,14 @@ sources.extend(( os.path.join(env['DATA_SOURCES'], "mc14.jpg.c"), os.path.join(env['DATA_SOURCES'], "mc15.jpg.c"), os.path.join(env['DATA_SOURCES'], "mc16.jpg.c"), + os.path.join(env['DATA_SOURCES'], "mc17.jpg.c"), + os.path.join(env['DATA_SOURCES'], "mc18.jpg.c"), + os.path.join(env['DATA_SOURCES'], "mc19.jpg.c"), + os.path.join(env['DATA_SOURCES'], "mc20.jpg.c"), + os.path.join(env['DATA_SOURCES'], "mc21.jpg.c"), + os.path.join(env['DATA_SOURCES'], "mc22.jpg.c"), + os.path.join(env['DATA_SOURCES'], "mc23.jpg.c"), + os.path.join(env['DATA_SOURCES'], "mc24.jpg.c"), )) diff --git a/source/blender/editors/include/ED_datafiles.h b/source/blender/editors/include/ED_datafiles.h index 19552d60387..81dbb8e9aa5 100644 --- a/source/blender/editors/include/ED_datafiles.h +++ b/source/blender/editors/include/ED_datafiles.h @@ -206,6 +206,30 @@ extern char datatoc_mc15_jpg[]; extern int datatoc_mc16_jpg_size; extern char datatoc_mc16_jpg[]; +extern int datatoc_mc17_jpg_size; +extern char datatoc_mc17_jpg[]; + +extern int datatoc_mc18_jpg_size; +extern char datatoc_mc18_jpg[]; + +extern int datatoc_mc19_jpg_size; +extern char datatoc_mc19_jpg[]; + +extern int datatoc_mc20_jpg_size; +extern char datatoc_mc20_jpg[]; + +extern int datatoc_mc21_jpg_size; +extern char datatoc_mc21_jpg[]; + +extern int datatoc_mc22_jpg_size; +extern char datatoc_mc22_jpg[]; + +extern int datatoc_mc23_jpg_size; +extern char datatoc_mc23_jpg[]; + +extern int datatoc_mc24_jpg_size; +extern char datatoc_mc24_jpg[]; + #endif /* __ED_DATAFILES_H__ */ diff --git a/source/blender/editors/include/UI_icons.h b/source/blender/editors/include/UI_icons.h index f5ac3f19b5b..0560cbd69cc 100644 --- a/source/blender/editors/include/UI_icons.h +++ b/source/blender/editors/include/UI_icons.h @@ -1007,6 +1007,14 @@ DEF_ICON(MATCAP_13) DEF_ICON(MATCAP_14) DEF_ICON(MATCAP_15) DEF_ICON(MATCAP_16) +DEF_ICON(MATCAP_17) +DEF_ICON(MATCAP_18) +DEF_ICON(MATCAP_19) +DEF_ICON(MATCAP_20) +DEF_ICON(MATCAP_21) +DEF_ICON(MATCAP_22) +DEF_ICON(MATCAP_23) +DEF_ICON(MATCAP_24) /* vector icons, VICO_ prefix added */ DEF_VICO(VIEW3D_VEC) diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index 1a3d8d20d47..086e9dad895 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -533,7 +533,7 @@ static void icon_verify_datatoc(IconImage *iimg) iimg->datatoc_size, IB_rect, NULL, "<matcap icon>"); /* w and h were set on initialize */ if (bbuf->x != iimg->h && bbuf->y != iimg->w) - IMB_scalefastImBuf(bbuf, iimg->w, iimg->h); + IMB_scaleImBuf(bbuf, iimg->w, iimg->h); iimg->rect = bbuf->rect; bbuf->rect = NULL; @@ -550,7 +550,7 @@ static void init_matcap_icons(void) int size = datatoc_ ##name## _jpg_size; \ DrawInfo *di; \ \ - di = def_internal_icon(NULL, icon_id, 0, 0, 128, ICON_TYPE_BUFFER); \ + di = def_internal_icon(NULL, icon_id, 0, 0, 96, ICON_TYPE_BUFFER); \ di->data.buffer.image->datatoc_rect = rect; \ di->data.buffer.image->datatoc_size = size; \ } (void)0 @@ -571,6 +571,14 @@ static void init_matcap_icons(void) INIT_MATCAP_ICON(ICON_MATCAP_14, mc14); INIT_MATCAP_ICON(ICON_MATCAP_15, mc15); INIT_MATCAP_ICON(ICON_MATCAP_16, mc16); + INIT_MATCAP_ICON(ICON_MATCAP_17, mc17); + INIT_MATCAP_ICON(ICON_MATCAP_18, mc18); + INIT_MATCAP_ICON(ICON_MATCAP_19, mc19); + INIT_MATCAP_ICON(ICON_MATCAP_20, mc20); + INIT_MATCAP_ICON(ICON_MATCAP_21, mc21); + INIT_MATCAP_ICON(ICON_MATCAP_22, mc22); + INIT_MATCAP_ICON(ICON_MATCAP_23, mc23); + INIT_MATCAP_ICON(ICON_MATCAP_24, mc24); #undef INIT_MATCAP_ICON diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 26a8f703545..ff47d481fc8 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -1585,11 +1585,12 @@ static uiBlock *icon_view_menu(bContext *C, ARegion *ar, void *arg_litem) for (a = 0; item[a].identifier; a++) { int x, y; - x = (a % 8) * UI_UNIT_X * 6; - y = (a / 8) * UI_UNIT_X * 6; + /* XXX hardcoded size to 5 x unit */ + x = (a % 8) * UI_UNIT_X * 5; + y = (a / 8) * UI_UNIT_X * 5; icon = item[a].icon; - but = uiDefIconButR_prop(block, ROW, 0, icon, x, y, UI_UNIT_X * 6, UI_UNIT_Y * 6, &cb.ptr, cb.prop, -1, 0, icon, -1, -1, NULL); + but = uiDefIconButR_prop(block, ROW, 0, icon, x, y, UI_UNIT_X * 5, UI_UNIT_Y * 5, &cb.ptr, cb.prop, -1, 0, icon, -1, -1, NULL); uiButSetFlag(but, UI_HAS_ICON | UI_ICON_PREVIEW); } |