Skip to content

VisualShaderNodeIntParameter

Inherits: VisualShaderNodeParameter < VisualShaderNode < Resource < RefCounted < Object

A visual shader node for shader parameter (uniform) of type int.

A VisualShaderNodeParameter of type int. Offers additional customization for range of accepted values.

Type Name Default
int default_value 0
bool default_value_enabled false
PackedStringArray enum_names PackedStringArray()
Hint hint 0
int max 100
int min 0
int step 1

Hint

enum Hint

HINT_NONE = 0

The parameter will not constrain its value.

HINT_RANGE = 1

The parameter’s value must be within the specified min/max range.

HINT_RANGE_STEP = 2

The parameter’s value must be within the specified range, with the given step between values.

HINT_ENUM = 3

The parameter uses an enum to associate preset values to names in the editor.

HINT_MAX = 4

Represents the size of the Hint enum.

default_value

int default_value = 0

Default value of this parameter, which will be used if not set externally. default_value_enabled must be enabled; defaults to 0 otherwise.

default_value_enabled

bool default_value_enabled = false

If true, the node will have a custom default value.

enum_names

PackedStringArray enum_names = PackedStringArray()

The names used for the enum select in the editor. hint must be HINT_ENUM for this to take effect.

hint

Hint hint = 0

Range hint of this node. Use it to customize valid parameter range.

max

int max = 100

The maximum value this parameter can take. hint must be either HINT_RANGE or HINT_RANGE_STEP for this to take effect.

min

int min = 0

The minimum value this parameter can take. hint must be either HINT_RANGE or HINT_RANGE_STEP for this to take effect.

step

int step = 1

The step between parameter’s values. Forces the parameter to be a multiple of the given value. hint must be HINT_RANGE_STEP for this to take effect.