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:
authorCampbell Barton <ideasman42@gmail.com>2016-03-03 04:33:43 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-03-04 19:11:59 +0300
commita78d679ddd361a9236f4911b77ddd9d21128f379 (patch)
treed13cc7fdc9a93adf10e19915f10d67407fd35cc9
parent5cbd14241f8e1af27e98ce237e442fef1d9d8fcb (diff)
Fix RNA property clamp assigning in Python
On first assignment the value was clamped, but successive assignments weren't.
-rw-r--r--source/blender/makesrna/intern/rna_access.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index d037600830a..6d48c69e9d8 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -2098,6 +2098,7 @@ void RNA_property_int_set(PointerRNA *ptr, PropertyRNA *prop, int value)
/* BLI_assert(RNA_property_int_clamp(ptr, prop, &value) == 0); */
if ((idprop = rna_idproperty_check(&prop, ptr))) {
+ RNA_property_int_clamp(ptr, prop, &value);
IDP_Int(idprop) = value;
rna_idproperty_touch(idprop);
}
@@ -2356,6 +2357,7 @@ void RNA_property_float_set(PointerRNA *ptr, PropertyRNA *prop, float value)
/* BLI_assert(RNA_property_float_clamp(ptr, prop, &value) == 0); */
if ((idprop = rna_idproperty_check(&prop, ptr))) {
+ RNA_property_float_clamp(ptr, prop, &value);
if (idprop->type == IDP_FLOAT)
IDP_Float(idprop) = value;
else