Digital Asset: display value in parameters ?

   5853   11   2
User Avatar
Member
1177 posts
Joined: April 2017
Offline
Hi!

I was making a simple asset that converts feets and inches to meters. I'm getting the result as a detail attribute. How can I get that value to be displayed inside the parameters panel?

-Olivier

Attachments:
Houdini_display_value_in_parameters_panel.JPG (20.4 KB)

User Avatar
Member
40 posts
Joined: Aug. 2018
Offline
It's usually done with a Label parameter, and setting it with
`detail(path,attrib,index)`
.
Edited by Herve - Dec. 14, 2020 05:11:31
User Avatar
Member
1177 posts
Joined: April 2017
Offline
Thanks for the info but as you can see, I have no idea what I'm doin'...

Attachments:
label_detail_function.JPG (158.8 KB)

User Avatar
Member
40 posts
Joined: Aug. 2018
Offline
I'm not entirely sure either what it is you want to achieve , but following my guess... that label parameter, label 1 entry has to be between tilde characters `detail("../Measure_converter",etc...)` for it work. otherwise it won't display correctly.

Attachments:
2020-12-14_192716.jpg (152.8 KB)

User Avatar
Member
1177 posts
Joined: April 2017
Offline
Ah, I forgot about that!

Now I'm getting the label to show up but the value is always "0" even if my detail value is 0.73152. Not sure what I'm doing wrong...

Attachments:
Houdini_asset_label_01.JPG (55.9 KB)
Houdini_asset_label_02.JPG (66.4 KB)

User Avatar
Member
802 posts
Joined: Feb. 2017
Offline
Hey olivierth,

have you got this to work? I have the same problem.

Cheers
CYTE
User Avatar
Member
313 posts
Joined: Oct. 2016
Offline
Not sure about your context, and I’m on the move. If you are using Python maybe try .eval() after your command.

Maybe share a file with this case?
Edited by SWest - Sept. 30, 2022 10:39:30
Interested in character concepts, modeling, rigging, and animation. Related tool dev with Py and VEX.
User Avatar
Member
802 posts
Joined: Feb. 2017
Offline
Hey SWest,

thank you for your help. I don't think it's python. Take a look at the file. I want to display the value of rand in the display parameter called Rand_is: But it always shows 0.
My end goal is to display a color in the hda interface randomly created by the hda. It would be beneficial if you have an idea of how to do that.

Cheers
CYTE

Attachments:
ShowRand.hip (125.3 KB)

User Avatar
Member
313 posts
Joined: Oct. 2016
Offline
Okay, now I’m outside with no chance to test anything. However, basically you seem to want to ”read” another parameter. With Python this would be setting a keyframe to a parameter telling it to update itself to some other parm. However, since you are not using Python you will need to get the expression to do something similar. A random color is just three float values, and I think you find the correct data type in the editor ”Edit Parameter Interface” (gear icon). When I have opportunity to take a look I will, otherwise I think there are a lot of seasoned Houdini users around here who will answer first. Cheers!
Edited by SWest - Sept. 30, 2022 15:11:40
Interested in character concepts, modeling, rigging, and animation. Related tool dev with Py and VEX.
User Avatar
Member
802 posts
Joined: Feb. 2017
Offline
Hey SWest,

thank you for your help! Unfortunately, this is not what I'm looking for. In your setup, the random number is generated inside the hda interface and not by nodes contained in the hda. this is important to me, as I want a multiparm setup in the end. the data should come from the node network to the interface. like I tried in my example with the rand value.

Cheers
CYTE
Edited by CYTE - Oct. 1, 2022 12:47:56
User Avatar
Member
33 posts
Joined: Nov. 2016
Offline
It works if you set the node path correctly. e.g. detail("/obj/geo1/subnet1/make_rand","rand",0) or probably easier to just set it relative: detail("./make_rand", "rand", 0)
Edited by gorrod - Oct. 2, 2022 11:33:08

Attachments:
ShowRand.hipnc (129.4 KB)

User Avatar
Member
802 posts
Joined: Feb. 2017
Offline
Hey gorrod,

Thank you very much! Stupid typo on my side

Cheers
CYTE
  • Quick Links