Disconnect node

   1117   13   3
User Avatar
Member
117 posts
Joined: Aug. 2015
Offline
Hey guys, I`ve searched everywhere now and wonder if there is a hotkey to disconnect a node out of a flow without doing that ridiculous shaking thing, cutting wires with "y" and rewiring them, drag it elsewhere to reconnect at another position in the flow or delete and create it again...
There are so many things you can do with ctrl, shift, alt like copy upstream, downstream etc. but I just couldn`t find the most essential one...
Edited by Sygnum - July 19, 2024 04:02:50
User Avatar
Member
201 posts
Joined: Jan. 2016
Offline
You could add a Shelf tool with this python script, and add a Hotkey to that tool:

import nodegraphutils
nodegraphutils.reconnectAroundItems(hou.selectedNodes(), False)


Definition of that function is here:
C:\Program Files\Side Effects Software\Houdini 20.5.299\houdini\python3.11libs\nodegraphutils.py

def reconnectAroundItems(items, update_unpinned_dots,
                         single_input_to_disconnect = None,
                         editor = None):
    conns = getExternalConnections(items)
    replacements = getReplacementConnections(conns, items)
    with hou.undos.group('Reconnect around items', editor):
        # If requested, only delete the first connection to the specified
        # input item.
        if single_input_to_disconnect is not None:
            conns = list(conn for conn in conns
                if conn.inputItem() in items or
                   (conn.outputItem() == single_input_to_disconnect and
                    conn.inputIndex() == 0))
        deleteConnections(conns, update_unpinned_dots, editor=editor)
        for replacement in replacements:
            replacement.createConnection()
User Avatar
Member
276 posts
Joined: Jan. 2013
Offline
Hi,
You can assign a hotkey for this action yourself.

Attachments:
2024-07-19_11-38.png (34.8 KB)

User Avatar
Member
117 posts
Joined: Aug. 2015
Offline
Thanks a lot to both of you for the answers and being so quick! :-)
User Avatar
Member
201 posts
Joined: Jan. 2016
Offline
The script I pasted does this, it also reconnects around the disconnected nodes:

Attachments:
disconnect.gif (18.4 KB)

User Avatar
Member
117 posts
Joined: Aug. 2015
Offline
ikoon
The script I pasted does this, it also reconnects around the disconnected nodes:

Yeah, it does exactely what I meant. Thanks!! I already have it in my shelf and assigned a hotkey for it. The suggestion of Alexwheezy unfortunately breaks the flow, I tried all "disconnects" available. I just don`t get why Sidefx doesn`t have a default for this - or am I the only one who doesn`t like that shaking thing?
Edited by Sygnum - July 19, 2024 05:00:18
User Avatar
Member
36 posts
Joined: Feb. 2017
Offline
Yeah, the issue with the shaking thing is that it only works in a narrow range of motion... not sure how to explain it, but shaking it like a maniac does nothing while just wiggling it a few pixels left and right (not too fast!) works. I got used to it, but I would also like to see an alternative directly from sidefx.
User Avatar
Member
113 posts
Joined: June 2024
Offline
Guys, you will be surprised, but disconnecting a node is in the menu and you can simply assign a key to this action. I assigned X to myself and my node is disconnected, leaving the nodes above and below connected.
User Avatar
Member
373 posts
Joined: June 2023
Offline
"Shaking" is a very unergonomic motion that begs for RSI (unless you use touchscree).

Just click this:

Attachments:
Screenshot 2024-07-19 190812.jpg (52.4 KB)

User Avatar
Member
373 posts
Joined: June 2023
Offline
racoonart
Yeah, the issue with the shaking thing is that it only works in a narrow range of motion... not sure how to explain it, but shaking it like a maniac does nothing while just wiggling it a few pixels left and right (not too fast!) works. I got used to it, but I would also like to see an alternative directly from sidefx.

There is a config for this

But I'd suggest to not use shaking motion with mouse.

Attachments:
Screenshot 2024-07-19 191239.jpg (24.6 KB)

User Avatar
Member
117 posts
Joined: Aug. 2015
Offline
kodra
"Shaking" is a very unergonomic motion that begs for RSI (unless you use touchscree).

Just click this:
Image Not Found

OMG...that`s it...
User Avatar
Member
36 posts
Joined: Feb. 2017
Offline
kodra
There is a config for this

Oh wow! How have I missed that setting all these years? Thanks for pointing that out

Edit: set it to 0.2 and it's much much better for me now
Edited by racoonart - July 19, 2024 08:06:19
User Avatar
Member
459 posts
Joined: March 2014
Offline
Maybe I misunderstand, but you can also select the connection line so it highlights yellow, and hit delete…
User Avatar
Member
117 posts
Joined: Aug. 2015
Offline
toonafish
Maybe I misunderstand, but you can also select the connection line so it highlights yellow, and hit delete…

That`s not what I meant, Kodra answered it exactely: "reconnect around selected" was what I`ve been looking for.
  • Quick Links