339 lines
13 KiB
ReStructuredText
339 lines
13 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. DO NOT EDIT THIS FILE!!!
|
|
.. Generated automatically from Godot engine sources.
|
|
.. Generator: https://github.com/godotengine/godot/tree/3.6/doc/tools/make_rst.py.
|
|
.. XML source: https://github.com/godotengine/godot/tree/3.6/modules/visual_script/doc_classes/VisualScriptPropertySet.xml.
|
|
|
|
.. _class_VisualScriptPropertySet:
|
|
|
|
VisualScriptPropertySet
|
|
=======================
|
|
|
|
**Inherits:** :ref:`VisualScriptNode<class_VisualScriptNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
|
|
|
|
A Visual Script node that sets a property of an :ref:`Object<class_Object>`.
|
|
|
|
.. rst-class:: classref-introduction-group
|
|
|
|
Description
|
|
-----------
|
|
|
|
**VisualScriptPropertySet** can set the value of any property from the current object or other objects.
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
Properties
|
|
----------
|
|
|
|
.. table::
|
|
:widths: auto
|
|
|
|
+--------------------------------------------------------+------------------------------------------------------------------------+--------------+
|
|
| :ref:`AssignOp<enum_VisualScriptPropertySet_AssignOp>` | :ref:`assign_op<class_VisualScriptPropertySet_property_assign_op>` | ``0`` |
|
|
+--------------------------------------------------------+------------------------------------------------------------------------+--------------+
|
|
| :ref:`String<class_String>` | :ref:`base_script<class_VisualScriptPropertySet_property_base_script>` | |
|
|
+--------------------------------------------------------+------------------------------------------------------------------------+--------------+
|
|
| :ref:`String<class_String>` | :ref:`base_type<class_VisualScriptPropertySet_property_base_type>` | ``"Object"`` |
|
|
+--------------------------------------------------------+------------------------------------------------------------------------+--------------+
|
|
| :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` | :ref:`basic_type<class_VisualScriptPropertySet_property_basic_type>` | |
|
|
+--------------------------------------------------------+------------------------------------------------------------------------+--------------+
|
|
| :ref:`String<class_String>` | :ref:`index<class_VisualScriptPropertySet_property_index>` | |
|
|
+--------------------------------------------------------+------------------------------------------------------------------------+--------------+
|
|
| :ref:`NodePath<class_NodePath>` | :ref:`node_path<class_VisualScriptPropertySet_property_node_path>` | |
|
|
+--------------------------------------------------------+------------------------------------------------------------------------+--------------+
|
|
| :ref:`String<class_String>` | :ref:`property<class_VisualScriptPropertySet_property_property>` | ``""`` |
|
|
+--------------------------------------------------------+------------------------------------------------------------------------+--------------+
|
|
| :ref:`CallMode<enum_VisualScriptPropertySet_CallMode>` | :ref:`set_mode<class_VisualScriptPropertySet_property_set_mode>` | ``0`` |
|
|
+--------------------------------------------------------+------------------------------------------------------------------------+--------------+
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
Enumerations
|
|
------------
|
|
|
|
.. _enum_VisualScriptPropertySet_CallMode:
|
|
|
|
.. rst-class:: classref-enumeration
|
|
|
|
enum **CallMode**:
|
|
|
|
.. _class_VisualScriptPropertySet_constant_CALL_MODE_SELF:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`CallMode<enum_VisualScriptPropertySet_CallMode>` **CALL_MODE_SELF** = ``0``
|
|
|
|
The property will be set on this :ref:`Object<class_Object>`.
|
|
|
|
.. _class_VisualScriptPropertySet_constant_CALL_MODE_NODE_PATH:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`CallMode<enum_VisualScriptPropertySet_CallMode>` **CALL_MODE_NODE_PATH** = ``1``
|
|
|
|
The property will be set on the given :ref:`Node<class_Node>` in the scene tree.
|
|
|
|
.. _class_VisualScriptPropertySet_constant_CALL_MODE_INSTANCE:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`CallMode<enum_VisualScriptPropertySet_CallMode>` **CALL_MODE_INSTANCE** = ``2``
|
|
|
|
The property will be set on an instanced node with the given type and script.
|
|
|
|
.. _class_VisualScriptPropertySet_constant_CALL_MODE_BASIC_TYPE:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`CallMode<enum_VisualScriptPropertySet_CallMode>` **CALL_MODE_BASIC_TYPE** = ``3``
|
|
|
|
The property will be set on a GDScript basic type (e.g. :ref:`Vector2<class_Vector2>`).
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _enum_VisualScriptPropertySet_AssignOp:
|
|
|
|
.. rst-class:: classref-enumeration
|
|
|
|
enum **AssignOp**:
|
|
|
|
.. _class_VisualScriptPropertySet_constant_ASSIGN_OP_NONE:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`AssignOp<enum_VisualScriptPropertySet_AssignOp>` **ASSIGN_OP_NONE** = ``0``
|
|
|
|
The property will be assigned regularly.
|
|
|
|
.. _class_VisualScriptPropertySet_constant_ASSIGN_OP_ADD:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`AssignOp<enum_VisualScriptPropertySet_AssignOp>` **ASSIGN_OP_ADD** = ``1``
|
|
|
|
The value will be added to the property. Equivalent of doing ``+=``.
|
|
|
|
.. _class_VisualScriptPropertySet_constant_ASSIGN_OP_SUB:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`AssignOp<enum_VisualScriptPropertySet_AssignOp>` **ASSIGN_OP_SUB** = ``2``
|
|
|
|
The value will be subtracted from the property. Equivalent of doing ``-=``.
|
|
|
|
.. _class_VisualScriptPropertySet_constant_ASSIGN_OP_MUL:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`AssignOp<enum_VisualScriptPropertySet_AssignOp>` **ASSIGN_OP_MUL** = ``3``
|
|
|
|
The property will be multiplied by the value. Equivalent of doing ``*=``.
|
|
|
|
.. _class_VisualScriptPropertySet_constant_ASSIGN_OP_DIV:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`AssignOp<enum_VisualScriptPropertySet_AssignOp>` **ASSIGN_OP_DIV** = ``4``
|
|
|
|
The property will be divided by the value. Equivalent of doing ``/=``.
|
|
|
|
.. _class_VisualScriptPropertySet_constant_ASSIGN_OP_MOD:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`AssignOp<enum_VisualScriptPropertySet_AssignOp>` **ASSIGN_OP_MOD** = ``5``
|
|
|
|
A modulo operation will be performed on the property and the value. Equivalent of doing ``%=``.
|
|
|
|
.. _class_VisualScriptPropertySet_constant_ASSIGN_OP_SHIFT_LEFT:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`AssignOp<enum_VisualScriptPropertySet_AssignOp>` **ASSIGN_OP_SHIFT_LEFT** = ``6``
|
|
|
|
The property will be binarly shifted to the left by the given value. Equivalent of doing ``<<``.
|
|
|
|
.. _class_VisualScriptPropertySet_constant_ASSIGN_OP_SHIFT_RIGHT:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`AssignOp<enum_VisualScriptPropertySet_AssignOp>` **ASSIGN_OP_SHIFT_RIGHT** = ``7``
|
|
|
|
The property will be binarly shifted to the right by the given value. Equivalent of doing ``>>``.
|
|
|
|
.. _class_VisualScriptPropertySet_constant_ASSIGN_OP_BIT_AND:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`AssignOp<enum_VisualScriptPropertySet_AssignOp>` **ASSIGN_OP_BIT_AND** = ``8``
|
|
|
|
A binary ``AND`` operation will be performed on the property. Equivalent of doing ``&=``.
|
|
|
|
.. _class_VisualScriptPropertySet_constant_ASSIGN_OP_BIT_OR:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`AssignOp<enum_VisualScriptPropertySet_AssignOp>` **ASSIGN_OP_BIT_OR** = ``9``
|
|
|
|
A binary ``OR`` operation will be performed on the property. Equivalent of doing ``|=``.
|
|
|
|
.. _class_VisualScriptPropertySet_constant_ASSIGN_OP_BIT_XOR:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`AssignOp<enum_VisualScriptPropertySet_AssignOp>` **ASSIGN_OP_BIT_XOR** = ``10``
|
|
|
|
A binary ``XOR`` operation will be performed on the property. Equivalent of doing ``^=``.
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
Property Descriptions
|
|
---------------------
|
|
|
|
.. _class_VisualScriptPropertySet_property_assign_op:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`AssignOp<enum_VisualScriptPropertySet_AssignOp>` **assign_op** = ``0``
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- void **set_assign_op** **(** :ref:`AssignOp<enum_VisualScriptPropertySet_AssignOp>` value **)**
|
|
- :ref:`AssignOp<enum_VisualScriptPropertySet_AssignOp>` **get_assign_op** **(** **)**
|
|
|
|
The additional operation to perform when assigning. See :ref:`AssignOp<enum_VisualScriptPropertySet_AssignOp>` for options.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_VisualScriptPropertySet_property_base_script:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`String<class_String>` **base_script**
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- void **set_base_script** **(** :ref:`String<class_String>` value **)**
|
|
- :ref:`String<class_String>` **get_base_script** **(** **)**
|
|
|
|
The script to be used when :ref:`set_mode<class_VisualScriptPropertySet_property_set_mode>` is set to :ref:`CALL_MODE_INSTANCE<class_VisualScriptPropertySet_constant_CALL_MODE_INSTANCE>`.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_VisualScriptPropertySet_property_base_type:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`String<class_String>` **base_type** = ``"Object"``
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- void **set_base_type** **(** :ref:`String<class_String>` value **)**
|
|
- :ref:`String<class_String>` **get_base_type** **(** **)**
|
|
|
|
The base type to be used when :ref:`set_mode<class_VisualScriptPropertySet_property_set_mode>` is set to :ref:`CALL_MODE_INSTANCE<class_VisualScriptPropertySet_constant_CALL_MODE_INSTANCE>`.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_VisualScriptPropertySet_property_basic_type:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **basic_type**
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- void **set_basic_type** **(** :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` value **)**
|
|
- :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **get_basic_type** **(** **)**
|
|
|
|
The type to be used when :ref:`set_mode<class_VisualScriptPropertySet_property_set_mode>` is set to :ref:`CALL_MODE_BASIC_TYPE<class_VisualScriptPropertySet_constant_CALL_MODE_BASIC_TYPE>`.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_VisualScriptPropertySet_property_index:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`String<class_String>` **index**
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- void **set_index** **(** :ref:`String<class_String>` value **)**
|
|
- :ref:`String<class_String>` **get_index** **(** **)**
|
|
|
|
The indexed name of the property to set. See :ref:`Object.set_indexed<class_Object_method_set_indexed>` for details.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_VisualScriptPropertySet_property_node_path:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`NodePath<class_NodePath>` **node_path**
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- void **set_base_path** **(** :ref:`NodePath<class_NodePath>` value **)**
|
|
- :ref:`NodePath<class_NodePath>` **get_base_path** **(** **)**
|
|
|
|
The node path to use when :ref:`set_mode<class_VisualScriptPropertySet_property_set_mode>` is set to :ref:`CALL_MODE_NODE_PATH<class_VisualScriptPropertySet_constant_CALL_MODE_NODE_PATH>`.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_VisualScriptPropertySet_property_property:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`String<class_String>` **property** = ``""``
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- void **set_property** **(** :ref:`String<class_String>` value **)**
|
|
- :ref:`String<class_String>` **get_property** **(** **)**
|
|
|
|
The name of the property to set. Changing this will clear :ref:`index<class_VisualScriptPropertySet_property_index>`.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_VisualScriptPropertySet_property_set_mode:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`CallMode<enum_VisualScriptPropertySet_CallMode>` **set_mode** = ``0``
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- void **set_call_mode** **(** :ref:`CallMode<enum_VisualScriptPropertySet_CallMode>` value **)**
|
|
- :ref:`CallMode<enum_VisualScriptPropertySet_CallMode>` **get_call_mode** **(** **)**
|
|
|
|
``set_mode`` determines the target object on which the property will be set. See :ref:`CallMode<enum_VisualScriptPropertySet_CallMode>` for options.
|
|
|
|
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
|
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
|
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
|
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|