[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [33176] trunk/blender: "Fix" for [#24743] Strand Shading: Distance slider gives different results even when greyed out

Janne Karhu jhkarh at gmail.com
Fri Nov 19 09:37:19 CET 2010


Revision: 33176
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=33176
Author:   jhk
Date:     2010-11-19 09:37:19 +0100 (Fri, 19 Nov 2010)

Log Message:
-----------
"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.

Modified Paths:
--------------
    trunk/blender/release/scripts/ui/properties_material.py
    trunk/blender/source/blender/makesrna/intern/rna_material.c

Modified: trunk/blender/release/scripts/ui/properties_material.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_material.py	2010-11-19 08:17:57 UTC (rev 33175)
+++ trunk/blender/release/scripts/ui/properties_material.py	2010-11-19 08:37:19 UTC (rev 33176)
@@ -622,9 +622,8 @@
         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")
 
 

Modified: trunk/blender/source/blender/makesrna/intern/rna_material.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_material.c	2010-11-19 08:17:57 UTC (rev 33175)
+++ trunk/blender/source/blender/makesrna/intern/rna_material.c	2010-11-19 08:37:19 UTC (rev 33176)
@@ -1425,8 +1425,10 @@
 	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");
 





More information about the Bf-blender-cvs mailing list