2.5 Buttons:

* Some minor code cleanup
* More tweaks to match the Layout Guidelines "Dependencies ".
This commit is contained in:
2009-05-05 04:07:08 +00:00
parent 08df158672
commit 33322ad1ff
3 changed files with 59 additions and 54 deletions

View 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")

View 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):

View 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.row()
layout.itemR(ao, "passes")
layout.itemR(ao, "error_tolerance")
layout.row()
layout.itemR(ao, "correction")
layout.itemR(ao, "pixel_cache")
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.itemS()
layout.row()
layout.itemS()
layout.row()
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)