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-06 07:35:00 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-12-06 07:35:00 +0300
commitf08e8af0b9568798bd2f59daf1b83dd0f7204ced (patch)
treecdc7416d12c9ec57d602081dc421aff464fa5b00 /source/blender/makesrna/intern/rna_wm_api.c
parent062cf438ce065b477b52f72871b95bc5ee12c619 (diff)
wm.invoke_popup(op, width, height) similar to wm.invoke_props_popup(op, event) except it doesnt use undo/redo (UI's need to execute operators themselves)
Diffstat (limited to 'source/blender/makesrna/intern/rna_wm_api.c')
-rw-r--r--source/blender/makesrna/intern/rna_wm_api.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_wm_api.c b/source/blender/makesrna/intern/rna_wm_api.c
index 62c4fe642a1..50b0e37b7cd 100644
--- a/source/blender/makesrna/intern/rna_wm_api.c
+++ b/source/blender/makesrna/intern/rna_wm_api.c
@@ -147,6 +147,15 @@ void RNA_api_wm(StructRNA *srna)
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
+
+ /* invoke functions, for use with python */
+ func= RNA_def_function(srna, "invoke_popup", "WM_operator_ui_popup");
+ RNA_def_function_flag(func, FUNC_NO_SELF|FUNC_USE_CONTEXT);
+ RNA_def_function_ui_description(func, "Operator popup invoke.");
+ parm= RNA_def_pointer(func, "operator", "Operator", "", "Operator to call.");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm= RNA_def_int(func, "width", 300, 0, INT_MAX, "", "Width of the popup.", 0, INT_MAX);
+ parm= RNA_def_int(func, "height", 20, 0, INT_MAX, "", "Height of the popup.", 0, INT_MAX);
}
void RNA_api_keyconfig(StructRNA *srna)