[Bf-blender-cvs] [81b3933abbb] master: Fix T94357: Node Ungroup operator copies current node tree
Hans Goudey
noreply at git.blender.org
Fri Dec 24 05:49:05 CET 2021
Commit: 81b3933abbbff4844253c04eeaf1ede672dcb566
Author: Hans Goudey
Date: Thu Dec 23 22:48:55 2021 -0600
Branches: master
https://developer.blender.org/rB81b3933abbbff4844253c04eeaf1ede672dcb566
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.
===================================================================
M source/blender/editors/space_node/node_group.cc
===================================================================
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) {
More information about the Bf-blender-cvs
mailing list