2.5 Buttons:
authorThomas Dinges <blender@dingto.org>
Tue, 5 May 2009 04:07:08 +0000 (04:07 +0000)
committerThomas Dinges <blender@dingto.org>
Tue, 5 May 2009 04:07:08 +0000 (04:07 +0000)
* Some minor code cleanup
* More tweaks to match the Layout Guidelines "Dependencies ".

release/ui/buttons_data.py
release/ui/buttons_scene.py
release/ui/buttons_world.py

index 6eb11a76823af90c600e6ca659d70ac5a6f1006d..5d82221b13499d37dcf211f1200183e7e4a316b5 100644 (file)
@@ -114,7 +114,7 @@ class DATA_PT_cameradisplay(DataButtonsPanel):
                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 @@ class DATA_PT_cameradisplay(DataButtonsPanel):
                
                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")
                
index cae02666abe73f638f3a4a26bb323af45810f58c..6b3c7dca49dc471d914bca071c87e2583dff3622 100644 (file)
@@ -18,7 +18,7 @@ class RENDER_PT_shading(RenderButtonsPanel):
                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 @@ class RENDER_PT_shading(RenderButtonsPanel):
                
                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 @@ class RENDER_PT_render(RenderButtonsPanel):
                
                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 @@ class RENDER_PT_render(RenderButtonsPanel):
                
                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):
index 699f7c331f4f6be51f9ab396132f7d05ea930ec5..44ce472bf5d4682e14d3df45dc609a3d7df9da78 100644 (file)
@@ -46,13 +46,16 @@ class WORLD_PT_mist(WorldButtonsPanel):
 
                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 @@ class WORLD_PT_stars(WorldButtonsPanel):
 
                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 @@ class WORLD_PT_ambient_occlusion(WorldButtonsPanel):
                
                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)