diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2013-06-12 15:26:44 +0400 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2013-06-12 15:26:44 +0400 |
commit | 0c91ebfeee94500ebd76d15119261c6d0f72b41f (patch) | |
tree | 56085fede92d05e6017cde223b0f94e1018db64a /source/blender/blenkernel | |
parent | 793e582d1a65bf2fbe285ae624916a569a8fdc17 (diff) |
Fix #35703, Viewer node doesn't updates image sometimes. The viewer node was not getting correctly initialized node->id pointer to the Viewer image (thanks to Sergey for figuring that out). The original
proposal was to add another special init hack for the viewer node->id, but rather would do it right and so moved all the special init hacks for constant ID backpointers (Scene for RenderLayer, Composite,
Defocus, FileOutput and MovieClip for MovieClip, MovieDistortion and Stabilization nodes). These are now part of the local init callbacks functions of the appropriate nodes, using the new initfunc_api
callback which takes a Context pointer, so they have access to Scene.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_node.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/node.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h index 55f68fcb8bd..ec0dd11392d 100644 --- a/source/blender/blenkernel/BKE_node.h +++ b/source/blender/blenkernel/BKE_node.h @@ -925,7 +925,7 @@ void ntreeCompositExecTree(struct bNodeTree *ntree, struct RenderData *rd, int r void ntreeCompositTagRender(struct Scene *sce); int ntreeCompositTagAnimated(struct bNodeTree *ntree); void ntreeCompositTagGenerators(struct bNodeTree *ntree); -void ntreeCompositForceHidden(struct bNodeTree *ntree, struct Scene *scene); +void ntreeCompositForceHidden(struct bNodeTree *ntree); void ntreeCompositClearTags(struct bNodeTree *ntree); struct bNodeSocket *ntreeCompositOutputFileAddSocket(struct bNodeTree *ntree, struct bNode *node, diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index f805005e911..d40e0daf247 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -150,6 +150,9 @@ static void node_init(const struct bContext *C, bNodeTree *ntree, bNode *node) ntype->initfunc_api(C, &ptr); } + if (node->id) + id_us_plus(node->id); + node->flag |= NODE_INIT; } |