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>2010-12-31 07:12:20 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-12-31 07:12:20 +0300
commit55934366521da478ad8f4674152c00742c2f5f1e (patch)
tree52413cd412034e70536d885dac6f69d8c0cbea68 /source/blender/makesrna/RNA_define.h
parenta8406439938d3eb405c144a50d87100f48f77c7e (diff)
Continue from my commit r33952, which disallowed floats to be wrapped as ints.
this missed some cases, now also disallow ints to be wrapped as floats. This commit also exposed a number of cases where ints/floats were incorrectly wrapped. Bugs like [#25416] wont slip through the cracks anymore.
Diffstat (limited to 'source/blender/makesrna/RNA_define.h')
-rw-r--r--source/blender/makesrna/RNA_define.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/makesrna/RNA_define.h b/source/blender/makesrna/RNA_define.h
index f97187d6e15..3a8e2e4f80e 100644
--- a/source/blender/makesrna/RNA_define.h
+++ b/source/blender/makesrna/RNA_define.h
@@ -197,6 +197,12 @@ void RNA_def_property_duplicate_pointers(StructOrFunctionRNA *cont_, PropertyRNA
void RNA_def_property_free_pointers(PropertyRNA *prop);
int RNA_def_property_free_identifier(StructOrFunctionRNA *cont_, const char *identifier);
+/* utilities */
+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)
+
+
#ifdef __cplusplus
}
#endif