Up to date

This page is up to date for Redot 4.3. If you still find outdated information, please create an issue.

VisualShaderNodeIntParameterΒΆ

Inherits: VisualShaderNodeParameter < VisualShaderNode < Resource < RefCounted < Object

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

DescriptionΒΆ

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

PropertiesΒΆ

int

default_value

0

bool

default_value_enabled

false

Hint

hint

0

int

max

100

int

min

0

int

step

1


EnumerationsΒΆ

enum Hint: πŸ”—

Hint HINT_NONE = 0

The parameter will not constrain its value.

Hint HINT_RANGE = 1

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

Hint HINT_RANGE_STEP = 2

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

Hint HINT_MAX = 3

Represents the size of the Hint enum.


Property DescriptionsΒΆ

int default_value = 0 πŸ”—

  • void set_default_value(value: int)

  • int get_default_value()

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


bool default_value_enabled = false πŸ”—

  • void set_default_value_enabled(value: bool)

  • bool is_default_value_enabled()

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


Hint hint = 0 πŸ”—

  • void set_hint(value: Hint)

  • Hint get_hint()

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


int max = 100 πŸ”—

  • void set_max(value: int)

  • int get_max()

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


int min = 0 πŸ”—

  • void set_min(value: int)

  • int get_min()

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


int step = 1 πŸ”—

  • void set_step(value: int)

  • int get_step()

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.