検索 - User list
Full Version: Using a Slider to lock in specific values
Root » Houdini Lounge » Using a Slider to lock in specific values
remiller91
I feel like I know the answer is going to be pretty straightforward, but for some reason it's eluding me. I'm trying to make a modular panel that has set height and width values. I would like to be able to switch between those set values using a slider. The long way of doing it would be a series of Switch SOPs for the heights, and widths. But is there a way to use a single Box SOP and have the slider drive the XYZ values, instead of a separate Box for each height/width value?
tamte
you can use arg() expression to choose between different values in your width/height fields
arg("5 12 28 44 51", ch("width_index"))

the width_index will be your slider specifying which width from the list you want 0 1 2 3 4

you can also provide that list of width values from a separate string parameter
arg(chs("width_list"), ch("width_index"))
remiller91
This worked perfectly! after I realized that I needed to add extra Integer parameters to the Box node. For some reason I was thinking that it would work similar to the chf in wrangles and add it automatically. Thanks!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB