diff options
author | Brecht Van Lommel <brecht> | 2020-03-03 19:21:18 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2020-03-03 19:21:47 +0300 |
commit | 0c603cffd123689c3021862a9d76dad9fbe13f4d (patch) | |
tree | 2b5112f4154e1019d8968fc74f85409001eb5fde /source/blender/makesrna/RNA_define.h | |
parent | 78383f7a9f9c3a2b3cc5f6c1ea0834cd7278317c (diff) |
RNA: support 64 bit boolean bitflags in DNA
This does not affect the RNA access API, since how the boolean is read from
DNA abstracted away in the API.
Differential Revision: https://developer.blender.org/D7002
Diffstat (limited to 'source/blender/makesrna/RNA_define.h')
-rw-r--r-- | source/blender/makesrna/RNA_define.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/makesrna/RNA_define.h b/source/blender/makesrna/RNA_define.h index 349b30fa64e..026043cd7c5 100644 --- a/source/blender/makesrna/RNA_define.h +++ b/source/blender/makesrna/RNA_define.h @@ -23,6 +23,7 @@ * Functions used during preprocess and runtime, for defining the RNA. */ +#include <inttypes.h> #include <float.h> #include <limits.h> @@ -337,11 +338,11 @@ PropertyRNA *RNA_def_property(StructOrFunctionRNA *cont, void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, - int bit); + int64_t bit); void RNA_def_property_boolean_negative_sdna(PropertyRNA *prop, const char *structname, const char *propname, - int bit); + int64_t bit); void RNA_def_property_int_sdna(PropertyRNA *prop, const char *structname, const char *propname); void RNA_def_property_float_sdna(PropertyRNA *prop, const char *structname, const char *propname); void RNA_def_property_string_sdna(PropertyRNA *prop, const char *structname, const char *propname); @@ -508,6 +509,8 @@ const char *RNA_property_typename(PropertyType type); #define IS_DNATYPE_FLOAT_COMPAT(_str) (strcmp(_str, "float") == 0 || strcmp(_str, "double") == 0) #define IS_DNATYPE_INT_COMPAT(_str) \ (strcmp(_str, "int") == 0 || strcmp(_str, "short") == 0 || strcmp(_str, "char") == 0) +#define IS_DNATYPE_BOOLEAN_COMPAT(_str) \ + (IS_DNATYPE_INT_COMPAT(_str) || strcmp(_str, "int64_t") == 0 || strcmp(_str, "uint64_t") == 0) void RNA_identifier_sanitize(char *identifier, int property); |