diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-09-06 11:59:18 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-09-06 11:59:18 +0400 |
commit | c94fe5e2995873536cbdb180652b1aa027e4ef8d (patch) | |
tree | 977908d8ac5cfa4fe6949eec62bba78fee17bad9 /source/blender/editors/util/undo.c | |
parent | a41f45946f8bf7b58e2b6bc048bfa30015e4ba2f (diff) |
Grease pencil: non-blocking sketch sessions
- Implement own undo stack for grease pencil, so now there'll be no keymaps conflicts.
- Supported redo's during sketch session.
- Get rid of flag stored in Globals -- use undo stack to check if grease pencil session is active.
Diffstat (limited to 'source/blender/editors/util/undo.c')
-rw-r--r-- | source/blender/editors/util/undo.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c index a2381a208ef..c1aca61f795 100644 --- a/source/blender/editors/util/undo.c +++ b/source/blender/editors/util/undo.c @@ -54,6 +54,7 @@ #include "ED_armature.h" #include "ED_particle.h" #include "ED_curve.h" +#include "ED_gpencil.h" #include "ED_mball.h" #include "ED_mesh.h" #include "ED_object.h" @@ -126,6 +127,11 @@ static int ed_undo_step(bContext *C, int step, const char *undoname) Object *obact= CTX_data_active_object(C); ScrArea *sa= CTX_wm_area(C); + /* grease pencil can be can be used in plenty of spaces, so check it first */ + if(ED_gpencil_session_active()) { + return ED_undo_gpencil_step(C, step, undoname); + } + if(sa && sa->spacetype==SPACE_IMAGE) { SpaceImage *sima= (SpaceImage *)sa->spacedata.first; |