[Bf-blender-cvs] [77f815f] master: RNA: clamp colors min to 0.0

Campbell Barton noreply at git.blender.org
Tue Apr 1 13:16:55 CEST 2014


Commit: 77f815f67a99404a6c5d78108e4cc93336f388cf
Author: Campbell Barton
Date:   Tue Apr 1 21:29:49 2014 +1100
https://developer.blender.org/rB77f815f67a99404a6c5d78108e4cc93336f388cf

RNA: clamp colors min to 0.0

any colors which need to be negative can explicitly pass in a range.

===================================================================

M	source/blender/makesrna/intern/rna_define.c

===================================================================

diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c
index 7c6198d..5b76044 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -1068,7 +1068,7 @@ PropertyRNA *RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier
 			fprop->hardmax = FLT_MAX;
 
 			if (ELEM(subtype, PROP_COLOR, PROP_COLOR_GAMMA)) {
-				fprop->softmin = 0.0f;
+				fprop->softmin = fprop->hardmin = 0.0f;
 				fprop->softmax = 1.0f;
 			}
 			else if (subtype == PROP_FACTOR) {




More information about the Bf-blender-cvs mailing list