From 440d1042798113a0e8115ea1f1d016a44712e7a0 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 12 Dec 2016 15:23:55 +0100 Subject: 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 --- source/blender/makesrna/intern/rna_texture_api.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/makesrna/intern/rna_texture_api.c') diff --git a/source/blender/makesrna/intern/rna_texture_api.c b/source/blender/makesrna/intern/rna_texture_api.c index ef1ef5e1469..a8fcf0ca3b6 100644 --- a/source/blender/makesrna/intern/rna_texture_api.c +++ b/source/blender/makesrna/intern/rna_texture_api.c @@ -93,11 +93,11 @@ void RNA_api_texture(StructRNA *srna) RNA_def_function_ui_description(func, "Evaluate the texture at the coordinates given"); parm = RNA_def_float_vector(func, "value", 3, NULL, -FLT_MAX, FLT_MAX, "", "", -1e4, 1e4); - RNA_def_property_flag(parm, PROP_REQUIRED); + RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); /* return location and normal */ parm = RNA_def_float_vector(func, "result", 4, NULL, -FLT_MAX, FLT_MAX, "Result", NULL, -1e4, 1e4); - RNA_def_property_flag(parm, PROP_THICK_WRAP); + RNA_def_parameter_flags(parm, PROP_THICK_WRAP, 0); RNA_def_function_output(func, parm); } @@ -119,7 +119,7 @@ void RNA_api_environment_map(StructRNA *srna) RNA_def_function_flag(func, FUNC_USE_CONTEXT | FUNC_USE_REPORTS); parm = RNA_def_string_file_name(func, "filepath", NULL, FILE_MAX, "File path", "Location of the output file"); - RNA_def_property_flag(parm, PROP_REQUIRED); + RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); RNA_def_pointer(func, "scene", "Scene", "", "Overrides the scene from which image parameters are taken"); -- cgit v1.2.3