Benedikt Roettger

gorrod

About Me

Expertise
Not Specified
Location
Not Specified
Website

Connect

Recent Forum Posts

Houdini Bookmarks Python Panel April 11, 2021, 2:16 p.m.




https://github.com/gorrod/houdini_bookmarks [github.com]

A Python Panel aimed to help organize a scene by bookmarking and quickly accessing nodes, online references and file locations.

The Panel lets you drag and drop items and create folders by right clicking.

The Bookmarks get saved to the hipfiles hou.session module and get loaded up when opening the file again.

You can also save out and load up the bookmarks into json files to share between hipfiles.


It's my first Project working with Pyside but I thought I might as well share it, maybe someone finds a use for it.

Set NetworkEditor path to NetworkBox or StickyNote Nov. 1, 2020, 6:31 a.m.

I see, now it makes sense .

Thanks for the example, that's great to know.

Set NetworkEditor path to NetworkBox or StickyNote Nov. 1, 2020, 5:38 a.m.

Phrasing the question in a better way actually resolved the issue for me.

Using animatrics code the answer to my question would be to do something like this:

stickynode = hou.item("/obj/geo1/__stickynote1")

def centerNetworkEditorOnItem(editor, item):
    center = item.position() + (item.size() / 2)
    bounds = editor.visibleBounds()
    bounds.translate(center - bounds.center())
    
    editor.cd(item.parent().path())
    editor.setVisibleBounds(bounds)
    
editor = hou.ui.curDesktop().paneTabOfType(hou.paneTabType.NetworkEditor)
centerNetworkEditorOnItem(editor, stickynode)

I didn't take the hou.PathBasedPaneTab.cd() [www.sidefx.com] function into account since it is not yet documented (Probably because it should be obvious what it does?).