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-08-08 14:29:24 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-08-08 14:51:19 +0300
commit4b3315fc98a9edb254bf99e2747fbccb7813a34b (patch)
treebd6d2d323aca199d664e93a74f46873b66bf7f3d /source/blender/blenkernel/intern/image_save.cc
parent1382514bf2f881bc2139ebfd477e54bba92e497a (diff)
Fix T100281: image save after copy not using correct filepath
Always use the image datablock filepath for saving. The only apparent reason use the image buffer file path is image sequences, for which the current frame filepath is now computed.
Diffstat (limited to 'source/blender/blenkernel/intern/image_save.cc')
-rw-r--r--source/blender/blenkernel/intern/image_save.cc10
1 files changed, 3 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/image_save.cc b/source/blender/blenkernel/intern/image_save.cc
index cd86d3f7087..9d23af39ec3 100644
--- a/source/blender/blenkernel/intern/image_save.cc
+++ b/source/blender/blenkernel/intern/image_save.cc
@@ -144,13 +144,9 @@ bool BKE_image_save_options_init(ImageSaveOptions *opts,
opts->im_format.color_management = R_IMF_COLOR_MANAGEMENT_FOLLOW_SCENE;
- 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));
- }
- else {
- BLI_strncpy(opts->filepath, ibuf->name, sizeof(opts->filepath));
- }
+ /* Compute filepath, but don't resolve multiview and UDIM which are handled
+ * by the image saving code itself. */
+ BKE_image_user_file_path_ex(bmain, iuser, ima, opts->filepath, false, false);
/* sanitize all settings */