diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2009-08-16 06:35:44 +0400 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2009-08-16 06:35:44 +0400 |
commit | 88294d7fa2a590674ec006da7fd9e8bd7a733fc3 (patch) | |
tree | bcec98791b71af0abbbb29a76a86fa3dbe8d7c40 /source/blender/editors/util/undo.c | |
parent | b257acfed11e8d98eb7c86e0908acf80fb9e27af (diff) |
2.5/Particle edit:
* Made particle edit object-localized.
Diffstat (limited to 'source/blender/editors/util/undo.c')
-rw-r--r-- | source/blender/editors/util/undo.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c index 1b5f61e77e2..18159414cf6 100644 --- a/source/blender/editors/util/undo.c +++ b/source/blender/editors/util/undo.c @@ -79,6 +79,7 @@ void ED_undo_push(bContext *C, char *str) { wmWindowManager *wm= CTX_wm_manager(C); Object *obedit= CTX_data_edit_object(C); + Object *obact= CTX_data_active_object(C); if(obedit) { if (U.undosteps == 0) return; @@ -96,7 +97,7 @@ void ED_undo_push(bContext *C, char *str) else if (obedit->type==OB_ARMATURE) undo_push_armature(C, str); } - else if(G.f & G_PARTICLEEDIT) { + else if(obact && obact->mode & OB_MODE_PARTICLE_EDIT) { if (U.undosteps == 0) return; PE_undo_push(CTX_data_scene(C), str); @@ -145,7 +146,7 @@ static int ed_undo_step(bContext *C, int step, const char *undoname) if(obact && obact->mode & OB_MODE_TEXTURE_PAINT) undo_imagepaint_step(step); - else if(G.f & G_PARTICLEEDIT) { + else if(obact && obact->mode & OB_MODE_PARTICLE_EDIT) { if(step==1) PE_undo(CTX_data_scene(C)); else @@ -210,13 +211,14 @@ static int ed_redo_exec(bContext *C, wmOperator *op) void ED_undo_menu(bContext *C) { Object *obedit= CTX_data_edit_object(C); + Object *obact= CTX_data_active_object(C); if(obedit) { //if ELEM7(obedit->type, OB_MESH, OB_FONT, OB_CURVE, OB_SURF, OB_MBALL, OB_LATTICE, OB_ARMATURE) // undo_editmode_menu(); } else { - if(G.f & G_PARTICLEEDIT) + if(obact && obact->mode & OB_MODE_PARTICLE_EDIT) PE_undo_menu(CTX_data_scene(C), CTX_data_active_object(C)); else if(U.uiflag & USER_GLOBALUNDO) { char *menu= BKE_undo_menu_string(); |