Using a Slider to lock in specific values

   488   2   0
User Avatar
Member
7 posts
Joined: 10月 2020
Offline
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?
User Avatar
Member
8554 posts
Joined: 7月 2007
Offline
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"))
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
7 posts
Joined: 10月 2020
Offline
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!
  • Quick Links