Tweak to set default ui range for color/color_gamma properties

This commit is contained in:
Matt Ebb
2010-03-29 07:15:51 +00:00
parent f4dcd1d570
commit 227baee3d4

View File

@@ -885,7 +885,7 @@ PropertyRNA *RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier
fprop->hardmin= (subtype == PROP_UNSIGNED)? 0.0f: -FLT_MAX;
fprop->hardmax= FLT_MAX;
if(subtype == PROP_COLOR) {
if(ELEM(subtype, PROP_COLOR, PROP_COLOR_GAMMA)) {
fprop->softmin= 0.0f;
fprop->softmax= 1.0f;
}