classref: Sync with current master branch (f87858a8f)

This commit is contained in:
Yuri Sizov
2022-12-05 20:38:58 +03:00
parent 913ff5e602
commit a7745c4cc4
843 changed files with 158186 additions and 80821 deletions

View File

@@ -14,6 +14,8 @@ SkeletonModification2DPhysicalBones
A modification that applies the transforms of :ref:`PhysicalBone2D<class_PhysicalBone2D>` nodes to :ref:`Bone2D<class_Bone2D>` nodes.
.. rst-class:: classref-introduction-group
Description
-----------
@@ -21,87 +23,126 @@ This modification takes the transforms of :ref:`PhysicalBone2D<class_PhysicalBon
Experimental. Physical bones may be changed in the future to perform the position update of :ref:`Bone2D<class_Bone2D>` on their own.
.. rst-class:: classref-reftable-group
Properties
----------
+-----------------------+------------------------------------------------------------------------------------------------------------------+-------+
| :ref:`int<class_int>` | :ref:`physical_bone_chain_length<class_SkeletonModification2DPhysicalBones_property_physical_bone_chain_length>` | ``0`` |
+-----------------------+------------------------------------------------------------------------------------------------------------------+-------+
.. table::
:widths: auto
+-----------------------+------------------------------------------------------------------------------------------------------------------+-------+
| :ref:`int<class_int>` | :ref:`physical_bone_chain_length<class_SkeletonModification2DPhysicalBones_property_physical_bone_chain_length>` | ``0`` |
+-----------------------+------------------------------------------------------------------------------------------------------------------+-------+
.. rst-class:: classref-reftable-group
Methods
-------
+---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`fetch_physical_bones<class_SkeletonModification2DPhysicalBones_method_fetch_physical_bones>` **(** **)** |
+---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`NodePath<class_NodePath>` | :ref:`get_physical_bone_node<class_SkeletonModification2DPhysicalBones_method_get_physical_bone_node>` **(** :ref:`int<class_int>` joint_idx **)** |const| |
+---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_physical_bone_node<class_SkeletonModification2DPhysicalBones_method_set_physical_bone_node>` **(** :ref:`int<class_int>` joint_idx, :ref:`NodePath<class_NodePath>` physicalbone2d_node **)** |
+---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`start_simulation<class_SkeletonModification2DPhysicalBones_method_start_simulation>` **(** :ref:`StringName[]<class_StringName>` bones=[] **)** |
+---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`stop_simulation<class_SkeletonModification2DPhysicalBones_method_stop_simulation>` **(** :ref:`StringName[]<class_StringName>` bones=[] **)** |
+---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
.. table::
:widths: auto
+---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`fetch_physical_bones<class_SkeletonModification2DPhysicalBones_method_fetch_physical_bones>` **(** **)** |
+---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`NodePath<class_NodePath>` | :ref:`get_physical_bone_node<class_SkeletonModification2DPhysicalBones_method_get_physical_bone_node>` **(** :ref:`int<class_int>` joint_idx **)** |const| |
+---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_physical_bone_node<class_SkeletonModification2DPhysicalBones_method_set_physical_bone_node>` **(** :ref:`int<class_int>` joint_idx, :ref:`NodePath<class_NodePath>` physicalbone2d_node **)** |
+---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`start_simulation<class_SkeletonModification2DPhysicalBones_method_start_simulation>` **(** :ref:`StringName[]<class_StringName>` bones=[] **)** |
+---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`stop_simulation<class_SkeletonModification2DPhysicalBones_method_stop_simulation>` **(** :ref:`StringName[]<class_StringName>` bones=[] **)** |
+---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Property Descriptions
---------------------
.. _class_SkeletonModification2DPhysicalBones_property_physical_bone_chain_length:
- :ref:`int<class_int>` **physical_bone_chain_length**
.. rst-class:: classref-property
+-----------+---------------------------------------+
| *Default* | ``0`` |
+-----------+---------------------------------------+
| *Setter* | set_physical_bone_chain_length(value) |
+-----------+---------------------------------------+
| *Getter* | get_physical_bone_chain_length() |
+-----------+---------------------------------------+
:ref:`int<class_int>` **physical_bone_chain_length** = ``0``
.. rst-class:: classref-property-setget
- void **set_physical_bone_chain_length** **(** :ref:`int<class_int>` value **)**
- :ref:`int<class_int>` **get_physical_bone_chain_length** **(** **)**
The number of :ref:`PhysicalBone2D<class_PhysicalBone2D>` nodes linked in this modification.
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Method Descriptions
-------------------
.. _class_SkeletonModification2DPhysicalBones_method_fetch_physical_bones:
- void **fetch_physical_bones** **(** **)**
.. rst-class:: classref-method
void **fetch_physical_bones** **(** **)**
Empties the list of :ref:`PhysicalBone2D<class_PhysicalBone2D>` nodes and populates it will all :ref:`PhysicalBone2D<class_PhysicalBone2D>` nodes that are children of the :ref:`Skeleton2D<class_Skeleton2D>`.
.. rst-class:: classref-item-separator
----
.. _class_SkeletonModification2DPhysicalBones_method_get_physical_bone_node:
- :ref:`NodePath<class_NodePath>` **get_physical_bone_node** **(** :ref:`int<class_int>` joint_idx **)** |const|
.. rst-class:: classref-method
:ref:`NodePath<class_NodePath>` **get_physical_bone_node** **(** :ref:`int<class_int>` joint_idx **)** |const|
Returns the :ref:`PhysicalBone2D<class_PhysicalBone2D>` node at ``joint_idx``.
.. rst-class:: classref-item-separator
----
.. _class_SkeletonModification2DPhysicalBones_method_set_physical_bone_node:
- void **set_physical_bone_node** **(** :ref:`int<class_int>` joint_idx, :ref:`NodePath<class_NodePath>` physicalbone2d_node **)**
.. rst-class:: classref-method
void **set_physical_bone_node** **(** :ref:`int<class_int>` joint_idx, :ref:`NodePath<class_NodePath>` physicalbone2d_node **)**
Sets the :ref:`PhysicalBone2D<class_PhysicalBone2D>` node at ``joint_idx``.
\ **Note:** This is just the index used for this modification, not the bone index used in the :ref:`Skeleton2D<class_Skeleton2D>`.
.. rst-class:: classref-item-separator
----
.. _class_SkeletonModification2DPhysicalBones_method_start_simulation:
- void **start_simulation** **(** :ref:`StringName[]<class_StringName>` bones=[] **)**
.. rst-class:: classref-method
void **start_simulation** **(** :ref:`StringName[]<class_StringName>` bones=[] **)**
Tell the :ref:`PhysicalBone2D<class_PhysicalBone2D>` nodes to start simulating and interacting with the physics world.
Optionally, an array of bone names can be passed to this function, and that will cause only :ref:`PhysicalBone2D<class_PhysicalBone2D>` nodes with those names to start simulating.
.. rst-class:: classref-item-separator
----
.. _class_SkeletonModification2DPhysicalBones_method_stop_simulation:
- void **stop_simulation** **(** :ref:`StringName[]<class_StringName>` bones=[] **)**
.. rst-class:: classref-method
void **stop_simulation** **(** :ref:`StringName[]<class_StringName>` bones=[] **)**
Tell the :ref:`PhysicalBone2D<class_PhysicalBone2D>` nodes to stop simulating and interacting with the physics world.