[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [21968] branches/blender2.5/blender/ release/ui/buttons_data_lamp.py: 2.5 Lamp Buttons:

Thomas Dinges dingto at gmx.de
Tue Jul 28 13:04:09 CEST 2009


Revision: 21968
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=21968
Author:   dingto
Date:     2009-07-28 13:04:08 +0200 (Tue, 28 Jul 2009)

Log Message:
-----------
2.5 Lamp Buttons:

* Some layout tweaks and fixes by nudelZ.

Modified Paths:
--------------
    branches/blender2.5/blender/release/ui/buttons_data_lamp.py

Modified: branches/blender2.5/blender/release/ui/buttons_data_lamp.py
===================================================================
--- branches/blender2.5/blender/release/ui/buttons_data_lamp.py	2009-07-28 10:57:36 UTC (rev 21967)
+++ branches/blender2.5/blender/release/ui/buttons_data_lamp.py	2009-07-28 11:04:08 UTC (rev 21968)
@@ -49,10 +49,13 @@
 		split = layout.split()
 		
 		col = split.column()
-		col.itemR(lamp, "color", text="")
-		col.itemR(lamp, "energy")
+		sub = col.column(align=True)
+		sub.itemR(lamp, "color", text="")
+		sub.itemR(lamp, "energy")
 		col.itemR(lamp, "negative")
-		col.itemR(lamp, "distance")
+		
+		if lamp.type == "AREA":
+			col.itemR(lamp, "distance")
 	
 		col = split.column()
 		col.itemR(lamp, "layer", text="This Layer Only")
@@ -67,7 +70,7 @@
 			sub = col.column(align=True)
 			sub.itemR(lamp, "falloff_type", text="")
 			sub.itemR(lamp, "distance")
-			sub.itemR(lamp, "sphere")
+			col.itemR(lamp, "sphere")
 			
 			if lamp.falloff_type == 'LINEAR_QUADRATIC_WEIGHTED':
 				col = split.column()
@@ -201,20 +204,18 @@
 			elif lamp.type == 'AREA':
 				split = layout.split()
 				
-				col = split.column(align=True)
+				col = split.column()
+				sub = split.column(align=True)
 				if lamp.shape == 'SQUARE':
-					col.itemR(lamp, "shadow_ray_samples_x", text="Samples")
+					sub.itemR(lamp, "shadow_ray_samples_x", text="Samples")
 				elif lamp.shape == 'RECTANGLE':
-					col.itemR(lamp, "shadow_ray_samples_x", text="Samples X")
-					col.itemR(lamp, "shadow_ray_samples_y", text="Samples Y")
+					sub.itemR(lamp, "shadow_ray_samples_x", text="Samples X")
+					sub.itemR(lamp, "shadow_ray_samples_y", text="Samples Y")
 					
 				if lamp.shadow_ray_sampling_method == 'ADAPTIVE_QMC':
-					col.itemR(lamp, "shadow_adaptive_threshold", text="Threshold")
-					split.column()
-				elif lamp.shadow_ray_sampling_method == 'CONSTANT_QMC':
-					split.column()
+					sub.itemR(lamp, "shadow_adaptive_threshold", text="Threshold")
+					
 				elif lamp.shadow_ray_sampling_method == 'CONSTANT_JITTERED':
-					col = split.column()
 					col.itemR(lamp, "umbra")
 					col.itemR(lamp, "dither")
 					col.itemR(lamp, "jitter")	





More information about the Bf-blender-cvs mailing list