class_visualshadernodeswitch.rst 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the VisualShaderNodeSwitch.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_VisualShaderNodeSwitch:
  6. VisualShaderNodeSwitch
  7. ======================
  8. **Inherits:** :ref:`VisualShaderNode<class_VisualShaderNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  9. A selector function for use within the visual shader graph.
  10. Description
  11. -----------
  12. Returns an associated value of the ``op_type`` type if the provided boolean value is ``true`` or ``false``.
  13. Properties
  14. ----------
  15. +---------------------------------------------------+---------------------------------------------------------------+-------+
  16. | :ref:`OpType<enum_VisualShaderNodeSwitch_OpType>` | :ref:`op_type<class_VisualShaderNodeSwitch_property_op_type>` | ``0`` |
  17. +---------------------------------------------------+---------------------------------------------------------------+-------+
  18. Enumerations
  19. ------------
  20. .. _enum_VisualShaderNodeSwitch_OpType:
  21. .. _class_VisualShaderNodeSwitch_constant_OP_TYPE_FLOAT:
  22. .. _class_VisualShaderNodeSwitch_constant_OP_TYPE_INT:
  23. .. _class_VisualShaderNodeSwitch_constant_OP_TYPE_VECTOR:
  24. .. _class_VisualShaderNodeSwitch_constant_OP_TYPE_BOOLEAN:
  25. .. _class_VisualShaderNodeSwitch_constant_OP_TYPE_TRANSFORM:
  26. .. _class_VisualShaderNodeSwitch_constant_OP_TYPE_MAX:
  27. enum **OpType**:
  28. - **OP_TYPE_FLOAT** = **0** --- A floating-point scalar.
  29. - **OP_TYPE_INT** = **1** --- An integer scalar.
  30. - **OP_TYPE_VECTOR** = **2** --- A vector type.
  31. - **OP_TYPE_BOOLEAN** = **3** --- A boolean type.
  32. - **OP_TYPE_TRANSFORM** = **4** --- A transform type.
  33. - **OP_TYPE_MAX** = **5** --- Represents the size of the :ref:`OpType<enum_VisualShaderNodeSwitch_OpType>` enum.
  34. Property Descriptions
  35. ---------------------
  36. .. _class_VisualShaderNodeSwitch_property_op_type:
  37. - :ref:`OpType<enum_VisualShaderNodeSwitch_OpType>` **op_type**
  38. +-----------+--------------------+
  39. | *Default* | ``0`` |
  40. +-----------+--------------------+
  41. | *Setter* | set_op_type(value) |
  42. +-----------+--------------------+
  43. | *Getter* | get_op_type() |
  44. +-----------+--------------------+
  45. A type of operands and returned value.
  46. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  47. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  48. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  49. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  50. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  51. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`