Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/makesrna/intern/rna_define.c')
-rw-r--r--source/blender/makesrna/intern/rna_define.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c
index 6c3e21cf5a5..3193265084c 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -597,8 +597,14 @@ PropertyRNA *RNA_def_property(StructRNA *srna, const char *identifier, int type,
fprop->hardmin= (subtype == PROP_UNSIGNED)? 0.0f: -FLT_MAX;
fprop->hardmax= FLT_MAX;
- fprop->softmin= (subtype == PROP_UNSIGNED)? 0.0f: -10000.0f; /* rather arbitrary .. */
- fprop->softmax= 10000.0f;
+ if(subtype == PROP_COLOR) {
+ fprop->softmin= 0.0f;
+ fprop->softmax= 1.0f;
+ }
+ else {
+ fprop->softmin= (subtype == PROP_UNSIGNED)? 0.0f: -10000.0f; /* rather arbitrary .. */
+ fprop->softmax= 10000.0f;
+ }
fprop->step= 10;
fprop->precision= 3;
break;
@@ -851,7 +857,7 @@ void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item
break;
}
default:
- fprintf(stderr, "RNA_def_property_struct_type: %s.%s, invalid type for struct type.\n", srna->identifier, prop->identifier);
+ fprintf(stderr, "RNA_def_property_enum_items: %s.%s, invalid type for struct type.\n", srna->identifier, prop->identifier);
DefRNA.error= 1;
break;
}