Jump to content

Access Node's Icon by Python


Jordan Walsh

Recommended Posts

There is not an ideal solution, no.

 

The hou.NodeType.name() function still returns the same so you'd be forced to write additional supporting functions that can parse that and handle various possibilities:

  • Regular Houdini icon aka "SOP_box" which you'd then have to expand out to the full path located inside the HFS (or custom locations, also possibly dealing with icon mappings)
  • Icons embedded inside operator definitions "opdef:...."
  • Regular icons pathed on disk.

Nothing that's overly hard, but not super easy without some understanding of where Houdini likes to keep things and whatnot.

Link to comment
Share on other sites

For embedded icons you could grab the contents from the icon section of the asset definition and write it to disk and then read that back in.  Though you'd want to have some sort of method to know if the icon for a node type was already written out so it wasn't doing it every time the ui updated.

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...