Fix T62670: insert_link() method not working for ShaderNodeCustomGroup.
Allow Python to override this method. Differential Revision: https://developer.blender.org/D4537
This commit is contained in:
parent
d0e28721b0
commit
1b06e3378a
Notes:
blender-bot
2023-02-14 05:01:20 +01:00
Referenced by issue #62670, ShaderNodeCustomGroup insert_link is not listening to inserts
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -242,8 +242,17 @@ void register_node_type_sh_group(void)
|
|||
|
||||
void register_node_type_sh_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 = sh_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;
|
||||
}
|
||||
|
||||
node_type_exec(ntype, group_initexec, group_freeexec, group_execute);
|
||||
node_type_gpu(ntype, gpu_group_execute);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue