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>2018-07-12 15:43:35 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-07-12 15:43:35 +0300
commit753a600e354f21618e24e9071ef5d88f1913fcd8 (patch)
tree1e05ca245590ff9a6cf7523a6f3fba46de25327c /source/blender/python
parent9a5fb0209e6e94112be4d390316933ab84e8e2df (diff)
PyAPI: add undo redo handlers
Useful so Python can clean up before/after undo steps.
Diffstat (limited to 'source/blender/python')
-rw-r--r--source/blender/python/intern/bpy_app_handlers.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/python/intern/bpy_app_handlers.c b/source/blender/python/intern/bpy_app_handlers.c
index 90aa22de5bf..ded5ead93aa 100644
--- a/source/blender/python/intern/bpy_app_handlers.c
+++ b/source/blender/python/intern/bpy_app_handlers.c
@@ -59,6 +59,10 @@ static PyStructSequence_Field app_cb_info_fields[] = {
{(char *)"load_post", (char *)"on loading a new blend file (after)"},
{(char *)"save_pre", (char *)"on saving a blend file (before)"},
{(char *)"save_post", (char *)"on saving a blend file (after)"},
+ {(char *)"undo_pre", (char *)"on loading an undo step (before)"},
+ {(char *)"undo_post", (char *)"on loading an undo step (after)"},
+ {(char *)"redo_pre", (char *)"on loading a redo step (before)"},
+ {(char *)"redo_post", (char *)"on loading a redo step (after)"},
{(char *)"scene_update_pre", (char *)"on every scene data update. Does not imply that anything changed in the "
"scene, just that the dependency graph is about to be reevaluated, and the "
"scene is about to be updated by Blender's animation system."},