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>2009-01-24 16:45:24 +0300
committerTon Roosendaal <ton@blender.org>2009-01-24 16:45:24 +0300
commit0ac35ca7c185f8e8f462b4ec06ad28c7f136e82e (patch)
tree5e49e7467bdb7d54f8b7aeaa4a14c2b89a2007ac /source/blender/editors/util/undo.c
parente71d531238bf998f0ee5b06561462c84b89cce0d (diff)
2.5
- Brought back code for particle edit and fluidsim - Sanitized code from globals and bad level calls, so its ready to come back working. - Fixed cirle selecting (Ckey now) - Enabled undo for editmode curve, armature, particle and lattice (another commit following)
Diffstat (limited to 'source/blender/editors/util/undo.c')
-rw-r--r--source/blender/editors/util/undo.c28
1 files changed, 12 insertions, 16 deletions
diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c
index 138050d6b9c..0d36d63a1d0 100644
--- a/source/blender/editors/util/undo.c
+++ b/source/blender/editors/util/undo.c
@@ -54,7 +54,11 @@
#include "BKE_utildefines.h"
+#include "ED_armature.h"
+#include "ED_editparticle.h"
+#include "ED_curve.h"
#include "ED_mesh.h"
+#include "ED_object.h"
#include "ED_screen.h"
#include "ED_util.h"
@@ -67,15 +71,7 @@
/* ***************** generic undo system ********************* */
/* ********* XXX **************** */
-static void undo_push_curve() {}
-static void undo_push_font() {}
static void undo_push_mball() {}
-static void undo_push_lattice() {}
-static void undo_push_armature() {}
-static void PE_undo_push() {}
-static void PE_undo() {}
-static void PE_redo() {}
-static void PE_undo_menu() {}
static void undo_imagepaint_step() {}
static void sound_initialize_sounds() {}
/* ********* XXX **************** */
@@ -90,20 +86,20 @@ void ED_undo_push(bContext *C, char *str)
if(obedit->type==OB_MESH)
undo_push_mesh(C, str);
else if ELEM(obedit->type, OB_CURVE, OB_SURF)
- undo_push_curve(str);
+ undo_push_curve(C, str);
else if (obedit->type==OB_FONT)
- undo_push_font(str);
+ undo_push_font(C, str);
else if (obedit->type==OB_MBALL)
undo_push_mball(str);
else if (obedit->type==OB_LATTICE)
- undo_push_lattice(str);
+ undo_push_lattice(C, str);
else if (obedit->type==OB_ARMATURE)
- undo_push_armature(str);
+ undo_push_armature(C, str);
}
else if(G.f & G_PARTICLEEDIT) {
if (U.undosteps == 0) return;
- PE_undo_push(str);
+ PE_undo_push(CTX_data_scene(C), str);
}
else {
if(U.uiflag & USER_GLOBALUNDO)
@@ -134,9 +130,9 @@ static int ed_undo_step(bContext *C, wmOperator *op, int step)
}
else if(G.f & G_PARTICLEEDIT) {
if(step==1)
- PE_undo();
+ PE_undo(CTX_data_scene(C));
else
- PE_redo();
+ PE_redo(CTX_data_scene(C));
}
else {
do_glob_undo= 1;
@@ -178,7 +174,7 @@ void ED_undo_menu(bContext *C)
}
else {
if(G.f & G_PARTICLEEDIT)
- PE_undo_menu();
+ PE_undo_menu(CTX_data_scene(C));
else if(U.uiflag & USER_GLOBALUNDO) {
char *menu= BKE_undo_menu_string();
if(menu) {