[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [11104] branches/soc-2007-maike/source/ blender: New event added for world ambient color, exp and range change

Miguel Torres Lima torreslima at gmail.com
Thu Jun 28 19:06:16 CEST 2007


Revision: 11104
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11104
Author:   maike
Date:     2007-06-28 19:06:16 +0200 (Thu, 28 Jun 2007)

Log Message:
-----------
New event added for world ambient color, exp and range change

Modified Paths:
--------------
    branches/soc-2007-maike/source/blender/include/butspace.h
    branches/soc-2007-maike/source/blender/src/butspace.c
    branches/soc-2007-maike/source/blender/src/buttons_shading.c

Modified: branches/soc-2007-maike/source/blender/include/butspace.h
===================================================================
--- branches/soc-2007-maike/source/blender/include/butspace.h	2007-06-28 17:04:24 UTC (rev 11103)
+++ branches/soc-2007-maike/source/blender/include/butspace.h	2007-06-28 17:06:16 UTC (rev 11104)
@@ -191,8 +191,8 @@
 #define B_LAMPQUAD              1150
 #define B_LAMPNEG               1151
 
-
 #define B_GLSLCHANGED           1160
+#define B_WORLDAMB              1161
    
 /* *********************** */
 #define B_MATBUTS		1300

Modified: branches/soc-2007-maike/source/blender/src/butspace.c
===================================================================
--- branches/soc-2007-maike/source/blender/src/butspace.c	2007-06-28 17:04:24 UTC (rev 11103)
+++ branches/soc-2007-maike/source/blender/src/butspace.c	2007-06-28 17:06:16 UTC (rev 11104)
@@ -546,7 +546,11 @@
 
 	if (event <=50){
 		do_global_buttons2(event);
-	}	
+	}
+	else if(event == B_WORLDAMB){
+	        do_worldbuts(event);
+		do_butspace(B_WORLDPRV);
+	}
 	
 	else if(event == B_MAT_TEXFACE){
          	do_matbuts(event);

Modified: branches/soc-2007-maike/source/blender/src/buttons_shading.c
===================================================================
--- branches/soc-2007-maike/source/blender/src/buttons_shading.c	2007-06-28 17:04:24 UTC (rev 11103)
+++ branches/soc-2007-maike/source/blender/src/buttons_shading.c	2007-06-28 17:06:16 UTC (rev 11104)
@@ -1875,6 +1875,7 @@
 	MTex *mtex;
 	
 	switch(event) {
+	  
 	case B_TEXCLEARWORLD:
 		wrld= G.buts->lockpoin;
 		mtex= wrld->mtex[ wrld->texact ];
@@ -1888,6 +1889,9 @@
 			BIF_preview_changed(ID_WO);
 		}
 		break;
+	case B_WORLDAMB:
+	        glsl_update_all_world_uniforms();
+		break;
 	case B_WMTEXCOPY:
 		wrld= G.buts->lockpoin;
 		if(wrld && wrld->mtex[(int)wrld->texact] ) {
@@ -2192,14 +2196,14 @@
 	uiDefButF(block, NUMSLI,B_WORLDPRV,"ZeB ",	160,90,145,19,	&(wrld->zenb), 0.0, 1.0, B_COLZEN,0, "Sets the amount of blue color at the zenith");
 
 	uiBlockBeginAlign(block);
-	uiDefButF(block, NUMSLI,B_WORLDPRV,"AmbR ",	10,50,145,19,	&(wrld->ambr), 0.0, 1.0 ,0,0, "Sets the amount of red ambient color");
-	uiDefButF(block, NUMSLI,B_WORLDPRV,"AmbG ",	10,30,145,19,	&(wrld->ambg), 0.0, 1.0 ,0,0, "Sets the amount of green ambient color");
-	uiDefButF(block, NUMSLI,B_WORLDPRV,"AmbB ",	10,10,145,19,	&(wrld->ambb), 0.0, 1.0 ,0,0, "Sets the amount of blue ambient color");
+	uiDefButF(block, NUMSLI,B_WORLDAMB,"AmbR ",	10,50,145,19,	&(wrld->ambr), 0.0, 1.0 ,0,0, "Sets the amount of red ambient color");
+	uiDefButF(block, NUMSLI,B_WORLDAMB,"AmbG ",	10,30,145,19,	&(wrld->ambg), 0.0, 1.0 ,0,0, "Sets the amount of green ambient color");
+	uiDefButF(block, NUMSLI,B_WORLDAMB,"AmbB ",	10,10,145,19,	&(wrld->ambb), 0.0, 1.0 ,0,0, "Sets the amount of blue ambient color");
 
 	uiBlockBeginAlign(block);
 	uiBlockSetCol(block, TH_BUT_SETTING1);
-	uiDefButF(block, NUMSLI,B_WORLDPRV, "Exp ",			160,30,145,19,	&(wrld->exp), 0.0, 1.0, 0, 2, "Sets amount of exponential color correction for light");
-	uiDefButF(block, NUMSLI,B_WORLDPRV, "Range ",		160,10,145,19,	&(wrld->range), 0.2, 5.0, 0, 2, "Sets the color amount that will be mapped on color 1.0");
+	uiDefButF(block, NUMSLI,B_WORLDAMB, "Exp ",			160,30,145,19,	&(wrld->exp), 0.0, 1.0, 0, 2, "Sets amount of exponential color correction for light");
+	uiDefButF(block, NUMSLI,B_WORLDAMB, "Range ",		160,10,145,19,	&(wrld->range), 0.2, 5.0, 0, 2, "Sets the color amount that will be mapped on color 1.0");
 
 
 }





More information about the Bf-blender-cvs mailing list