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>2011-03-17 10:02:02 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-03-17 10:02:02 +0300
commit33047585ea19bde496d4c82add0edb9ad6759dd5 (patch)
tree19c7755d1bdd5c277ac1ae71a052b1118a20d88e /source/blender/makesrna/intern/rna_wm_api.c
parent0277073579411206c2b05cabf5d6354c8c251f1e (diff)
add cancel() method for python defined operators.
Diffstat (limited to 'source/blender/makesrna/intern/rna_wm_api.c')
-rw-r--r--source/blender/makesrna/intern/rna_wm_api.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_wm_api.c b/source/blender/makesrna/intern/rna_wm_api.c
index aad00a468d5..4891d8b1078 100644
--- a/source/blender/makesrna/intern/rna_wm_api.c
+++ b/source/blender/makesrna/intern/rna_wm_api.c
@@ -215,6 +215,13 @@ void RNA_api_operator(StructRNA *srna)
RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL);
parm= RNA_def_pointer(func, "context", "Context", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
+
+ /* cancel */
+ func= RNA_def_function(srna, "cancel", NULL);
+ RNA_def_function_ui_description(func, "Called when the operator is cancelled.");
+ RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL);
+ parm= RNA_def_pointer(func, "context", "Context", "", "");
+ RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
}
void RNA_api_macro(StructRNA *srna)