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:
authorJeroen Bakker <jeroen@blender.org>2022-05-25 09:46:18 +0300
committerJeroen Bakker <jeroen@blender.org>2022-05-25 09:46:18 +0300
commit08324ba2c1cd6427466e8f08a2b0b476ff9b32f6 (patch)
tree79f8cee207dc7750ae2b28c385f1b4ae12b6a763 /source/blender/blenkernel/BKE_image_partial_update.hh
parente69f3d7db17893c2153ec8395db1168d6fc7608e (diff)
Fix T98350: Crash when using clone tool + sequence.
When no image user is known the last used frame of the image is used to read a frame. When partial updating an image there is always an image user that would use a zerod out image user, meaning the frame number is set to 0 when using the clone tool. This fix syncs the frame with the last used frame of the image to ensure that the buffer exists. There is a bailout in the overlay_edit_uv.c.
Diffstat (limited to 'source/blender/blenkernel/BKE_image_partial_update.hh')
-rw-r--r--source/blender/blenkernel/BKE_image_partial_update.hh5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_image_partial_update.hh b/source/blender/blenkernel/BKE_image_partial_update.hh
index 393bf003caa..6611efe7a61 100644
--- a/source/blender/blenkernel/BKE_image_partial_update.hh
+++ b/source/blender/blenkernel/BKE_image_partial_update.hh
@@ -172,6 +172,11 @@ class ImageTileData : AbstractTileData {
if (image_user != nullptr) {
this->image_user = *image_user;
}
+ else {
+ /* When no image user is given the lastframe of the image should be used. This reflect the
+ * same logic when using a stencil image in the clone tool. */
+ this->image_user.framenr = image->lastframe;
+ }
}
void init_data(TileNumber new_tile_number) override