Patch by oenvoyage - olivier amrein, thanks a lot!
authorThomas Dinges <blender@dingto.org>
Tue, 2 Aug 2011 18:56:03 +0000 (18:56 +0000)
committerThomas Dinges <blender@dingto.org>
Tue, 2 Aug 2011 18:56:03 +0000 (18:56 +0000)
* Material Diffuse Ramp was not greyed out when shadeless was enabled.

release/scripts/startup/bl_ui/properties_material.py

index 2a52ae23782a57238a3f246ab0072f3efdaf2931..296c05d78f5fa1ec975c7dcecfe2a4c40da09f62 100644 (file)
@@ -247,15 +247,17 @@ class MATERIAL_PT_diffuse(MaterialButtonsPanel, bpy.types.Panel):
             row.prop(mat, "diffuse_fresnel_factor", text="Factor")
 
         if mat.use_diffuse_ramp:
-            layout.separator()
-            layout.template_color_ramp(mat, "diffuse_ramp", expand=True)
-            layout.separator()
+            col = layout.column()
+            col.active = (not mat.use_shadeless)
+            col.separator()
+            col.template_color_ramp(mat, "diffuse_ramp", expand=True)
+            col.separator()
 
-            row = layout.row()
+            row = col.row()
             row.prop(mat, "diffuse_ramp_input", text="Input")
             row.prop(mat, "diffuse_ramp_blend", text="Blend")
 
-            layout.prop(mat, "diffuse_ramp_factor", text="Factor")
+            col.prop(mat, "diffuse_ramp_factor", text="Factor")
 
 
 class MATERIAL_PT_specular(MaterialButtonsPanel, bpy.types.Panel):