From 65ddef19b92d39415a5943e01903d66ede9f1df6 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Fri, 19 Sep 2008 16:01:22 +0000 Subject: Patch #13422, By Roland Hess, Shadow Color Finally, after a long time new render candy for the non-game peoples! :) Good doc is here: (url splits in two) http://www.harkyman.com/2008/08/06/controllable-shadow-intensity- and-color/ Note the colorpicker for shadow is in "Shadow and Spot" panel. A bit hidden, could get more attention. For later. :) --- source/blender/src/buttons_shading.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'source/blender/src/buttons_shading.c') diff --git a/source/blender/src/buttons_shading.c b/source/blender/src/buttons_shading.c index 6d5e1a62ad4..c41047ed788 100644 --- a/source/blender/src/buttons_shading.c +++ b/source/blender/src/buttons_shading.c @@ -2535,7 +2535,10 @@ static void lamp_panel_mapto(Object *ob, Lamp *la) uiDefButF(block, NUMSLI, B_LAMPPRV, "DVar ", 10,10,135,19, &(mtex->def_var), 0.0, 1.0, 0, 0, "Value to use for Ref, Spec, Amb, Emit, Alpha, RayMir, TransLu and Hard"); /* MAP TO */ - uiDefButBitS(block, TOG, MAP_COL, B_LAMPPRV, "Col", 10,180,135,19, &(mtex->mapto), 0, 0, 0, 0, "Lets the texture affect the basic color of the lamp"); + uiBlockBeginAlign(block); + uiDefButBitS(block, TOG, LAMAP_COL, B_LAMPPRV, "Col", 10,180,135,19, &(mtex->mapto), 0, 0, 0, 0, "Lets the texture affect the basic color of the lamp"); + uiDefButBitS(block, TOG, LAMAP_SHAD, B_LAMPPRV, "Shadow", 146,180,135,19, &(mtex->mapto), 0, 0, 0, 0, "Lets the texture affect the shadow color of the lamp"); + uiBlockEndAlign(block); uiBlockBeginAlign(block); uiDefButS(block, MENU, B_LAMPPRV, mapto_blendtype_pup(),155,125,155,19, &(mtex->blendtype), 0, 0, 0, 0, "Texture blending mode"); @@ -2669,6 +2672,12 @@ static void lamp_panel_spot(Object *ob, Lamp *la) uiDefButBitI(block, TOG, LA_LAYER_SHADOW, B_LAMPPRV,"Layer", 10,90,80,19,&la->mode, 0, 0, 0, 0, "Causes only objects on the same layer to cast shadows"); uiBlockEndAlign(block); + if(ELEM4(la->type, LA_AREA, LA_SPOT, LA_SUN, LA_LOCAL) && ((la->mode & LA_SHAD_RAY)||(la->mode & LA_SHAD_BUF))) { + uiBlockBeginAlign(block); + uiDefButF(block, COL, 0, "Shadow ", 10,90,80,19,&la->shdwr, 0, 0, 0, B_COLLAMP, "Sets the shadow color; default is black (RGB 0,0,0)"); + uiBlockEndAlign(block); + } + if(la->type==LA_SPOT) { uiBlockBeginAlign(block); uiDefButBitI(block, TOG, LA_SQUARE, B_LAMPREDRAW,"Square", 10,60,80,19,&la->mode, 0, 0, 0, 0, "Sets square spotbundles"); -- cgit v1.2.3