Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2022-05-30 15:23:45 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-05-30 17:24:12 +0300
commitfc1ae52994016fc4d43053caa412212726f7e223 (patch)
tree7fa498e890ab0ecaa2ce96e925c68209981ea3e8 /source/blender/makesrna
parent65bd9974d1a6e3b66b9613a60e521a5211631304 (diff)
Fix T98444: Image.save_render not using scene output file type
Also simplify logic because (source == IMA_SRC_VIEWER) and ELEM(type, IMA_TYPE_R_RESULT, IMA_TYPE_COMPOSITE) are the same thing.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_image_api.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_image_api.c b/source/blender/makesrna/intern/rna_image_api.c
index bac8f214441..46bb0df5c11 100644
--- a/source/blender/makesrna/intern/rna_image_api.c
+++ b/source/blender/makesrna/intern/rna_image_api.c
@@ -59,9 +59,8 @@ static void rna_Image_save_render(
ImageSaveOptions opts;
- if (BKE_image_save_options_init(&opts, bmain, scene, image, NULL, false)) {
+ if (BKE_image_save_options_init(&opts, bmain, scene, image, NULL, false, true)) {
opts.save_copy = true;
- opts.save_as_render = true;
STRNCPY(opts.filepath, path);
if (!BKE_image_save(reports, bmain, image, NULL, &opts)) {
@@ -83,7 +82,7 @@ static void rna_Image_save(Image *image, Main *bmain, bContext *C, ReportList *r
Scene *scene = CTX_data_scene(C);
ImageSaveOptions opts;
- if (BKE_image_save_options_init(&opts, bmain, scene, image, NULL, false)) {
+ if (BKE_image_save_options_init(&opts, bmain, scene, image, NULL, false, false)) {
if (!BKE_image_save(reports, bmain, image, NULL, &opts)) {
BKE_reportf(reports,
RPT_ERROR,