diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-06-23 10:13:21 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-06-23 10:13:21 +0400 |
commit | 53bf66a579789ad32e2e7c4bd15dca9863ba7e2d (patch) | |
tree | 8a820875ccbb49a71bdcef227097796a3f818f36 /source/blender/makesrna/intern/rna_access.c | |
parent | 353cd44301aba693b3541490a0da5e1e8cdd5c1c (diff) |
checks in rna range functions that the max value cant be less than the min.
also fix for invalid rage for FILE_OT_filenum.
Diffstat (limited to 'source/blender/makesrna/intern/rna_access.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_access.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index 8fbee8ea740..e83161b8c62 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -1603,6 +1603,8 @@ void RNA_property_int_set(PointerRNA *ptr, PropertyRNA *prop, int value) IDProperty *idprop; BLI_assert(RNA_property_type(prop) == PROP_INT); + /* useful to check on bad values but set function should clamp */ + /* BLI_assert(RNA_property_int_clamp(ptr, prop, &value) == 0); */ if((idprop=rna_idproperty_check(&prop, ptr))) IDP_Int(idprop)= value; @@ -1825,6 +1827,8 @@ void RNA_property_float_set(PointerRNA *ptr, PropertyRNA *prop, float value) IDProperty *idprop; BLI_assert(RNA_property_type(prop) == PROP_FLOAT); + /* useful to check on bad values but set function should clamp */ + /* BLI_assert(RNA_property_float_clamp(ptr, prop, &value) == 0); */ if((idprop=rna_idproperty_check(&prop, ptr))) { if(idprop->type == IDP_FLOAT) |