diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2009-08-16 05:25:53 +0400 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2009-08-16 05:25:53 +0400 |
commit | ebf1c5faca86286aa90ab5ab9fc4d3ddb1f51cdf (patch) | |
tree | 1e457366adcd664233760e5e17b20aa6c3f8e4a2 /source/blender/editors/util | |
parent | db1cab0f3a75562eebf5aea93753e77582a4c3e4 (diff) |
2.5/Texture paint
* Made texture paint object-localized too.
Note for Brecht: gpu_draw.c had three uses of G_TEXTUREPAINT that I was not able to cleanly fix, so commented out for now. Can you take a look and see what should be done here?
Diffstat (limited to 'source/blender/editors/util')
-rw-r--r-- | source/blender/editors/util/undo.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c index e175f7c1393..1b5f61e77e2 100644 --- a/source/blender/editors/util/undo.c +++ b/source/blender/editors/util/undo.c @@ -115,12 +115,13 @@ void ED_undo_push(bContext *C, char *str) static int ed_undo_step(bContext *C, int step, const char *undoname) { Object *obedit= CTX_data_edit_object(C); + Object *obact= CTX_data_active_object(C); ScrArea *sa= CTX_wm_area(C); if(sa && sa->spacetype==SPACE_IMAGE) { SpaceImage *sima= (SpaceImage *)sa->spacedata.first; - if(G.f & G_TEXTUREPAINT || sima->flag & SI_DRAWTOOL) { + if((obact && obact->mode & OB_MODE_TEXTURE_PAINT) || sima->flag & SI_DRAWTOOL) { undo_imagepaint_step(step); WM_event_add_notifier(C, NC_WINDOW, NULL); @@ -142,7 +143,7 @@ static int ed_undo_step(bContext *C, int step, const char *undoname) else { int do_glob_undo= 0; - if(G.f & G_TEXTUREPAINT) + if(obact && obact->mode & OB_MODE_TEXTURE_PAINT) undo_imagepaint_step(step); else if(G.f & G_PARTICLEEDIT) { if(step==1) |