:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/SkeletonProfile.xml. .. _class_SkeletonProfile: SkeletonProfile =============== **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` **Inherited By:** :ref:`SkeletonProfileHumanoid` Profile of a virtual skeleton used as a target for retargeting. Description ----------- This resource is used in :ref:`EditorScenePostImport`. Some parameters are referring to bones in :ref:`Skeleton3D`, :ref:`Skin`, :ref:`Animation`, and some other nodes are rewritten based on the parameters of ``SkeletonProfile``. Properties ---------- +-----------------------+--------------------------------------------------------------+-------+ | :ref:`int` | :ref:`bone_size` | ``0`` | +-----------------------+--------------------------------------------------------------+-------+ | :ref:`int` | :ref:`group_size` | ``0`` | +-----------------------+--------------------------------------------------------------+-------+ Methods ------- +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`find_bone` **(** :ref:`StringName` bone_name **)** |const| | +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`StringName` | :ref:`get_bone_name` **(** :ref:`int` bone_idx **)** |const| | +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`StringName` | :ref:`get_bone_parent` **(** :ref:`int` bone_idx **)** |const| | +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`StringName` | :ref:`get_bone_tail` **(** :ref:`int` bone_idx **)** |const| | +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`StringName` | :ref:`get_group` **(** :ref:`int` bone_idx **)** |const| | +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`StringName` | :ref:`get_group_name` **(** :ref:`int` group_idx **)** |const| | +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_handle_offset` **(** :ref:`int` bone_idx **)** |const| | +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform3D` | :ref:`get_reference_pose` **(** :ref:`int` bone_idx **)** |const| | +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`TailDirection` | :ref:`get_tail_direction` **(** :ref:`int` bone_idx **)** |const| | +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Texture2D` | :ref:`get_texture` **(** :ref:`int` group_idx **)** |const| | +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_bone_name` **(** :ref:`int` bone_idx, :ref:`StringName` bone_name **)** | +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_bone_parent` **(** :ref:`int` bone_idx, :ref:`StringName` bone_parent **)** | +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_bone_tail` **(** :ref:`int` bone_idx, :ref:`StringName` bone_tail **)** | +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_group` **(** :ref:`int` bone_idx, :ref:`StringName` group **)** | +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_group_name` **(** :ref:`int` group_idx, :ref:`StringName` group_name **)** | +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_handle_offset` **(** :ref:`int` bone_idx, :ref:`Vector2` handle_offset **)** | +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_reference_pose` **(** :ref:`int` bone_idx, :ref:`Transform3D` bone_name **)** | +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_tail_direction` **(** :ref:`int` bone_idx, :ref:`TailDirection` tail_direction **)** | +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_texture` **(** :ref:`int` group_idx, :ref:`Texture2D` texture **)** | +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- .. _class_SkeletonProfile_signal_profile_updated: - **profile_updated** **(** **)** This signal is emitted when change the value in profile. This is used to update key name in the :ref:`BoneMap` and to redraw the :ref:`BoneMap` editor. \ **Note**: This signal is not connected directly to editor to simplify the reference, instead it is passed on to editor through the :ref:`BoneMap`. Enumerations ------------ .. _enum_SkeletonProfile_TailDirection: .. _class_SkeletonProfile_constant_TAIL_DIRECTION_AVERAGE_CHILDREN: .. _class_SkeletonProfile_constant_TAIL_DIRECTION_SPECIFIC_CHILD: .. _class_SkeletonProfile_constant_TAIL_DIRECTION_END: enum **TailDirection**: - **TAIL_DIRECTION_AVERAGE_CHILDREN** = **0** --- Direction to the average coordinates of bone children. - **TAIL_DIRECTION_SPECIFIC_CHILD** = **1** --- Direction to the coordinates of specified bone child. - **TAIL_DIRECTION_END** = **2** --- Direction is not calculated. Property Descriptions --------------------- .. _class_SkeletonProfile_property_bone_size: - :ref:`int` **bone_size** +-----------+----------------------+ | *Default* | ``0`` | +-----------+----------------------+ | *Setter* | set_bone_size(value) | +-----------+----------------------+ | *Getter* | get_bone_size() | +-----------+----------------------+ ---- .. _class_SkeletonProfile_property_group_size: - :ref:`int` **group_size** +-----------+-----------------------+ | *Default* | ``0`` | +-----------+-----------------------+ | *Setter* | set_group_size(value) | +-----------+-----------------------+ | *Getter* | get_group_size() | +-----------+-----------------------+ Method Descriptions ------------------- .. _class_SkeletonProfile_method_find_bone: - :ref:`int` **find_bone** **(** :ref:`StringName` bone_name **)** |const| Returns the bone index that matches ``bone_name`` as its name. ---- .. _class_SkeletonProfile_method_get_bone_name: - :ref:`StringName` **get_bone_name** **(** :ref:`int` bone_idx **)** |const| Returns the name of the bone at ``bone_idx`` that will be the key name in the :ref:`BoneMap`. In the retargeting process, the returned bone name is the bone name of the target skeleton. ---- .. _class_SkeletonProfile_method_get_bone_parent: - :ref:`StringName` **get_bone_parent** **(** :ref:`int` bone_idx **)** |const| Returns the name of the bone which is the parent to the bone at ``bone_idx``. The result is empty if the bone has no parent. ---- .. _class_SkeletonProfile_method_get_bone_tail: - :ref:`StringName` **get_bone_tail** **(** :ref:`int` bone_idx **)** |const| Returns the name of the bone which is the tail of the bone at ``bone_idx``. ---- .. _class_SkeletonProfile_method_get_group: - :ref:`StringName` **get_group** **(** :ref:`int` bone_idx **)** |const| Returns the group of the bone at ``bone_idx``. ---- .. _class_SkeletonProfile_method_get_group_name: - :ref:`StringName` **get_group_name** **(** :ref:`int` group_idx **)** |const| Returns the name of the group at ``group_idx`` that will be the drawing group in the :ref:`BoneMap` editor. ---- .. _class_SkeletonProfile_method_get_handle_offset: - :ref:`Vector2` **get_handle_offset** **(** :ref:`int` bone_idx **)** |const| Returns the offset of the bone at ``bone_idx`` that will be the button position in the :ref:`BoneMap` editor. This is the offset with origin at the top left corner of the square. ---- .. _class_SkeletonProfile_method_get_reference_pose: - :ref:`Transform3D` **get_reference_pose** **(** :ref:`int` bone_idx **)** |const| Returns the reference pose transform for bone ``bone_idx``. ---- .. _class_SkeletonProfile_method_get_tail_direction: - :ref:`TailDirection` **get_tail_direction** **(** :ref:`int` bone_idx **)** |const| Returns the tail direction of the bone at ``bone_idx``. ---- .. _class_SkeletonProfile_method_get_texture: - :ref:`Texture2D` **get_texture** **(** :ref:`int` group_idx **)** |const| Returns the texture of the group at ``group_idx`` that will be the drawing group background image in the :ref:`BoneMap` editor. ---- .. _class_SkeletonProfile_method_set_bone_name: - void **set_bone_name** **(** :ref:`int` bone_idx, :ref:`StringName` bone_name **)** Sets the name of the bone at ``bone_idx`` that will be the key name in the :ref:`BoneMap`. In the retargeting process, the setting bone name is the bone name of the target skeleton. ---- .. _class_SkeletonProfile_method_set_bone_parent: - void **set_bone_parent** **(** :ref:`int` bone_idx, :ref:`StringName` bone_parent **)** Sets the bone with name ``bone_parent`` as the parent of the bone at ``bone_idx``. If an empty string is passed, then the bone has no parent. ---- .. _class_SkeletonProfile_method_set_bone_tail: - void **set_bone_tail** **(** :ref:`int` bone_idx, :ref:`StringName` bone_tail **)** Sets the bone with name ``bone_tail`` as the tail of the bone at ``bone_idx``. ---- .. _class_SkeletonProfile_method_set_group: - void **set_group** **(** :ref:`int` bone_idx, :ref:`StringName` group **)** Sets the group of the bone at ``bone_idx``. ---- .. _class_SkeletonProfile_method_set_group_name: - void **set_group_name** **(** :ref:`int` group_idx, :ref:`StringName` group_name **)** Sets the name of the group at ``group_idx`` that will be the drawing group in the :ref:`BoneMap` editor. ---- .. _class_SkeletonProfile_method_set_handle_offset: - void **set_handle_offset** **(** :ref:`int` bone_idx, :ref:`Vector2` handle_offset **)** Sets the offset of the bone at ``bone_idx`` that will be the button position in the :ref:`BoneMap` editor. This is the offset with origin at the top left corner of the square. ---- .. _class_SkeletonProfile_method_set_reference_pose: - void **set_reference_pose** **(** :ref:`int` bone_idx, :ref:`Transform3D` bone_name **)** Sets the reference pose transform for bone ``bone_idx``. ---- .. _class_SkeletonProfile_method_set_tail_direction: - void **set_tail_direction** **(** :ref:`int` bone_idx, :ref:`TailDirection` tail_direction **)** Sets the tail direction of the bone at ``bone_idx``. \ **Note:** This only specifies the method of calculation. The actual coordinates required should be stored in an external skeleton, so the calculation itself needs to be done externally. ---- .. _class_SkeletonProfile_method_set_texture: - void **set_texture** **(** :ref:`int` group_idx, :ref:`Texture2D` texture **)** Sets the texture of the group at ``group_idx`` that will be the drawing group background image in the :ref:`BoneMap` editor. .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`