diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2012-06-11 19:28:45 +0400 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2012-06-11 19:28:45 +0400 |
commit | edecf49d8408f565963ed03bc795b7eff712ac5d (patch) | |
tree | 1a7e015f98433682724f3ab12f27b0bf4375a9d2 /source | |
parent | 5f1eec564f27c0c542940571d14cd7fdb8194325 (diff) |
Fix for node 'make group' operator in combination with frame nodes. When a selected node is attached to an unselected frame, the parent pointer would end up pointing to a different ID data block.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/nodes/intern/node_common.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/nodes/intern/node_common.c b/source/blender/nodes/intern/node_common.c index 3d1b656fc4e..78d21e5d4e4 100644 --- a/source/blender/nodes/intern/node_common.c +++ b/source/blender/nodes/intern/node_common.c @@ -176,6 +176,10 @@ bNode *node_group_make_from_selected(bNodeTree *ntree) BLI_addtail(&anim_basepaths, BLI_genericNodeN(path)); } + /* ensure valid parent pointers, detach if parent stays outside the group */ + if (node->parent && !(node->parent->flag & NODE_SELECT)) + nodeDetachNode(node); + /* change node-collection membership */ BLI_remlink(&ntree->nodes, node); BLI_addtail(&ngroup->nodes, node); |