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 /intern/cycles/blender/blender_shader.cpp | |
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 'intern/cycles/blender/blender_shader.cpp')
-rw-r--r-- | intern/cycles/blender/blender_shader.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/intern/cycles/blender/blender_shader.cpp b/intern/cycles/blender/blender_shader.cpp index a1ab5277744..72328333732 100644 --- a/intern/cycles/blender/blender_shader.cpp +++ b/intern/cycles/blender/blender_shader.cpp @@ -1234,7 +1234,8 @@ static void add_nodes(Scene *scene, for (BL::NodeLink &b_link : b_ntree.links) { /* Ignore invalid links to avoid unwanted cycles created in graph. * Also ignore links with unavailable sockets. */ - if (!(b_link.is_valid() && b_link.from_socket().enabled() && b_link.to_socket().enabled())) { + if (!(b_link.is_valid() && b_link.from_socket().enabled() && b_link.to_socket().enabled()) || + b_link.is_muted()) { continue; } /* get blender link data */ |