Jump to content

Source Image for HDA embedded into Parameter window, or Network view Background image


forbidden14

Recommended Posts

Hey all, 

I'm working on a simple paper tearing HDA that creates a tear from an existing image with alpha.  I've got all that working ok, but I'd like to embed the source image into the HDA parameters window itself for visualization purposes.  I've looked into the icon strip parameter, but I can't really get it to scale up and visualize how i'd like (I'm using the file path in the token dialog in the Menu tab on the Edit Parameter Interface), but feel like I may be using this wrong. 

I also like the idea of a background image in the network editor that gets linked to the HDA node itself.  I've found this bit of code on the sideFX site: 

editor = hou.ui.paneTabOfType(hou.paneTabType.NetworkEditor)
image = hou.NetworkImage()
image.setPath('$HFS/houdini/pic/Mandril.pic')
image.setRect(hou.BoundingRect(0, 0, 5, 5))
editor.setBackgroundImages([image])

but Ideally I'd like to tie it my source string parameter and to go into a specific geo node network and place the image.  It's weird, this code only worked one time when I was playing about with it switching around variables and such, but I couldn't even recreate the mandril BG on the root /obj level even with this code from the SideFx site.  

I feel like I'm close but missing something or have some python class error or typo, thanks for any help in advance!  

Screenshot 2023-01-25 235839.png

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