Assorted UI tweaks/cleanups
[blender.git] / release / ui / buttons_world.py
index 124c9d3d766131f2ab5d64c44f34353dc69538b8..f8ccf4f329f958f6f4eb7611c6f71e33ff4d46af 100644 (file)
@@ -46,16 +46,15 @@ class WORLD_PT_mist(WorldButtonsPanel):
 
                row = layout.row()
                row.itemR(world.mist, "enabled", text="Enable")
-               if (world.mist.enabled):
-       
-                       flow = layout.column_flow()
-                       flow.itemR(world.mist, "start")
-                       flow.itemR(world.mist, "depth")
-                       flow.itemR(world.mist, "height")
-                       flow.itemR(world.mist, "intensity")
-                       col = layout.column()
-                       col.itemL(text="Fallof:")
-                       col.row().itemR(world.mist, "falloff", expand=True)
+
+               flow = layout.column_flow()
+               flow.itemR(world.mist, "start")
+               flow.itemR(world.mist, "depth")
+               flow.itemR(world.mist, "height")
+               flow.itemR(world.mist, "intensity")
+               col = layout.column()
+               col.itemL(text="Fallof:")
+               col.row().itemR(world.mist, "falloff", expand=True)
                
 class WORLD_PT_stars(WorldButtonsPanel):
        __label__ = "Stars"
@@ -66,13 +65,12 @@ class WORLD_PT_stars(WorldButtonsPanel):
 
                row = layout.row()
                row.itemR(world.stars, "enabled", text="Enable")
-               if (world.stars.enabled):
 
-                       flow = layout.column_flow()
-                       flow.itemR(world.stars, "size")
-                       flow.itemR(world.stars, "min_distance", text="MinDist")
-                       flow.itemR(world.stars, "average_separation", text="StarDist")
-                       flow.itemR(world.stars, "color_randomization", text="Colnoise")
+               flow = layout.column_flow()
+               flow.itemR(world.stars, "size")
+               flow.itemR(world.stars, "min_distance", text="Min. Dist")
+               flow.itemR(world.stars, "average_separation", text="Separation")
+               flow.itemR(world.stars, "color_randomization", text="Random:")
                
 class WORLD_PT_ambient_occlusion(WorldButtonsPanel):
        __label__ = "Ambient Occlusion"
@@ -85,51 +83,49 @@ class WORLD_PT_ambient_occlusion(WorldButtonsPanel):
                
                row = layout.row()
                row.itemR(ao, "enabled", text="Enable")
-               if (ao.enabled):
-
+               row = layout.row()
+               row.itemR(ao, "gather_method", expand=True)
+               
+               if ao.gather_method == 'RAYTRACE':
                        row = layout.row()
-                       row.itemR(ao, "gather_method", expand=True)
+                       row.itemR(ao, "samples")
+                       row.itemR(ao, "distance")
                        
-                       if ao.gather_method == 'RAYTRACE':
-                               row = layout.row()
-                               row.itemR(ao, "samples")
-                               row.itemR(ao, "distance")
-                               
-                               row = layout.row()
-                               row.itemR(ao, "sample_method")
-                               if ao.sample_method == 'ADAPTIVE_QMC':
-                                       row = layout.row()
-                                       row.itemR(ao, "threshold")
-                                       row.itemR(ao, "adapt_to_speed")
-                                       
-                               if ao.sample_method == 'CONSTANT_JITTERED':
-                                       row = layout.row()
-                                       row.itemR(ao, "bias")
-                                                       
-                       if ao.gather_method == 'APPROXIMATE':
+                       row = layout.row()
+                       row.itemR(ao, "sample_method")
+                       if ao.sample_method == 'ADAPTIVE_QMC':
                                row = layout.row()
-                               row.itemR(ao, "passes")
-                               row.itemR(ao, "error_tolerance")
+                               row.itemR(ao, "threshold")
+                               row.itemR(ao, "adapt_to_speed")
                                
+                       if ao.sample_method == 'CONSTANT_JITTERED':
                                row = layout.row()
-                               row.itemR(ao, "correction")
-                               row.itemR(ao, "pixel_cache")
-
+                               row.itemR(ao, "bias")
+                                               
+               if ao.gather_method == 'APPROXIMATE':
                        row = layout.row()
-                       row.itemS()
-                               
+                       row.itemR(ao, "passes")
+                       row.itemR(ao, "error_tolerance", text="Error")
+                       
                        row = layout.row()
-                       row.itemR(ao, "falloff")        
-                       row.itemR(ao, "strength")
+                       row.itemR(ao, "correction")
+                       row.itemR(ao, "pixel_cache")
+
+               row = layout.row()
+               row.itemS()
                        
-                       col = layout.column()
-                       col.row().itemR(ao, "blend_mode", expand=True)
-                       col.row().itemR(ao, "color", expand=True)
-                       col.itemR(ao, "energy")
+               row = layout.row()
+               row.itemR(ao, "falloff")        
+               row.itemR(ao, "strength")
+               
+               col = layout.column()
+               col.row().itemR(ao, "blend_mode", expand=True)
+               col.row().itemR(ao, "color", expand=True)
+               col.itemR(ao, "energy")
        
 bpy.types.register(WORLD_PT_world)
+bpy.types.register(WORLD_PT_ambient_occlusion)
 bpy.types.register(WORLD_PT_mist)
 bpy.types.register(WORLD_PT_stars)
-bpy.types.register(WORLD_PT_ambient_occlusion)
 bpy.types.register(WORLD_PT_color_correction)