[Bf-blender-cvs] [08324ba2c1c] blender-v3.2-release: Fix T98350: Crash when using clone tool + sequence.

Jeroen Bakker noreply at git.blender.org
Wed May 25 08:49:57 CEST 2022


Commit: 08324ba2c1cd6427466e8f08a2b0b476ff9b32f6
Author: Jeroen Bakker
Date:   Wed May 25 08:46:18 2022 +0200
Branches: blender-v3.2-release
https://developer.blender.org/rB08324ba2c1cd6427466e8f08a2b0b476ff9b32f6

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.

===================================================================

M	source/blender/blenkernel/BKE_image_partial_update.hh

===================================================================

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



More information about the Bf-blender-cvs mailing list