diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-04-06 16:23:26 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-04-06 16:23:26 +0300 |
commit | 42824f4403db3a35b718459fc01d87ce458565ab (patch) | |
tree | 9a071f6538fd08ea9471ff8e6c5503cccc50a5ec /source/blender/editors | |
parent | e10ec6ee9ad5b9a88fb4a20a913f92fd2d01bdab (diff) |
Fix missing viewport update when tree output is in a node
There was already an attempt to do it, but it worked incorrect because
of wrong recursion check.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_node/node_relationships.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/editors/space_node/node_relationships.c b/source/blender/editors/space_node/node_relationships.c index 6a09605b9c6..07e79c5a59c 100644 --- a/source/blender/editors/space_node/node_relationships.c +++ b/source/blender/editors/space_node/node_relationships.c @@ -39,6 +39,8 @@ #include "BKE_context.h" #include "BKE_global.h" +#include "BKE_library.h" +#include "BKE_main.h" #include "BKE_node.h" #include "ED_node.h" /* own include */ @@ -95,11 +97,11 @@ static bool ntree_check_nodes_connected(bNodeTree *ntree, bNode *from, bNode *to static bool node_group_has_output_dfs(bNode *node) { - if (node->flag & NODE_TEST) { + bNodeTree *ntree = (bNodeTree *)node->id; + if (ntree->id.tag & LIB_TAG_DOIT) { return false; } - node->flag |= NODE_TEST; - bNodeTree *ntree = (bNodeTree *)node->id; + ntree->id.tag |= LIB_TAG_DOIT; for (bNode *current_node = ntree->nodes.first; current_node != NULL; current_node = current_node->next) @@ -120,12 +122,13 @@ static bool node_group_has_output_dfs(bNode *node) static bool node_group_has_output(bNode *node) { + Main *bmain = G.main; BLI_assert(node->type == NODE_GROUP); bNodeTree *ntree = (bNodeTree *)node->id; if (ntree == NULL) { return false; } - ntreeNodeFlagSet(ntree, NODE_TEST, false); + BKE_main_id_tag_listbase(&bmain->nodetree, LIB_TAG_DOIT, false); return node_group_has_output_dfs(node); } |