Page MenuHome

Mute node wires
Needs ReviewPublic

Authored by Charlie Jolly (charlie) on Aug 24 2017, 4:17 PM.

Details

Reviewers
None
Group Reviewers
Nodes
User Interface
Maniphest Tasks
T52659: Mute node links (design task)
Summary

This patch adds the ability to mute individual wires in the node editor.

This is based on the wire cut feature.

It is currently invoked with Leftmouse + Alt.

Dragging over wires will toggle the mute state for that wire.

The muted wires are drawn in red.

When a wire is muted it exposes the original node button which is normally hidden when a wire is connected.

Todo:

  • Add support for pynodes e.g. Animation Nodes -- Requires minor change to AN
  • Check how other pynodes are working -- Requires minor change from plugin authors

Known issues:

  • Not working with Cycles nodes. some help would be appreciated. -- Now fixed

Diff Detail

Repository
rB Blender

Event Timeline

Charlie Jolly (charlie) retitled this revision from Initial mute node link functionality to Mute node wires.Aug 24 2017, 4:31 PM
Charlie Jolly (charlie) edited the summary of this revision. (Show Details)
Charlie Jolly (charlie) added a project: Nodes.
Charlie Jolly (charlie) edited the summary of this revision. (Show Details)
Charlie Jolly (charlie) edited the summary of this revision. (Show Details)Aug 24 2017, 5:10 PM
Charlie Jolly (charlie) added a subscriber: Nodes.
Charlie Jolly (charlie) edited the summary of this revision. (Show Details)Aug 24 2017, 5:15 PM
Charlie Jolly (charlie) added a reviewer: Nodes.
Charlie Jolly (charlie) removed a subscriber: Nodes.
Charlie Jolly (charlie) edited the summary of this revision. (Show Details)Aug 25 2017, 5:25 PM
Charlie Jolly (charlie) updated this revision to Diff 9189.

Now working with Cycles nodes.

Charlie Jolly (charlie) edited the summary of this revision. (Show Details)Aug 25 2017, 5:49 PM
Charlie Jolly (charlie) edited the summary of this revision. (Show Details)Aug 25 2017, 6:03 PM

Minor changes, change description of 'is_muted' function

I messaged Jacques Lucke on BA about AN/Pynodes, and he suggested that the API description should be changed and that it would be an easy change to support muted wires.

I guess the remaining question is if it is a better design to handle muted links like 'internal_links'.

Greg Zaal (gregzaal) resigned from this revision.EditedSep 5 2017, 9:02 AM

Not sure why I'm added as a reviewer, I only work on add-ons. Seems like a good idea though.

Seems like this could be yet-another-thing-to-check for when troubleshooting complex node setups, especially with many lines and zoomed further out.

Would be interested to hear from users who work with others, sharing complex node groups for eg.

Also red is already used for errors (cyclic deps).

Not sure why I'm added as a reviewer, I only work on add-ons. Seems like a good idea though.

Sorry, who should be assigned as reviewer for node patches?

@Charlie Jolly (charlie) - code for this seems fairly straightforward, think this is more a design topic, added design task T52659

Charlie Jolly (charlie) updated this revision to Diff 9227.EditedSep 6 2017, 12:40 PM

Draws muted links with a bar accross.

Flag target socket as used/unused when muting wires. Enables the use of existing socket.is_linked api method in addition to the link.is_muted method.

Adding existing api call link.to_socket.is_linked == False enables muted wires in Animation Nodes (limited testing πŸ˜„).

#..\tree_info\forest_data.py
        for link in links:
            if (link.from_node.bl_idname == "NodeUndefined" or
                link.to_socket.is_linked == False or
                link.to_node.bl_idname == "NodeUndefined"):
                continue
            originSocket = link.from_socket
            targetSocket = link.to_socket
This comment was removed by Charlie Jolly (charlie).

Updated patch for Blender 2.8

Todo:
+ Cursor / design task
+ Draw mute bar / code task / blender2.8 draw code is new to me

+ Add custom mute cursor

Muted links display red at both ends and the normal wire colour in the middle.

Charlie Jolly (charlie) edited the summary of this revision. (Show Details)May 29 2018, 4:58 PM
Charlie Jolly (charlie) updated this revision to Diff 11155.

Added back bar and simplified the logic.

Compile fix for bmain changes in 2.8


Added back bar and simplified the logic.

Good call in bringing the bar back. Looking so good!

Keep patch updated with name changes from GWN to GPU.

Keep updated with master

We should revisit this one! @William Reynish (billreynish) any thoughts on this?

The main reason why I like this approach is that it has the same effect than removing the wires, without actually having to re-connect them later.

@Pablo Vazquez (pablovazquez) Yes. However most of these examples I don't find to be clear enough.

The only one that is visually strong enough to be easy enough to notice it this one:

But even then, the *entire* noodle should be red, not just at the ends, because noodles may be long and stretch out of view.

But even then, the *entire* noodle should be red, not just at the ends

Totally agree. No gradients, just the whole noodle.

I personally like the thicker one (red noodle, dark-red outline), so it's easier to see when zoomed out like Campbell pointed out.

The reason for the thinner muted line is because there needs to be a differentiation between muted and invalid links.

The reason for the gradient is to respect the connections to the 'selected node'.

This shows an invalid link (thick red), muted and selected link (with bar) and a normal link.