diff options
author | Miguel Porces <cmporces> | 2019-03-16 20:54:00 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-03-16 22:21:16 +0300 |
commit | 5797a5fc65c87b69460d910a82d219b5e3ea12ad (patch) | |
tree | 98ffac5a6ad2904d916987720460765b763d2e50 /source/blender/nodes/shader | |
parent | b9af4efe41712680d554a389d771e83c66fce5c4 (diff) |
Fix ID user counting issues with NodeCustomGroup.
User counting now happens before init() and after free() methods, so that
the ID users are in a valid state when Python might modify them. ID user
counting was moved into node.c and simplified.
Patch by Miguel with further refactoring by Brecht. Ref D4370.
Diffstat (limited to 'source/blender/nodes/shader')
-rw-r--r-- | source/blender/nodes/shader/node_shader_tree.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/nodes/shader/node_shader_tree.c b/source/blender/nodes/shader/node_shader_tree.c index 9c00786dc91..50bec047222 100644 --- a/source/blender/nodes/shader/node_shader_tree.c +++ b/source/blender/nodes/shader/node_shader_tree.c @@ -143,7 +143,7 @@ static void localize(bNodeTree *localtree, bNodeTree *UNUSED(ntree)) if (node->flag & NODE_MUTED || node->type == NODE_REROUTE) { nodeInternalRelink(localtree, node); - nodeFreeNode(localtree, node); + ntreeFreeLocalNode(localtree, node); } } } @@ -247,7 +247,7 @@ static bNode *ntree_shader_relink_output_from_group(bNodeTree *ntree, SH_NODE_OUTPUT_WORLD, SH_NODE_OUTPUT_LIGHT)) { - nodeFreeNode(ntree, node); + ntreeFreeLocalNode(ntree, node); } } |