From 36b7f5d27e7aec2300d0c9f44f724c479769eb98 Mon Sep 17 00:00:00 2001 From: Lukas Stockner Date: Mon, 10 Feb 2020 16:12:45 +0100 Subject: Fix T73713: Tiled textures (UDIM) getting lost when saving the .blend but not the textures The issue here is simple, IMA_SRC_TILED was missing from a check for whether the image should be saved. Note that tiled images won't be automatically saved if they have never been saved before. For single images this is handled by packing them, but packing of tiled images isn't supported yet. However, in that case the file closing dialog will at least show a warning now instead of completely ignoring tiled images. --- source/blender/editors/space_image/image_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/space_image') diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index e6bd563b02f..18e084729bd 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -2510,7 +2510,7 @@ static bool image_should_be_saved_when_modified(Image *ima) static bool image_should_be_saved(Image *ima, bool *is_format_writable) { if (BKE_image_is_dirty_writable(ima, is_format_writable) && - (ima->source == IMA_SRC_FILE || ima->source == IMA_SRC_GENERATED)) { + ELEM(ima->source, IMA_SRC_FILE, IMA_SRC_GENERATED, IMA_SRC_TILED)) { return image_should_be_saved_when_modified(ima); } else { -- cgit v1.2.3 From d08ccd526f3641d79467e5d8d85a32a29acd2ade Mon Sep 17 00:00:00 2001 From: Lukas Stockner Date: Mon, 10 Feb 2020 16:19:30 +0100 Subject: Fix unreported: Packing/unpacking errors don't mention tiled images Thanks to @dfelinto for spotting this! --- source/blender/editors/space_image/image_ops.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/space_image') diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 18e084729bd..99929a4a0b7 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -3148,7 +3148,8 @@ static bool image_pack_test(bContext *C, wmOperator *op) } if (ELEM(ima->source, IMA_SRC_SEQUENCE, IMA_SRC_MOVIE, IMA_SRC_TILED)) { - BKE_report(op->reports, RPT_ERROR, "Packing movies or image sequences not supported"); + BKE_report( + op->reports, RPT_ERROR, "Packing movies, image sequences or tiled images not supported"); return 0; } @@ -3216,7 +3217,8 @@ static int image_unpack_exec(bContext *C, wmOperator *op) } if (ELEM(ima->source, IMA_SRC_SEQUENCE, IMA_SRC_MOVIE, IMA_SRC_TILED)) { - BKE_report(op->reports, RPT_ERROR, "Unpacking movies or image sequences not supported"); + BKE_report( + op->reports, RPT_ERROR, "Unpacking movies, image sequences or tiled images not supported"); return OPERATOR_CANCELLED; } @@ -3249,7 +3251,8 @@ static int image_unpack_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSE } if (ELEM(ima->source, IMA_SRC_SEQUENCE, IMA_SRC_MOVIE, IMA_SRC_TILED)) { - BKE_report(op->reports, RPT_ERROR, "Unpacking movies or image sequences not supported"); + BKE_report( + op->reports, RPT_ERROR, "Unpacking movies, image sequences or tiled images not supported"); return OPERATOR_CANCELLED; } -- cgit v1.2.3