diff options
author | Hans Goudey <h.goudey@me.com> | 2021-12-24 07:48:55 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-12-24 07:48:55 +0300 |
commit | 81b3933abbbff4844253c04eeaf1ede672dcb566 (patch) | |
tree | 7ae851a8d0b7df399f946197386c32e28273c473 /source/blender/editors/space_node/node_group.cc | |
parent | 35bd6fe993a11df8395f2ef740fd0afa38c77b61 (diff) |
Fix T94357: Node Ungroup operator copies current node tree
This was a mistake in rBfdc4a1a590d8befb1ff which copied the parent
node tree into itself rather than accessing the node group's nodes.
Diffstat (limited to 'source/blender/editors/space_node/node_group.cc')
-rw-r--r-- | source/blender/editors/space_node/node_group.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/space_node/node_group.cc b/source/blender/editors/space_node/node_group.cc index ceeb42832ea..0846eb826f1 100644 --- a/source/blender/editors/space_node/node_group.cc +++ b/source/blender/editors/space_node/node_group.cc @@ -223,13 +223,14 @@ static int node_group_ungroup(Main *bmain, bNodeTree *ntree, bNode *gnode) { ListBase anim_basepaths = {nullptr, nullptr}; LinkNode *nodes_delayed_free = nullptr; + const bNodeTree *ngroup = reinterpret_cast<const bNodeTree *>(gnode->id); /* wgroup is a temporary copy of the NodeTree we're merging in * - all of wgroup's nodes are copied across to their new home * - ngroup (i.e. the source NodeTree) is left unscathed * - temp copy. do change ID usercount for the copies */ - bNodeTree *wgroup = ntreeCopyTree(bmain, ntree); + bNodeTree *wgroup = ntreeCopyTree(bmain, ngroup); /* Add the nodes into the ntree */ LISTBASE_FOREACH_MUTABLE (bNode *, node, &wgroup->nodes) { |