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:
authorHans Goudey <h.goudey@me.com>2021-08-27 22:31:19 +0300
committerHans Goudey <h.goudey@me.com>2021-08-27 22:31:19 +0300
commit276a862ebc5629f45f672e7ca6b5ba55077c88f3 (patch)
tree831daedd7b0fc422e9ba8b32d4dde7d3a7fae886 /source/blender/makesrna/intern/rna_access.c
parent400605c3a6a88ba0cd6729fc7389a1c808e4abe5 (diff)
Fix failing alembic test after IDProperty UI data refactor
The default float IDProperty min value rB8b9a3b94fc148d19 for when there is no UI data was FLT_MIN instead of -FLT_MAX, which meant that animated custom property values couldn't be less than zero unless they had their UI data values edited previously. That's a mistake I won't make again! Also change the int minimums from -INT_MAX to INT_MIN to sanitize the whole situation.
Diffstat (limited to 'source/blender/makesrna/intern/rna_access.c')
-rw-r--r--source/blender/makesrna/intern/rna_access.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index 2d6d5408aa0..a2905018cc7 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -1333,7 +1333,7 @@ void RNA_property_float_range(PointerRNA *ptr, PropertyRNA *prop, float *hardmin
*hardmax = (float)ui_data->max;
}
else {
- *hardmin = FLT_MIN;
+ *hardmin = -FLT_MAX;
*hardmax = FLT_MAX;
}
return;
@@ -1377,7 +1377,7 @@ void RNA_property_float_ui_range(PointerRNA *ptr,
*precision = (float)ui_data->precision;
}
else {
- *softmin = FLT_MIN;
+ *softmin = -FLT_MAX;
*softmax = FLT_MAX;
*step = 1.0f;
*precision = 3.0f;