diff options
author | Charlie Jolly <charlie> | 2021-03-16 22:11:54 +0300 |
---|---|---|
committer | Charlie Jolly <mistajolly@gmail.com> | 2021-03-17 14:54:16 +0300 |
commit | 266cd7bb82ce4bfed20a3d61a84f25e2bacfca2b (patch) | |
tree | 963a983f902f5368669c1d93312b53262592e4dc /release | |
parent | 20bf736ff81c6fb79558796b74d50d4e7a9c8ef6 (diff) |
Nodes: Add support to mute node wires
This patch adds the ability to mute individual wires in the node editor.
This is invoked like the cut links operator but with a new shortcut.
Mute = Ctrl + Alt
Cut = Ctrl
Dragging over wires will toggle the mute state for that wire.
The muted wires are drawn in red with a bar across the center.
Red is used in the nodes context to indicate invalid links, muted links and internal links.
When a wire is muted it exposes the original node buttons which are normally hidden when a wire is connected.
Downstream and upstream links connected using reroute nodes are also muted.
Outside scope of patch:
- Add support for pynodes e.g. Animation Nodes
- Requires minor change to check for muted links using the `is_muted` link property or the `is_linked` socket property.
Maniphest Tasks: T52659
Differential Revision: https://developer.blender.org/D2807
Diffstat (limited to 'release')
3 files changed, 3 insertions, 0 deletions
diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py index 3471a8d0db0..feba4e3bd09 100644 --- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py +++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py @@ -1844,6 +1844,7 @@ def km_node_editor(params): ("node.resize", {"type": 'EVT_TWEAK_L', "value": 'ANY'}, None), ("node.add_reroute", {"type": 'EVT_TWEAK_L' if params.legacy else 'EVT_TWEAK_R', "value": 'ANY', "shift": True}, None), ("node.links_cut", {"type": 'EVT_TWEAK_L' if params.legacy else 'EVT_TWEAK_R', "value": 'ANY', "ctrl": True}, None), + ("node.links_mute", {"type": 'EVT_TWEAK_R', "value": 'ANY', "ctrl": True, "alt": True}, None), ("node.select_link_viewer", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True, "ctrl": True}, None), ("node.backimage_move", {"type": 'MIDDLEMOUSE', "value": 'PRESS', "alt": True}, None), ("node.backimage_zoom", {"type": 'V', "value": 'PRESS', "repeat": True}, diff --git a/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py b/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py index c8fc6abe10a..91f153a0f42 100644 --- a/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py +++ b/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py @@ -1113,6 +1113,7 @@ def km_node_editor(params): ("node.resize", {"type": 'EVT_TWEAK_L', "value": 'ANY'}, None), ("node.add_reroute", {"type": params.action_tweak, "value": 'ANY', "shift": True}, None), ("node.links_cut", {"type": params.action_tweak, "value": 'ANY', "ctrl": True}, None), + ("node.links_mute", {"type": params.action_tweak, "value": 'ANY', "ctrl": True, "alt": True}, None), ("node.select_link_viewer", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True, "ctrl": True}, None), ("node.backimage_fit", {"type": 'A', "value": 'PRESS', "alt": True}, None), ("node.backimage_sample", {"type": 'LEFTMOUSE', "value": 'PRESS', "alt": True}, None), diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py index a9934850acd..7f66cdd3d74 100644 --- a/release/scripts/startup/bl_ui/space_node.py +++ b/release/scripts/startup/bl_ui/space_node.py @@ -331,6 +331,7 @@ class NODE_MT_node(Menu): layout.operator("node.link_make", text="Make and Replace Links").replace = True layout.operator("node.links_cut") layout.operator("node.links_detach") + layout.operator("node.links_mute") layout.separator() |