Revision: 33650
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=33650
Author:   campbellbarton
Date:     2010-12-14 05:44:07 +0100 (Tue, 14 Dec 2010)

Log Message:
-----------
disallow RNA color values to be set to negative values. Material colors could 
be set to -100.0 if typed in manually, this is sure to cause bad/unpredictable 
behavior.

Modified Paths:
--------------
    trunk/blender/source/blender/makesrna/intern/rna_define.c

Modified: trunk/blender/source/blender/makesrna/intern/rna_define.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_define.c   2010-12-14 
03:30:30 UTC (rev 33649)
+++ trunk/blender/source/blender/makesrna/intern/rna_define.c   2010-12-14 
04:44:07 UTC (rev 33650)
@@ -887,6 +887,8 @@
                        fprop->hardmax= FLT_MAX;
 
                        if(ELEM(subtype, PROP_COLOR, PROP_COLOR_GAMMA)) {
+                               fprop->hardmin= 0.0f; /* disallow colors to go 
below zero */
+
                                fprop->softmin= 0.0f;
                                fprop->softmax= 1.0f;
                        }


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to