Mute node wires
Needs ReviewPublic

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

Details

Reviewers
Greg Zaal (gregzaal)
Group Reviewers
Nodes
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

Known issues:

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

Diff Detail

Repository
rB Blender
Branch
arcpatch-D2807 (branched from master)
Build Status
Buildable 804
Build 804: arc lint + arc unit
Charlie Jolly (charlie) retitled this revision from Initial mute node link functionality to Mute node wires.Thu, Aug 24, 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)Thu, Aug 24, 5:10 PM
Charlie Jolly (charlie) added a subscriber: Nodes.
Charlie Jolly (charlie) edited the summary of this revision. (Show Details)Thu, Aug 24, 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)Fri, Aug 25, 5:49 PM
Charlie Jolly (charlie) edited the summary of this revision. (Show Details)Fri, Aug 25, 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.EditedTue, Sep 5, 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.EditedWed, Sep 6, 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).