diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-12-12 17:23:55 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-12-12 17:46:06 +0300 |
commit | 440d1042798113a0e8115ea1f1d016a44712e7a0 (patch) | |
tree | 147ca3dfc851aa635538a988005afa5ed89ac65a /source/blender/makesrna/intern/rna_fcurve_api.c | |
parent | 62703850ad560b5832c4e42143f563d11ba21cf4 (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_fcurve_api.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_fcurve_api.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/rna_fcurve_api.c b/source/blender/makesrna/intern/rna_fcurve_api.c index 8551ca609f4..d8ed908f2df 100644 --- a/source/blender/makesrna/intern/rna_fcurve_api.c +++ b/source/blender/makesrna/intern/rna_fcurve_api.c @@ -144,9 +144,9 @@ void RNA_api_fcurves(StructRNA *srna) "Convert current FCurve from keyframes to sample points, if necessary"); RNA_def_function_flag(func, FUNC_USE_REPORTS); parm = RNA_def_int(func, "start", 0, MINAFRAME, MAXFRAME, "Start Frame", "", MINAFRAME, MAXFRAME); - RNA_def_property_flag(parm, PROP_REQUIRED); + RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); parm = RNA_def_int(func, "end", 0, MINAFRAME, MAXFRAME, "End Frame", "", MINAFRAME, MAXFRAME); - RNA_def_property_flag(parm, PROP_REQUIRED); + RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); func = RNA_def_function(srna, "convert_to_keyframes", "rna_FCurve_convert_to_keyframes"); RNA_def_function_ui_description(func, @@ -154,9 +154,9 @@ void RNA_api_fcurves(StructRNA *srna) "if necessary"); RNA_def_function_flag(func, FUNC_USE_REPORTS); parm = RNA_def_int(func, "start", 0, MINAFRAME, MAXFRAME, "Start Frame", "", MINAFRAME, MAXFRAME); - RNA_def_property_flag(parm, PROP_REQUIRED); + RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); parm = RNA_def_int(func, "end", 0, MINAFRAME, MAXFRAME, "End Frame", "", MINAFRAME, MAXFRAME); - RNA_def_property_flag(parm, PROP_REQUIRED); + RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); } void RNA_api_drivers(StructRNA *UNUSED(srna)) |