"Fix" for [#24743] Strand Shading: Distance slider gives different results even when greyed out

* The actual flag was set at render time, was not supposed to be editable manually.
This commit is contained in:
Janne Karhu 2010-11-19 08:37:19 +00:00
parent 53d0bdd6b3
commit ba36dd3cc5
2 changed files with 3 additions and 2 deletions

@ -622,9 +622,8 @@ class MATERIAL_PT_strand(MaterialButtonsPanel, bpy.types.Panel):
col.separator()
sub = col.column()
sub.active = (not mat.use_shadeless)
sub.prop(tan, "use_surface_diffuse")
sub.label("Surface diffuse:")
sub = col.column()
sub.active = tan.use_surface_diffuse
sub.prop(tan, "blend_distance", text="Distance")

@ -1425,8 +1425,10 @@ static void rna_def_material_strand(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Tangent Shading", "Uses direction of strands as normal for tangent-shading");
RNA_def_property_update(prop, 0, "rna_Material_update");
/* this flag is only set when rendering, not to be edited manually */
prop= RNA_def_property(srna, "use_surface_diffuse", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_STR_SURFDIFF);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Surface Diffuse", "Make diffuse shading more similar to shading the surface");
RNA_def_property_update(prop, 0, "rna_Material_update");