Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2004-09-01 01:01:21 +0400
committerTon Roosendaal <ton@blender.org>2004-09-01 01:01:21 +0400
commit2e0380f365a9b88ddeddc9203842d267bd54d9c5 (patch)
tree6c66d01e3072742eea2b1a291300790fcadc5975
parentbd31cc5eb49c375da25df6068efee8274f02c74c (diff)
The undo test is now safely hidden behind a user-button (temporal)
Activate it in User menu "edit methods"
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h2
-rw-r--r--source/blender/src/space.c15
-rw-r--r--source/blender/src/usiblender.c3
3 files changed, 13 insertions, 7 deletions
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index c43aa6268cb..fef367b6e3f 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -192,7 +192,7 @@ extern UserDef U; /* from usiblender.c !!!! */
#define USER_PANELPINNED 1024
#define USER_AUTOPERSP 2048
#define USER_LOCKAROUND 4096
-
+#define USER_GLOBALUNDO 8192
/* transopts */
diff --git a/source/blender/src/space.c b/source/blender/src/space.c
index f99ed5032a9..930f9a3eb37 100644
--- a/source/blender/src/space.c
+++ b/source/blender/src/space.c
@@ -1438,12 +1438,13 @@ void winqreadview3dspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
wpaint_undo();
else if(G.f & G_VERTEXPAINT)
vpaint_undo();
- else
- // single_user();
- BIF_undo_step(1);
+ else {
+ if(U.uiflag & USER_GLOBALUNDO) BIF_undo_step(1);
+ else single_user();
+ }
}
else if(G.qual==LR_SHIFTKEY)
- BIF_undo_step(-1);
+ if(U.uiflag & USER_GLOBALUNDO) BIF_undo_step(-1);
break;
case VKEY:
@@ -2314,13 +2315,17 @@ void drawinfospace(ScrArea *sa, void *spacedata)
uiBlockEndAlign(block);
- uiDefBut(block, LABEL,0,"Mesh undo:",
+ uiDefBut(block, LABEL,0,"Editmode undo:",
(xpos+(2*edgsp)+mpref),y3label, mpref,buth,
0, 0, 0, 0, 0, "");
uiDefButS(block, NUMSLI, B_DRAWINFO, "Steps:",
(xpos+edgsp+mpref+midsp),y2,mpref,buth,
&(U.undosteps), 2, 64, 0, 0, "Number of undo steps available in Edit Mode (smaller values conserve memory)");
+ uiDefButBitS(block, TOG, USER_GLOBALUNDO, B_DRAWINFO, "Global undo",
+ (xpos+edgsp+mpref+midsp),y1,mpref,buth,
+ &(U.uiflag), 2, 64, 0, 0, "");
+
uiDefBut(block, LABEL,0,"Auto keyframe on:",
(xpos+(2*edgsp)+(2*mpref)+midsp),y3label,mpref,buth,
diff --git a/source/blender/src/usiblender.c b/source/blender/src/usiblender.c
index ff5b334e480..b484d2d7d68 100644
--- a/source/blender/src/usiblender.c
+++ b/source/blender/src/usiblender.c
@@ -507,8 +507,9 @@ void BIF_write_undo(char *name)
char *err, tstr[FILE_MAXDIR+FILE_MAXFILE];
UndoElem *uel;
- /* calculate current filename */
+ if( (U.uiflag & USER_GLOBALUNDO==0)) return;
+ /* calculate current filename */
counter++;
counter= counter % MAXUNDO;
get_undosave_location(tstr, counter);