diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-07-25 15:25:10 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-07-25 15:25:10 +0400 |
commit | e771e07fe8e876d91922bb3f2c2f04c415ed1a06 (patch) | |
tree | 7ad62b199932428641e4a64a556b9abd58597394 /source/blender/editors/space_image/image_edit.c | |
parent | a54fc5a99db04afcbbfd661f5fafa1f0fa4c4632 (diff) |
image space now has a mode for view/paint/mask editing.
Diffstat (limited to 'source/blender/editors/space_image/image_edit.c')
-rw-r--r-- | source/blender/editors/space_image/image_edit.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/editors/space_image/image_edit.c b/source/blender/editors/space_image/image_edit.c index 1c488fe4ac7..ae6fe704c6f 100644 --- a/source/blender/editors/space_image/image_edit.c +++ b/source/blender/editors/space_image/image_edit.c @@ -66,8 +66,11 @@ void ED_space_image_set(SpaceImage *sima, Scene *scene, Object *obedit, Image *i * to check if the face is displayed in UV-localview */ sima->image = ima; - if (ima == NULL || ima->type == IMA_TYPE_R_RESULT || ima->type == IMA_TYPE_COMPOSITE) - sima->flag &= ~SI_DRAWTOOL; + if (ima == NULL || ima->type == IMA_TYPE_R_RESULT || ima->type == IMA_TYPE_COMPOSITE) { + if (sima->mode == SI_MODE_PAINT) { + sima->mode = SI_MODE_VIEW; + } + } if (sima->image) BKE_image_signal(sima->image, &sima->iuser, IMA_SIGNAL_USER_NEW_IMAGE); @@ -257,7 +260,7 @@ int ED_space_image_show_paint(SpaceImage *sima) if (ED_space_image_show_render(sima)) return 0; - return (sima->flag & SI_DRAWTOOL); + return (sima->mode == SI_MODE_PAINT); } int ED_space_image_show_uvedit(SpaceImage *sima, Object *obedit) |