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/intern/rna_text_api.c
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/intern/rna_text_api.c')
-rw-r--r--source/blender/makesrna/intern/rna_text_api.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_text_api.c b/source/blender/makesrna/intern/rna_text_api.c
index 2478ad0fe1a..0287f74587b 100644
--- a/source/blender/makesrna/intern/rna_text_api.c
+++ b/source/blender/makesrna/intern/rna_text_api.c
@@ -55,15 +55,15 @@ static void rna_Text_write(Text *text, const char *str)
void RNA_api_text(StructRNA *srna)
{
FunctionRNA *func;
- PropertyRNA *prop;
+ PropertyRNA *parm;
func = RNA_def_function(srna, "clear", "rna_Text_clear");
RNA_def_function_ui_description(func, "clear the text block");
func = RNA_def_function(srna, "write", "rna_Text_write");
RNA_def_function_ui_description(func, "write text at the cursor location and advance to the end of the text block");
- prop = RNA_def_string(func, "text", "Text", 0, "", "New text for this data-block");
- RNA_def_property_flag(prop, PROP_REQUIRED);
+ parm = RNA_def_string(func, "text", "Text", 0, "", "New text for this data-block");
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
}
#endif