Search - User list
Full Version: Network View: Layout Nodes Left Alphabetically?
Root » Technical Discussion » Network View: Layout Nodes Left Alphabetically?
olivierth
Hi!

I just found out about the Layout -> Layout Nodes Left. Alternatively, you can press and hold "A" + left-click and drag in the direction you want them to stack.

Wonderfull, but!! It's not in alphabetical order. Any way to change the behavior?

-Olivier
ajz3d
I don't think so.
But for this particular case, where all nodes are disconnected, you can lay them out alphabetically with a tiny bit of Python:

import hou
selection = hou.selectedNodes()
node_paths = []
for node in selection:
    node_paths.append(node.path())
node_paths = sorted(node_paths)
for node_path in node_paths:
    # Either create your own layout rules here, using position(),
    # setPosition() and shiftPosition() methods of hou.Node class,
    # or use:
    hou.node(node_path).moveToGoodPosition()
olivierth
Thanks, ajz3d !
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB