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>2011-02-16 22:52:32 +0300
committerThomas Dinges <blender@dingto.org>2011-02-16 22:52:32 +0300
commit0ea7f1ce155147e873ffc4350f8faf4489c9052a (patch)
treed08f906e8c2620c14763fd8e3d4f01dd60d72526 /release
parent878c8f47d8104b425d2004f60449f4f45e946d2d (diff)
Material UI: Code cleanup.
Please, don't use a split function if you just have 2 properties in one line, a row is all you need here. ;-)
Diffstat (limited to 'release')
-rw-r--r--release/scripts/ui/properties_material.py40
1 files changed, 12 insertions, 28 deletions
diff --git a/release/scripts/ui/properties_material.py b/release/scripts/ui/properties_material.py
index 4586dc8bdd7..17501475e51 100644
--- a/release/scripts/ui/properties_material.py
+++ b/release/scripts/ui/properties_material.py
@@ -231,21 +231,13 @@ class MATERIAL_PT_diffuse(MaterialButtonsPanel, bpy.types.Panel):
elif mat.diffuse_shader == 'MINNAERT':
col.prop(mat, "darkness")
elif mat.diffuse_shader == 'TOON':
- split = col.split()
-
- col = split.column()
- col.prop(mat, "diffuse_toon_size", text="Size")
-
- col = split.column()
- col.prop(mat, "diffuse_toon_smooth", text="Smooth")
+ row = col.row()
+ row.prop(mat, "diffuse_toon_size", text="Size")
+ row.prop(mat, "diffuse_toon_smooth", text="Smooth")
elif mat.diffuse_shader == 'FRESNEL':
- split = col.split()
-
- col = split.column()
- col.prop(mat, "diffuse_fresnel", text="Fresnel")
-
- col = split.column()
- col.prop(mat, "diffuse_fresnel_factor", text="Factor")
+ row = col.row()
+ row.prop(mat, "diffuse_fresnel", text="Fresnel")
+ row.prop(mat, "diffuse_fresnel_factor", text="Factor")
if mat.use_diffuse_ramp:
layout.separator()
@@ -294,23 +286,15 @@ class MATERIAL_PT_specular(MaterialButtonsPanel, bpy.types.Panel):
if mat.specular_shader in ('COOKTORR', 'PHONG'):
col.prop(mat, "specular_hardness", text="Hardness")
elif mat.specular_shader == 'BLINN':
- split = layout.split()
-
- col = split.column()
- col.prop(mat, "specular_hardness", text="Hardness")
-
- col = split.column()
- col.prop(mat, "specular_ior", text="IOR")
+ row = col.row()
+ row.prop(mat, "specular_hardness", text="Hardness")
+ row.prop(mat, "specular_ior", text="IOR")
elif mat.specular_shader == 'WARDISO':
col.prop(mat, "specular_slope", text="Slope")
elif mat.specular_shader == 'TOON':
- split = layout.split()
-
- col = split.column()
- col.prop(mat, "specular_toon_size", text="Size")
-
- col = split.column()
- col.prop(mat, "specular_toon_smooth", text="Smooth")
+ row = col.row()
+ row.prop(mat, "specular_toon_size", text="Size")
+ row.prop(mat, "specular_toon_smooth", text="Smooth")
if mat.use_specular_ramp:
layout.separator()