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-23 13:06:07 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-05-23 13:30:11 +0300
commiteba6900b083e78b70c328783382f99bb18da6099 (patch)
tree8fd9f427c1f9985d50dd1aac268502627408c606 /source/blender/blenkernel/intern/image_save.cc
parenta833c7f4a54e24fb3012311636bf7b1949b20eaf (diff)
Fix T98305: Image.save not working for generated images with filepath
This is a place where the API function and operator should differ, for the API manually setting the filepath and then saving should work. For the UI there is no filepath visible, so it should open Save As even if there was a filepath set for example from before changing an image type to Generated.
Diffstat (limited to 'source/blender/blenkernel/intern/image_save.cc')
-rw-r--r--source/blender/blenkernel/intern/image_save.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/image_save.cc b/source/blender/blenkernel/intern/image_save.cc
index 0230cf89d06..b67d3490e03 100644
--- a/source/blender/blenkernel/intern/image_save.cc
+++ b/source/blender/blenkernel/intern/image_save.cc
@@ -143,7 +143,7 @@ bool BKE_image_save_options_init(ImageSaveOptions *opts,
opts->im_format.color_management = R_IMF_COLOR_MANAGEMENT_FOLLOW_SCENE;
- if (ima->source == IMA_SRC_TILED) {
+ if (ibuf->name[0] == '\0' || ima->source == IMA_SRC_TILED) {
BLI_strncpy(opts->filepath, ima->filepath, sizeof(opts->filepath));
BLI_path_abs(opts->filepath, ID_BLEND_PATH_FROM_GLOBAL(&ima->id));
}