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:
authorHans Goudey <h.goudey@me.com>2021-12-22 17:47:46 +0300
committerHans Goudey <h.goudey@me.com>2021-12-22 17:47:46 +0300
commitfdc4a1a590d8befb1ff9ab1de3f02d82aa46d539 (patch)
tree32f92586f0de79d5f7762999b18fa03f036f9648 /source/blender/nodes/shader/node_shader_tree.c
parentd6224db8f17f7035d8240bb5b9d28ce709cd3cb4 (diff)
Nodes: Refactor to remove node and socket "new" pointers
These pointers point to the new nodes when duplicating, and their even used to point to "original" nodes for "localized" trees. They're just a bad design decision that make code confusing and buggy. Instead, node copy functions now optionally add to a map of old to new socket pointers. The case where the compositor abused these pointers as "original" pointers are handled by looking up the string node names. Differential Revision: https://developer.blender.org/D13518
Diffstat (limited to 'source/blender/nodes/shader/node_shader_tree.c')
-rw-r--r--source/blender/nodes/shader/node_shader_tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/nodes/shader/node_shader_tree.c b/source/blender/nodes/shader/node_shader_tree.c
index b19835fae19..8f4bffe5b30 100644
--- a/source/blender/nodes/shader/node_shader_tree.c
+++ b/source/blender/nodes/shader/node_shader_tree.c
@@ -659,7 +659,7 @@ static bNode *ntree_shader_copy_branch(bNodeTree *ntree,
LISTBASE_FOREACH (bNode *, node, &ntree->nodes) {
if (node->tmp_flag >= 0) {
int id = node->tmp_flag;
- nodes_copy[id] = BKE_node_copy_ex(
+ nodes_copy[id] = BKE_node_copy(
ntree, node, LIB_ID_CREATE_NO_USER_REFCOUNT | LIB_ID_CREATE_NO_MAIN, false);
nodes_copy[id]->tmp_flag = -2; /* Copy */
/* Make sure to clear all sockets links as they are invalid. */