From fc1ae52994016fc4d43053caa412212726f7e223 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 30 May 2022 14:23:45 +0200 Subject: 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. --- source/blender/makesrna/intern/rna_image_api.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source/blender/makesrna') 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, -- cgit v1.2.3