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/editors/space_node/node_add.c
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/editors/space_node/node_add.c')
-rw-r--r--source/blender/editors/space_node/node_add.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/source/blender/editors/space_node/node_add.c b/source/blender/editors/space_node/node_add.c
index 509339dd3d4..d5224a37358 100644
--- a/source/blender/editors/space_node/node_add.c
+++ b/source/blender/editors/space_node/node_add.c
@@ -64,13 +64,11 @@
/* XXX Does some additional initialization on top of nodeAddNode
* Can be used with both custom and static nodes, if idname==NULL the static int type will be used instead.
- * Can be called from menus too, but they should do own undopush and redraws.
*/
bNode *node_add_node(const bContext *C, const char *idname, int type, float locx, float locy)
{
SpaceNode *snode = CTX_wm_space_node(C);
Main *bmain = CTX_data_main(C);
- Scene *scene = CTX_data_scene(C);
bNode *node = NULL;
node_deselect_all(snode);
@@ -96,20 +94,6 @@ bNode *node_add_node(const bContext *C, const char *idname, int type, float locx
ntreeUpdateTree(bmain, snode->edittree);
ED_node_set_active(bmain, snode->edittree, node);
- if (snode->nodetree->type == NTREE_COMPOSIT) {
- if (ELEM4(node->type, CMP_NODE_R_LAYERS, CMP_NODE_COMPOSITE, CMP_NODE_DEFOCUS, CMP_NODE_OUTPUT_FILE)) {
- node->id = &scene->id;
- }
- else if (ELEM3(node->type, CMP_NODE_MOVIECLIP, CMP_NODE_MOVIEDISTORTION, CMP_NODE_STABILIZE2D)) {
- node->id = (ID *)scene->clip;
- }
-
- ntreeCompositForceHidden(snode->edittree, scene);
- }
-
- if (node->id)
- id_us_plus(node->id);
-
if (snode->flag & SNODE_USE_HIDDEN_PREVIEW)
node->flag &= ~NODE_PREVIEW;