diff options
author | Jacques Lucke <jacques@blender.org> | 2021-02-15 21:29:09 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-02-15 21:29:09 +0300 |
commit | 9cccbbebaa3f03aa5137bd54f991f2cd824a3977 (patch) | |
tree | 0eff86bde207e01739b101dd40b0aef6e462d00f /source | |
parent | 7c864388fc0de1e92b8ad9394966d38ffea17daf (diff) |
Fix T84624: node group data-block has phantom user
This is because the node editor added a "real user" to the node group
that it displays. It was mainly added as a hack to solve issues with custom
tree types (T36024). Since we can store id references in custom properties
now, this "real user" is not really necessary anymore.
Given that we are close to a release, I'll only disable line for geometry nodes,
for which the bug has been reported.
Discussed this solution with Hans Goudey.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_node/space_node.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c index ad7632377a3..5960360dc33 100644 --- a/source/blender/editors/space_node/space_node.c +++ b/source/blender/editors/space_node/space_node.c @@ -80,7 +80,12 @@ void ED_node_tree_start(SpaceNode *snode, bNodeTree *ntree, ID *id, ID *from) BLI_addtail(&snode->treepath, path); - id_us_ensure_real(&ntree->id); + if (ntree->type != NTREE_GEOMETRY) { + /* This can probably be removed for all node tree types. It mainly exists because it was not + * possible to store id references in custom properties. Also see T36024. I don't want to + * remove it for all tree types in bcon3 though. */ + id_us_ensure_real(&ntree->id); + } } /* update current tree */ |