PyAPI: add undo redo handlers

Useful so Python can clean up before/after undo steps.
This commit is contained in:
2018-07-12 14:43:35 +02:00
parent 9a5fb0209e
commit 753a600e35
3 changed files with 45 additions and 2 deletions

View File

@@ -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."},