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:
authorLukas Toenne <lukas.toenne@googlemail.com>2013-06-12 15:26:44 +0400
committerLukas Toenne <lukas.toenne@googlemail.com>2013-06-12 15:26:44 +0400
commit0c91ebfeee94500ebd76d15119261c6d0f72b41f (patch)
tree56085fede92d05e6017cde223b0f94e1018db64a /source/blender/makesrna
parent793e582d1a65bf2fbe285ae624916a569a8fdc17 (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/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c18
-rw-r--r--source/blender/makesrna/intern/rna_scene.c2
2 files changed, 2 insertions, 18 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 4433dc45601..04051cf3418 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -724,23 +724,7 @@ static bNode *rna_NodeTree_node_new(bNodeTree *ntree, bContext *C, ReportList *r
node = nodeAddNode(C, ntree, type);
BLI_assert(node && node->typeinfo);
- /* XXX ugly stuff, should be done with specialized operators (after actual node creation)! */
- if (ntree->type == NTREE_COMPOSIT) {
- if (ELEM4(node->type, CMP_NODE_COMPOSITE, CMP_NODE_DEFOCUS, CMP_NODE_OUTPUT_FILE, CMP_NODE_R_LAYERS)) {
- /* annoying, find the node tree we are in, scene can be NULL */
- Scene *scene;
- for (scene = CTX_data_main(C)->scene.first; scene; scene = scene->id.next) {
- if (scene->nodetree == ntree) {
- break;
- }
- }
- node->id = (ID *)scene;
- id_us_plus(node->id);
- }
-
- ntreeCompositForceHidden(ntree, CTX_data_scene(C));
- }
- else if (ntree->type == NTREE_TEXTURE) {
+ if (ntree->type == NTREE_TEXTURE) {
ntreeTexCheckCyclics(ntree);
}
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 0218c188062..44eee642081 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -1195,7 +1195,7 @@ static void rna_SceneRenderLayer_pass_update(Main *bmain, Scene *activescene, Po
Scene *scene = (Scene *)ptr->id.data;
if (scene->nodetree)
- ntreeCompositForceHidden(scene->nodetree, scene);
+ ntreeCompositForceHidden(scene->nodetree);
rna_Scene_glsl_update(bmain, activescene, ptr);
}