:github_url: hide .. Generated automatically by doc/tools/make_rst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the Skeleton2D.xml source instead. .. The source is found in doc/classes or modules//doc_classes. .. _class_Skeleton2D: Skeleton2D ========== **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` Skeleton for 2D characters and animated objects. Description ----------- Skeleton2D parents a hierarchy of :ref:`Bone2D` objects. It is a requirement of :ref:`Bone2D`. Skeleton2D holds a reference to the rest pose of its children and acts as a single point of access to its bones. Tutorials --------- - :doc:`../tutorials/animation/2d_skeletons` Methods ------- +-----------------------------+-----------------------------------------------------------------------------------------+ | :ref:`Bone2D` | :ref:`get_bone` **(** :ref:`int` idx **)** | +-----------------------------+-----------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_bone_count` **(** **)** |const| | +-----------------------------+-----------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`get_skeleton` **(** **)** |const| | +-----------------------------+-----------------------------------------------------------------------------------------+ Signals ------- .. _class_Skeleton2D_signal_bone_setup_changed: - **bone_setup_changed** **(** **)** Method Descriptions ------------------- .. _class_Skeleton2D_method_get_bone: - :ref:`Bone2D` **get_bone** **(** :ref:`int` idx **)** Returns a :ref:`Bone2D` from the node hierarchy parented by Skeleton2D. The object to return is identified by the parameter ``idx``. Bones are indexed by descending the node hierarchy from top to bottom, adding the children of each branch before moving to the next sibling. ---- .. _class_Skeleton2D_method_get_bone_count: - :ref:`int` **get_bone_count** **(** **)** |const| Returns the number of :ref:`Bone2D` nodes in the node hierarchy parented by Skeleton2D. ---- .. _class_Skeleton2D_method_get_skeleton: - :ref:`RID` **get_skeleton** **(** **)** |const| Returns the :ref:`RID` of a Skeleton2D instance. .. |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.)`