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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-03-30 20:09:05 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-03-30 20:09:05 +0400
commitf469e0652aa3152752845834477f2939c40f908d (patch)
treea0c291dd1b3a6a08e76f8ed00850b3727a9de8e5 /source/blender/makesrna/intern/makesrna.c
parent953af01d2ae4cc18789616edcb75454851ef4202 (diff)
Node socket values now only have soft limits, rather than hard limits, so you
can type in any value, and only when sliding the number value there is a limit. It was already possible to assign any value to a socket with node linking, so this shouldn't cause any new issues. Also raised the limits on the math nodes, with a patch by Agustin Benavidez.
Diffstat (limited to 'source/blender/makesrna/intern/makesrna.c')
-rw-r--r--source/blender/makesrna/intern/makesrna.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index 987d7c1ade2..6f73fc65151 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -687,15 +687,15 @@ static void rna_clamp_value_range(FILE *f, PropertyRNA *prop)
if (prop->type == PROP_FLOAT) {
FloatPropertyRNA *fprop = (FloatPropertyRNA*)prop;
if (fprop->range) {
- fprintf(f, " float prop_clamp_min, prop_clamp_max;\n");
- fprintf(f, " %s(ptr, &prop_clamp_min, &prop_clamp_max);\n", rna_function_string(fprop->range));
+ fprintf(f, " float prop_clamp_min = -FLT_MAX, prop_clamp_max = FLT_MAX, prop_soft_min, prop_soft_max;\n");
+ fprintf(f, " %s(ptr, &prop_clamp_min, &prop_clamp_max, &prop_soft_min, &prop_soft_max);\n", rna_function_string(fprop->range));
}
}
else if (prop->type == PROP_INT) {
IntPropertyRNA *iprop = (IntPropertyRNA*)prop;
if (iprop->range) {
- fprintf(f, " int prop_clamp_min, prop_clamp_max;\n");
- fprintf(f, " %s(ptr, &prop_clamp_min, &prop_clamp_max);\n", rna_function_string(iprop->range));
+ fprintf(f, " int prop_clamp_min = INT_MIN, prop_clamp_max = INT_MAX, prop_soft_min, prop_soft_max;\n");
+ fprintf(f, " %s(ptr, &prop_clamp_min, &prop_clamp_max, &prop_soft_min, &prop_soft_max);\n", rna_function_string(iprop->range));
}
}
}