Enabled trial for 'global undo'. This now only has undo steps for
authorTon Roosendaal <ton@blender.org>
Tue, 31 Aug 2004 20:13:32 +0000 (20:13 +0000)
committerTon Roosendaal <ton@blender.org>
Tue, 31 Aug 2004 20:13:32 +0000 (20:13 +0000)
- transform (grab, rot, scale, etc)
- all button commands, including menus

I sacrificed for now the UKEY in the 3d window for it. Shift+U does a redo.
(Only in 3d window)

What this system does is saving files in the temp directory (user pref).
The filenames are cycled around (32 in total now).

This commit will follow shortly with a userpref for it, not to frustrate
people who want to work in normal fashion with blender.

source/blender/src/editobject.c
source/blender/src/interface.c
source/blender/src/space.c

index 1b8ed2d6d79fe40edf6ea50305cdd670d21c159a..b3fdef709ecc4c838858348282853737420b4bb3 100644 (file)
@@ -6163,8 +6163,8 @@ void transform(int mode)
        tottrans= 0;
 
        /* undo after transform, since it's storing current situations */
-       //if(canceled==0 && G.obedit==NULL) 
-       //      BIF_write_undo(transform_mode_to_string(mode));
+       if(canceled==0 && G.obedit==NULL) 
+               BIF_write_undo(transform_mode_to_string(mode));
 }
 
 void std_rmouse_transform(void (*xf_func)(int))
index 7e39dff0f1797138b29877f601a78243e6e6bce9..29f8a8051533821ebcce21c459b7babc06555f3f 100644 (file)
@@ -3091,7 +3091,7 @@ static int ui_do_block(uiBlock *block, uiEvent *uevent)
                                        if(inside || uevent->event!=LEFTMOUSE) {
                                                butevent= ui_do_button(block, but, uevent);
                                                
-                                               // if(but->type!=BLOCK) BIF_write_undo(but->str);
+                                               if(but->type!=BLOCK) BIF_write_undo(but->str);
 
                                                if(butevent) addqueue(block->winq, UI_BUT_EVENT, (short)butevent);
 
index daeeb6fff19fa764f39981039a2b005be558dae4..f99ed5032a9d7240469467802f61a2addbce8fc5 100644 (file)
@@ -1439,12 +1439,12 @@ void winqreadview3dspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
                                        else if(G.f & G_VERTEXPAINT)
                                                vpaint_undo();
                                        else
-                                               single_user();
-                                               //BIF_undo_step(1);
+                                               // single_user();
+                                               BIF_undo_step(1);
                                }
                                else if(G.qual==LR_SHIFTKEY)
-                                       // BIF_undo_step(-1);
-                                       ;
+                                       BIF_undo_step(-1);
+                                       
                                break;
                        case VKEY:
                                ob= OBACT;