Files
godot-docs-l10n/classes/zh_Hans/class_gltfanimation.rst

132 lines
5.9 KiB
ReStructuredText

:github_url: hide
.. _class_GLTFAnimation:
GLTFAnimation
=============
**继承:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
.. container:: contribute
There is currently no description for this class. Please help us by `contributing one <https://contributing.godotengine.org/en/latest/documentation/class_reference.html>`__!
.. rst-class:: classref-introduction-group
教程
----
- :doc:`运行时文件加载与保存 <../tutorials/io/runtime_file_loading_and_saving>`
.. rst-class:: classref-reftable-group
属性
----
.. table::
:widths: auto
+-----------------------------+------------------------------------------------------------------+-----------+
| :ref:`bool<class_bool>` | :ref:`loop<class_GLTFAnimation_property_loop>` | ``false`` |
+-----------------------------+------------------------------------------------------------------+-----------+
| :ref:`String<class_String>` | :ref:`original_name<class_GLTFAnimation_property_original_name>` | ``""`` |
+-----------------------------+------------------------------------------------------------------+-----------+
.. rst-class:: classref-reftable-group
方法
----
.. table::
:widths: auto
+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Variant<class_Variant>` | :ref:`get_additional_data<class_GLTFAnimation_method_get_additional_data>`\ (\ extension_name\: :ref:`StringName<class_StringName>`\ ) |
+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_additional_data<class_GLTFAnimation_method_set_additional_data>`\ (\ extension_name\: :ref:`StringName<class_StringName>`, additional_data\: :ref:`Variant<class_Variant>`\ ) |
+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
属性说明
--------
.. _class_GLTFAnimation_property_loop:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **loop** = ``false`` :ref:`🔗<class_GLTFAnimation_property_loop>`
.. rst-class:: classref-property-setget
- |void| **set_loop**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **get_loop**\ (\ )
.. container:: contribute
There is currently no description for this property. Please help us by `contributing one <https://contributing.godotengine.org/en/latest/documentation/class_reference.html>`__!
.. rst-class:: classref-item-separator
----
.. _class_GLTFAnimation_property_original_name:
.. rst-class:: classref-property
:ref:`String<class_String>` **original_name** = ``""`` :ref:`🔗<class_GLTFAnimation_property_original_name>`
.. rst-class:: classref-property-setget
- |void| **set_original_name**\ (\ value\: :ref:`String<class_String>`\ )
- :ref:`String<class_String>` **get_original_name**\ (\ )
动画的原名。
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
方法说明
--------
.. _class_GLTFAnimation_method_get_additional_data:
.. rst-class:: classref-method
:ref:`Variant<class_Variant>` **get_additional_data**\ (\ extension_name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_GLTFAnimation_method_get_additional_data>`
在这个 **GLTFAnimation** 实例中获取额外的任意数据。这可用于将每个节点的状态数据保存在 :ref:`GLTFDocumentExtension<class_GLTFDocumentExtension>` 类中,这很重要,因为它们是无状态的。
参数应该是 :ref:`GLTFDocumentExtension<class_GLTFDocumentExtension>` 的名字(不必与 glTF 文件中的扩展名匹配),且返回值可以是你设置的任何值。如果没有设置任何内容,则返回值为 ``null``\ 。
.. rst-class:: classref-item-separator
----
.. _class_GLTFAnimation_method_set_additional_data:
.. rst-class:: classref-method
|void| **set_additional_data**\ (\ extension_name\: :ref:`StringName<class_StringName>`, additional_data\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_GLTFAnimation_method_set_additional_data>`
在这个 **GLTFAnimation** 实例中设置额外的任意数据。这可用于将每个节点的状态数据保存在 :ref:`GLTFDocumentExtension<class_GLTFDocumentExtension>` 类中,这很重要,因为它们是无状态的。
第一个参数应该是 :ref:`GLTFDocumentExtension<class_GLTFDocumentExtension>` 的名字(不必与 glTF 文件中的扩展名匹配),第二个参数可以是你想要的任何内容。
.. |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 (无返回值。)`