User Values
User values are values within the expression which are
specified through the graphical interface. Each user value
must have a name. User values sometimes take arguments, like
user_float, in this case to specify the range of
allowed values.
- user_float(name,minimum,maximum)
- user_slider(name,minimum,maximum)
- Returns a tuple of type nil:1 corresponding to
the chosen number in the range minimum to
maximum.
- user_int(name,minimum,maximum)
- Returns a tuple of type nil:1 corresponding to
the chosen integer in the range minimum to
maximum.
- user_bool(name)
- Returns the tuple nil:[1] or nil:[0]
depending on whether the user has activated a push button.
- user_color(name)
- Returns a tuple of type rgba:4 corresponding to
the color the user has chosen in a color well.
- user_curve(name,x)
- Returns a tuple of type nil:1 corresponding to
the value of a curve at position x. The curve is
defined in the interval 0 to 1. Its values
are in the same interval. If x is outside the
interval, it is clamped.
- user_gradient(name,x)
- Returns the value of a user-defined gradient at the
value x. The gradient is defined in the interval
0 to 1. Values outside this interval
are clamped. The returned tuple is a color of type
rgba:4.
- user_image(name)
- Returns a tuple of type image:1 containing the
ID of a user-selected image. The user may only select images
having the same size as the input image.