formZ SDK | 5.0 API Reference | Project | Modeling | Rendering | Shaders
Description
This function can only be called inside the set_parameters
callback function when implementing a plugin or script
shader. It declares an integer shader parameter, which will
show up in the shader options dialog as a slider and text field with a title.
The min_flags parameter determines the acceptable lower bounds
of the value, that a user can type in the field. The possible values
are :
0 no lower bounds are checked
1 min is allowed as the lowest value
2 values must be greater than min
The max_flags parameter determines the acceptable upper bounds
of the value, that a user can type in the field. The possible values
are :
0 no upper bounds are checked
1 maxis allowed as the highest value
2 values must be less than max
Plugin Prototype
fzrt_error_td fz_shdr_set_sld_int_parm(
char * | name, |
fzrt_int | val, |
fzrt_int | min, |
fzrt_int | max, |
fzrt_int | min_flags, |
fzrt_int | max_flags, |
fzrt_int | id ) |
Parameters
name [Input]
The title of the parameter, as shown in the shader options dialog
val [Input]
The default value
min [Input]
The minimum value, if the range is checked
max [Input]
The maximum value, if the range is checked
min_flags [Input]
flags to determine the lower bounds
Range: 0 <= min_flags <= 2
max_flags [Input]
flags to determine the upper bounds
Range: 0 <= max_flags <= 2
id [Input]
if passed in as -1, this function will create a unique id, with which the value of this parameter can be retrieved using the API . This id will be returned by the function in its return value. If a value other than -1 is passed in, it will be used as the unique id. It is the responsibility of the calling code to make sure, that the id is not used again in another fz_shdr_set_xxx_parm function
Returns
unique id for this parameter.
Availability
5.0.0.0
Function Set
Defined in