diff options
Diffstat (limited to 'source/blender/makesrna/RNA_define.h')
-rw-r--r-- | source/blender/makesrna/RNA_define.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/makesrna/RNA_define.h b/source/blender/makesrna/RNA_define.h index 16ca718e335..f4693ae941e 100644 --- a/source/blender/makesrna/RNA_define.h +++ b/source/blender/makesrna/RNA_define.h @@ -86,6 +86,7 @@ PropertyRNA *RNA_def_string_dir_path(StructOrFunctionRNA *cont, const char *iden PropertyRNA *RNA_def_string_file_name(StructOrFunctionRNA *cont, const char *identifier, const char *default_value, int maxlen, const char *ui_name, const char *ui_description); PropertyRNA *RNA_def_enum(StructOrFunctionRNA *cont, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description); +PropertyRNA *RNA_def_enum_flag(StructOrFunctionRNA *cont, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description); void RNA_def_enum_funcs(PropertyRNA *prop, EnumPropertyItemFunc itemfunc); PropertyRNA *RNA_def_float(StructOrFunctionRNA *cont, const char *identifier, float default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax); @@ -132,8 +133,9 @@ void RNA_def_property_collection_sdna(PropertyRNA *prop, const char *structname, void RNA_def_property_flag(PropertyRNA *prop, int flag); void RNA_def_property_clear_flag(PropertyRNA *prop, int flag); +void RNA_def_property_subtype(PropertyRNA *prop, PropertySubType subtype); void RNA_def_property_array(PropertyRNA *prop, int length); -void RNA_def_property_multi_array(PropertyRNA *prop, int dimension, int length[]); +void RNA_def_property_multi_array(PropertyRNA *prop, int dimension, const int length[]); void RNA_def_property_range(PropertyRNA *prop, double min, double max); void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item); @@ -196,6 +198,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 |