Page MenuHome
Paste P1958

D7789 example
ActivePublic

Authored by Campbell Barton (campbellbarton) on Feb 11 2021, 5:14 AM.
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index 10f15519ea4..ee6656a3205 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -5440,7 +5440,13 @@ void BKE_image_user_file_path(ImageUser *iuser, Image *ima, char *filepath)
index = iuser ? iuser->framenr : ima->lastframe;
}
else {
- index = (iuser && iuser->tile) ? iuser->tile : 1001;
+ if (iuser && iuser->tile) {
+ index = iuser->tile;
+ }
+ else {
+ const ImageTile *tile = BLI_findlink(&ima->tiles, ima->active_tile_index);
+ index = (tile != NULL) ? tile->tile_number : 1001;
+ }
}
BLI_path_sequence_decode(filepath, head, tail, &numlen);