Create Houdini interface element class

   831   3   2
User Avatar
Member
126 posts
Joined: Sept. 2021
Offline
Hi!

I'm building an HDA that operates on points. For many of the operations we perform on points, we are thinking that it might be helpful to multiply the parameter values by an attribute found on the points. We were thinking it might be useful to place a checkbox next to each float attribute and give the user the ability to check it and then type in the name of the point attribute that they want the value to be multiplied by for each point. Here's an example with two parameters:



In my mind, this sounds kind of like how classes in object oriented programming can have attributes and functionality that are common to each of them. Is there a way I can do something like this in Houdini programmatically, without having to add all of these checkboxes and string attribute boxes one at a time?

Thanks!
Anson

Attachments:
multiply_by_point_attribute.png (8.0 KB)

User Avatar
Member
82 posts
Joined: Nov. 2016
Offline
Hi!

I'm not sure if I'm following you right but, maybe the Folder as "Multiparm Block (List)" can do what you are looking for?

https://www.dropbox.com/scl/fi/m751m5l0k7dm32eblaxvx/houdini_VpAfDeY5KM.mp4?rlkey=3op85jhz7i5a7hkoutqx6fadb&dl=0 [www.dropbox.com]
Edited by cdordelly - July 2, 2023 21:00:27
User Avatar
Member
126 posts
Joined: Sept. 2021
Offline
cdordelly
Hi!

I'm not sure if I'm following you right but, maybe the Folder as "Multiparm Block (List)" can do what you are looking for?

https://www.dropbox.com/scl/fi/m751m5l0k7dm32eblaxvx/houdini_VpAfDeY5KM.mp4?rlkey=3op85jhz7i5a7hkoutqx6fadb&dl=0 [www.dropbox.com]

Hey, that looks great! Is there a way that I could fix the multiparm block to be a set number for each HDA with each parameter name and label being chosen from a programmer defined list?

Thanks!
Anson
User Avatar
Member
82 posts
Joined: Nov. 2016
Offline
Yes, you can define the default values for the HDA parameters, or you can also use the Create Python section to run a script once the HDA is created, in case you want to save only one HDA but create it in multiple ways with different initial values depending on how are you calling, you can create a shelf script to create your HDA and control the initial values with it.

Regarding the pre-defined list, you can create an Ordered Menu parameter instead of a string field like in the example.
  • Quick Links