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/editors/space_node/node_templates.c | |
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/editors/space_node/node_templates.c')
-rw-r--r-- | source/blender/editors/space_node/node_templates.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/source/blender/editors/space_node/node_templates.c b/source/blender/editors/space_node/node_templates.c index aef36b49814..b3edf98c470 100644 --- a/source/blender/editors/space_node/node_templates.c +++ b/source/blender/editors/space_node/node_templates.c @@ -143,9 +143,7 @@ static void node_remove_linked(Main *bmain, bNodeTree *ntree, bNode *rem_node) next = node->next; if (node->flag & NODE_TEST) { - if (node->id) - id_us_min(node->id); - nodeDeleteNode(bmain, ntree, node); + nodeRemoveNode(bmain, ntree, node, true); } } } |