python hou.node.moveToGoodPosition

   9070   5   0
User Avatar
Member
665 posts
Joined: 7月 2005
Offline
I find that with this bit of code, if I'm moving a network, that the nodes almost never end up in a good position.

I'm moving the nodes one at a time right now. Are there any tricks for moving a whole network?

cheers,
-j
User Avatar
Member
4140 posts
Joined: 7月 2005
Offline
Ctl-a selects all the nodes, then you can move them. You can also right click on a node and ‘select input’.

Cheers,

J.C.
John Coldrick
User Avatar
Member
665 posts
Joined: 7月 2005
Offline
Heh, apologies for being unclear…

I have a python script

for n in nodes:
n.moveToGoodPosition(move_outputs=False,move_inputs=False, relative_to_inputs=True)



As you can see, I tried playing with some of the options with no real sucess. Is there a better way to do this?

cheers,
-j
User Avatar
Member
4140 posts
Joined: 7月 2005
Offline
Ah, yes, I see…am I not reading subjects again?

Sorry, never touched that - I'm just guessing but I would imagine ‘good position’ means whatever ‘l’ does when you hit it in the interface…but maybe someone can jump in who's actually used it.

Cheers,

J.C.
John Coldrick
User Avatar
Member
665 posts
Joined: 7月 2005
Offline
Hmmm, that's a good point JC. Using the ‘l’ key you can transfrom a selection of nodes all relative to each other…

I imagine that this method (multiple nodes at once) hasn't made it to hython yet?

cheers,
-j
User Avatar
Member
8 posts
Joined: 7月 2013
Offline
I get nice results using layoutChildren()
http://www.sidefx.com/docs/houdini/hom/hou/Node.html [www.sidefx.com]
Try it out.
  • Quick Links