From 236a11ca63cc736ca15e0ea8cdf377cefc82d4a3 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 30 Nov 2010 18:07:44 +0000 Subject: misc small changes. - commented unused View3D->flag's - popup dialog now centers over the mouse - only overwrite image alpha with render settings on save if saving the render result. --- source/blender/editors/space_image/image_ops.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'source/blender/editors/space_image') diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 7dae17ff9e0..d2cf3365423 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -876,15 +876,19 @@ static void save_image_doit(bContext *C, SpaceImage *sima, Scene *scene, wmOpera short ok= FALSE; BLI_path_abs(path, bmain->name); - + WM_cursor_wait(1); - /* enforce user setting for RGB or RGBA, but skip BW */ - if(scene->r.planes==32) - ibuf->depth= 32; - else if(scene->r.planes==24) - ibuf->depth= 24; - + if(ima->type == IMA_TYPE_R_RESULT) { + /* enforce user setting for RGB or RGBA, but skip BW */ + if(scene->r.planes==32) { + ibuf->depth= 32; + } + else if(scene->r.planes==24) { + ibuf->depth= 24; + } + } + if(scene->r.scemode & R_EXTENSION) { BKE_add_image_extension(path, sima->imtypenr); } @@ -946,9 +950,8 @@ static void save_image_doit(bContext *C, SpaceImage *sima, Scene *scene, wmOpera else { BKE_reportf(op->reports, RPT_ERROR, "Couldn't write image: %s", path); } - - - + + WM_event_add_notifier(C, NC_IMAGE|NA_EDITED, sima->image); WM_cursor_wait(0); -- cgit v1.2.3