Dynamic Range in Interface Options.

   2987   3   0
User Avatar
Member
2 posts
Joined: Oct. 2016
Offline
Hello. I encountered a task where I needed to make one parameter dependent on another, with a change in the lower threshold of the parameter definition area.
I have a value of 2 diameters.(A and B)
A - The user can set any value.
B∈ - The user can only set a value between the A diameter value and any value greater than A.

I have made it so that the user drives the difference between the values (B-A), but this is visually badly perceived.
I was thinking of making a dynamic data entry into the values of “range” in the Interface Options, but I didn't find any data on creating links to any variables in this block.
Is it possible to create such dynamic ranges at all?
User Avatar
Member
875 posts
Joined: Oct. 2008
Offline
I'm not sure it's worth the trouble but it's possible. Make it into an asset and then go to type properties and in the script section create a python module that modifies the parm's value.
--
Jobless
User Avatar
Member
8177 posts
Joined: Sept. 2011
Offline
Just don't. Parm interfaces aren't meant to be dynamic. The range of parameter sliders is a mere convenience. If the range is unpredictable, there are other ways to interact with the value such as the ladder or using a handle.

You could also use a slider with a fixed range, and remap the value internally on some computed range.
User Avatar
Member
2 posts
Joined: Oct. 2016
Offline
jsmack
Just don't. Parm interfaces aren't meant to be dynamic. The range of parameter sliders is a mere convenience. If the range is unpredictable, there are other ways to interact with the value such as the ladder or using a handle.

You could also use a slider with a fixed range, and remap the value internally on some computed range.

Hmm, “remap” is something similar in the sense that I need, but not quite suitable.
My interface parameters interface looks like this(attached photo):

Diameter + 2*Delta Shell Dim = Max Shell Dim

In my opinion, it is not very convenient to set the difference between Max Shell Dim and Diameter at once, because the user needs to remember that in order to know the maximum diameter must multiply Delta Shell Dim by 2.
I think that easier it would be if you could set both diameters, and the calculation of the difference between the numbers was hidden.
But the values Max Shell Dim cannot be less than the values Diameter.
So I was looking for a way to limit the lower limit for the Max Shell Dim values by adding a reference from Diameter in “Range” of parameter Max Shell Dim .
Edited by Maximkl - Nov. 18, 2020 13:54:53

Attachments:
Houdini_UI.PNG (12.2 KB)

  • Quick Links