[Bf-blender-cvs] [42824f4] master: Fix missing viewport update when tree output is in a node
Sergey Sharybin
noreply at git.blender.org
Wed Apr 6 15:25:07 CEST 2016
Commit: 42824f4403db3a35b718459fc01d87ce458565ab
Author: Sergey Sharybin
Date: Wed Apr 6 15:23:26 2016 +0200
Branches: master
https://developer.blender.org/rB42824f4403db3a35b718459fc01d87ce458565ab
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.
===================================================================
M source/blender/editors/space_node/node_relationships.c
===================================================================
diff --git a/source/blender/editors/space_node/node_relationships.c b/source/blender/editors/space_node/node_relationships.c
index 6a09605..07e79c5 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);
}
More information about the Bf-blender-cvs
mailing list