Neon Junkyard Posted November 16, 2018 Share Posted November 16, 2018 (edited) There are a few quality of life things I would like to customize in houdini but I'm not sure if its possible If you create a network box in houdini it makes it completely snug around your nodes and I am constantly having to immediately resize it and reposition everything, In nuke I have it set up to auto-create backdrops with 200px or so padding automatically, is this possible in Houdini? This problem is made worse due to houdini will automatically select the network box and all its contents if your mouse goes anywhere over the title bar. So if you are drag selecting nodes across several network boxes it will select the entire contents of all of them. Again Nuke handles this way better, it will only select the entire network box if you drag select over the entire thing, or specifically click on the title bar The second part I dont have much hope for but is there any python solution to create netboxes with padding, and maybe further customization? EDIT - Also looking to set some defaults when creating new scene views Edited November 16, 2018 by Neon Junkyard Quote Link to comment Share on other sites More sharing options...
asnowcappedromance Posted November 20, 2018 Share Posted November 20, 2018 Hey man, Have a look at this code on how to resize a network box in Python: if hou.selectedNodes(): sel = hou.selectedNodes()[0] pos = sel.position() parent = sel.parent() box = parent.createNetworkBox() box.setPosition(sel.position()) box.addNode(sel) box.setColor(hou.Color(0.5, 0.2, 0.5)) bbox = hou.BoundingRect(pos[0] - 4, pos[1] - 1, pos[0] + 5, pos[1] + 1) box.setBounds(bbox) cheers, Manu 2 Quote Link to comment Share on other sites More sharing options...
Neon Junkyard Posted November 25, 2018 Author Share Posted November 25, 2018 On 11/20/2018 at 4:09 PM, asnowcappedromance said: Hey man, Have a look at this code on how to resize a network box in Python: if hou.selectedNodes(): sel = hou.selectedNodes()[0] pos = sel.position() parent = sel.parent() box = parent.createNetworkBox() box.setPosition(sel.position()) box.addNode(sel) box.setColor(hou.Color(0.5, 0.2, 0.5)) bbox = hou.BoundingRect(pos[0] - 4, pos[1] - 1, pos[0] + 5, pos[1] + 1) box.setBounds(bbox) cheers, Manu awesome! This is a great starting point, thanks for that Quote Link to comment Share on other sites More sharing options...
Neon Junkyard Posted November 26, 2018 Author Share Posted November 26, 2018 This is a great starting point but I cant figure out how to get the network box to resize to selected nodes, like the default behavior does currently the bounding box is hard coded, how would I code it to resize to fit all the selected nodes on creation? Thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.