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
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)

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)

Added back bar and simplified the logic.

Compile fix for bmain changes in 2.8