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:
authorCampbell Barton <ideasman42@gmail.com>2009-12-07 03:16:57 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-12-07 03:16:57 +0300
commit750764f411d18b5f57cac3857cf201d4e9425521 (patch)
treee0de3ecab9cefe266080f9962a848e32c6e58c0f /source/blender/makesrna/intern/rna_wm_api.c
parent85773c72303962f03c2a2d62bb26e042da8dd4b7 (diff)
rna flag PROP_ENUM_FLAG which makes rna props a tuple of enums when converted into a PyObject
only used by wm.invoke_props_popup() currently
Diffstat (limited to 'source/blender/makesrna/intern/rna_wm_api.c')
-rw-r--r--source/blender/makesrna/intern/rna_wm_api.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_wm_api.c b/source/blender/makesrna/intern/rna_wm_api.c
index 50b0e37b7cd..ce26072e91b 100644
--- a/source/blender/makesrna/intern/rna_wm_api.c
+++ b/source/blender/makesrna/intern/rna_wm_api.c
@@ -146,7 +146,11 @@ void RNA_api_wm(StructRNA *srna)
RNA_def_property_flag(parm, PROP_REQUIRED);
parm= RNA_def_pointer(func, "event", "Event", "", "Event.");
RNA_def_property_flag(parm, PROP_REQUIRED);
- RNA_def_function_return(func, RNA_def_int(func, "mode", 0, 0, INT_MAX, "Mode", "", 0, INT_MAX)); // XXX, should be an enum/flag thingo
+
+ parm= RNA_def_enum(func, "result", operator_return_items, 0, "result", ""); // better name?
+ RNA_def_property_flag(parm, PROP_ENUM_FLAG);
+ RNA_def_function_return(func, parm);
+
/* invoke functions, for use with python */
func= RNA_def_function(srna, "invoke_popup", "WM_operator_ui_popup");