diff options
author | Jacques Lucke <jacques@blender.org> | 2021-11-17 13:52:44 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-11-17 13:52:54 +0300 |
commit | f5dde382af8078a2e5265e7d6710df7cb1b320a0 (patch) | |
tree | 367bdf822149128d0566f02ec062207aa7c82719 /source/blender/editors/space_node/node_edit.cc | |
parent | 83a4d51997f24a31631217f819f00a6db68fb0cb (diff) |
Cleanup: use same function for updating internal links for all nodes
Previously, node types had a callback that creates internal links. Pretty
much all nodes used the same callback though. The exceptions are the
reroute node (which probably shouldn't be mutable anyway) and some
input/output nodes that are not mutable.
Removing the callback helps with D13246, because it makes it easier
to reason about which internal links are created and when they change.
In the future, the internal links should be part of the node declaration.
Diffstat (limited to 'source/blender/editors/space_node/node_edit.cc')
-rw-r--r-- | source/blender/editors/space_node/node_edit.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/editors/space_node/node_edit.cc b/source/blender/editors/space_node/node_edit.cc index f36ded22a39..30c9f7ea56b 100644 --- a/source/blender/editors/space_node/node_edit.cc +++ b/source/blender/editors/space_node/node_edit.cc @@ -1775,8 +1775,7 @@ static int node_mute_exec(bContext *C, wmOperator *UNUSED(op)) ED_preview_kill_jobs(CTX_wm_manager(C), bmain); LISTBASE_FOREACH (bNode *, node, &snode->edittree->nodes) { - /* Only allow muting of nodes having a mute func! */ - if ((node->flag & SELECT) && node->typeinfo->update_internal_links) { + if ((node->flag & SELECT) && !node->typeinfo->no_muting) { node->flag ^= NODE_MUTED; snode_update(snode, node); do_tag_update |= (do_tag_update || node_connected_to_output(bmain, snode->edittree, node)); |