Sculpt: split generic part of image paint undo system into separate
[blender-staging.git] / source / blender / editors / util / undo.c
index 18159414cf60d0267985f81a63dd1dc43ebd3251..18e3304c1910a48e08da37156a630ce2d1d4c382 100644 (file)
@@ -58,6 +58,7 @@
 #include "ED_armature.h"
 #include "ED_particle.h"
 #include "ED_curve.h"
+#include "ED_mball.h"
 #include "ED_mesh.h"
 #include "ED_object.h"
 #include "ED_screen.h"
@@ -123,7 +124,7 @@ static int ed_undo_step(bContext *C, int step, const char *undoname)
                SpaceImage *sima= (SpaceImage *)sa->spacedata.first;
                
                if((obact && obact->mode & OB_MODE_TEXTURE_PAINT) || sima->flag & SI_DRAWTOOL) {
-                       undo_imagepaint_step(step);
+                       ED_undo_paint_step(C, UNDO_PAINT_IMAGE, step);
 
                        WM_event_add_notifier(C, NC_WINDOW, NULL);
                        return OPERATOR_FINISHED;
@@ -145,7 +146,7 @@ static int ed_undo_step(bContext *C, int step, const char *undoname)
                int do_glob_undo= 0;
                
                if(obact && obact->mode & OB_MODE_TEXTURE_PAINT)
-                       undo_imagepaint_step(step);
+                       ED_undo_paint_step(C, UNDO_PAINT_IMAGE, step);
                else if(obact && obact->mode & OB_MODE_PARTICLE_EDIT) {
                        if(step==1)
                                PE_undo(CTX_data_scene(C));
@@ -239,6 +240,7 @@ void ED_OT_undo(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Undo";
+    ot->description= "Undo previous action.";
        ot->idname= "ED_OT_undo";
        
        /* api callbacks */
@@ -250,6 +252,7 @@ void ED_OT_redo(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Redo";
+    ot->description= "Redo previous action.";
        ot->idname= "ED_OT_redo";
        
        /* api callbacks */