Node Editor Setting / Behaviour

   747   4   1
User Avatar
Member
71 posts
Joined: 8月 2013
Offline
I have two basic questions regarding the node editor:

1. is the default spacing of nodes configurable? For example when you align nodes, where is that spacing defined vertically / horizontally?
2. is there an option to delay the middle mouse node info window? When navigating big networks with middle mouse butotn I get crashes if instead of panning it tries to display the node info window
User Avatar
Member
12 posts
Joined: 1月 2021
Offline
coccarolla
1. is the default spacing of nodes configurable? For example when you align nodes, where is that spacing defined vertically / horizontally?

Press 'D' in the network editor to bring up display options. Or in the network editor menu go to View > Display Options. On the first tab there should be a grid spacing option. I am not sure if this is what you are looking for.

coccarolla
2. is there an option to delay the middle mouse node info window? When navigating big networks with middle mouse butotn I get crashes if instead of panning it tries to display the node info window

The best I can think of is 'extending the network editor' [www.sidefx.com] in the documentation. I don't think I have ever done anything with mouse handling, so I don't know if it is possible to override the default behavior. Of course, you would have to understand some python in order to do this.
User Avatar
Member
4672 posts
Joined: 2月 2012
Offline
coccarolla
I have two basic questions regarding the node editor:

1. is the default spacing of nodes configurable? For example when you align nodes, where is that spacing defined vertically / horizontally?
2. is there an option to delay the middle mouse node info window? When navigating big networks with middle mouse butotn I get crashes if instead of panning it tries to display the node info window

For #2, I submitted an RFE about this, to not show the MMB info dialog if the user is panning the view, it's easy to accidentally MMB on a node with rapid panning. I am not sure if it's implemented yet.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
User Avatar
Member
71 posts
Joined: 8月 2013
Offline
Here is what I mean:

When I align nodes their spacing is too small, I would like to be able to align nodes more like the grid spacing shown.
When I say align I mean aligning the nodes with the A key.

Attachments:
Enter_a_filename.png (46.7 KB)

User Avatar
Member
12 posts
Joined: 1月 2021
Offline
I looked in the python api and there is indeed a way to do this, but still some scripting required. It can be installed by looking at the documentation page I mentioned earlier.

If you want to actually move the nodes onto the grid after spacing them you could write some more code, or just select all the nodes and drag them to the grid with the cursor. The default grid size is 2x1, and can be changed by doing what I mentioned in my previous response. You will of course need to disable the default layout hotkey.

import hou
from canvaseventtypes import *
import nodegraphdisplay as display
import nodegraphview as view

def action(uievent):
    if isinstance(uievent, KeyboardEvent) and uievent.eventtype == 'keyhit':
        editor = uievent.editor
        node = editor.currentNode()
        parent = node.parent()
        key = uievent.key
        step_x = 2
        step_y = 1

        if key == "A":
            parent.layoutChildren(horizontal_spacing=step_x, vertical_spacing=step_y)
Edited by l_s_galante - 2024年10月11日 08:57:47
  • Quick Links