[Bf-blender-cvs] [8b2a450] master: Fix T49222: Image Save settings are overridden by the File Save Screen ones.

Bastien Montagne noreply at git.blender.org
Fri Sep 2 08:42:44 CEST 2016


Commit: 8b2a4505209343cebb7012af7dc29aa03da18536
Author: Bastien Montagne
Date:   Fri Sep 2 08:37:57 2016 +0200
Branches: master
https://developer.blender.org/rB8b2a4505209343cebb7012af7dc29aa03da18536

Fix T49222: Image Save settings are overridden by the File Save Screen ones.

There were two inconsistencies in how 'save image' op initiated its settings:
* It would always use ImBuf->planes value.
* It would always use Image views settings.

Both of those settings should come from scene->r.im_format (as everything else)
when saving render/compo result...

===================================================================

M	source/blender/editors/space_image/image_ops.c

===================================================================

diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index f9d76da..1f591b5 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -1613,13 +1613,16 @@ static int save_image_options_init(SaveImageOptions *simopts, SpaceImage *sima,
 			if (ima->source == IMA_SRC_GENERATED) {
 				simopts->im_format.imtype = R_IMF_IMTYPE_PNG;
 				simopts->im_format.compress = ibuf->foptions.quality;
+				simopts->im_format.planes = ibuf->planes;
 			}
 			else {
 				BKE_imbuf_to_image_format(&simopts->im_format, ibuf);
 			}
-		}
 
-		simopts->im_format.planes = ibuf->planes;
+			/* use the multiview image settings as the default */
+			simopts->im_format.stereo3d_format = *ima->stereo3d_format;
+			simopts->im_format.views_format = ima->views_format;
+		}
 
 		//simopts->subimtype = scene->r.subimtype; /* XXX - this is lame, we need to make these available too! */
 
@@ -1660,10 +1663,6 @@ static int save_image_options_init(SaveImageOptions *simopts, SpaceImage *sima,
 			}
 		}
 
-		/* use the multiview image settings as the default */
-		simopts->im_format.stereo3d_format = *ima->stereo3d_format;
-		simopts->im_format.views_format = ima->views_format;
-
 		/* color management */
 		BKE_color_managed_display_settings_copy(&simopts->im_format.display_settings, &scene->display_settings);
 		BKE_color_managed_view_settings_copy(&simopts->im_format.view_settings, &scene->view_settings);




More information about the Bf-blender-cvs mailing list