Implemented suggestion be Matt to slightly tweak the code for single column UI

This commit is contained in:
2009-11-12 13:05:12 +00:00
parent 4f47f21d44
commit bee2335aa0
5 changed files with 117 additions and 82 deletions

View File

@@ -43,14 +43,14 @@ class RENDER_PT_render(RenderButtonsPanel):
layout = self.layout
rd = context.scene.render_data
global narrowui
col2 = context.region.width > narrowui
split = layout.split()
col = split.column()
col.itemO("screen.render", text="Image", icon='ICON_RENDER_STILL')
if (context.region.width > narrowui):
if col2:
col = split.column()
col.item_booleanO("screen.render", "animation", True, text="Animation", icon='ICON_RENDER_ANIMATION')
@@ -67,7 +67,8 @@ class RENDER_PT_layers(RenderButtonsPanel):
scene = context.scene
rd = scene.render_data
col2 = context.region.width > narrowui
row = layout.row()
row.template_list(rd, "layers", rd, "active_layer_index", rows=2)
@@ -84,7 +85,7 @@ class RENDER_PT_layers(RenderButtonsPanel):
col = split.column()
col.itemR(scene, "visible_layers", text="Scene")
if (context.region.width > narrowui):
if col2:
col = split.column()
col.itemR(rl, "visible_layers", text="Layer")
@@ -132,7 +133,7 @@ class RENDER_PT_layers(RenderButtonsPanel):
col.itemR(rl, "pass_mist")
col.itemR(rl, "pass_object_index")
if (context.region.width > narrowui):
if col2:
col = split.column()
col.itemL()
col.itemR(rl, "pass_color")
@@ -162,7 +163,8 @@ class RENDER_PT_shading(RenderButtonsPanel):
layout = self.layout
rd = context.scene.render_data
col2 = context.region.width > narrowui
split = layout.split()
col = split.column()
@@ -171,7 +173,7 @@ class RENDER_PT_shading(RenderButtonsPanel):
col.itemR(rd, "render_sss", text="Subsurface Scattering")
col.itemR(rd, "render_envmaps", text="Environment Map")
if (context.region.width > narrowui):
if col2:
col = split.column()
col.itemR(rd, "render_raytracing", text="Ray Tracing")
col.itemR(rd, "color_management")
@@ -187,7 +189,8 @@ class RENDER_PT_performance(RenderButtonsPanel):
layout = self.layout
rd = context.scene.render_data
col2 = context.region.width > narrowui
split = layout.split()
col = split.column(align=True)
@@ -200,7 +203,7 @@ class RENDER_PT_performance(RenderButtonsPanel):
col.itemR(rd, "parts_x", text="X")
col.itemR(rd, "parts_y", text="Y")
if (context.region.width > narrowui):
if col2:
col = split.column()
col.itemL(text="Memory:")
sub = col.column()
@@ -229,6 +232,7 @@ class RENDER_PT_post_processing(RenderButtonsPanel):
layout = self.layout
rd = context.scene.render_data
col2 = context.region.width > narrowui
split = layout.split()
@@ -236,7 +240,7 @@ class RENDER_PT_post_processing(RenderButtonsPanel):
col.itemR(rd, "use_compositing")
col.itemR(rd, "use_sequencer")
if (context.region.width > narrowui):
if col2:
col = split.column()
col.itemR(rd, "dither_intensity", text="Dither", slider=True)
@@ -252,7 +256,7 @@ class RENDER_PT_post_processing(RenderButtonsPanel):
sub.itemR(rd, "fields_still", text="Still")
if (context.region.width > narrowui):
if col2:
col = split.column()
else:
col.itemS()
@@ -271,7 +275,7 @@ class RENDER_PT_output(RenderButtonsPanel):
layout = self.layout
rd = context.scene.render_data
col2 = context.region.width > narrowui
layout.itemR(rd, "output_path", text="")
@@ -280,7 +284,7 @@ class RENDER_PT_output(RenderButtonsPanel):
col.itemR(rd, "file_format", text="")
col.row().itemR(rd, "color_mode", text="Color", expand=True)
if (context.region.width > narrowui):
if col2:
col = split.column()
col.itemR(rd, "file_extensions")
col.itemR(rd, "use_overwrite")
@@ -297,13 +301,13 @@ class RENDER_PT_output(RenderButtonsPanel):
col.itemL(text="Codec:")
col.itemR(rd, "exr_codec", text="")
if (context.region.width > narrowui):
if col2:
subsplit = split.split()
col = subsplit.column()
col.itemR(rd, "exr_half")
col.itemR(rd, "exr_zbuf")
if (context.region.width > narrowui):
if col2:
col = subsplit.column()
col.itemR(rd, "exr_preview")
@@ -313,7 +317,7 @@ class RENDER_PT_output(RenderButtonsPanel):
col.itemL(text="Depth:")
col.row().itemR(rd, "jpeg2k_depth", expand=True)
if (context.region.width > narrowui):
if col2:
col = split.column()
col.itemR(rd, "jpeg2k_preset", text="")
col.itemR(rd, "jpeg2k_ycc")
@@ -323,7 +327,7 @@ class RENDER_PT_output(RenderButtonsPanel):
col = split.column()
col.itemR(rd, "cineon_log", text="Convert to Log")
if (context.region.width > narrowui):
if col2:
col = split.column(align=True)
col.active = rd.cineon_log
col.itemR(rd, "cineon_black", text="Black")
@@ -348,6 +352,7 @@ class RENDER_PT_encoding(RenderButtonsPanel):
layout = self.layout
rd = context.scene.render_data
col2 = context.region.width > narrowui
split = layout.split()
@@ -366,7 +371,7 @@ class RENDER_PT_encoding(RenderButtonsPanel):
col.itemR(rd, "ffmpeg_maxrate", text="Maximum")
col.itemR(rd, "ffmpeg_buffersize", text="Buffer")
if (context.region.width > narrowui):
if col2:
col = split.column()
col.itemR(rd, "ffmpeg_gopsize")
col.itemR(rd, "ffmpeg_autosplit")
@@ -385,7 +390,7 @@ class RENDER_PT_encoding(RenderButtonsPanel):
col.itemR(rd, "ffmpeg_audio_bitrate")
col.itemR(rd, "ffmpeg_audio_mixrate")
if (context.region.width > narrowui):
if col2:
col = split.column()
col.itemR(rd, "ffmpeg_multiplex_audio")
col.itemR(rd, "ffmpeg_audio_volume")
@@ -404,6 +409,7 @@ class RENDER_PT_antialiasing(RenderButtonsPanel):
layout = self.layout
rd = context.scene.render_data
col2 = context.region.width > narrowui
layout.active = rd.antialiasing
split = layout.split()
@@ -412,7 +418,7 @@ class RENDER_PT_antialiasing(RenderButtonsPanel):
col.row().itemR(rd, "antialiasing_samples", expand=True)
col.itemR(rd, "full_sample")
if (context.region.width > narrowui):
if col2:
col = split.column()
col.itemR(rd, "pixel_filter", text="")
col.itemR(rd, "filter_size", text="Size", slider=True)
@@ -427,6 +433,7 @@ class RENDER_PT_dimensions(RenderButtonsPanel):
scene = context.scene
rd = scene.render_data
col2 = context.region.width > narrowui
split = layout.split()
@@ -447,7 +454,7 @@ class RENDER_PT_dimensions(RenderButtonsPanel):
rowsub.active = rd.use_border
rowsub.itemR(rd, "crop_to_border", text="Crop")
if (context.region.width > narrowui):
if col2:
col = split.column()
sub = col.column(align=True)
sub.itemL(text="Frame Range:")
@@ -475,6 +482,7 @@ class RENDER_PT_stamp(RenderButtonsPanel):
layout = self.layout
rd = context.scene.render_data
col2 = context.region.width > narrowui
layout.active = rd.render_stamp
@@ -491,7 +499,7 @@ class RENDER_PT_stamp(RenderButtonsPanel):
col.itemR(rd, "stamp_marker", text="Marker")
col.itemR(rd, "stamp_sequence_strip", text="Seq. Strip")
if (context.region.width > narrowui):
if col2:
col = split.column()
col.active = rd.render_stamp
col.itemR(rd, "stamp_foreground", slider=True)