[Bf-blender-cvs] [e76364adcd] master: Image: Fix non-deterministic behavior of image sequence loading
Sergey Sharybin
noreply at git.blender.org
Sat Feb 11 22:19:57 CET 2017
Commit: e76364adcd3810134f0b9a55fd7fa40de72a008b
Author: Sergey Sharybin
Date: Sat Feb 11 22:15:30 2017 +0100
Branches: master
https://developer.blender.org/rBe76364adcd3810134f0b9a55fd7fa40de72a008b
Image: Fix non-deterministic behavior of image sequence loading
The issue was caused by usage of non-initialized image user, which
could have different settings, causing some random image being loaded
or not loaded at all.
This caused non-deterministic behavior of Cycles image loading because
it was querying image information from several places.
This fixes crash reported in T50616, but it's not a complete fix
because preview rendering in material is wrong (same wrong as in
2.78a release).
===================================================================
M source/blender/blenkernel/intern/image.c
===================================================================
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index a2d94ccc47..318f6480aa 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -3159,7 +3159,7 @@ static ImBuf *load_sequence_single(Image *ima, ImageUser *iuser, int frame, cons
struct ImBuf *ibuf;
char name[FILE_MAX];
int flag;
- ImageUser iuser_t;
+ ImageUser iuser_t = {0};
/* XXX temp stuff? */
if (ima->lastframe != frame)
@@ -3167,8 +3167,12 @@ static ImBuf *load_sequence_single(Image *ima, ImageUser *iuser, int frame, cons
ima->lastframe = frame;
- if (iuser)
+ if (iuser) {
iuser_t = *iuser;
+ }
+ else {
+ /* TODO(sergey): Do we need to initialize something here? */
+ }
iuser_t.view = view_id;
BKE_image_user_file_path(&iuser_t, ima, name);
More information about the Bf-blender-cvs
mailing list