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_space_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_space_api.c')
-rw-r--r--source/blender/makesrna/intern/rna_space_api.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/rna_space_api.c b/source/blender/makesrna/intern/rna_space_api.c
index 3cfbd798ad6..c72d6d9e581 100644
--- a/source/blender/makesrna/intern/rna_space_api.c
+++ b/source/blender/makesrna/intern/rna_space_api.c
@@ -84,9 +84,9 @@ void RNA_api_space_node(StructRNA *srna)
RNA_def_function_ui_description(func, "Set the cursor location using region coordinates");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
parm = RNA_def_int(func, "x", 0, INT_MIN, INT_MAX, "x", "Region x coordinate", -10000, 10000);
- RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
parm = RNA_def_int(func, "y", 0, INT_MIN, INT_MAX, "y", "Region y coordinate", -10000, 10000);
- RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
}
void RNA_api_space_text(StructRNA *srna)
@@ -98,9 +98,9 @@ void RNA_api_space_text(StructRNA *srna)
RNA_def_function_ui_description(func, "Retrieve the region position from the given line and character position");
RNA_def_function_flag(func, FUNC_USE_SELF_ID);
parm = RNA_def_int(func, "line", 0, INT_MIN, INT_MAX, "Line", "Line index", 0, INT_MAX);
- RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
parm = RNA_def_int(func, "column", 0, INT_MIN, INT_MAX, "Column", "Column index", 0, INT_MAX);
- RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
parm = RNA_def_int_array(func, "result", 2, NULL, -1, INT_MAX, "", "Region coordinates", -1, INT_MAX);
RNA_def_function_output(func, parm);
}