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

Thomas Dinges dingto at gmx.de
Tue May 5 06:07:11 CEST 2009


Revision: 20066
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20066
Author:   dingto
Date:     2009-05-05 06:07:08 +0200 (Tue, 05 May 2009)

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

* Some minor code cleanup
* More tweaks to match the Layout Guidelines "Dependencies ".

Modified Paths:
--------------
    branches/blender2.5/blender/release/ui/buttons_data.py
    branches/blender2.5/blender/release/ui/buttons_scene.py
    branches/blender2.5/blender/release/ui/buttons_world.py

Modified: branches/blender2.5/blender/release/ui/buttons_data.py
===================================================================
--- branches/blender2.5/blender/release/ui/buttons_data.py	2009-05-05 02:24:58 UTC (rev 20065)
+++ branches/blender2.5/blender/release/ui/buttons_data.py	2009-05-05 04:07:08 UTC (rev 20066)
@@ -114,7 +114,7 @@
 		layout.split(number=2)
 		
 		sub = layout.sub(0)
-		sub.column_flow()
+		sub.column()
 		sub.itemR(cam, "show_limits", text="Limits")
 		sub.itemR(cam, "show_mist", text="Mist")
 		sub.itemR(cam, "show_title_safe", text="Title Safe")
@@ -122,10 +122,10 @@
 		
 		sub = layout.sub(1)
 		subsub = sub.box()
-		subsub.row()
+		subsub.column()
 		subsub.itemR(cam, "show_passepartout", text="Passepartout")
-		subsub.row()
-		subsub.itemR(cam, "passepartout_alpha", text="Alpha")
+		if (cam.show_passepartout):
+			subsub.itemR(cam, "passepartout_alpha", text="Alpha")
 		sub.row()
 		sub.itemR(cam, "draw_size", text="Size")
 		

Modified: branches/blender2.5/blender/release/ui/buttons_scene.py
===================================================================
--- branches/blender2.5/blender/release/ui/buttons_scene.py	2009-05-05 02:24:58 UTC (rev 20065)
+++ branches/blender2.5/blender/release/ui/buttons_scene.py	2009-05-05 04:07:08 UTC (rev 20066)
@@ -18,7 +18,7 @@
 		layout.split(number=2)
 		
 		sub = layout.sub(0)
-		sub.column_flow()
+		sub.column()
 		sub.itemR(rd, "render_shadows", text="Shadows")
 		sub.itemR(rd, "render_sss", text="SSS")
 		sub.itemR(rd, "render_envmaps", text="EnvMap")
@@ -26,7 +26,7 @@
 		
 		sub = layout.sub(1)
 		subsub = sub.box()
-		subsub.column_flow()
+		subsub.column()
 		subsub.itemR(rd, "render_raytracing", text="Ray Tracing")
 		if (rd.render_raytracing):
 			subsub.itemR(rd, "octree_resolution", text="Octree")
@@ -122,19 +122,19 @@
 		
 		sub = layout.sub(0)
 		subsub = sub.box()
-		subsub.column_flow()
+		subsub.column()
 		subsub.itemL(text="Threads Mode:")
 		subsub.itemR(rd, "threads_mode", expand=True)
 		if rd.threads_mode == 'THREADS_FIXED':
 			subsub.itemR(rd, "threads")
 		
 		subsub = sub.box()
-		subsub.column_flow()
+		subsub.column()
 		subsub.itemL(text="Distributed Rendering:")
 		subsub.itemR(rd, "placeholders")
 		subsub.itemR(rd, "no_overwrite")
 		subsub = sub.box()
-		subsub.column_flow()
+		subsub.column()
 		subsub.itemR(rd, "fields", text="Fields")
 		if (rd.fields):
 			subsub.itemR(rd, "fields_still", text="Still")
@@ -142,14 +142,14 @@
 		
 		sub = layout.sub(1)
 		subsub = sub.box()
-		subsub.column_flow()
+		subsub.column()
 		subsub.itemL(text="Extra:")
 		subsub.itemR(rd, "panorama")
 		subsub.itemR(rd, "backbuf")
 		subsub.itemR(rd, "free_image_textures")
 		
 		subsub = sub.box()
-		subsub.column_flow()
+		subsub.column()
 		subsub.itemL(text="Border:")
 		subsub.itemR(rd, "border", text="Border Render")
 		if (rd.border):

Modified: branches/blender2.5/blender/release/ui/buttons_world.py
===================================================================
--- branches/blender2.5/blender/release/ui/buttons_world.py	2009-05-05 02:24:58 UTC (rev 20065)
+++ branches/blender2.5/blender/release/ui/buttons_world.py	2009-05-05 04:07:08 UTC (rev 20066)
@@ -46,13 +46,16 @@
 
 		layout.row()
 		layout.itemR(world.mist, "enabled", text="Enable")
