123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198 |
- .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
- .. DO NOT EDIT THIS FILE, but the Skeleton.xml source instead.
- .. The source is found in doc/classes or modules/<name>/doc_classes.
- .. _class_Skeleton:
- Skeleton
- ========
- **Inherits:** :ref:`Spatial<class_spatial>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
- **Category:** Core
- Brief Description
- -----------------
- Skeleton for characters and animated objects.
- Member Functions
- ----------------
- +------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`add_bone<class_Skeleton_add_bone>` **(** :ref:`String<class_string>` name **)** |
- +------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`bind_child_node_to_bone<class_Skeleton_bind_child_node_to_bone>` **(** :ref:`int<class_int>` bone_idx, :ref:`Node<class_node>` node **)** |
- +------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`clear_bones<class_Skeleton_clear_bones>` **(** **)** |
- +------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`find_bone<class_Skeleton_find_bone>` **(** :ref:`String<class_string>` name **)** const |
- +------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_bone_count<class_Skeleton_get_bone_count>` **(** **)** const |
- +------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Transform<class_transform>` | :ref:`get_bone_custom_pose<class_Skeleton_get_bone_custom_pose>` **(** :ref:`int<class_int>` bone_idx **)** const |
- +------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Transform<class_transform>` | :ref:`get_bone_global_pose<class_Skeleton_get_bone_global_pose>` **(** :ref:`int<class_int>` bone_idx **)** const |
- +------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`String<class_string>` | :ref:`get_bone_name<class_Skeleton_get_bone_name>` **(** :ref:`int<class_int>` bone_idx **)** const |
- +------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_bone_parent<class_Skeleton_get_bone_parent>` **(** :ref:`int<class_int>` bone_idx **)** const |
- +------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Transform<class_transform>` | :ref:`get_bone_pose<class_Skeleton_get_bone_pose>` **(** :ref:`int<class_int>` bone_idx **)** const |
- +------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Transform<class_transform>` | :ref:`get_bone_rest<class_Skeleton_get_bone_rest>` **(** :ref:`int<class_int>` bone_idx **)** const |
- +------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Transform<class_transform>` | :ref:`get_bone_transform<class_Skeleton_get_bone_transform>` **(** :ref:`int<class_int>` bone_idx **)** const |
- +------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Array<class_array>` | :ref:`get_bound_child_nodes_to_bone<class_Skeleton_get_bound_child_nodes_to_bone>` **(** :ref:`int<class_int>` bone_idx **)** const |
- +------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_bone_rest_disabled<class_Skeleton_is_bone_rest_disabled>` **(** :ref:`int<class_int>` bone_idx **)** const |
- +------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_bone_custom_pose<class_Skeleton_set_bone_custom_pose>` **(** :ref:`int<class_int>` bone_idx, :ref:`Transform<class_transform>` custom_pose **)** |
- +------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_bone_disable_rest<class_Skeleton_set_bone_disable_rest>` **(** :ref:`int<class_int>` bone_idx, :ref:`bool<class_bool>` disable **)** |
- +------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_bone_global_pose<class_Skeleton_set_bone_global_pose>` **(** :ref:`int<class_int>` bone_idx, :ref:`Transform<class_transform>` pose **)** |
- +------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_bone_parent<class_Skeleton_set_bone_parent>` **(** :ref:`int<class_int>` bone_idx, :ref:`int<class_int>` parent_idx **)** |
- +------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_bone_pose<class_Skeleton_set_bone_pose>` **(** :ref:`int<class_int>` bone_idx, :ref:`Transform<class_transform>` pose **)** |
- +------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_bone_rest<class_Skeleton_set_bone_rest>` **(** :ref:`int<class_int>` bone_idx, :ref:`Transform<class_transform>` rest **)** |
- +------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`unbind_child_node_from_bone<class_Skeleton_unbind_child_node_from_bone>` **(** :ref:`int<class_int>` bone_idx, :ref:`Node<class_node>` node **)** |
- +------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`unparent_bone_and_rest<class_Skeleton_unparent_bone_and_rest>` **(** :ref:`int<class_int>` bone_idx **)** |
- +------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
- Numeric Constants
- -----------------
- - **NOTIFICATION_UPDATE_SKELETON** = **50**
- Description
- -----------
- Skeleton provides a hierarchical interface for managing bones, including pose, rest and animation (see :ref:`Animation<class_animation>`). Skeleton will support rag doll dynamics in the future.
- Member Function Description
- ---------------------------
- .. _class_Skeleton_add_bone:
- - void **add_bone** **(** :ref:`String<class_string>` name **)**
- Add a bone, with name "name". :ref:`get_bone_count<class_Skeleton_get_bone_count>` will become the bone index.
- .. _class_Skeleton_bind_child_node_to_bone:
- - void **bind_child_node_to_bone** **(** :ref:`int<class_int>` bone_idx, :ref:`Node<class_node>` node **)**
- Deprecated soon.
- .. _class_Skeleton_clear_bones:
- - void **clear_bones** **(** **)**
- Clear all the bones in this skeleton.
- .. _class_Skeleton_find_bone:
- - :ref:`int<class_int>` **find_bone** **(** :ref:`String<class_string>` name **)** const
- Return the bone index that matches "name" as its name.
- .. _class_Skeleton_get_bone_count:
- - :ref:`int<class_int>` **get_bone_count** **(** **)** const
- Return the amount of bones in the skeleton.
- .. _class_Skeleton_get_bone_custom_pose:
- - :ref:`Transform<class_transform>` **get_bone_custom_pose** **(** :ref:`int<class_int>` bone_idx **)** const
- .. _class_Skeleton_get_bone_global_pose:
- - :ref:`Transform<class_transform>` **get_bone_global_pose** **(** :ref:`int<class_int>` bone_idx **)** const
- .. _class_Skeleton_get_bone_name:
- - :ref:`String<class_string>` **get_bone_name** **(** :ref:`int<class_int>` bone_idx **)** const
- Return the name of the bone at index "index"
- .. _class_Skeleton_get_bone_parent:
- - :ref:`int<class_int>` **get_bone_parent** **(** :ref:`int<class_int>` bone_idx **)** const
- Return the bone index which is the parent of the bone at "bone_idx". If -1, then bone has no parent. Note that the parent bone returned will always be less than "bone_idx".
- .. _class_Skeleton_get_bone_pose:
- - :ref:`Transform<class_transform>` **get_bone_pose** **(** :ref:`int<class_int>` bone_idx **)** const
- Return the pose transform for bone "bone_idx".
- .. _class_Skeleton_get_bone_rest:
- - :ref:`Transform<class_transform>` **get_bone_rest** **(** :ref:`int<class_int>` bone_idx **)** const
- Return the rest transform for a bone "bone_idx".
- .. _class_Skeleton_get_bone_transform:
- - :ref:`Transform<class_transform>` **get_bone_transform** **(** :ref:`int<class_int>` bone_idx **)** const
- .. _class_Skeleton_get_bound_child_nodes_to_bone:
- - :ref:`Array<class_array>` **get_bound_child_nodes_to_bone** **(** :ref:`int<class_int>` bone_idx **)** const
- Deprecated soon.
- .. _class_Skeleton_is_bone_rest_disabled:
- - :ref:`bool<class_bool>` **is_bone_rest_disabled** **(** :ref:`int<class_int>` bone_idx **)** const
- .. _class_Skeleton_set_bone_custom_pose:
- - void **set_bone_custom_pose** **(** :ref:`int<class_int>` bone_idx, :ref:`Transform<class_transform>` custom_pose **)**
- .. _class_Skeleton_set_bone_disable_rest:
- - void **set_bone_disable_rest** **(** :ref:`int<class_int>` bone_idx, :ref:`bool<class_bool>` disable **)**
- .. _class_Skeleton_set_bone_global_pose:
- - void **set_bone_global_pose** **(** :ref:`int<class_int>` bone_idx, :ref:`Transform<class_transform>` pose **)**
- .. _class_Skeleton_set_bone_parent:
- - void **set_bone_parent** **(** :ref:`int<class_int>` bone_idx, :ref:`int<class_int>` parent_idx **)**
- Set the bone index "parent_idx" as the parent of the bone at "bone_idx". If -1, then bone has no parent. Note: "parent_idx" must be less than "bone_idx".
- .. _class_Skeleton_set_bone_pose:
- - void **set_bone_pose** **(** :ref:`int<class_int>` bone_idx, :ref:`Transform<class_transform>` pose **)**
- Return the pose transform for bone "bone_idx".
- .. _class_Skeleton_set_bone_rest:
- - void **set_bone_rest** **(** :ref:`int<class_int>` bone_idx, :ref:`Transform<class_transform>` rest **)**
- Set the rest transform for bone "bone_idx"
- .. _class_Skeleton_unbind_child_node_from_bone:
- - void **unbind_child_node_from_bone** **(** :ref:`int<class_int>` bone_idx, :ref:`Node<class_node>` node **)**
- Deprecated soon.
- .. _class_Skeleton_unparent_bone_and_rest:
- - void **unparent_bone_and_rest** **(** :ref:`int<class_int>` bone_idx **)**
|