diff options
Diffstat (limited to 'source/blender/editors/util/undo.c')
-rw-r--r-- | source/blender/editors/util/undo.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c index ee6101d2952..3eef8401db9 100644 --- a/source/blender/editors/util/undo.c +++ b/source/blender/editors/util/undo.c @@ -55,6 +55,7 @@ #include "ED_mball.h" #include "ED_mesh.h" #include "ED_object.h" +#include "ED_physics.h" #include "ED_render.h" #include "ED_screen.h" #include "ED_paint.h" @@ -104,6 +105,9 @@ void ED_undo_push(bContext *C, const char *str) PE_undo_push(CTX_data_scene(C), str); } + else if (obact && obact->mode & OB_MODE_HAIR_EDIT) { + undo_push_strands(C, str); + } else if (obact && obact->mode & OB_MODE_SCULPT) { /* do nothing for now */ } @@ -189,6 +193,14 @@ static int ed_undo_step(bContext *C, int step, const char *undoname) else PE_redo(scene); } + else if (obact && obact->mode & OB_MODE_HAIR_EDIT) { + if (undoname) + undo_editmode_name(C, undoname); + else + undo_editmode_step(C, step); + + WM_event_add_notifier(C, NC_GEOM | ND_DATA, NULL); + } else if (U.uiflag & USER_GLOBALUNDO) { // note python defines not valid here anymore. //#ifdef WITH_PYTHON |