Enabled trial for 'global undo'. This now only has undo steps for

- 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.
This commit is contained in:
2004-08-31 20:13:32 +00:00
parent 934a11e9ff
commit bd31cc5eb4
3 changed files with 7 additions and 7 deletions

View File

@@ -6163,8 +6163,8 @@ void transform(int mode)
tottrans= 0; tottrans= 0;
/* undo after transform, since it's storing current situations */ /* undo after transform, since it's storing current situations */
//if(canceled==0 && G.obedit==NULL) if(canceled==0 && G.obedit==NULL)
// BIF_write_undo(transform_mode_to_string(mode)); BIF_write_undo(transform_mode_to_string(mode));
} }
void std_rmouse_transform(void (*xf_func)(int)) void std_rmouse_transform(void (*xf_func)(int))

View File

@@ -3091,7 +3091,7 @@ static int ui_do_block(uiBlock *block, uiEvent *uevent)
if(inside || uevent->event!=LEFTMOUSE) { if(inside || uevent->event!=LEFTMOUSE) {
butevent= ui_do_button(block, but, uevent); 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); if(butevent) addqueue(block->winq, UI_BUT_EVENT, (short)butevent);

View File

@@ -1439,12 +1439,12 @@ void winqreadview3dspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
else if(G.f & G_VERTEXPAINT) else if(G.f & G_VERTEXPAINT)
vpaint_undo(); vpaint_undo();
else else
single_user(); // single_user();
//BIF_undo_step(1); BIF_undo_step(1);
} }
else if(G.qual==LR_SHIFTKEY) else if(G.qual==LR_SHIFTKEY)
// BIF_undo_step(-1); BIF_undo_step(-1);
;
break; break;
case VKEY: case VKEY:
ob= OBACT; ob= OBACT;