diff options
author | Thomas Dinges <blender@dingto.org> | 2009-05-29 13:53:46 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2009-05-29 13:53:46 +0400 |
commit | a01fa8b581fefed07d4951134ea9abe76ac7eb26 (patch) | |
tree | f6a23a35bd55f38ed6a6d7a25e794013ad19c3fb | |
parent | 7c2b2f55807b3f9faf84e5506944ba6d1bda18dd (diff) |
2.5 Buttons
* More greying out tweaks by William Reynish and myself.
-rw-r--r-- | release/ui/buttons_data_camera.py | 11 | ||||
-rw-r--r-- | release/ui/buttons_data_curve.py | 28 | ||||
-rw-r--r-- | release/ui/buttons_data_lamp.py | 61 | ||||
-rw-r--r-- | release/ui/buttons_data_mesh.py | 14 | ||||
-rw-r--r-- | release/ui/buttons_data_modifier.py | 28 | ||||
-rw-r--r-- | release/ui/buttons_material.py | 54 | ||||
-rw-r--r-- | release/ui/buttons_physic_cloth.py | 9 | ||||
-rw-r--r-- | release/ui/buttons_scene.py | 90 |
8 files changed, 155 insertions, 140 deletions
diff --git a/release/ui/buttons_data_camera.py b/release/ui/buttons_data_camera.py index 9770fdaf8eb..d4dabea9480 100644 --- a/release/ui/buttons_data_camera.py +++ b/release/ui/buttons_data_camera.py @@ -63,11 +63,12 @@ class DATA_PT_cameradisplay(DataButtonsPanel): sub.itemR(cam, "show_title_safe", text="Title Safe") sub.itemR(cam, "show_name", text="Name") - sub = split.column() - sub.itemR(cam, "show_passepartout", text="Passepartout") - if (cam.show_passepartout): - sub.itemR(cam, "passepartout_alpha", text="Alpha", slider=True) - sub.itemR(cam, "draw_size", text="Size") + col = split.column() + col.itemR(cam, "show_passepartout", text="Passepartout") + colsub = col.column() + colsub.active = cam.show_passepartout + colsub.itemR(cam, "passepartout_alpha", text="Alpha", slider=True) + col.itemR(cam, "draw_size", text="Size") bpy.types.register(DATA_PT_cameralens) bpy.types.register(DATA_PT_cameradisplay)
\ No newline at end of file diff --git a/release/ui/buttons_data_curve.py b/release/ui/buttons_data_curve.py index 12a1fefd478..754c26aa3e6 100644 --- a/release/ui/buttons_data_curve.py +++ b/release/ui/buttons_data_curve.py @@ -22,14 +22,16 @@ class DATA_PT_shape_curve(DataButtonsPanel): split = layout.split() - sub = split.column() - sub.itemL(text="Caps:") - sub.itemR(curve, "front") - sub.itemR(curve, "back") + col = split.column() + colsub = col.column() + colsub.active = curve.curve_2d + colsub.itemL(text="Caps:") + colsub.itemR(curve, "front") + colsub.itemR(curve, "back") - sub.itemL(text="Textures:") - sub.itemR(curve, "uv_orco") - sub.itemR(curve, "auto_texspace") + col.itemL(text="Textures:") + col.itemR(curve, "uv_orco") + col.itemR(curve, "auto_texspace") sub = split.column() sub.itemL(text="Resolution:") @@ -68,12 +70,17 @@ class DATA_PT_geometry(DataButtonsPanel): class DATA_PT_pathanim(DataButtonsPanel): __idname__ = "DATA_PT_pathanim" __label__ = "Path Animation" + + def draw_header(self, context): + curve = context.active_object.data + + layout = self.layout + layout.itemR(curve, "path", text="") def draw(self, context): curve = context.active_object.data layout = self.layout - - layout.itemR(curve, "path", text="Enable") + layout.active = curve.path split = layout.split() @@ -102,9 +109,6 @@ class DATA_PT_current_curve(DataButtonsPanel): sub.itemL(text="Order:") sub.itemR(currentcurve, "order_u", text="U") sub.itemR(currentcurve, "order_v", text="V") - sub.itemL(text="Point Count:") - sub.itemR(currentcurve, "point_count_u", text="U") - sub.itemR(currentcurve, "point_count_v", text="V") sub.itemL(text="Endpoints:") sub.itemR(currentcurve, "endpoint_u", text="U") sub.itemR(currentcurve, "endpoint_v", text="V") diff --git a/release/ui/buttons_data_lamp.py b/release/ui/buttons_data_lamp.py index 157a89eb2c7..a2a6ad0426c 100644 --- a/release/ui/buttons_data_lamp.py +++ b/release/ui/buttons_data_lamp.py @@ -67,32 +67,32 @@ class DATA_PT_sunsky(DataButtonsPanel): row.itemR(lamp, "sky") row.itemR(lamp, "atmosphere") - if lamp.sky or lamp.atmosphere: - layout.itemR(lamp, "atmosphere_turbidity", text="Turbidity") - - split = layout.split() + row = layout.row() + row.active = lamp.sky or lamp.atmosphere + row.itemR(lamp, "atmosphere_turbidity", text="Turbidity") - col = split.column() - if lamp.sky: - sub = col.column() - sub.itemR(lamp, "sky_blend_type", text="Blend Type") - sub.itemR(lamp, "sky_blend") - sub.itemR(lamp, "sky_color_space", text="Color Space") - sub.itemR(lamp, "sky_exposure") - - sub = col.column() - sub.itemR(lamp, "horizon_brightness", text="Hor Bright") - sub.itemR(lamp, "spread", text="Hor Spread") - sub.itemR(lamp, "sun_brightness", text="Sun Bright") - sub.itemR(lamp, "sun_size") - sub.itemR(lamp, "backscattered_light", text="Back Light") + split = layout.split() + + col = split.column() + + sub = col.column() + sub.active = lamp.sky + sub.itemR(lamp, "sky_blend_type", text="Blend Type") + sub.itemR(lamp, "sky_blend") + sub.itemR(lamp, "sky_color_space", text="Color Space") + sub.itemR(lamp, "sky_exposure") + sub.itemR(lamp, "horizon_brightness", text="Hor Bright") + sub.itemR(lamp, "spread", text="Hor Spread") + sub.itemR(lamp, "sun_brightness", text="Sun Bright") + sub.itemR(lamp, "sun_size") + sub.itemR(lamp, "backscattered_light", text="Back Light") - sub = split.column() - if lamp.atmosphere: - sub.itemR(lamp, "sun_intensity", text="Sun Intens") - sub.itemR(lamp, "atmosphere_inscattering", text="Inscattering") - sub.itemR(lamp, "atmosphere_extinction", text="Extinction") - sub.itemR(lamp, "atmosphere_distance_factor", text="Distance") + sub = split.column() + sub.active = lamp.atmosphere + sub.itemR(lamp, "sun_intensity", text="Sun Intens") + sub.itemR(lamp, "atmosphere_inscattering", text="Inscattering") + sub.itemR(lamp, "atmosphere_extinction", text="Extinction") + sub.itemR(lamp, "atmosphere_distance_factor", text="Distance") class DATA_PT_shadow(DataButtonsPanel): __idname__ = "DATA_PT_shadow" @@ -192,12 +192,13 @@ class DATA_PT_spot(DataButtonsPanel): sub.itemR(lamp, "spot_blend", text="Blend") sub.itemR(lamp, "square") - sub = split.column() - sub.itemR(lamp, "halo") - if lamp.halo: - sub.itemR(lamp, "halo_intensity", text="Intensity") - if lamp.shadow_method == 'BUFFER_SHADOW': - sub.itemR(lamp, "halo_step", text="Step") + col = split.column() + col.itemR(lamp, "halo") + colsub = col.column() + colsub.active = lamp.halo + colsub.itemR(lamp, "halo_intensity", text="Intensity") + if lamp.shadow_method == 'BUFFER_SHADOW': + colsub.itemR(lamp, "halo_step", text="Step") bpy.types.register(DATA_PT_lamp) bpy.types.register(DATA_PT_shadow) diff --git a/release/ui/buttons_data_mesh.py b/release/ui/buttons_data_mesh.py index 44a48dcc534..6e9a30cefbc 100644 --- a/release/ui/buttons_data_mesh.py +++ b/release/ui/buttons_data_mesh.py @@ -1,4 +1,4 @@ - + import bpy class DataButtonsPanel(bpy.types.Panel): @@ -12,7 +12,7 @@ class DataButtonsPanel(bpy.types.Panel): class DATA_PT_surface(DataButtonsPanel): __idname__ = "DATA_PT_surface" - __label__ = "Surface" + __label__ = "Mesh" def draw(self, context): mesh = context.active_object.data @@ -20,13 +20,15 @@ class DATA_PT_surface(DataButtonsPanel): split = layout.split() - sub = split.column() - sub.itemR(mesh, "autosmooth") - sub.itemR(mesh, "autosmooth_angle", text="Angle") + col = split.column() + col.itemR(mesh, "autosmooth") + colsub = col.column() + colsub.active = mesh.autosmooth + colsub.itemR(mesh, "autosmooth_angle", text="Angle") sub = split.column() sub.itemR(mesh, "vertex_normal_flip") sub.itemR(mesh, "double_sided") layout.itemR(mesh, "texco_mesh") -bpy.types.register(DATA_PT_surface)
\ No newline at end of file +bpy.types.register(DATA_PT_surface)
\ No newline at end of file diff --git a/release/ui/buttons_data_modifier.py b/release/ui/buttons_data_modifier.py index 93fa122caf8..4ec57065c10 100644 --- a/release/ui/buttons_data_modifier.py +++ b/release/ui/buttons_data_modifier.py @@ -151,10 +151,10 @@ class DATA_PT_modifiers(DataButtonsPanel): layout.itemR(md, "start") layout.itemR(md, "length") + layout.itemR(md, "randomize") row = layout.row() - row.itemR(md, "randomize") - if md.randomize: - row.itemR(md, "seed") + row.active = md.randomize + row.itemR(md, "seed") def cast(self, layout, md): layout.itemR(md, "cast_type") @@ -196,8 +196,9 @@ class DATA_PT_modifiers(DataButtonsPanel): def edgesplit(self, layout, md): layout.itemR(md, "use_edge_angle", text="Edge Angle") - if (md.use_edge_angle): - layout.itemR(md, "split_angle") + row = layout.row() + row.active = md.use_edge_angle + row.itemR(md, "split_angle") layout.itemR(md, "use_sharp", text="Sharp Edges") def explode(self, layout, md): @@ -353,13 +354,13 @@ class DATA_PT_modifiers(DataButtonsPanel): sub.itemR(md, "y") sub.itemR(md, "cyclic") - sub = split.column() - sub.itemR(md, "normals") - if md.normals: - row = sub.row(align=True) - row.itemR(md, "x_normal", text="X", toggle=True) - row.itemR(md, "y_normal", text="Y", toggle=True) - row.itemR(md, "z_normal", text="Z", toggle=True) + col = split.column() + col.itemR(md, "normals") + colsub = col.row(align=True) + colsub.active = md.normals + colsub.itemR(md, "x_normal", text="X", toggle=True) + colsub.itemR(md, "y_normal", text="Y", toggle=True) + colsub.itemR(md, "z_normal", text="Z", toggle=True) col = layout.column_flow() col.itemR(md, "time_offset") @@ -384,5 +385,4 @@ class DATA_PT_modifiers(DataButtonsPanel): col.itemR(md, "width", slider=True) col.itemR(md, "narrowness", slider=True) -bpy.types.register(DATA_PT_modifiers) - +bpy.types.register(DATA_PT_modifiers)
\ No newline at end of file diff --git a/release/ui/buttons_material.py b/release/ui/buttons_material.py index 7137bccd245..c9a5fa6db06 100644 --- a/release/ui/buttons_material.py +++ b/release/ui/buttons_material.py @@ -54,6 +54,7 @@ class MATERIAL_PT_sss(MaterialButtonsPanel): def draw(self, context): layout = self.layout sss = context.active_object.active_material.subsurface_scattering + layout.active = sss.enabled flow = layout.column_flow() flow.itemR(sss, "error_tolerance") @@ -87,7 +88,7 @@ class MATERIAL_PT_raymir(MaterialButtonsPanel): def draw(self, context): layout = self.layout raym = context.active_object.active_material.raytrace_mirror - + layout.active = raym.enabled split = layout.split() sub = split.column() @@ -124,6 +125,7 @@ class MATERIAL_PT_raytransp(MaterialButtonsPanel): def draw(self, context): layout = self.layout rayt = context.active_object.active_material.raytrace_transparency + layout.active = rayt.enabled split = layout.split() @@ -173,35 +175,31 @@ class MATERIAL_PT_halo(MaterialButtonsPanel): col.itemR(halo, "soft") col = split.column() - sub = col.column(align=True) - sub.itemL(text="Elements:") - sub.itemR(halo, "ring") - sub.itemR(halo, "lines") - sub.itemR(halo, "star") - sub.itemR(halo, "flare_mode") - - sub = col.column() - if (halo.ring): - sub.itemR(halo, "rings") - if (halo.lines): - sub.itemR(halo, "line_number") - if (halo.ring or halo.lines): - sub.itemR(halo, "seed") - if (halo.star): - sub.itemR(halo, "star_tips") - if (halo.flare_mode): - sub = col.column(align=True) - sub.itemL(text="Flare:") - sub.itemR(halo, "flare_size", text="Size") - sub.itemR(halo, "flare_subsize", text="Subsize") - sub.itemR(halo, "flare_boost", text="Boost") - sub.itemR(halo, "flare_seed", text="Seed") - sub.itemR(halo, "flares_sub", text="Sub") - + col = col.column(align=True) + col.itemR(halo, "ring") + colsub = col.column() + colsub.active = halo.ring + colsub.itemR(halo, "rings") + col.itemR(halo, "lines") + colsub = col.column() + colsub.active = halo.lines + colsub.itemR(halo, "line_number", text="Lines") + col.itemR(halo, "star") + colsub = col.column() + colsub.active = halo.star + colsub.itemR(halo, "star_tips") + col.itemR(halo, "flare_mode") + colsub = col.column() + colsub.active = halo.flare_mode + colsub.itemR(halo, "flare_size", text="Size") + colsub.itemR(halo, "flare_subsize", text="Subsize") + colsub.itemR(halo, "flare_boost", text="Boost") + colsub.itemR(halo, "flare_seed", text="Seed") + colsub.itemR(halo, "flares_sub", text="Sub") + bpy.types.register(MATERIAL_PT_preview) bpy.types.register(MATERIAL_PT_material) bpy.types.register(MATERIAL_PT_raymir) bpy.types.register(MATERIAL_PT_raytransp) bpy.types.register(MATERIAL_PT_sss) -bpy.types.register(MATERIAL_PT_halo) - +bpy.types.register(MATERIAL_PT_halo)
\ No newline at end of file diff --git a/release/ui/buttons_physic_cloth.py b/release/ui/buttons_physic_cloth.py index 12d218382ec..6dab2bcf57c 100644 --- a/release/ui/buttons_physic_cloth.py +++ b/release/ui/buttons_physic_cloth.py @@ -43,7 +43,7 @@ class Physic_PT_cloth(PhysicButtonsPanel): col.itemR(cloth, "spring_damping", text="Spring") col.itemR(cloth, "air_damping", text="Air") - # Disabled for now# + # Disabled for now """ if cloth.mass_vertex_group: layout.itemL(text="Goal:") @@ -67,8 +67,10 @@ class Physic_PT_cloth_collision(PhysicButtonsPanel): def draw(self, context): layout = self.layout - md = self.cloth_modifier(context) + + md = self.cloth_modifier(context) cloth = md.collision_settings + layout.active = cloth.enable_collision col = layout.column_flow() col.itemR(cloth, "collision_quality", slider=True) @@ -79,6 +81,7 @@ class Physic_PT_cloth_collision(PhysicButtonsPanel): layout.itemR(cloth, "enable_self_collision", text="Self Collision") col = layout.column_flow() + col.active = cloth.enable_self_collision col.itemR(cloth, "self_collision_quality", slider=True) col.itemR(cloth, "self_min_distance", text="MinDistance") @@ -95,8 +98,10 @@ class Physic_PT_cloth_stiffness(PhysicButtonsPanel): def draw(self, context): layout = self.layout + md = self.cloth_modifier(context) cloth = md.settings + layout.active = cloth.stiffness_scaling split = layout.split() diff --git a/release/ui/buttons_scene.py b/release/ui/buttons_scene.py index 83836f8e781..2d0aaff6f46 100644 --- a/release/ui/buttons_scene.py +++ b/release/ui/buttons_scene.py @@ -24,9 +24,9 @@ class RENDER_PT_shading(RenderButtonsPanel): # sub.itemR(rd, "render_radiosity", text="Radio") col = split.column() + col.itemR(rd, "render_raytracing", text="Ray Tracing") colsub = col.column() colsub.active = rd.render_raytracing - colsub.itemR(rd, "render_raytracing", text="Ray Tracing") colsub.itemR(rd, "octree_resolution", text="Octree") col.itemR(rd, "dither_intensity", text="Dither", slider=True) @@ -43,10 +43,11 @@ class RENDER_PT_output(RenderButtonsPanel): split = layout.split() - sub = split.column() - sub.itemR(rd, "file_format", text="Format") - if rd.file_format in ("AVIJPEG", "JPEG"): - sub.itemR(rd, "quality", slider=True) + col = split.column() + col.itemR(rd, "file_format", text="Format") + colsub = col.column() + colsub.active = rd.file_format in ("AVIJPEG", "JPEG") + colsub.itemR(rd, "quality", slider=True) sub = split.column() sub.itemR(rd, "color_mode") @@ -55,17 +56,17 @@ class RENDER_PT_output(RenderButtonsPanel): split = layout.split() sub = split.column() + sub.itemR(rd, "file_extensions") sub.itemL(text="Distributed Rendering:") sub.itemR(rd, "placeholders") sub.itemR(rd, "no_overwrite") - sub = split.column() - sub.itemL(text="Settings:") - sub.itemR(rd, "file_extensions") - sub.itemR(rd, "fields", text="Fields") - if rd.fields: - sub.itemR(rd, "fields_still", text="Still") - sub.row().itemR(rd, "field_order", expand=True) + col = split.column() + col.itemR(rd, "fields", text="Fields") + colsub = col.column() + colsub.active = rd.fields + colsub.itemR(rd, "fields_still", text="Still") + colsub.row().itemR(rd, "field_order", expand=True) class RENDER_PT_antialiasing(RenderButtonsPanel): __label__ = "Anti-Aliasing" @@ -88,13 +89,14 @@ class RENDER_PT_antialiasing(RenderButtonsPanel): sub = split.column() sub.itemL(text="Samples:") sub.row().itemR(rd, "antialiasing_samples", expand=True) - - sub = split.column() sub.itemR(rd, "pixel_filter") - sub.itemR(rd, "filter_size", text="Size", slider=True) - sub.itemR(rd, "save_buffers") - if rd.save_buffers: - sub.itemR(rd, "full_sample") + + col = split.column() + col.itemR(rd, "filter_size", text="Size", slider=True) + col.itemR(rd, "save_buffers") + colsub = col.column() + colsub.active = rd.save_buffers + colsub.itemR(rd, "full_sample") class RENDER_PT_render(RenderButtonsPanel): __label__ = "Render" @@ -112,17 +114,18 @@ class RENDER_PT_render(RenderButtonsPanel): row = layout.row() row.itemR(rd, "do_composite") row.itemR(rd, "do_sequence") - if rd.do_composite: - row = layout.row() - row.itemR(rd, "free_image_textures") + rowsub = layout.row() + rowsub.active = rd.do_composite + rowsub.itemR(rd, "free_image_textures") split = layout.split() - sub = split.column(align=True) - sub.itemL(text="Threads:") - sub.row().itemR(rd, "threads_mode", expand=True) - if rd.threads_mode == 'THREADS_FIXED': - sub.itemR(rd, "threads") + col = split.column(align=True) + col.itemL(text="Threads:") + col.row().itemR(rd, "threads_mode", expand=True) + colsub = col.column() + colsub.active = rd.threads_mode == 'THREADS_FIXED' + colsub.itemR(rd, "threads") sub = split.column(align=True) sub.itemL(text="Tiles:") @@ -158,10 +161,11 @@ class RENDER_PT_dimensions(RenderButtonsPanel): sub.itemR(rd, "pixel_aspect_x", text="X") sub.itemR(rd, "pixel_aspect_y", text="Y") - sub = col.column(align=False) - sub.itemR(rd, "border", text="Border") - if rd.border: - sub.itemR(rd, "crop_to_border") + col = col.column(align=False) + col.itemR(rd, "border", text="Border") + colsub = col.column() + colsub.active = rd.border + colsub.itemR(rd, "crop_to_border") col = split.column(align=True) col.itemL(text="Frame Range:") @@ -191,17 +195,18 @@ class RENDER_PT_stamp(RenderButtonsPanel): split = layout.split() - sub = split.column() - sub.itemR(rd, "stamp_time", text="Time") - sub.itemR(rd, "stamp_date", text="Date") - sub.itemR(rd, "stamp_frame", text="Frame") - sub.itemR(rd, "stamp_camera", text="Scene") - sub.itemR(rd, "stamp_marker", text="Marker") - sub.itemR(rd, "stamp_filename", text="Filename") - sub.itemR(rd, "stamp_sequence_strip", text="Seq. Strip") - sub.itemR(rd, "stamp_note", text="Note") - if (rd.stamp_note): - sub.itemR(rd, "stamp_note_text", text="") + col = split.column() + col.itemR(rd, "stamp_time", text="Time") + col.itemR(rd, "stamp_date", text="Date") + col.itemR(rd, "stamp_frame", text="Frame") + col.itemR(rd, "stamp_camera", text="Scene") + col.itemR(rd, "stamp_marker", text="Marker") + col.itemR(rd, "stamp_filename", text="Filename") + col.itemR(rd, "stamp_sequence_strip", text="Seq. Strip") + col.itemR(rd, "stamp_note", text="Note") + colsub = col.column() + colsub.active = rd.stamp_note + colsub.itemR(rd, "stamp_note_text", text="") sub = split.column() sub.itemR(rd, "render_stamp") @@ -214,5 +219,4 @@ bpy.types.register(RENDER_PT_dimensions) bpy.types.register(RENDER_PT_antialiasing) bpy.types.register(RENDER_PT_shading) bpy.types.register(RENDER_PT_output) -bpy.types.register(RENDER_PT_stamp) - +bpy.types.register(RENDER_PT_stamp)
\ No newline at end of file |