Move nodes to a nice Layout

   6065   5   1
User Avatar
Member
106 posts
Joined: June 2011
Offline
Hey guys

I have a big hierarchy of nodes. When I press the ‘L’ key it creates a nice layout of my nodes. I'm just wondering if there is a way I can do this using python. I tried using hou.node.moveToGoodPosition(). It doesn't look the same as pressing the ‘L’ key. Any ideas ??

Cheers
-J
User Avatar
Member
7725 posts
Joined: July 2005
Offline
Try: hou.node(“/obj”).layoutChildren()
User Avatar
Member
106 posts
Joined: June 2011
Offline
Thanks Edward for your reply. I tried it but it doesn't give the same layout as the ‘L’ Key :cry:
User Avatar
Member
7725 posts
Joined: July 2005
Offline
It seems to work for me. How is it doing it differently for you?
User Avatar
Member
106 posts
Joined: June 2011
Offline
First Image shows the layout I get when I press the L-Key. Second one is the layout using layoutChildren()

Attachments:
Screenshot-1.png (14.2 KB)
Screenshot.png (11.0 KB)

User Avatar
Member
7725 posts
Joined: July 2005
Offline
Oh, I see I think there must be a bug in the python call where it doesn't include the subnet input. You should log it (see Support menu on this web page). Thanks!
  • Quick Links