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:
authorJacques Lucke <jacques@blender.org>2021-04-13 10:39:05 +0300
committerJacques Lucke <jacques@blender.org>2021-04-13 10:39:20 +0300
commit9b15c552cc125ff7b41ba81220c2072db6a46848 (patch)
treecce1c30e362471920edc2e66ff3e59d0c415c057 /source/blender/makesrna/intern/rna_define.c
parent7b9d94e07360cb3d80457cbd73d72ecc5529505b (diff)
DNA: support int8_t type in DNA structs
Differential Revision: https://developer.blender.org/D8908
Diffstat (limited to 'source/blender/makesrna/intern/rna_define.c')
-rw-r--r--source/blender/makesrna/intern/rna_define.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c
index 08f52be4257..2fdf7e5eaa7 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -2410,6 +2410,10 @@ void RNA_def_property_int_sdna(PropertyRNA *prop, const char *structname, const
iprop->softmin = -10000; /* rather arbitrary .. */
iprop->softmax = 10000;
}
+ else if (dp->dnatype && STREQ(dp->dnatype, "int8_t")) {
+ iprop->hardmin = iprop->softmin = INT8_MIN;
+ iprop->hardmax = iprop->softmax = INT8_MAX;
+ }
if (prop->subtype == PROP_UNSIGNED || prop->subtype == PROP_PERCENTAGE ||
prop->subtype == PROP_FACTOR) {