Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Toenne <lukas.toenne@googlemail.com>2013-04-03 13:10:29 +0400
committerLukas Toenne <lukas.toenne@googlemail.com>2013-04-03 13:10:29 +0400
commitbb4ab6a007ddc1130cc80439c9d4cd89c8117fb6 (patch)
treec24bd2e13e6a85992879df33d8f53996e9d87a9e /source/blender/nodes/composite/nodes/node_composite_common.c
parentbfeef2f5f07094c4014ce7c7bf7e933c168c2bd0 (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/composite/nodes/node_composite_common.c')
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_common.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/nodes/composite/nodes/node_composite_common.c b/source/blender/nodes/composite/nodes/node_composite_common.c
index 44643724073..df1c5d3316b 100644
--- a/source/blender/nodes/composite/nodes/node_composite_common.c
+++ b/source/blender/nodes/composite/nodes/node_composite_common.c
@@ -51,6 +51,7 @@ void register_node_type_cmp_group(void)
node_type_base_custom(&ntype, "CompositorNodeGroup", "Group", NODE_CLASS_GROUP, NODE_OPTIONS | NODE_CONST_OUTPUT);
ntype.type = NODE_GROUP;
ntype.poll = cmp_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("CompositorNodeGroup");
BLI_assert(ntype.ext.srna != NULL);