Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion classes/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -6434,7 +6434,7 @@ Converts one or more arguments of any type to string in the best way possible an



\ **Note:** Consider using :ref:`push_error<class_@GlobalScope_method_push_error>` and :ref:`push_warning<class_@GlobalScope_method_push_warning>` to print error and warning messages instead of :ref:`print<class_@GlobalScope_method_print>` or :ref:`print_rich<class_@GlobalScope_method_print_rich>`. This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed.
\ **Note:** Consider using :ref:`push_error<class_@GlobalScope_method_push_error>` and :ref:`push_warning<class_@GlobalScope_method_push_warning>` to print error and warning messages instead of :ref:`print<class_@GlobalScope_method_print>` or :ref:`print_rich<class_@GlobalScope_method_print_rich>`. This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed. See also :ref:`Engine.print_to_stdout<class_Engine_property_print_to_stdout>` and :ref:`ProjectSettings.application/run/disable_stdout<class_ProjectSettings_property_application/run/disable_stdout>`.

.. rst-class:: classref-item-separator

Expand Down
14 changes: 14 additions & 0 deletions classes/class_animation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ Methods
+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :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| |
Expand Down Expand Up @@ -951,6 +953,18 @@ Returns the arguments values to be called on a method track for a given key in a

----

.. _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>`

Optimize the animation and all its tracks in-place. This will preserve only as many keys as are necessary to keep the animation within the specified bounds.

.. rst-class:: classref-item-separator

----

.. _class_Animation_method_position_track_insert_key:

.. rst-class:: classref-method
Expand Down
28 changes: 28 additions & 0 deletions classes/class_array.rst
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ Methods
+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Variant<class_Variant>` | :ref:`front<class_Array_method_front>`\ (\ ) |const| |
+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Variant<class_Variant>` | :ref:`get<class_Array_method_get>`\ (\ index\: :ref:`int<class_int>`\ ) |const| |
+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_typed_builtin<class_Array_method_get_typed_builtin>`\ (\ ) |const| |
+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`StringName<class_StringName>` | :ref:`get_typed_class_name<class_Array_method_get_typed_class_name>`\ (\ ) |const| |
Expand Down Expand Up @@ -187,6 +189,8 @@ Methods
+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`rfind_custom<class_Array_method_rfind_custom>`\ (\ method\: :ref:`Callable<class_Callable>`, from\: :ref:`int<class_int>` = -1\ ) |const| |
+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set<class_Array_method_set>`\ (\ index\: :ref:`int<class_int>`, value\: :ref:`Variant<class_Variant>`\ ) |
+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`shuffle<class_Array_method_shuffle>`\ (\ ) |
+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`size<class_Array_method_size>`\ (\ ) |const| |
Expand Down Expand Up @@ -802,6 +806,18 @@ Returns the first element of the array. If the array is empty, fails and returns

----

.. _class_Array_method_get:

.. rst-class:: classref-method

:ref:`Variant<class_Variant>` **get**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Array_method_get>`

Returns the element at the given ``index`` in the array. This is the same as using the ``[]`` operator (``array[index]``).

.. rst-class:: classref-item-separator

----

.. _class_Array_method_get_typed_builtin:

.. rst-class:: classref-method
Expand Down Expand Up @@ -1253,6 +1269,18 @@ Returns the index of the **last** element of the array that causes ``method`` to

----

.. _class_Array_method_set:

.. rst-class:: classref-method

