diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2013-04-03 13:10:29 +0400 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2013-04-03 13:10:29 +0400 |
commit | bb4ab6a007ddc1130cc80439c9d4cd89c8117fb6 (patch) | |
tree | c24bd2e13e6a85992879df33d8f53996e9d87a9e /source/blender/nodes/texture | |
parent | bfeef2f5f07094c4014ce7c7bf7e933c168c2bd0 (diff) |
Fix #33628, Segmentation fault after pasting a closed group of nodes into an open group. Finally now there is a proper check for pasting nodes into groups. It uses the poll_instance callback of node types to determine if a node can be added into a specific node tree. Currently this is only implemented for group nodes and does a recursive check to avoid pasting a node group into itself (on any level, also nested groups).
Diffstat (limited to 'source/blender/nodes/texture')
-rw-r--r-- | source/blender/nodes/texture/nodes/node_texture_common.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/nodes/texture/nodes/node_texture_common.c b/source/blender/nodes/texture/nodes/node_texture_common.c index e884d50dc05..ee03323fb5d 100644 --- a/source/blender/nodes/texture/nodes/node_texture_common.c +++ b/source/blender/nodes/texture/nodes/node_texture_common.c @@ -159,6 +159,7 @@ void register_node_type_tex_group(void) node_type_base_custom(&ntype, "TextureNodeGroup", "Group", NODE_CLASS_GROUP, NODE_OPTIONS | NODE_CONST_OUTPUT); ntype.type = NODE_GROUP; ntype.poll = tex_node_poll_default; + ntype.poll_instance = node_group_poll_instance; ntype.update_internal_links = node_update_internal_links_default; ntype.ext.srna = RNA_struct_find("TextureNodeGroup"); BLI_assert(ntype.ext.srna != NULL); |