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:
authorMiguel Porces <cmporces>2019-03-18 13:16:34 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-03-18 13:37:31 +0300
commit1b06e3378a750774cd7da76ab61f86476f7087cc (patch)
tree662b6243a21a82b28e4df30bdf995db3055c9f1b /source/blender/nodes/composite
parentd0e28721b04a0235d4f6bfbe42f43672ff923444 (diff)
Fix T62670: insert_link() method not working for ShaderNodeCustomGroup.
Allow Python to override this method. Differential Revision: https://developer.blender.org/D4537
Diffstat (limited to 'source/blender/nodes/composite')
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_common.c12
1 files changed, 10 insertions, 2 deletions
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;
+ }
}