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>2012-08-06 22:49:28 +0400
committerLukas Toenne <lukas.toenne@googlemail.com>2012-08-06 22:49:28 +0400
commitf961afece0a7bbcf758234bdf19cd35eae30dea2 (patch)
tree9a02a8c1b3e9ebde23e6166ddf609341f96be98f /source/blender/nodes/texture/node_texture_tree.c
parente276a7c8058d146f81ce08f12a0c45f77906515b (diff)
Fix for incomplete Reroute node updates. Adding reroute nodes by spliting links would often result in unrelated color sockets or otherwise miss updates.
The reason is that the per-node updates used for Reroute node type inheritance are not supposed to be looking at connected nodes, they are purely for "local" updates. For this sort of "global" update which requires depth-first search, the update function on the node tree level must be used instead.
Diffstat (limited to 'source/blender/nodes/texture/node_texture_tree.c')
-rw-r--r--source/blender/nodes/texture/node_texture_tree.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/nodes/texture/node_texture_tree.c b/source/blender/nodes/texture/node_texture_tree.c
index 1a11a7075b8..063cc31e6f6 100644
--- a/source/blender/nodes/texture/node_texture_tree.c
+++ b/source/blender/nodes/texture/node_texture_tree.c
@@ -45,6 +45,7 @@
#include "BKE_main.h"
#include "BKE_node.h"
+#include "node_common.h"
#include "node_exec.h"
#include "node_util.h"
#include "NOD_texture.h"
@@ -112,6 +113,11 @@ static void local_sync(bNodeTree *localtree, bNodeTree *ntree)
}
}
+static void update(bNodeTree *ntree)
+{
+ ntree_update_reroute_nodes(ntree);
+}
+
bNodeTreeType ntreeType_Texture = {
/* type */ NTREE_TEXTURE,
/* id_name */ "NTTexture Nodetree",
@@ -125,7 +131,7 @@ bNodeTreeType ntreeType_Texture = {
/* localize */ localize,
/* local_sync */ local_sync,
/* local_merge */ NULL,
- /* update */ NULL,
+ /* update */ update,
/* update_node */ NULL,
/* validate_link */ NULL,
/* internal_connect */ node_internal_connect_default