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...
This commit is contained in:
parent
e7ea1ae78c
commit
8b2a450520
Notes:
blender-bot
2023-02-14 11:29:52 +01:00
Referenced by issue #49815, Blender always reverts to RGBA when using Save As Image Referenced by issue #49222, Image Save settings are overridden by the File Save Screen ones.
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue