diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2014-02-05 16:51:51 +0400 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2014-02-05 16:51:51 +0400 |
commit | 1687023776a3ce0de41a4cfe0ebc72a5ebadabe4 (patch) | |
tree | 28e8af3d7cbafbab07bc86f61b58a109d0091408 /source/blender/blenkernel/intern/node.c | |
parent | e9fda259dac3d95018bc9378e2f8f3b10a8c46c4 (diff) |
Fix T38340 and T38473: fixed Scene pointers in Composite and Defocus nodes don't get updated based on context.
As discussed in T38340 the solution is to use the current scene from
context whenever feasible.
Composite does not use node->id at all now, the scene which owns the
compositing node tree is retrieved from context instead.
Defocus node->id is made editable by the user. By default it is not set,
which also will make it use the contextual scene and camera info.
The node->id pointer in Defocus is **not** cleared in older blend files.
This is done for backward compatibility: the node will then behave as
before in untouched scenes.
File Output nodes also don't store scene in node->id. This is only needed
when creating a new node for initializing the file format.
Reviewers: brecht, jbakker, mdewanchand
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D290
Diffstat (limited to 'source/blender/blenkernel/intern/node.c')
-rw-r--r-- | source/blender/blenkernel/intern/node.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index f058bbc5f78..bc616934fef 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -3658,31 +3658,6 @@ void free_nodesystem(void) } } -/* called from BKE_scene_unlink, when deleting a scene goes over all scenes - * other than the input, checks if they have render layer nodes referencing - * the to-be-deleted scene, and resets them to NULL. */ - -/* XXX needs to get current scene then! */ -void clear_scene_in_nodes(Main *bmain, Scene *sce) -{ - Scene *sce1; - bNode *node; - - for (sce1 = bmain->scene.first; sce1; sce1 = sce1->id.next) { - if (sce1 != sce) { - if (sce1->nodetree) { - for (node = sce1->nodetree->nodes.first; node; node = node->next) { - if (node->type == CMP_NODE_R_LAYERS) { - Scene *nodesce = (Scene *)node->id; - - if (nodesce == sce) node->id = NULL; - } - } - } - } - } -} - /* -------------------------------------------------------------------- */ /* NodeTree Iterator Helpers (FOREACH_NODETREE) */ |