mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2025-12-31 09:49:22 +03:00
1562 lines
116 KiB
ReStructuredText
1562 lines
116 KiB
ReStructuredText
:github_url: hide
|
||
|
||
.. _class_Animation:
|
||
|
||
Animation
|
||
=========
|
||
|
||
**Успадковує:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||
|
||
Зберігає дані, які можна використовувати для анімації будь-чого в механізмі.
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
Опис
|
||
--------
|
||
|
||
Цей ресурс містить дані, які можна використовувати для анімації будь-чого в механізмі. Анімації поділені на доріжки, і кожна доріжка має бути пов’язана з вузлом. Стан цього вузла можна змінювати з часом, додаючи часові ключі (події) до треку.
|
||
|
||
|
||
.. tabs::
|
||
|
||
.. code-tab:: gdscript
|
||
|
||
# Це створює анімацію, яка змушує вузол «Ворог» рухатися праворуч
|
||
# 100 пікселів за 2,0 секунди.
|
||
var animation = Animation.new()
|
||
var track_index = animation.add_track(Animation.TYPE_VALUE)
|
||
animation.track_set_path(track_index, "Enemy:position:x")
|
||
animation.track_insert_key(індекс_доріжки, 0.0, 0)
|
||
animation.track_insert_key(track_index, 2.0, 100)
|
||
animation.length = 2,0
|
||
|
||
.. code-tab:: csharp
|
||
|
||
// Це створює анімацію, яка змушує вузол «Ворог» рухатися вправо
|
||
// 100 пікселів за 2,0 секунди.
|
||
var animation = new Animation();
|
||
int trackIndex = animation.AddTrack(Animation.TrackType.Value);
|
||
animation.TrackSetPath(trackIndex, "Enemy:position:x");
|
||
animation.TrackInsertKey(trackIndex, 0.0f, 0);
|
||
animation.TrackInsertKey(trackIndex, 2.0f, 100);
|
||
animation.Length = 2.0f;
|
||
|
||
|
||
|
||
Анімації — це лише контейнери даних, і для відтворення їх потрібно додати до таких вузлів, як :ref:`AnimationPlayer<class_AnimationPlayer>`. Доріжки анімації мають різні типи, кожна з яких має власний набір спеціальних методів. Перевірте :ref:`TrackType<enum_Animation_TrackType>`, щоб побачити доступні типи.
|
||
|
||
\ **Примітка.** Для 3D-положення/обертання/масштабу з міркувань продуктивності рекомендується використовувати спеціалізовані типи треків :ref:`TYPE_POSITION_3D<class_Animation_constant_TYPE_POSITION_3D>`, :ref:`TYPE_ROTATION_3D<class_Animation_constant_TYPE_ROTATION_3D>` і :ref:`TYPE_SCALE_3D<class_Animation_constant_TYPE_SCALE_3D>` замість :ref:`TYPE_VALUE<class_Animation_constant_TYPE_VALUE>`.
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
Посібники
|
||
------------------
|
||
|
||
- :doc:`Індекс анімаційної документації <../tutorials/animation/index>`
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
Властивості
|
||
----------------------
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+------------------------------------------+--------------------------------------------------------------------+-----------------+
|
||
| :ref:`bool<class_bool>` | :ref:`capture_included<class_Animation_property_capture_included>` | ``false`` |
|
||
+------------------------------------------+--------------------------------------------------------------------+-----------------+
|
||
| :ref:`float<class_float>` | :ref:`length<class_Animation_property_length>` | ``1.0`` |
|
||
+------------------------------------------+--------------------------------------------------------------------+-----------------+
|
||
| :ref:`LoopMode<enum_Animation_LoopMode>` | :ref:`loop_mode<class_Animation_property_loop_mode>` | ``0`` |
|
||
+------------------------------------------+--------------------------------------------------------------------+-----------------+
|
||
| :ref:`float<class_float>` | :ref:`step<class_Animation_property_step>` | ``0.033333335`` |
|
||
+------------------------------------------+--------------------------------------------------------------------+-----------------+
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
Методи
|
||
------------
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`add_marker<class_Animation_method_add_marker>`\ (\ name\: :ref:`StringName<class_StringName>`, time\: :ref:`float<class_float>`\ ) |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`add_track<class_Animation_method_add_track>`\ (\ type\: :ref:`TrackType<enum_Animation_TrackType>`, at_position\: :ref:`int<class_int>` = -1\ ) |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`StringName<class_StringName>` | :ref:`animation_track_get_key_animation<class_Animation_method_animation_track_get_key_animation>`\ (\ track_idx\: :ref:`int<class_int>`, key_idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`animation_track_insert_key<class_Animation_method_animation_track_insert_key>`\ (\ track_idx\: :ref:`int<class_int>`, time\: :ref:`float<class_float>`, animation\: :ref:`StringName<class_StringName>`\ ) |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`animation_track_set_key_animation<class_Animation_method_animation_track_set_key_animation>`\ (\ track_idx\: :ref:`int<class_int>`, key_idx\: :ref:`int<class_int>`, animation\: :ref:`StringName<class_StringName>`\ ) |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`audio_track_get_key_end_offset<class_Animation_method_audio_track_get_key_end_offset>`\ (\ track_idx\: :ref:`int<class_int>`, key_idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`audio_track_get_key_start_offset<class_Animation_method_audio_track_get_key_start_offset>`\ (\ track_idx\: :ref:`int<class_int>`, key_idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Resource<class_Resource>` | :ref:`audio_track_get_key_stream<class_Animation_method_audio_track_get_key_stream>`\ (\ track_idx\: :ref:`int<class_int>`, key_idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`audio_track_insert_key<class_Animation_method_audio_track_insert_key>`\ (\ track_idx\: :ref:`int<class_int>`, time\: :ref:`float<class_float>`, stream\: :ref:`Resource<class_Resource>`, start_offset\: :ref:`float<class_float>` = 0, end_offset\: :ref:`float<class_float>` = 0\ ) |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`audio_track_is_use_blend<class_Animation_method_audio_track_is_use_blend>`\ (\ track_idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`audio_track_set_key_end_offset<class_Animation_method_audio_track_set_key_end_offset>`\ (\ track_idx\: :ref:`int<class_int>`, key_idx\: :ref:`int<class_int>`, offset\: :ref:`float<class_float>`\ ) |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`audio_track_set_key_start_offset<class_Animation_method_audio_track_set_key_start_offset>`\ (\ track_idx\: :ref:`int<class_int>`, key_idx\: :ref:`int<class_int>`, offset\: :ref:`float<class_float>`\ ) |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`audio_track_set_key_stream<class_Animation_method_audio_track_set_key_stream>`\ (\ track_idx\: :ref:`int<class_int>`, key_idx\: :ref:`int<class_int>`, stream\: :ref:`Resource<class_Resource>`\ ) |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`audio_track_set_use_blend<class_Animation_method_audio_track_set_use_blend>`\ (\ track_idx\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Vector2<class_Vector2>` | :ref:`bezier_track_get_key_in_handle<class_Animation_method_bezier_track_get_key_in_handle>`\ (\ track_idx\: :ref:`int<class_int>`, key_idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Vector2<class_Vector2>` | :ref:`bezier_track_get_key_out_handle<class_Animation_method_bezier_track_get_key_out_handle>`\ (\ track_idx\: :ref:`int<class_int>`, key_idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`bezier_track_get_key_value<class_Animation_method_bezier_track_get_key_value>`\ (\ track_idx\: :ref:`int<class_int>`, key_idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`bezier_track_insert_key<class_Animation_method_bezier_track_insert_key>`\ (\ track_idx\: :ref:`int<class_int>`, time\: :ref:`float<class_float>`, value\: :ref:`float<class_float>`, in_handle\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0), out_handle\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0)\ ) |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`bezier_track_interpolate<class_Animation_method_bezier_track_interpolate>`\ (\ track_idx\: :ref:`int<class_int>`, time\: :ref:`float<class_float>`\ ) |const| |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`bezier_track_set_key_in_handle<class_Animation_method_bezier_track_set_key_in_handle>`\ (\ track_idx\: :ref:`int<class_int>`, key_idx\: :ref:`int<class_int>`, in_handle\: :ref:`Vector2<class_Vector2>`, balanced_value_time_ratio\: :ref:`float<class_float>` = 1.0\ ) |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`bezier_track_set_key_out_handle<class_Animation_method_bezier_track_set_key_out_handle>`\ (\ track_idx\: :ref:`int<class_int>`, key_idx\: :ref:`int<class_int>`, out_handle\: :ref:`Vector2<class_Vector2>`, balanced_value_time_ratio\: :ref:`float<class_float>` = 1.0\ ) |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`bezier_track_set_key_value<class_Animation_method_bezier_track_set_key_value>`\ (\ track_idx\: :ref:`int<class_int>`, key_idx\: :ref:`int<class_int>`, value\: :ref:`float<class_float>`\ ) |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`blend_shape_track_insert_key<class_Animation_method_blend_shape_track_insert_key>`\ (\ track_idx\: :ref:`int<class_int>`, time\: :ref:`float<class_float>`, amount\: :ref:`float<class_float>`\ ) |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`blend_shape_track_interpolate<class_Animation_method_blend_shape_track_interpolate>`\ (\ track_idx\: :ref:`int<class_int>`, time_sec\: :ref:`float<class_float>`, backward\: :ref:`bool<class_bool>` = false\ ) |const| |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`clear<class_Animation_method_clear>`\ (\ ) |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`compress<class_Animation_method_compress>`\ (\ page_size\: :ref:`int<class_int>` = 8192, fps\: :ref:`int<class_int>` = 120, split_tolerance\: :ref:`float<class_float>` = 4.0\ ) |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`copy_track<class_Animation_method_copy_track>`\ (\ track_idx\: :ref:`int<class_int>`, to_animation\: :ref:`Animation<class_Animation>`\ ) |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`find_track<class_Animation_method_find_track>`\ (\ path\: :ref:`NodePath<class_NodePath>`, type\: :ref:`TrackType<enum_Animation_TrackType>`\ ) |const| |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`StringName<class_StringName>` | :ref:`get_marker_at_time<class_Animation_method_get_marker_at_time>`\ (\ time\: :ref:`float<class_float>`\ ) |const| |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Color<class_Color>` | :ref:`get_marker_color<class_Animation_method_get_marker_color>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_marker_names<class_Animation_method_get_marker_names>`\ (\ ) |const| |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`get_marker_time<class_Animation_method_get_marker_time>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`StringName<class_StringName>` | :ref:`get_next_marker<class_Animation_method_get_next_marker>`\ (\ time\: :ref:`float<class_float>`\ ) |const| |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`StringName<class_StringName>` | :ref:`get_prev_marker<class_Animation_method_get_prev_marker>`\ (\ time\: :ref:`float<class_float>`\ ) |const| |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`get_track_count<class_Animation_method_get_track_count>`\ (\ ) |const| |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`has_marker<class_Animation_method_has_marker>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`StringName<class_StringName>` | :ref:`method_track_get_name<class_Animation_method_method_track_get_name>`\ (\ track_idx\: :ref:`int<class_int>`, key_idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Array<class_Array>` | :ref:`method_track_get_params<class_Animation_method_method_track_get_params>`\ (\ track_idx\: :ref:`int<class_int>`, key_idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`optimize<class_Animation_method_optimize>`\ (\ allowed_velocity_err\: :ref:`float<class_float>` = 0.01, allowed_angular_err\: :ref:`float<class_float>` = 0.01, precision\: :ref:`int<class_int>` = 3\ ) |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`position_track_insert_key<class_Animation_method_position_track_insert_key>`\ (\ track_idx\: :ref:`int<class_int>`, time\: :ref:`float<class_float>`, position\: :ref:`Vector3<class_Vector3>`\ ) |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Vector3<class_Vector3>` | :ref:`position_track_interpolate<class_Animation_method_position_track_interpolate>`\ (\ track_idx\: :ref:`int<class_int>`, time_sec\: :ref:`float<class_float>`, backward\: :ref:`bool<class_bool>` = false\ ) |const| |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`remove_marker<class_Animation_method_remove_marker>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`remove_track<class_Animation_method_remove_track>`\ (\ track_idx\: :ref:`int<class_int>`\ ) |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`rotation_track_insert_key<class_Animation_method_rotation_track_insert_key>`\ (\ track_idx\: :ref:`int<class_int>`, time\: :ref:`float<class_float>`, rotation\: :ref:`Quaternion<class_Quaternion>`\ ) |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Quaternion<class_Quaternion>` | :ref:`rotation_track_interpolate<class_Animation_method_rotation_track_interpolate>`\ (\ track_idx\: :ref:`int<class_int>`, time_sec\: :ref:`float<class_float>`, backward\: :ref:`bool<class_bool>` = false\ ) |const| |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`scale_track_insert_key<class_Animation_method_scale_track_insert_key>`\ (\ track_idx\: :ref:`int<class_int>`, time\: :ref:`float<class_float>`, scale\: :ref:`Vector3<class_Vector3>`\ ) |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Vector3<class_Vector3>` | :ref:`scale_track_interpolate<class_Animation_method_scale_track_interpolate>`\ (\ track_idx\: :ref:`int<class_int>`, time_sec\: :ref:`float<class_float>`, backward\: :ref:`bool<class_bool>` = false\ ) |const| |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_marker_color<class_Animation_method_set_marker_color>`\ (\ name\: :ref:`StringName<class_StringName>`, color\: :ref:`Color<class_Color>`\ ) |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`track_find_key<class_Animation_method_track_find_key>`\ (\ track_idx\: :ref:`int<class_int>`, time\: :ref:`float<class_float>`, find_mode\: :ref:`FindMode<enum_Animation_FindMode>` = 0, limit\: :ref:`bool<class_bool>` = false, backward\: :ref:`bool<class_bool>` = false\ ) |const| |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`track_get_interpolation_loop_wrap<class_Animation_method_track_get_interpolation_loop_wrap>`\ (\ track_idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`InterpolationType<enum_Animation_InterpolationType>` | :ref:`track_get_interpolation_type<class_Animation_method_track_get_interpolation_type>`\ (\ track_idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`track_get_key_count<class_Animation_method_track_get_key_count>`\ (\ track_idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`track_get_key_time<class_Animation_method_track_get_key_time>`\ (\ track_idx\: :ref:`int<class_int>`, key_idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`track_get_key_transition<class_Animation_method_track_get_key_transition>`\ (\ track_idx\: :ref:`int<class_int>`, key_idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Variant<class_Variant>` | :ref:`track_get_key_value<class_Animation_method_track_get_key_value>`\ (\ track_idx\: :ref:`int<class_int>`, key_idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`NodePath<class_NodePath>` | :ref:`track_get_path<class_Animation_method_track_get_path>`\ (\ track_idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`TrackType<enum_Animation_TrackType>` | :ref:`track_get_type<class_Animation_method_track_get_type>`\ (\ track_idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`track_insert_key<class_Animation_method_track_insert_key>`\ (\ track_idx\: :ref:`int<class_int>`, time\: :ref:`float<class_float>`, key\: :ref:`Variant<class_Variant>`, transition\: :ref:`float<class_float>` = 1\ ) |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`track_is_compressed<class_Animation_method_track_is_compressed>`\ (\ track_idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`track_is_enabled<class_Animation_method_track_is_enabled>`\ (\ track_idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`track_is_imported<class_Animation_method_track_is_imported>`\ (\ track_idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`track_move_down<class_Animation_method_track_move_down>`\ (\ track_idx\: :ref:`int<class_int>`\ ) |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`track_move_to<class_Animation_method_track_move_to>`\ (\ track_idx\: :ref:`int<class_int>`, to_idx\: :ref:`int<class_int>`\ ) |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`track_move_up<class_Animation_method_track_move_up>`\ (\ track_idx\: :ref:`int<class_int>`\ ) |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`track_remove_key<class_Animation_method_track_remove_key>`\ (\ track_idx\: :ref:`int<class_int>`, key_idx\: :ref:`int<class_int>`\ ) |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`track_remove_key_at_time<class_Animation_method_track_remove_key_at_time>`\ (\ track_idx\: :ref:`int<class_int>`, time\: :ref:`float<class_float>`\ ) |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`track_set_enabled<class_Animation_method_track_set_enabled>`\ (\ track_idx\: :ref:`int<class_int>`, enabled\: :ref:`bool<class_bool>`\ ) |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`track_set_imported<class_Animation_method_track_set_imported>`\ (\ track_idx\: :ref:`int<class_int>`, imported\: :ref:`bool<class_bool>`\ ) |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`track_set_interpolation_loop_wrap<class_Animation_method_track_set_interpolation_loop_wrap>`\ (\ track_idx\: :ref:`int<class_int>`, interpolation\: :ref:`bool<class_bool>`\ ) |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`track_set_interpolation_type<class_Animation_method_track_set_interpolation_type>`\ (\ track_idx\: :ref:`int<class_int>`, interpolation\: :ref:`InterpolationType<enum_Animation_InterpolationType>`\ ) |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`track_set_key_time<class_Animation_method_track_set_key_time>`\ (\ track_idx\: :ref:`int<class_int>`, key_idx\: :ref:`int<class_int>`, time\: :ref:`float<class_float>`\ ) |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`track_set_key_transition<class_Animation_method_track_set_key_transition>`\ (\ track_idx\: :ref:`int<class_int>`, key_idx\: :ref:`int<class_int>`, transition\: :ref:`float<class_float>`\ ) |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`track_set_key_value<class_Animation_method_track_set_key_value>`\ (\ track_idx\: :ref:`int<class_int>`, key\: :ref:`int<class_int>`, value\: :ref:`Variant<class_Variant>`\ ) |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`track_set_path<class_Animation_method_track_set_path>`\ (\ track_idx\: :ref:`int<class_int>`, path\: :ref:`NodePath<class_NodePath>`\ ) |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`track_swap<class_Animation_method_track_swap>`\ (\ track_idx\: :ref:`int<class_int>`, with_idx\: :ref:`int<class_int>`\ ) |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`UpdateMode<enum_Animation_UpdateMode>` | :ref:`value_track_get_update_mode<class_Animation_method_value_track_get_update_mode>`\ (\ track_idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Variant<class_Variant>` | :ref:`value_track_interpolate<class_Animation_method_value_track_interpolate>`\ (\ track_idx\: :ref:`int<class_int>`, time_sec\: :ref:`float<class_float>`, backward\: :ref:`bool<class_bool>` = false\ ) |const| |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`value_track_set_update_mode<class_Animation_method_value_track_set_update_mode>`\ (\ track_idx\: :ref:`int<class_int>`, mode\: :ref:`UpdateMode<enum_Animation_UpdateMode>`\ ) |
|
||
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Переліки
|
||
----------------
|
||
|
||
.. _enum_Animation_TrackType:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
enum **TrackType**: :ref:`🔗<enum_Animation_TrackType>`
|
||
|
||
.. _class_Animation_constant_TYPE_VALUE:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`TrackType<enum_Animation_TrackType>` **TYPE_VALUE** = ``0``
|
||
|
||
Доріжки значення задають значення у властивостях вузла, але тільки ті, які можна інтерполювати. Для 3D-розташування/обертання/масштабу рекомендується використовувати спеціальні типи доріжок :ref:`TYPE_POSITION_3D<class_Animation_constant_TYPE_POSITION_3D>`, :ref:`TYPE_ROTATION_3D<class_Animation_constant_TYPE_ROTATION_3D>` і :ref:`TYPE_SCALE_3D<class_Animation_constant_TYPE_SCALE_3D>` замість :ref:`TYPE_VALUE<class_Animation_constant_TYPE_VALUE>` з міркувань продуктивності.
|
||
|
||
.. _class_Animation_constant_TYPE_POSITION_3D:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`TrackType<enum_Animation_TrackType>` **TYPE_POSITION_3D** = ``1``
|
||
|
||
Доріжка 3D-розташування (значення зберігаються у :ref:`Vector3<class_Vector3>`\ ах).
|
||
|
||
.. _class_Animation_constant_TYPE_ROTATION_3D:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`TrackType<enum_Animation_TrackType>` **TYPE_ROTATION_3D** = ``2``
|
||
|
||
Доріжка 3D-обертання (значення зберігаються у :ref:`Quaternion<class_Quaternion>`\ ах).
|
||
|
||
.. _class_Animation_constant_TYPE_SCALE_3D:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`TrackType<enum_Animation_TrackType>` **TYPE_SCALE_3D** = ``3``
|
||
|
||
Доріжка 3D-масштабування (значення зберігаються в :ref:`Vector3<class_Vector3>`\ ах).
|
||
|
||
.. _class_Animation_constant_TYPE_BLEND_SHAPE:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`TrackType<enum_Animation_TrackType>` **TYPE_BLEND_SHAPE** = ``4``
|
||
|
||
Доріжка форми змішування.
|
||
|
||
.. _class_Animation_constant_TYPE_METHOD:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`TrackType<enum_Animation_TrackType>` **TYPE_METHOD** = ``5``
|
||
|
||
Доріжка методу викликає функції із заданими аргументами на кожен ключ.
|
||
|
||
.. _class_Animation_constant_TYPE_BEZIER:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`TrackType<enum_Animation_TrackType>` **TYPE_BEZIER** = ``6``
|
||
|
||
Доріжки Безьє використовуються для інтерполяції значення за допомогою користувацьких кривих. Їх також можна використовувати для анімування підвластивостей векторів і кольорів (наприклад, значення альфа-параметру :ref:`Color<class_Color>`).
|
||
|
||
.. _class_Animation_constant_TYPE_AUDIO:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`TrackType<enum_Animation_TrackType>` **TYPE_AUDIO** = ``7``
|
||
|
||
Звукові доріжки використовуються для відтворення аудіопотоку за допомогою будь-якого типу :ref:`AudioStreamPlayer<class_AudioStreamPlayer>`. Потік можна обрізати та попередньо переглянути в анімації.
|
||
|
||
.. _class_Animation_constant_TYPE_ANIMATION:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`TrackType<enum_Animation_TrackType>` **TYPE_ANIMATION** = ``8``
|
||
|
||
Доріжки анімації відтворюють анімацію в інших вузлах :ref:`AnimationPlayer<class_AnimationPlayer>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _enum_Animation_InterpolationType:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
enum **InterpolationType**: :ref:`🔗<enum_Animation_InterpolationType>`
|
||
|
||
.. _class_Animation_constant_INTERPOLATION_NEAREST:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`InterpolationType<enum_Animation_InterpolationType>` **INTERPOLATION_NEAREST** = ``0``
|
||
|
||
Без інтерполяції (найближче значення).
|
||
|
||
.. _class_Animation_constant_INTERPOLATION_LINEAR:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`InterpolationType<enum_Animation_InterpolationType>` **INTERPOLATION_LINEAR** = ``1``
|
||
|
||
Лінійна інтерполяція.
|
||
|
||
.. _class_Animation_constant_INTERPOLATION_CUBIC:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`InterpolationType<enum_Animation_InterpolationType>` **INTERPOLATION_CUBIC** = ``2``
|
||
|
||
Кубічна інтерполяція. Виглядає більш плавно, ніж лінійна інтерполяція, але більш затратна. Використовуйте значення :ref:`INTERPOLATION_LINEAR<class_Animation_constant_INTERPOLATION_LINEAR>` для складних 3D-анімацій, імпортованих із зовнішнього програмного забезпечення, навіть якщо це вимагає використання більшої частоти кадрів анімації.
|
||
|
||
.. _class_Animation_constant_INTERPOLATION_LINEAR_ANGLE:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`InterpolationType<enum_Animation_InterpolationType>` **INTERPOLATION_LINEAR_ANGLE** = ``3``
|
||
|
||
Лінійна інтерполяція з обертанням по найкоротшому шляху.
|
||
|
||
\ **Примітка:** Значення результату завжди нормалізоване і може не збігатися зі значенням ключа.
|
||
|
||
.. _class_Animation_constant_INTERPOLATION_CUBIC_ANGLE:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`InterpolationType<enum_Animation_InterpolationType>` **INTERPOLATION_CUBIC_ANGLE** = ``4``
|
||
|
||
Кубічна інтерполяція з обертанням по найкоротшому шляху.
|
||
|
||
\ **Примітка:** Значення результату завжди нормалізоване і може не збігатися зі значенням ключа.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _enum_Animation_UpdateMode:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
enum **UpdateMode**: :ref:`🔗<enum_Animation_UpdateMode>`
|
||
|
||
.. _class_Animation_constant_UPDATE_CONTINUOUS:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`UpdateMode<enum_Animation_UpdateMode>` **UPDATE_CONTINUOUS** = ``0``
|
||
|
||
Оновлення між ключовими кадрами та утриманням значення.
|
||
|
||
.. _class_Animation_constant_UPDATE_DISCRETE:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`UpdateMode<enum_Animation_UpdateMode>` **UPDATE_DISCRETE** = ``1``
|
||
|
||
Оновлення на ключових кадрах.
|
||
|
||
.. _class_Animation_constant_UPDATE_CAPTURE:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`UpdateMode<enum_Animation_UpdateMode>` **UPDATE_CAPTURE** = ``2``
|
||
|
||
Те саме, що :ref:`UPDATE_CONTINUOUS<class_Animation_constant_UPDATE_CONTINUOUS>`, але працює як прапорець для захоплення значення поточного об’єкта та виконання інтерполяції в деяких методах. Дивіться також :ref:`AnimationMixer.capture<class_AnimationMixer_property_capture>`, :ref:`AnimationPlayer.playback_auto_capture<class_AnimationPlayer_property_playback_auto_capture>` і :ref:`AnimationPlayer.play_with_capture()<class_AnimationPlayer_method_play_with_capture>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _enum_Animation_LoopMode:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
enum **LoopMode**: :ref:`🔗<enum_Animation_LoopMode>`
|
||
|
||
.. _class_Animation_constant_LOOP_NONE:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`LoopMode<enum_Animation_LoopMode>` **LOOP_NONE** = ``0``
|
||
|
||
На обох кінцях анімації відтворення анімації буде зупинено.
|
||
|
||
.. _class_Animation_constant_LOOP_LINEAR:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`LoopMode<enum_Animation_LoopMode>` **LOOP_LINEAR** = ``1``
|
||
|
||
В обох кінцях анімації анімація повторюватиметься без зміни напрямку відтворення.
|
||
|
||
.. _class_Animation_constant_LOOP_PINGPONG:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`LoopMode<enum_Animation_LoopMode>` **LOOP_PINGPONG** = ``2``
|
||
|
||
Повторюється відтворення та зворотне відтворення на обох кінцях анімації.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _enum_Animation_LoopedFlag:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
enum **LoopedFlag**: :ref:`🔗<enum_Animation_LoopedFlag>`
|
||
|
||
.. _class_Animation_constant_LOOPED_FLAG_NONE:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`LoopedFlag<enum_Animation_LoopedFlag>` **LOOPED_FLAG_NONE** = ``0``
|
||
|
||
Ця позначка вказує на те, що анімація виконується без зациклення.
|
||
|
||
.. _class_Animation_constant_LOOPED_FLAG_END:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`LoopedFlag<enum_Animation_LoopedFlag>` **LOOPED_FLAG_END** = ``1``
|
||
|
||
Ця позначка вказує на те, що анімація досягла кінця і щойно завершився цикл.
|
||
|
||
.. _class_Animation_constant_LOOPED_FLAG_START:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`LoopedFlag<enum_Animation_LoopedFlag>` **LOOPED_FLAG_START** = ``2``
|
||
|
||
Ця позначка вказує на те, що анімація досягла початку анімації і щойно завершився цикл.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _enum_Animation_FindMode:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
enum **FindMode**: :ref:`🔗<enum_Animation_FindMode>`
|
||
|
||
.. _class_Animation_constant_FIND_MODE_NEAREST:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`FindMode<enum_Animation_FindMode>` **FIND_MODE_NEAREST** = ``0``
|
||
|
||
Знаходить найближчий часовий ключ.
|
||
|
||
.. _class_Animation_constant_FIND_MODE_APPROX:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`FindMode<enum_Animation_FindMode>` **FIND_MODE_APPROX** = ``1``
|
||
|
||
Знаходить тільки ключ з наближеним часом.
|
||
|
||
.. _class_Animation_constant_FIND_MODE_EXACT:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`FindMode<enum_Animation_FindMode>` **FIND_MODE_EXACT** = ``2``
|
||
|
||
Знаходить тільки той ключ, який збігається за часом.
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Описи властивостей
|
||
------------------------------------
|
||
|
||
.. _class_Animation_property_capture_included:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **capture_included** = ``false`` :ref:`🔗<class_Animation_property_capture_included>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- :ref:`bool<class_bool>` **is_capture_included**\ (\ )
|
||
|
||
Повертає ``true``, якщо включений контроль захоплення. Це окреме значення для виконання.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_property_length:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **length** = ``1.0`` :ref:`🔗<class_Animation_property_length>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_length**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_length**\ (\ )
|
||
|
||
Загальна тривалість анімації (у секундах).
|
||
|
||
\ **Примітка:** Довжина не обмежується останнім ключем, оскільки вона може бути до, або після, кінця, щоб забезпечити правильну інтерполяцію та зациклення.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_property_loop_mode:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`LoopMode<enum_Animation_LoopMode>` **loop_mode** = ``0`` :ref:`🔗<class_Animation_property_loop_mode>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_loop_mode**\ (\ value\: :ref:`LoopMode<enum_Animation_LoopMode>`\ )
|
||
- :ref:`LoopMode<enum_Animation_LoopMode>` **get_loop_mode**\ (\ )
|
||
|
||
Визначає поведінку обох кінців часової шкали анімації під час відтворення анімації. Це вказує, чи слід перезапускати анімацію і як, а також використовується для правильної інтерполяції циклів анімації.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_property_step:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **step** = ``0.033333335`` :ref:`🔗<class_Animation_property_step>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_step**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_step**\ (\ )
|
||
|
||
Значення кроку анімації.
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Описи методів
|
||
--------------------------
|
||
|
||
.. _class_Animation_method_add_marker:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **add_marker**\ (\ name\: :ref:`StringName<class_StringName>`, time\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Animation_method_add_marker>`
|
||
|
||
Додає маркер до цієї анімації.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_add_track:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **add_track**\ (\ type\: :ref:`TrackType<enum_Animation_TrackType>`, at_position\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_Animation_method_add_track>`
|
||
|
||
Додає доріжку до анімації.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_animation_track_get_key_animation:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`StringName<class_StringName>` **animation_track_get_key_animation**\ (\ track_idx\: :ref:`int<class_int>`, key_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Animation_method_animation_track_get_key_animation>`
|
||
|
||
Повертає назву анімації за ключем, визначеним ``key_idx``. ``track_idx`` має бути індексом Доріжки Анімації.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_animation_track_insert_key:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **animation_track_insert_key**\ (\ track_idx\: :ref:`int<class_int>`, time\: :ref:`float<class_float>`, animation\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Animation_method_animation_track_insert_key>`
|
||
|
||
Вставляє ключ зі значенням ``animation`` на заданий ``time`` (у секундах). ``track_idx`` має бути індексом Доріжки Анімації.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_animation_track_set_key_animation:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **animation_track_set_key_animation**\ (\ track_idx\: :ref:`int<class_int>`, key_idx\: :ref:`int<class_int>`, animation\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Animation_method_animation_track_set_key_animation>`
|
||
|
||
Встановлює ключ, визначений ``key_idx``, на значення ``animation``. ``track_idx`` має бути індексом Доріжки Анімації.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_audio_track_get_key_end_offset:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`float<class_float>` **audio_track_get_key_end_offset**\ (\ track_idx\: :ref:`int<class_int>`, key_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Animation_method_audio_track_get_key_end_offset>`
|
||
|
||
Повертає кінцеве зміщення ключа, визначеного ``key_idx``. ``track_idx`` має бути індексом Звукової Доріжки.
|
||
|
||
Кінцеве зміщення - це кількість секунд, що відсікаються в кінці аудіопотоку.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_audio_track_get_key_start_offset:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`float<class_float>` **audio_track_get_key_start_offset**\ (\ track_idx\: :ref:`int<class_int>`, key_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Animation_method_audio_track_get_key_start_offset>`
|
||
|
||
Повертає початкове зміщення ключа, визначеного параметром ``key_idx``. ``track_idx`` має бути індексом Звукової Доріжки.
|
||
|
||
Початкове зміщення - це кількість секунд, відрізаних на початку аудіопотоку.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_audio_track_get_key_stream:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Resource<class_Resource>` **audio_track_get_key_stream**\ (\ track_idx\: :ref:`int<class_int>`, key_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Animation_method_audio_track_get_key_stream>`
|
||
|
||
Повертає аудіопотік ключа, визначеного параметром ``key_idx``. ``track_idx`` має бути індексом Звукової Доріжки.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_audio_track_insert_key:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **audio_track_insert_key**\ (\ track_idx\: :ref:`int<class_int>`, time\: :ref:`float<class_float>`, stream\: :ref:`Resource<class_Resource>`, start_offset\: :ref:`float<class_float>` = 0, end_offset\: :ref:`float<class_float>` = 0\ ) :ref:`🔗<class_Animation_method_audio_track_insert_key>`
|
||
|
||
Вставляє ключ Звукової Доріжки на заданий ``time`` у секундах. ``track_idx`` має бути індексом Звукової Доріжки.
|
||
|
||
\ ``stream`` - це ресурс :ref:`AudioStream<class_AudioStream>` для відтворення. ``start_offset`` - це кількість секунд, що відсікаються на початку аудіопотоку, а ``end_offset`` - наприкінці.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_audio_track_is_use_blend:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **audio_track_is_use_blend**\ (\ track_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Animation_method_audio_track_is_use_blend>`
|
||
|
||
Повертає ``true``, якщо доріжка ``track_idx`` буде змішана з іншими анімаціями.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_audio_track_set_key_end_offset:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **audio_track_set_key_end_offset**\ (\ track_idx\: :ref:`int<class_int>`, key_idx\: :ref:`int<class_int>`, offset\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Animation_method_audio_track_set_key_end_offset>`
|
||
|
||
Встановлює кінцеве зміщення ключа, визначеного параметром ``key_idx``, на значення ``offset``. ``track_idx`` має бути індексом Звукової Доріжки.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_audio_track_set_key_start_offset:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **audio_track_set_key_start_offset**\ (\ track_idx\: :ref:`int<class_int>`, key_idx\: :ref:`int<class_int>`, offset\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Animation_method_audio_track_set_key_start_offset>`
|
||
|
||
Встановлює початкове зміщення ключа визначеної ``key_idx``, на значення ``offset``. ``track_idx`` має бути індексом Звукової Доріжки.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_audio_track_set_key_stream:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **audio_track_set_key_stream**\ (\ track_idx\: :ref:`int<class_int>`, key_idx\: :ref:`int<class_int>`, stream\: :ref:`Resource<class_Resource>`\ ) :ref:`🔗<class_Animation_method_audio_track_set_key_stream>`
|
||
|
||
Встановлює потік ключа, визначеного ``key_idx``, на значення ``stream``. ``track_idx`` має бути індексом Звукової Доріжки.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_audio_track_set_use_blend:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **audio_track_set_use_blend**\ (\ track_idx\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Animation_method_audio_track_set_use_blend>`
|
||
|
||
Дозволяє вказати, чи буде доріжку змішано з іншими анімаціями. Якщо ``true``, гучність відтворення звуку змінюється залежно від значення змішування.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_bezier_track_get_key_in_handle:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Vector2<class_Vector2>` **bezier_track_get_key_in_handle**\ (\ track_idx\: :ref:`int<class_int>`, key_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Animation_method_bezier_track_get_key_in_handle>`
|
||
|
||
Повертає дескриптор ключа, визначеного ``key_idx``. ``track_idx`` має бути індексом Доріжки Безьє.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_bezier_track_get_key_out_handle:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Vector2<class_Vector2>` **bezier_track_get_key_out_handle**\ (\ track_idx\: :ref:`int<class_int>`, key_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Animation_method_bezier_track_get_key_out_handle>`
|
||
|
||
Повертає вихідний дескриптор ключа, визначеного ``key_idx``. ``track_idx`` має бути індексом Доріжки Безьє.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_bezier_track_get_key_value:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`float<class_float>` **bezier_track_get_key_value**\ (\ track_idx\: :ref:`int<class_int>`, key_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Animation_method_bezier_track_get_key_value>`
|
||
|
||
Повертає значення ключа, визначеного ``key_idx``. ``track_idx`` має бути індексом Доріжки Безьє.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_bezier_track_insert_key:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **bezier_track_insert_key**\ (\ track_idx\: :ref:`int<class_int>`, time\: :ref:`float<class_float>`, value\: :ref:`float<class_float>`, in_handle\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0), out_handle\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0)\ ) :ref:`🔗<class_Animation_method_bezier_track_insert_key>`
|
||
|
||
Вставляє ключ Доріжки Безьє на заданий ``time`` у секундах. ``track_idx`` має бути індексом Доріжки Безьє.
|
||
|
||
\ ``in_handle`` — вплив лівої сторони доданої точки кривої Безьє, ``out_handle`` — правої, а ``value`` — фактичне значення в цій точці.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_bezier_track_interpolate:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`float<class_float>` **bezier_track_interpolate**\ (\ track_idx\: :ref:`int<class_int>`, time\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Animation_method_bezier_track_interpolate>`
|
||
|
||
Повертає інтерпольоване значення на заданий ``time`` (у секундах). ``track_idx`` має бути індексом Доріжки Безьє.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_bezier_track_set_key_in_handle:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **bezier_track_set_key_in_handle**\ (\ track_idx\: :ref:`int<class_int>`, key_idx\: :ref:`int<class_int>`, in_handle\: :ref:`Vector2<class_Vector2>`, balanced_value_time_ratio\: :ref:`float<class_float>` = 1.0\ ) :ref:`🔗<class_Animation_method_bezier_track_set_key_in_handle>`
|
||
|
||
Встановлює для дескриптора ключа, визначеного ``key_idx``, значення ``in_handle``. ``track_idx`` має бути індексом Доріжки Безьє.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_bezier_track_set_key_out_handle:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **bezier_track_set_key_out_handle**\ (\ track_idx\: :ref:`int<class_int>`, key_idx\: :ref:`int<class_int>`, out_handle\: :ref:`Vector2<class_Vector2>`, balanced_value_time_ratio\: :ref:`float<class_float>` = 1.0\ ) :ref:`🔗<class_Animation_method_bezier_track_set_key_out_handle>`
|
||
|
||
Встановлює вихідний дескриптор ключа, визначеного ``key_idx``, на значення ``out_handle``. ``track_idx`` має бути індексом Доріжки Безьє.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_bezier_track_set_key_value:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **bezier_track_set_key_value**\ (\ track_idx\: :ref:`int<class_int>`, key_idx\: :ref:`int<class_int>`, value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Animation_method_bezier_track_set_key_value>`
|
||
|
||
Встановлює значення ключа, визначеного параметром ``key_idx``, на задане значення. ``track_idx`` має бути індексом Доріжки Безьє.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_blend_shape_track_insert_key:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **blend_shape_track_insert_key**\ (\ track_idx\: :ref:`int<class_int>`, time\: :ref:`float<class_float>`, amount\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Animation_method_blend_shape_track_insert_key>`
|
||
|
||
Вставляє ключ на задану доріжку форми змішування. Повертає індекс ключа.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_blend_shape_track_interpolate:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`float<class_float>` **blend_shape_track_interpolate**\ (\ track_idx\: :ref:`int<class_int>`, time_sec\: :ref:`float<class_float>`, backward\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_Animation_method_blend_shape_track_interpolate>`
|
||
|
||
Повертає інтерпольоване значення форми змішування в заданий час (у секундах). ``track_idx`` має бути індексом доріжки форми змішування.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_clear:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **clear**\ (\ ) :ref:`🔗<class_Animation_method_clear>`
|
||
|
||
Очистить анімацію (очищає всі доріжки і все скидає).
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_compress:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **compress**\ (\ page_size\: :ref:`int<class_int>` = 8192, fps\: :ref:`int<class_int>` = 120, split_tolerance\: :ref:`float<class_float>` = 4.0\ ) :ref:`🔗<class_Animation_method_compress>`
|
||
|
||
Стискає анімацію та всі її доріжки на місці. Це призведе до того, що :ref:`track_is_compressed()<class_Animation_method_track_is_compressed>` поверне ``true`` після виклику на цій **Animation**. Стиснуті доріжки вимагають менше пам'яті для відтворення і призначені для використання у складних 3D-анімаціях (таких як ролики), імпортованих із зовнішнього 3D-програмного забезпечення. Стиснення призводить до втрат, але в реальних умовах різниця зазвичай не помітна.
|
||
|
||
\ **Примітка:** Стиснуті доріжки мають різні обмеження (наприклад, їх не можна редагувати у редакторі), тому використовуйте стиснуту анімацію лише тоді, коли вона вам справді потрібна.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_copy_track:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **copy_track**\ (\ track_idx\: :ref:`int<class_int>`, to_animation\: :ref:`Animation<class_Animation>`\ ) :ref:`🔗<class_Animation_method_copy_track>`
|
||
|
||
Додає новий трек до ``to_animation``, який є копією заданого треку з цієї анімації.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_find_track:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **find_track**\ (\ path\: :ref:`NodePath<class_NodePath>`, type\: :ref:`TrackType<enum_Animation_TrackType>`\ ) |const| :ref:`🔗<class_Animation_method_find_track>`
|
||
|
||
Повертає індекс заданої доріжки. Якщо доріжку не знайдено, повертається -1.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_get_marker_at_time:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`StringName<class_StringName>` **get_marker_at_time**\ (\ time\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Animation_method_get_marker_at_time>`
|
||
|
||
Повертає назву маркера, розташованого в заданий час.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_get_marker_color:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Color<class_Color>` **get_marker_color**\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Animation_method_get_marker_color>`
|
||
|
||
Повертає заданий колір маркера.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_get_marker_names:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`PackedStringArray<class_PackedStringArray>` **get_marker_names**\ (\ ) |const| :ref:`🔗<class_Animation_method_get_marker_names>`
|
||
|
||
Повертає кожен маркер у цій анімації, відсортований за зростанням за часом.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_get_marker_time:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`float<class_float>` **get_marker_time**\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Animation_method_get_marker_time>`
|
||
|
||
Повертає заданий час маркера.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_get_next_marker:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`StringName<class_StringName>` **get_next_marker**\ (\ time\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Animation_method_get_next_marker>`
|
||
|
||
Повертає найближчий маркер після заданого часу. Якщо такий маркер не існує, повертається порожній рядок.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_get_prev_marker:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`StringName<class_StringName>` **get_prev_marker**\ (\ time\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Animation_method_get_prev_marker>`
|
||
|
||
Повертає найближчий маркер, який передує вказаному часу. Якщо такий маркер не існує, повертається порожній рядок.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_get_track_count:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **get_track_count**\ (\ ) |const| :ref:`🔗<class_Animation_method_get_track_count>`
|
||
|
||
Повертає кількість доріжок в анімації.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_has_marker:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **has_marker**\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Animation_method_has_marker>`
|
||
|
||
Повертає ``true``, якщо ця анімація містить маркер із вказаною назвою.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_method_track_get_name:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`StringName<class_StringName>` **method_track_get_name**\ (\ track_idx\: :ref:`int<class_int>`, key_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Animation_method_method_track_get_name>`
|
||
|
||
Повертає назву методу доріжки методу.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_method_track_get_params:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Array<class_Array>` **method_track_get_params**\ (\ track_idx\: :ref:`int<class_int>`, key_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Animation_method_method_track_get_params>`
|
||
|
||
Повертає значення аргументів, які потрібно викликати на доріжці методів для заданого ключа на даній доріжці.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_optimize:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **optimize**\ (\ allowed_velocity_err\: :ref:`float<class_float>` = 0.01, allowed_angular_err\: :ref:`float<class_float>` = 0.01, precision\: :ref:`int<class_int>` = 3\ ) :ref:`🔗<class_Animation_method_optimize>`
|
||
|
||
Оптимізуйте анімацію та всі її доріжки на місці. Це збереже лише стільки ключів, скільки необхідно для збереження анімації у вказаних межах.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_position_track_insert_key:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **position_track_insert_key**\ (\ track_idx\: :ref:`int<class_int>`, time\: :ref:`float<class_float>`, position\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_Animation_method_position_track_insert_key>`
|
||
|
||
Вставляє ключ у задану доріжку 3D-розташування. Повертає індекс ключа.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_position_track_interpolate:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Vector3<class_Vector3>` **position_track_interpolate**\ (\ track_idx\: :ref:`int<class_int>`, time_sec\: :ref:`float<class_float>`, backward\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_Animation_method_position_track_interpolate>`
|
||
|
||
Повертає інтерпольоване значення позиції в заданий час (у секундах). ``track_idx`` має бути індексом 3D-треку позиції.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_remove_marker:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **remove_marker**\ (\ name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Animation_method_remove_marker>`
|
||
|
||
Видаляє маркер із вказаною назвою з цієї анімації.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_remove_track:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **remove_track**\ (\ track_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Animation_method_remove_track>`
|
||
|
||
Видаляє доріжку, вказавши її індекс.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_rotation_track_insert_key:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **rotation_track_insert_key**\ (\ track_idx\: :ref:`int<class_int>`, time\: :ref:`float<class_float>`, rotation\: :ref:`Quaternion<class_Quaternion>`\ ) :ref:`🔗<class_Animation_method_rotation_track_insert_key>`
|
||
|
||
Вставляє ключ у задану доріжку 3D-обертання. Повертає індекс ключа.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_rotation_track_interpolate:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Quaternion<class_Quaternion>` **rotation_track_interpolate**\ (\ track_idx\: :ref:`int<class_int>`, time_sec\: :ref:`float<class_float>`, backward\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_Animation_method_rotation_track_interpolate>`
|
||
|
||
Повертає інтерпольоване значення обертання в заданий час (у секундах). ``track_idx`` має бути індексом 3D-доріжки обертання.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_scale_track_insert_key:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **scale_track_insert_key**\ (\ track_idx\: :ref:`int<class_int>`, time\: :ref:`float<class_float>`, scale\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_Animation_method_scale_track_insert_key>`
|
||
|
||
Вставляє ключ у задану доріжку 3D-масштабування. Повертає індекс ключа.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_scale_track_interpolate:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Vector3<class_Vector3>` **scale_track_interpolate**\ (\ track_idx\: :ref:`int<class_int>`, time_sec\: :ref:`float<class_float>`, backward\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_Animation_method_scale_track_interpolate>`
|
||
|
||
Повертає інтерпольоване значення масштабу в заданий час (у секундах). Параметр ``track_idx`` має бути індексом доріжки 3D-масштабування.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_set_marker_color:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_marker_color**\ (\ name\: :ref:`StringName<class_StringName>`, color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_Animation_method_set_marker_color>`
|
||
|
||
Встановлює заданий колір маркера.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_track_find_key:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **track_find_key**\ (\ track_idx\: :ref:`int<class_int>`, time\: :ref:`float<class_float>`, find_mode\: :ref:`FindMode<enum_Animation_FindMode>` = 0, limit\: :ref:`bool<class_bool>` = false, backward\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_Animation_method_track_find_key>`
|
||
|
||
Знаходить індекс ключа за часом у даній доріжці. За бажанням знайдіть його, лише якщо вказано приблизний/точний час.
|
||
|
||
Якщо ``limit`` має значення ``true``, ключі за межами діапазону анімації не повертаються.
|
||
|
||
Якщо ``backward`` має значення ``true``, напрямок змінюється на протилежний у методах, які покладаються на односпрямовану обробку.
|
||
|
||
Наприклад, якщо ``find_mode`` дорівнює :ref:`FIND_MODE_NEAREST<class_Animation_constant_FIND_MODE_NEAREST>`, якщо в поточній позиції відразу після пошуку немає ключа, перший знайдений ключ витягується шляхом пошуку перед позицією, але якщо ``backward`` дорівнює `` true``, перший знайдений ключ витягується після позиції.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_track_get_interpolation_loop_wrap:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **track_get_interpolation_loop_wrap**\ (\ track_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Animation_method_track_get_interpolation_loop_wrap>`
|
||
|
||
Повертає ``true``, якщо доріжка в ``track_idx`` обертає цикл інтерполяції. Нові доріжки обертають цикл інтерполяції за замовчуванням.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_track_get_interpolation_type:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`InterpolationType<enum_Animation_InterpolationType>` **track_get_interpolation_type**\ (\ track_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Animation_method_track_get_interpolation_type>`
|
||
|
||
Повертає тип інтерполяції заданої доріжки.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_track_get_key_count:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **track_get_key_count**\ (\ track_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Animation_method_track_get_key_count>`
|
||
|
||
Повертає кількість ключів на заданій доріжці.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_track_get_key_time:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`float<class_float>` **track_get_key_time**\ (\ track_idx\: :ref:`int<class_int>`, key_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Animation_method_track_get_key_time>`
|
||
|
||
Повертає час, на якому розміщений ключ.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_track_get_key_transition:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`float<class_float>` **track_get_key_transition**\ (\ track_idx\: :ref:`int<class_int>`, key_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Animation_method_track_get_key_transition>`
|
||
|
||
Повертає криву переходу (послаблення) для певного ключа (дивіться вбудовану математичну функцію :ref:`@GlobalScope.ease()<class_@GlobalScope_method_ease>`).
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_track_get_key_value:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Variant<class_Variant>` **track_get_key_value**\ (\ track_idx\: :ref:`int<class_int>`, key_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Animation_method_track_get_key_value>`
|
||
|
||
Повертає значення заданого ключа на заданій доріжці.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_track_get_path:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`NodePath<class_NodePath>` **track_get_path**\ (\ track_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Animation_method_track_get_path>`
|
||
|
||
Отримує шлях до доріжки. Докладнішу інформацію про формат шляху можна знайти у :ref:`track_set_path()<class_Animation_method_track_set_path>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_track_get_type:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`TrackType<enum_Animation_TrackType>` **track_get_type**\ (\ track_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Animation_method_track_get_type>`
|
||
|
||
Отримує тип доріжки.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_track_insert_key:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **track_insert_key**\ (\ track_idx\: :ref:`int<class_int>`, time\: :ref:`float<class_float>`, key\: :ref:`Variant<class_Variant>`, transition\: :ref:`float<class_float>` = 1\ ) :ref:`🔗<class_Animation_method_track_insert_key>`
|
||
|
||
Вставляє загальний ключ у задану доріжку. Повертає індекс ключа.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_track_is_compressed:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **track_is_compressed**\ (\ track_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Animation_method_track_is_compressed>`
|
||
|
||
Повертає ``true``, якщо доріжку стиснуто, інакше ``false``. Дивіться також :ref:`compress()<class_Animation_method_compress>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_track_is_enabled:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **track_is_enabled**\ (\ track_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Animation_method_track_is_enabled>`
|
||
|
||
Повертає ``true``, якщо доріжка за індексом ``track_idx`` увімкнена.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_track_is_imported:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **track_is_imported**\ (\ track_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Animation_method_track_is_imported>`
|
||
|
||
Повертає ``true``, якщо задану доріжку імпортовано. Інакше повертає ``false``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_track_move_down:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **track_move_down**\ (\ track_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Animation_method_track_move_down>`
|
||
|
||
Переміщує доріжку вниз.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_track_move_to:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **track_move_to**\ (\ track_idx\: :ref:`int<class_int>`, to_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Animation_method_track_move_to>`
|
||
|
||
Змінює індексну позицію доріжки ``track_idx`` на позицію, визначену у ``to_idx``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_track_move_up:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **track_move_up**\ (\ track_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Animation_method_track_move_up>`
|
||
|
||
Переміщує доріжку вгору.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_track_remove_key:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **track_remove_key**\ (\ track_idx\: :ref:`int<class_int>`, key_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Animation_method_track_remove_key>`
|
||
|
||
Видаляє ключ за індексом на заданій доріжці.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_track_remove_key_at_time:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **track_remove_key_at_time**\ (\ track_idx\: :ref:`int<class_int>`, time\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Animation_method_track_remove_key_at_time>`
|
||
|
||
Видаляє ключ на ``time`` у заданій доріжці.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_track_set_enabled:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **track_set_enabled**\ (\ track_idx\: :ref:`int<class_int>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Animation_method_track_set_enabled>`
|
||
|
||
Вмикає/вимикає задану доріжку. За замовчуванням доріжки увімкнені.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_track_set_imported:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **track_set_imported**\ (\ track_idx\: :ref:`int<class_int>`, imported\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Animation_method_track_set_imported>`
|
||
|
||
Визначає імпортовану доріжку як імпортовану чи ні.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_track_set_interpolation_loop_wrap:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **track_set_interpolation_loop_wrap**\ (\ track_idx\: :ref:`int<class_int>`, interpolation\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Animation_method_track_set_interpolation_loop_wrap>`
|
||
|
||
Якщо ``true``, доріжка в ``track_idx`` обертає цикл інтерполяції.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_track_set_interpolation_type:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **track_set_interpolation_type**\ (\ track_idx\: :ref:`int<class_int>`, interpolation\: :ref:`InterpolationType<enum_Animation_InterpolationType>`\ ) :ref:`🔗<class_Animation_method_track_set_interpolation_type>`
|
||
|
||
Задає тип інтерполяції для даної доріжки.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_track_set_key_time:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **track_set_key_time**\ (\ track_idx\: :ref:`int<class_int>`, key_idx\: :ref:`int<class_int>`, time\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Animation_method_track_set_key_time>`
|
||
|
||
Встановлює час існуючого ключа.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_track_set_key_transition:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **track_set_key_transition**\ (\ track_idx\: :ref:`int<class_int>`, key_idx\: :ref:`int<class_int>`, transition\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Animation_method_track_set_key_transition>`
|
||
|
||
Встановлює криву переходу (послаблення) для певного ключа (див. вбудовану математичну функцію :ref:`@GlobalScope.ease()<class_@GlobalScope_method_ease>`).
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_track_set_key_value:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **track_set_key_value**\ (\ track_idx\: :ref:`int<class_int>`, key\: :ref:`int<class_int>`, value\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_Animation_method_track_set_key_value>`
|
||
|
||
Встановлює значення існуючого ключа.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_track_set_path:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **track_set_path**\ (\ track_idx\: :ref:`int<class_int>`, path\: :ref:`NodePath<class_NodePath>`\ ) :ref:`🔗<class_Animation_method_track_set_path>`
|
||
|
||
Встановлює шлях доріжки. Шляхи мають бути дійсними шляхами дерева сцен до вузла та мають бути вказані, починаючи з :ref:`AnimationMixer.root_node<class_AnimationMixer_property_root_node>`, який відтворюватиме анімацію. Треки, які керують властивостями або кістками, мають додавати свою назву після шляху, розділеного ``":"``.
|
||
|
||
Наприклад, ``"character/skeleton:ankle"`` або ``"character/mesh:transform/local"``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_track_swap:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **track_swap**\ (\ track_idx\: :ref:`int<class_int>`, with_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Animation_method_track_swap>`
|
||
|
||
Міняє місцями індексну позицію доріжки ``track_idx`` та доріжки ``with_idx``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_value_track_get_update_mode:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`UpdateMode<enum_Animation_UpdateMode>` **value_track_get_update_mode**\ (\ track_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Animation_method_value_track_get_update_mode>`
|
||
|
||
Повертає режим оновлення значень доріжки.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_value_track_interpolate:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Variant<class_Variant>` **value_track_interpolate**\ (\ track_idx\: :ref:`int<class_int>`, time_sec\: :ref:`float<class_float>`, backward\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_Animation_method_value_track_interpolate>`
|
||
|
||
Повертає інтерпольоване значення в заданий час (у секундах). ``track_idx`` має бути індексом доріжки значення.
|
||
|
||
\ ``backward`` головним чином впливає на напрямок пошуку ключа треку з :ref:`UPDATE_DISCRETE<class_Animation_constant_UPDATE_DISCRETE>`, перетвореною :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_DISCRETE_FORCE_CONTINUOUS<class_AnimationMixer_constant_ANIMATION_CALLBACK_MODE_DISCRETE_FORCE_CONTINUOUS>`, щоб відповідати результату :ref:`track_find_key()<class_Animation_method_track_find_key>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Animation_method_value_track_set_update_mode:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **value_track_set_update_mode**\ (\ track_idx\: :ref:`int<class_int>`, mode\: :ref:`UpdateMode<enum_Animation_UpdateMode>`\ ) :ref:`🔗<class_Animation_method_value_track_set_update_mode>`
|
||
|
||
Встановлює режим оновлення відстеження вартості.
|
||
|
||
.. |virtual| replace:: :abbr:`virtual (Зазвичай, цей метод перевизначається користувачем, щоб він мав вплив.)`
|
||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||
.. |const| replace:: :abbr:`const (Цей метод не має побічних ефектів. Не змінює ніяку змінну екземпляра об'єкта.)`
|
||
.. |vararg| replace:: :abbr:`vararg (Цей метод приймає будь-яке число аргументів після описаних тут.)`
|
||
.. |constructor| replace:: :abbr:`constructor (Цей метод використовується для побудови типів.)`
|
||
.. |static| replace:: :abbr:`static (Цей метод не потребує екземпляра для виклику, його можна викликати безпосередньо за допомогою назви класу.)`
|
||
.. |operator| replace:: :abbr:`operator (Цей метод описує дійсний оператор для взаємодії з цим типом як з лівим операндом.)`
|
||
.. |bitfield| replace:: :abbr:`BitField (Це значення є цілим числом, складеним у вигляді бітової маски з наступних прапорів.)`
|
||
.. |void| replace:: :abbr:`void (Значення не повертається.)`
|