Jump to content

customizing netbox creation and other UI commands


Neon Junkyard

Recommended Posts

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 by Neon Junkyard
Link to comment
Share on other sites

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

  • Like 2
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...