VisualScriptPropertySet.xml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="VisualScriptPropertySet" inherits="VisualScriptNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
  3. <brief_description>
  4. A Visual Script node that sets a property of an [Object].
  5. </brief_description>
  6. <description>
  7. [VisualScriptPropertySet] can set the value of any property from the current object or other objects.
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <members>
  12. <member name="assign_op" type="int" setter="set_assign_op" getter="get_assign_op" enum="VisualScriptPropertySet.AssignOp" default="0">
  13. The additional operation to perform when assigning. See [enum AssignOp] for options.
  14. </member>
  15. <member name="base_script" type="String" setter="set_base_script" getter="get_base_script">
  16. The script to be used when [member set_mode] is set to [constant CALL_MODE_INSTANCE].
  17. </member>
  18. <member name="base_type" type="StringName" setter="set_base_type" getter="get_base_type" default="&amp;&quot;Object&quot;">
  19. The base type to be used when [member set_mode] is set to [constant CALL_MODE_INSTANCE].
  20. </member>
  21. <member name="basic_type" type="int" setter="set_basic_type" getter="get_basic_type" enum="Variant.Type">
  22. The type to be used when [member set_mode] is set to [constant CALL_MODE_BASIC_TYPE].
  23. </member>
  24. <member name="index" type="StringName" setter="set_index" getter="get_index">
  25. The indexed name of the property to set. See [method Object.set_indexed] for details.
  26. </member>
  27. <member name="node_path" type="NodePath" setter="set_base_path" getter="get_base_path">
  28. The node path to use when [member set_mode] is set to [constant CALL_MODE_NODE_PATH].
  29. </member>
  30. <member name="property" type="StringName" setter="set_property" getter="get_property" default="&amp;&quot;&quot;">
  31. The name of the property to set. Changing this will clear [member index].
  32. </member>
  33. <member name="set_mode" type="int" setter="set_call_mode" getter="get_call_mode" enum="VisualScriptPropertySet.CallMode" default="0">
  34. [code]set_mode[/code] determines the target object on which the property will be set. See [enum CallMode] for options.
  35. </member>
  36. </members>
  37. <constants>
  38. <constant name="CALL_MODE_SELF" value="0" enum="CallMode">
  39. The property will be set on this [Object].
  40. </constant>
  41. <constant name="CALL_MODE_NODE_PATH" value="1" enum="CallMode">
  42. The property will be set on the given [Node] in the scene tree.
  43. </constant>
  44. <constant name="CALL_MODE_INSTANCE" value="2" enum="CallMode">
  45. The property will be set on an instanced node with the given type and script.
  46. </constant>
  47. <constant name="CALL_MODE_BASIC_TYPE" value="3" enum="CallMode">
  48. The property will be set on a GDScript basic type (e.g. [Vector2]).
  49. </constant>
  50. <constant name="ASSIGN_OP_NONE" value="0" enum="AssignOp">
  51. The property will be assigned regularly.
  52. </constant>
  53. <constant name="ASSIGN_OP_ADD" value="1" enum="AssignOp">
  54. The value will be added to the property. Equivalent of doing [code]+=[/code].
  55. </constant>
  56. <constant name="ASSIGN_OP_SUB" value="2" enum="AssignOp">
  57. The value will be subtracted from the property. Equivalent of doing [code]-=[/code].
  58. </constant>
  59. <constant name="ASSIGN_OP_MUL" value="3" enum="AssignOp">
  60. The property will be multiplied by the value. Equivalent of doing [code]*=[/code].
  61. </constant>
  62. <constant name="ASSIGN_OP_DIV" value="4" enum="AssignOp">
  63. The property will be divided by the value. Equivalent of doing [code]/=[/code].
  64. </constant>
  65. <constant name="ASSIGN_OP_MOD" value="5" enum="AssignOp">
  66. A modulo operation will be performed on the property and the value. Equivalent of doing [code]%=[/code].
  67. </constant>
  68. <constant name="ASSIGN_OP_SHIFT_LEFT" value="6" enum="AssignOp">
  69. The property will be binarly shifted to the left by the given value. Equivalent of doing [code]&lt;&lt;[/code].
  70. </constant>
  71. <constant name="ASSIGN_OP_SHIFT_RIGHT" value="7" enum="AssignOp">
  72. The property will be binarly shifted to the right by the given value. Equivalent of doing [code]&gt;&gt;[/code].
  73. </constant>
  74. <constant name="ASSIGN_OP_BIT_AND" value="8" enum="AssignOp">
  75. A binary [code]AND[/code] operation will be performed on the property. Equivalent of doing [code]&amp;=[/code].
  76. </constant>
  77. <constant name="ASSIGN_OP_BIT_OR" value="9" enum="AssignOp">
  78. A binary [code]OR[/code] operation will be performed on the property. Equivalent of doing [code]|=[/code].
  79. </constant>
  80. <constant name="ASSIGN_OP_BIT_XOR" value="10" enum="AssignOp">
  81. A binary [code]XOR[/code] operation will be performed on the property. Equivalent of doing [code]^=[/code].
  82. </constant>
  83. </constants>
  84. </class>