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 Tönne <lukas.toenne@gmail.com>2014-04-02 12:59:35 +0400
committerLukas Tönne <lukas.toenne@gmail.com>2014-04-02 13:04:09 +0400
commit288147334ce81cf0be533c15f3698b88ef7c63f3 (patch)
tree65326991ac0024dc054c2007209f9efd6e33a3ef /source/blender/editors/space_node/node_edit.c
parenteed3974d11af6072174a43f6b103c9b64be054e2 (diff)
Fix T39547: Toggling render passes on active scene does not update
render layer nodes in a pinned tree from different scene. The way these updates work is a nasty legacy hack: https://developer.blender.org/diffusion/B/browse/master/source/blender/nodes/composite/node_composite_tree.c$277 This function is called //very frequently// by the get_from_context method. However, this does not get called for pinned node trees, so when showing a different scene's compositing nodes in the editor they may not get updated correctly. Now moved this update call out of get_from_context so it happens in any case. Will be called no more frequently than before (on every redraw). Eventually the depsgraph should handle this more precisely, it's just a simple ID dependency anyway ...
Diffstat (limited to 'source/blender/editors/space_node/node_edit.c')
-rw-r--r--source/blender/editors/space_node/node_edit.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index ac0834cd635..7c5ffa54f92 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -586,6 +586,14 @@ void snode_set_context(const bContext *C)
if (snode->nodetree != ntree || snode->id != id || snode->from != from) {
ED_node_tree_start(snode, ntree, id, from);
}
+
+ /* XXX Legacy hack to update render layer node outputs.
+ * This should be handled by the depsgraph eventually ...
+ */
+ if (ED_node_is_compositor(snode) && snode->nodetree) {
+ /* update output sockets based on available layers */
+ ntreeCompositForceHidden(snode->nodetree);
+ }
}
void snode_update(SpaceNode *snode, bNode *node)