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:
Diffstat (limited to 'source/blender/blenkernel/intern/image.c')
-rw-r--r--source/blender/blenkernel/intern/image.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index 5807ea555c2..9b00a0150ad 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -2977,6 +2977,16 @@ static ImBuf *image_get_cached_ibuf(Image *ima, ImageUser *iuser, int *r_frame,
ima->tpageflag |= IMA_TPAGE_REFRESH;
}
ima->lastframe = frame;
+
+ /* counter the fact that image is set as invalid when loading a frame
+ * that is not in the cache (through image_acquire_ibuf for instance),
+ * yet we have valid frames in the cache loaded */
+ if (ibuf) {
+ ima->ok = IMA_OK_LOADED;
+
+ if (iuser)
+ iuser->ok = ima->ok;
+ }
}
else if (ima->type == IMA_TYPE_MULTILAYER) {
frame = iuser ? iuser->framenr : ima->lastframe;