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>2019-02-04 07:01:55 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-02-04 07:01:55 +0300
commit55c29e36dccddc7ae8c6512b6dec074437214097 (patch)
tree0d439554dea0e226c01f8b2969f33f6b32b656c1 /source/blender/makesrna/intern/rna_wm_api.c
parentb5c841498c468771219b89c6b58bc751ee4e2472 (diff)
Undo System: add function to print undo steps
Useful for debugging.
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 4e87d06db80..0fffadfa158 100644
--- a/source/blender/makesrna/intern/rna_wm_api.c
+++ b/source/blender/makesrna/intern/rna_wm_api.c
@@ -66,6 +66,7 @@ const EnumPropertyItem rna_enum_window_cursor_items[] = {
#ifdef RNA_RUNTIME
#include "BKE_context.h"
+#include "BKE_undo_system.h"
#include "WM_types.h"
@@ -457,6 +458,11 @@ static void rna_PieMenuEnd(bContext *C, PointerRNA *handle)
UI_pie_menu_end(C, handle->data);
}
+static void rna_WindowManager_print_undo_steps(wmWindowManager *wm)
+{
+ BKE_undosys_print(wm->undo_stack);
+}
+
static PointerRNA rna_WindoManager_operator_properties_last(const char *idname)
{
wmOperatorType *ot = WM_operatortype_find(idname, true);
@@ -783,6 +789,7 @@ void RNA_api_wm(StructRNA *srna)
RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_RNAPTR);
RNA_def_function_return(func, parm);
+ RNA_def_function(srna, "print_undo_steps", "rna_WindowManager_print_undo_steps");
}
void RNA_api_operator(StructRNA *srna)