From 1b06e3378a750774cd7da76ab61f86476f7087cc Mon Sep 17 00:00:00 2001 From: Miguel Porces Date: Mon, 18 Mar 2019 11:16:34 +0100 Subject: Fix T62670: insert_link() method not working for ShaderNodeCustomGroup. Allow Python to override this method. Differential Revision: https://developer.blender.org/D4537 --- source/blender/nodes/composite/nodes/node_composite_common.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'source/blender/nodes/composite') diff --git a/source/blender/nodes/composite/nodes/node_composite_common.c b/source/blender/nodes/composite/nodes/node_composite_common.c index f9a6961c47b..480b9f1e989 100644 --- a/source/blender/nodes/composite/nodes/node_composite_common.c +++ b/source/blender/nodes/composite/nodes/node_composite_common.c @@ -59,6 +59,14 @@ void register_node_type_cmp_group(void) void register_node_type_cmp_custom_group(bNodeType *ntype) { - ntype->insert_link = node_insert_link_default; - ntype->update_internal_links = node_update_internal_links_default; + /* These methods can be overriden but need a default implementation otherwise. */ + if (ntype->poll == NULL) { + ntype->poll = cmp_node_poll_default; + } + if (ntype->insert_link == NULL) { + ntype->insert_link = node_insert_link_default; + } + if (ntype->update_internal_links == NULL) { + ntype->update_internal_links = node_update_internal_links_default; + } } -- cgit v1.2.3