|void| **set**\ (\ index\: :ref:`int<class_int>`, value\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_Array_method_set>`

Sets the value of the element at the given ``index`` to the given ``value``. This will not change the size of the array, it only changes the value at an index already in the array. This is the same as using the ``[]`` operator (``array[index] = value``).

.. rst-class:: classref-item-separator

----

.. _class_Array_method_shuffle:

.. rst-class:: classref-method
Expand Down
4 changes: 3 additions & 1 deletion classes/class_basebutton.rst
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ To allow both left-click and right-click, use ``MOUSE_BUTTON_MASK_LEFT | MOUSE_B

If ``true``, the button's state is pressed. Means the button is pressed down or toggled (if :ref:`toggle_mode<class_BaseButton_property_toggle_mode>` is active). Only works if :ref:`toggle_mode<class_BaseButton_property_toggle_mode>` is ``true``.

\ **Note:** Setting :ref:`button_pressed<class_BaseButton_property_button_pressed>` will result in :ref:`toggled<class_BaseButton_signal_toggled>` to be emitted. If you want to change the pressed state without emitting that signal, use :ref:`set_pressed_no_signal<class_BaseButton_method_set_pressed_no_signal>`.
\ **Note:** Changing the value of :ref:`button_pressed<class_BaseButton_property_button_pressed>` will result in :ref:`toggled<class_BaseButton_signal_toggled>` to be emitted. If you want to change the pressed state without emitting that signal, use :ref:`set_pressed_no_signal<class_BaseButton_method_set_pressed_no_signal>`.

.. rst-class:: classref-item-separator

Expand Down Expand Up @@ -377,6 +377,8 @@ If ``true``, the button will highlight for a short amount of time when its short

If ``true``, the button will add information about its shortcut in the tooltip.

\ **Note:** This property does nothing when the tooltip control is customized using :ref:`Control._make_custom_tooltip<class_Control_private_method__make_custom_tooltip>`.

.. rst-class:: classref-item-separator

----
Expand Down
85 changes: 76 additions & 9 deletions classes/class_camerafeed.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ Properties
+---------------------------------------+-----------------------------------------------------------------+------------------------------------+
| :ref:`Transform2D<class_Transform2D>` | :ref:`feed_transform<class_CameraFeed_property_feed_transform>` | ``Transform2D(1, 0, 0, -1, 0, 1)`` |
+---------------------------------------+-----------------------------------------------------------------+------------------------------------+
| :ref:`Array<class_Array>` | :ref:`formats<class_CameraFeed_property_formats>` | ``[]`` |
+---------------------------------------+-----------------------------------------------------------------+------------------------------------+

.. rst-class:: classref-reftable-group

Expand All @@ -45,15 +47,46 @@ Methods
.. table::
:widths: auto

+---------------------------------------------------+-------------------------------------------------------------------------+
| :ref:`FeedDataType<enum_CameraFeed_FeedDataType>` | :ref:`get_datatype<class_CameraFeed_method_get_datatype>`\ (\ ) |const| |
+---------------------------------------------------+-------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_id<class_CameraFeed_method_get_id>`\ (\ ) |const| |
+---------------------------------------------------+-------------------------------------------------------------------------+
| :ref:`String<class_String>` | :ref:`get_name<class_CameraFeed_method_get_name>`\ (\ ) |const| |
+---------------------------------------------------+-------------------------------------------------------------------------+
| :ref:`FeedPosition<enum_CameraFeed_FeedPosition>` | :ref:`get_position<class_CameraFeed_method_get_position>`\ (\ ) |const| |
+---------------------------------------------------+-------------------------------------------------------------------------+
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`FeedDataType<enum_CameraFeed_FeedDataType>` | :ref:`get_datatype<class_CameraFeed_method_get_datatype>`\ (\ ) |const| |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_id<class_CameraFeed_method_get_id>`\ (\ ) |const| |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`String<class_String>` | :ref:`get_name<class_CameraFeed_method_get_name>`\ (\ ) |const| |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`FeedPosition<enum_CameraFeed_FeedPosition>` | :ref:`get_position<class_CameraFeed_method_get_position>`\ (\ ) |const| |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`set_format<class_CameraFeed_method_set_format>`\ (\ index\: :ref:`int<class_int>`, parameters\: :ref:`Dictionary<class_Dictionary>`\ ) |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+

.. rst-class:: classref-section-separator

----

.. rst-class:: classref-descriptions-group

Signals
-------

.. _class_CameraFeed_signal_format_changed:

.. rst-class:: classref-signal

**format_changed**\ (\ ) :ref:`🔗<class_CameraFeed_signal_format_changed>`

Emitted when the format has changed.

.. rst-class:: classref-item-separator

----

.. _class_CameraFeed_signal_frame_changed:

.. rst-class:: classref-signal

**frame_changed**\ (\ ) :ref:`🔗<class_CameraFeed_signal_frame_changed>`

Emitted when a new frame is available.

.. rst-class:: classref-section-separator

Expand Down Expand Up @@ -175,6 +208,22 @@ If ``true``, the feed is active.

The transform applied to the camera's image.

.. rst-class:: classref-item-separator

----

.. _class_CameraFeed_property_formats:

.. rst-class:: classref-property

:ref:`Array<class_Array>` **formats** = ``[]`` :ref:`🔗<class_CameraFeed_property_formats>`

.. rst-class:: classref-property-setget

- :ref:`Array<class_Array>` **get_formats**\ (\ )

Formats supported by the feed. Each entry is a :ref:`Dictionary<class_Dictionary>` describing format parameters.

.. rst-class:: classref-section-separator

----
Expand Down Expand Up @@ -228,6 +277,24 @@ Returns the camera's name.

Returns the position of camera on the device.

.. rst-class:: classref-item-separator

----

.. _class_CameraFeed_method_set_format:

.. rst-class:: classref-method

:ref:`bool<class_bool>` **set_format**\ (\ index\: :ref:`int<class_int>`, parameters\: :ref:`Dictionary<class_Dictionary>`\ ) :ref:`🔗<class_CameraFeed_method_set_format>`

Sets the feed format parameters for the given index in the :ref:`formats<class_CameraFeed_property_formats>` array. Returns ``true`` on success. By default YUYV encoded stream is transformed to FEED_RGB. YUYV encoded stream output format can be changed with ``parameters``.output value:

\ ``separate`` will result in FEED_YCBCR_SEP

\ ``grayscale`` will result in desaturated FEED_RGB

\ ``copy`` will result in FEED_YCBCR

.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
Expand Down
2 changes: 1 addition & 1 deletion classes/class_cameraserver.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The **CameraServer** keeps track of different cameras accessible in Godot. These

It is notably used to provide AR modules with a video feed from the camera.

\ **Note:** This class is currently only implemented on macOS and iOS. To get a :ref:`CameraFeed<class_CameraFeed>` on iOS, the camera plugin from `godot-ios-plugins <https://github.com/godotengine/godot-ios-plugins>`__ is required. On other platforms, no :ref:`CameraFeed<class_CameraFeed>`\ s will be available.
\ **Note:** This class is currently only implemented on Linux, macOS, and iOS, on other platforms no :ref:`CameraFeed<class_CameraFeed>`\ s will be available. To get a :ref:`CameraFeed<class_CameraFeed>` on iOS, the camera plugin from `godot-ios-plugins <https://github.com/godotengine/godot-ios-plugins>`__ is required.

.. rst-class:: classref-reftable-group

Expand Down
Loading