-		layout.itemR(world.mist, "falloff")
+		if (world.mist.enabled):
 	
-		layout.column_flow()
-		layout.itemR(world.mist, "start")
-		layout.itemR(world.mist, "depth")
-		layout.itemR(world.mist, "height")
-		layout.itemR(world.mist, "intensity")
+			layout.column_flow()
+			layout.itemR(world.mist, "start")
+			layout.itemR(world.mist, "depth")
+			layout.itemR(world.mist, "height")
+			layout.itemR(world.mist, "intensity")
+			layout.column()
+			layout.itemL(text="Fallof:")
+			layout.itemR(world.mist, "falloff", expand=True)
 		
 class WORLD_PT_stars(WorldButtonsPanel):
 	__label__ = "Stars"
@@ -63,12 +66,13 @@
 
 		layout.row()
 		layout.itemR(world.stars, "enabled", text="Enable")
+		if (world.stars.enabled):
 
-		layout.column_flow()
-		layout.itemR(world.stars, "size")
-		layout.itemR(world.stars, "min_distance", text="MinDist")
-		layout.itemR(world.stars, "average_separation", text="StarDist")
-		layout.itemR(world.stars, "color_randomization", text="Colnoise")
+			layout.column_flow()
+			layout.itemR(world.stars, "size")
+			layout.itemR(world.stars, "min_distance", text="MinDist")
+			layout.itemR(world.stars, "average_separation", text="StarDist")
+			layout.itemR(world.stars, "color_randomization", text="Colnoise")
 		
 class WORLD_PT_ambient_occlusion(WorldButtonsPanel):
 	__label__ = "Ambient Occlusion"
@@ -81,46 +85,47 @@
 		
 		layout.row()
 		layout.itemR(ao, "enabled", text="Enable")
+		if (ao.enabled):
 
-		layout.row()
-		layout.itemR(ao, "gather_method", expand=True)
-		
-		if ao.gather_method == 'RAYTRACE':
 			layout.row()
-			layout.itemR(ao, "samples")
-			layout.itemR(ao, "distance")
+			layout.itemR(ao, "gather_method", expand=True)
 			
-			layout.row()
-			layout.itemR(ao, "sample_method")
-			if ao.sample_method == 'ADAPTIVE_QMC':
+			if ao.gather_method == 'RAYTRACE':
 				layout.row()
-				layout.itemR(ao, "threshold")
-				layout.itemR(ao, "adapt_to_speed")
+				layout.itemR(ao, "samples")
+				layout.itemR(ao, "distance")
 				
-			if ao.sample_method == 'CONSTANT_JITTERED':
 				layout.row()
-				layout.itemR(ao, "bias")
-						
-		if ao.gather_method == 'APPROXIMATE':
+				layout.itemR(ao, "sample_method")
+				if ao.sample_method == 'ADAPTIVE_QMC':
+					layout.row()
+					layout.itemR(ao, "threshold")
+					layout.itemR(ao, "adapt_to_speed")
+					
+				if ao.sample_method == 'CONSTANT_JITTERED':
+					layout.row()
+					layout.itemR(ao, "bias")
+							
+			if ao.gather_method == 'APPROXIMATE':
+				layout.row()
+				layout.itemR(ao, "passes")
+				layout.itemR(ao, "error_tolerance")
+				
+				layout.row()
+				layout.itemR(ao, "correction")
+				layout.itemR(ao, "pixel_cache")
+
 			layout.row()
-			layout.itemR(ao, "passes")
-			layout.itemR(ao, "error_tolerance")
-			
+			layout.itemS()
+				
 			layout.row()
-			layout.itemR(ao, "correction")
-			layout.itemR(ao, "pixel_cache")
-
-		layout.row()
-		layout.itemS()
+			layout.itemR(ao, "falloff")	
+			layout.itemR(ao, "strength")
 			
-		layout.row()
-		layout.itemR(ao, "falloff")	
-		layout.itemR(ao, "strength")
-		
-		layout.column()
-		layout.itemR(ao, "blend_mode", expand=True)
-		layout.itemR(ao, "color", expand=True)
-		layout.itemR(ao, "energy")
+			layout.column()
+			layout.itemR(ao, "blend_mode", expand=True)
+			layout.itemR(ao, "color", expand=True)
+			layout.itemR(ao, "energy")
 	
 bpy.types.register(WORLD_PT_world)
 bpy.types.register(WORLD_PT_mist)





More information about the Bf-blender-cvs mailing list