Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Dinges <blender@dingto.org>2009-05-05 08:07:08 +0400
committerThomas Dinges <blender@dingto.org>2009-05-05 08:07:08 +0400
commit33322ad1ffa0f9828f56b428b31c460e4c859f63 (patch)
tree5aa1b33420c69b3ca8e8409c91aaa10c1a45e428
parent08df158672184a5459d517cc8841a66a92a07bce (diff)
2.5 Buttons:
* Some minor code cleanup * More tweaks to match the Layout Guidelines "Dependencies ".
-rw-r--r--release/ui/buttons_data.py8
-rw-r--r--release/ui/buttons_scene.py14
-rw-r--r--release/ui/buttons_world.py89
3 files changed, 58 insertions, 53 deletions
diff --git a/release/ui/buttons_data.py b/release/ui/buttons_data.py
index 6eb11a76823..5d82221b134 100644
--- a/release/ui/buttons_data.py
+++ b/release/ui/buttons_data.py
@@ -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")
diff --git a/release/ui/buttons_scene.py b/release/ui/buttons_scene.py
index cae02666abe..6b3c7dca49d 100644
--- a/release/ui/buttons_scene.py
+++ b/release/ui/buttons_scene.py
@@ -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):
diff --git a/release/ui/buttons_world.py b/release/ui/buttons_world.py
index 699f7c331f4..44ce472bf5d 100644
--- a/release/ui/buttons_world.py
+++ b/release/ui/buttons_world.py
@@ -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)