VisualShaderNodeIntParameter

继承: 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.

属性


枚举

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_ENUM = 3

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

Hint HINT_MAX = 4

Represents the size of the Hint enum.


属性说明

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.


PackedStringArray enum_names = PackedStringArray()

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

Note: The returned array is copied and any changes to it will not update the original property value. See PackedStringArray for more details.


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.

1

本方法通常需要用户覆盖才能生效。

2

本方法无副作用,不会修改该实例的任何成员变量。

3

本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。

4

本方法用于构造某个类型。

5

调用本方法无需实例,可直接使用类名进行调用。

6

本方法描述的是使用本类型作为左操作数的有效运算符。

7

这个值是由下列位标志构成位掩码的整数。

8

无返回值。