diff options
Diffstat (limited to 'source/blender/src/editsima.c')
-rw-r--r-- | source/blender/src/editsima.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/src/editsima.c b/source/blender/src/editsima.c index 2af4444cd08..40cbe36ac8c 100644 --- a/source/blender/src/editsima.c +++ b/source/blender/src/editsima.c @@ -1881,7 +1881,8 @@ void reload_image_sima(void) void new_image_sima(void) { static int width= 256, height= 256; - static short uvtestgrid=0; + static short uvtestgrid= 0; + static float color[] = {0, 0, 0, 1}; char name[22]; strcpy(name, "Untitled"); @@ -1889,11 +1890,13 @@ void new_image_sima(void) add_numbut(0, TEX, "Name:", 0, 21, name, NULL); add_numbut(1, NUM|INT, "Width:", 1, 5000, &width, NULL); add_numbut(2, NUM|INT, "Height:", 1, 5000, &height, NULL); - add_numbut(3, TOG|SHO, "UV Test Grid", 0, 0, &uvtestgrid, NULL); - if (!do_clever_numbuts("New Image", 4, REDRAW)) - return; + add_numbut(3, COL, "", 0, 0, &color, NULL); + add_numbut(4, NUM|FLO, "Alpha:", 0.0, 1.0, &color[3], NULL); + add_numbut(5, TOG|SHO, "UV Test Grid", 0, 0, &uvtestgrid, NULL); + if (!do_clever_numbuts("New Image", 6, REDRAW)) + return; - G.sima->image= BKE_add_image_size(width, height, name, uvtestgrid); + G.sima->image= BKE_add_image_size(width, height, name, uvtestgrid, color); BKE_image_signal(G.sima->image, &G.sima->iuser, IMA_SIGNAL_USER_NEW_IMAGE); image_changed(G.sima, 0); |