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:
authorBastien Montagne <montagne29@wanadoo.fr>2016-12-12 17:23:55 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-12-12 17:46:06 +0300
commit440d1042798113a0e8115ea1f1d016a44712e7a0 (patch)
tree147ca3dfc851aa635538a988005afa5ed89ac65a /source/blender/makesrna/RNA_define.h
parent62703850ad560b5832c4e42143f563d11ba21cf4 (diff)
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore), and also makes things slightly cleaner. To simplify (and make more clear the differences between mere properties and function parameters), also added RNA_def_parameter_flags function (and its clear counterpart), to be used instead of RNA_def_property_flag for function parameters. This patch is also a big cleanup (some RNA function definitions were still using 'prop' PropertyRNA pointer, etc.). And yes, am aware this will be annoying for all branches, but we really need to get new flags available for properties (will need at least one for override, etc.). Reviewers: sergey, Severin Subscribers: dfelinto, brecht Differential Revision: https://developer.blender.org/D2400
Diffstat (limited to 'source/blender/makesrna/RNA_define.h')
-rw-r--r--source/blender/makesrna/RNA_define.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/makesrna/RNA_define.h b/source/blender/makesrna/RNA_define.h
index bf8ea048fae..2a680b6eaeb 100644
--- a/source/blender/makesrna/RNA_define.h
+++ b/source/blender/makesrna/RNA_define.h
@@ -137,8 +137,8 @@ void RNA_def_property_enum_bitflag_sdna(PropertyRNA *prop, const char *structnam
void RNA_def_property_pointer_sdna(PropertyRNA *prop, const char *structname, const char *propname);
void RNA_def_property_collection_sdna(PropertyRNA *prop, const char *structname, const char *propname, const char *lengthpropname);
-void RNA_def_property_flag(PropertyRNA *prop, int flag);
-void RNA_def_property_clear_flag(PropertyRNA *prop, int flag);
+void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag);
+void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag 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, const int length[]);
@@ -201,6 +201,9 @@ void RNA_def_function_output(FunctionRNA *func, PropertyRNA *ret);
void RNA_def_function_flag(FunctionRNA *func, int flag);
void RNA_def_function_ui_description(FunctionRNA *func, const char *description);
+void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter);
+void RNA_def_parameter_clear_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter);
+
/* Dynamic Enums
* strings are not freed, assumed pointing to static location. */