[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16678] trunk/blender/source/blender/src/ buttons_shading.c: Realy time for 2.5!

Ton Roosendaal ton at blender.org
Mon Sep 22 17:38:21 CEST 2008


Revision: 16678
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16678
Author:   ton
Date:     2008-09-22 17:38:17 +0200 (Mon, 22 Sep 2008)

Log Message:
-----------
Realy time for 2.5! 
Takes half an hour to find a nice empty spot for a button! Another attempt
to locate new shadow color swatch. Now back in shadow panel, bottom.

Modified Paths:
--------------
    trunk/blender/source/blender/src/buttons_shading.c

Modified: trunk/blender/source/blender/src/buttons_shading.c
===================================================================
--- trunk/blender/source/blender/src/buttons_shading.c	2008-09-22 15:37:32 UTC (rev 16677)
+++ trunk/blender/source/blender/src/buttons_shading.c	2008-09-22 15:38:17 UTC (rev 16678)
@@ -2766,6 +2766,17 @@
 	}
 	else uiDefBut(block, LABEL,0," ",	100,180,200,19,NULL, 0, 0, 0, 0, "");
 
+	if(ELEM4(la->type, LA_AREA, LA_SPOT, LA_SUN, LA_LOCAL) && ((la->mode & LA_SHAD_RAY)||(la->mode & LA_SHAD_BUF))) {
+		short yval= 10;
+		if(la->type == LA_SPOT && (la->mode & LA_SHAD_BUF)) 
+			yval= -15;
+		if(la->type != LA_SPOT)
+			uiDefBut(block, LABEL, 0, "Shadow",	10,30,90,19,NULL, 0, 0, 0, 0, "");
+			
+		uiBlockBeginAlign(block);
+		uiDefButF(block, COL, 0, "",			10,yval,90,19,&la->shdwr, 0, 0, 0, B_COLLAMP, "Sets the shadow color; default is black (RGB 0,0,0)");
+	}
+
 }
 
 /* yafray: adaptation of lamp_panel_spot above with yafray specific parameters */
@@ -2981,25 +2992,18 @@
 	uiBlockEndAlign(block);
 	
 	uiDefButF(block, COL, B_LAMPPRV, "",		120,52,180,24, &la->r, 0, 0, 0, B_COLLAMP, "");
+	uiBlockEndAlign(block);
 	
-	uiBlockBeginAlign(block);
 	if (ELEM(la->type, LA_LOCAL, LA_SPOT) && (la->falloff_type == LA_FALLOFF_SLIDERS)) {
+		uiBlockBeginAlign(block);
 		uiDefButF(block, NUMSLI,B_LAMPPRV,"Linear ",	120,30,180,19,&la->att1, 0.0, 1.0, 0, 0, "Set the linear distance attenuation for a Lin/Quad Weighted lamp");
 		uiDefButF(block, NUMSLI,B_LAMPPRV,"Quad ",  120,10,180,19,&la->att2, 0.0, 1.0, 0, 0, "Set the quadratic distance attenuation for a Lin/Quad Weighted lamp");
 	}
 	else if(la->type==LA_AREA) {
 		if(la->k==0.0) la->k= 1.0;
-		uiDefButF(block, NUM,B_LAMPPRV, "Gam. ",	10,95,100,19, &la->k, 0.001, 2.0, 100, 0, "Set the light gamma correction value");
+		uiDefButF(block, NUMSLI,B_LAMPPRV,"Gamma ",	120,10,180,19,&la->k, 0.001, 2.0, 100, 0, "Set the light gamma correction value");
 	}
-	uiBlockEndAlign(block);
 	
-	if(ELEM4(la->type, LA_AREA, LA_SPOT, LA_SUN, LA_LOCAL) && ((la->mode & LA_SHAD_RAY)||(la->mode & LA_SHAD_BUF))) {
-		
-		uiDefBut(block, LABEL, 0, "Shadow Color",			120, 32, 180, 20, 0, 0.0, 0.0, 0, 0, "");
-		uiBlockBeginAlign(block);
-		uiDefButF(block, COL, 0, "Shadow ",				120,10,180,22,&la->shdwr, 0, 0, 0, B_COLLAMP, "Sets the shadow color; default is black (RGB 0,0,0)");
-		
-	}
 }
 
 





More information about the Bf-blender-cvs mailing list