HDAs with pictures in the parameters tab?

   404   7   0
User Avatar
Member
117 posts
Joined: Feb. 2016
Offline
Let's say my digital asset lets me build different species of plants.
A menu in the parameters tab let me choose which species to start with, so that I can then play with the parameters to make some variation.

It would be very helpful for the end user to look at a preview thumbnail/image before selecting the starting species, to avoid wasting time to cook every species just to know how it looks like.

Is there any way to embed images in the parameters tab? With some python magic maybe? :p

Cheers
User Avatar
Member
3541 posts
Joined: July 2007
Online
you may want to have a look at Icon Strip parameter
http://www.sidefx.com/docs/houdini/ref/windows/optype.html#parmtypes [www.sidefx.com]
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
465 posts
Joined: June 2006
Offline
tamte
you may want to have a look at Icon Strip parameter
http://www.sidefx.com/docs/houdini/ref/windows/optype.html#parmtypes [www.sidefx.com]

cool didn't know that!

whats also possible is pypanel and a html site:
pypanel: http://www.sidefx.com/docs/houdini/ref/windows/pythonpaneleditor.html [www.sidefx.com]
html: http://www.sidefx.com/docs/houdini/hom/browserpython.html [www.sidefx.com]
User Avatar
Member
17 posts
Joined: Feb. 2017
Offline
I can not understand the help of “Make a icon strip parameter”


I tried to use .ico format image, it doesn't work.
And now, I am using .png format image, it works…
Edited by zengchen01 - Aug. 13, 2018 09:12:39
User Avatar
Member
117 posts
Joined: Feb. 2016
Offline
Hey thanks for the tips guys.

Zeng, could you share the hip file by any chance? or just the code to make this reference to icon.

cheers!


(ps. I'm wondering if it accepts .svg files too)
User Avatar
Member
17 posts
Joined: Feb. 2017
Offline
Andr
Zeng, could you share the hip file by any chance? or just the code to make this reference to icon.

Here's the hip file.
The Labels will be used as tooltips when the user hovers over an icon.
So I casually give some number to Labels at this case.
Edited by zengchen01 - Aug. 13, 2018 09:55:34

Attachments:
捕获.PNG (29.5 KB)
sample.zip (44.8 KB)

User Avatar
Member
117 posts
Joined: Feb. 2016
Offline
Hey Zeng thanks, especially for providing also the python code.

Icons size is pretty small though. I guess there's no way to change the default size
User Avatar
Member
17 posts
Joined: Feb. 2017
Offline
Andr
Icons size is pretty small though. I guess there's no way to change the default size
I also wonder if there are some ways to scale the icon. It's tooooooo small…
  • Quick Links