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:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-03-27 15:26:10 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-03-27 15:26:10 +0400
commit68d8c6ad3d9aa54219da9bce4abdb4bc424a3154 (patch)
treed1cb04bc8ebe7575f2a62e23a6fe272976687908 /source/blender/nodes/composite
parentcb6f4160cce25fb3f233e0e0a623d035836caa32 (diff)
Fix #34779: Channels disappear from multilayer exr sequence
Issue was caused by delayed or missing image user frame number update, which lead to image loading failure in cases node is updating from image signal callback. Solved in a way that file from image datablock is used for sockets detection instead of loading image for current frame.
Diffstat (limited to 'source/blender/nodes/composite')
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_image.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/source/blender/nodes/composite/nodes/node_composite_image.c b/source/blender/nodes/composite/nodes/node_composite_image.c
index c09903ad6c5..e2c4db55fd8 100644
--- a/source/blender/nodes/composite/nodes/node_composite_image.c
+++ b/source/blender/nodes/composite/nodes/node_composite_image.c
@@ -174,11 +174,24 @@ static void cmp_node_image_create_outputs(bNodeTree *ntree, bNode *node)
{
Image *ima= (Image *)node->id;
if (ima) {
- ImageUser *iuser= node->storage;
+ ImageUser *iuser = node->storage;
+ ImageUser load_iuser = {0};
ImBuf *ibuf;
-
+ int offset = BKE_image_sequence_guess_offset(ima);
+
+ /* It is possible that image user in this node is not
+ * properly updated yet. In this case loading image will
+ * fail and sockets detection will go wrong.
+ *
+ * So we manually construct image user to be sure first
+ * image from sequence (that one which is set as fileanme
+ * for image datablock) is used for sockets detection
+ */
+ load_iuser.ok = 1;
+ load_iuser.framenr = offset;
+
/* make sure ima->type is correct */
- ibuf = BKE_image_acquire_ibuf(ima, iuser, NULL);
+ ibuf = BKE_image_acquire_ibuf(ima, &load_iuser, NULL);
if (ima->rr) {
RenderLayer *rl= BLI_findlink(&ima->rr->layers, iuser->layer);