Skip to content

Commit 80c8eea

Browse files
authored
Merge pull request #10494 from godotengine/classref/sync-abf8e1e
classref: Sync with current master branch (abf8e1e)
2 parents 8debbc2 + c2e772b commit 80c8eea

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1010
-205
lines changed

classes/[email protected]

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,6 +1040,8 @@ Converts ``what`` to ``type`` in the best way possible. The ``type`` uses the :r
10401040

10411041
:ref:`Object<class_Object>` **dict_to_inst**\ (\ dictionary\: :ref:`Dictionary<class_Dictionary>`\ ) :ref:`🔗<class_@GDScript_method_dict_to_inst>`
10421042

1043+
**Deprecated:** Consider using :ref:`JSON.to_native<class_JSON_method_to_native>` or :ref:`Object.get_property_list<class_Object_method_get_property_list>` instead.
1044+
10431045
Converts a ``dictionary`` (created with :ref:`inst_to_dict<class_@GDScript_method_inst_to_dict>`) back to an Object instance. Can be useful for deserializing.
10441046

10451047
.. rst-class:: classref-item-separator
@@ -1085,9 +1087,9 @@ Starting from ``_ready()``, ``bar()`` would print:
10851087

10861088
:ref:`Dictionary<class_Dictionary>` **inst_to_dict**\ (\ instance\: :ref:`Object<class_Object>`\ ) :ref:`🔗<class_@GDScript_method_inst_to_dict>`
10871089

1088-
Returns the passed ``instance`` converted to a Dictionary. Can be useful for serializing.
1090+
**Deprecated:** Consider using :ref:`JSON.from_native<class_JSON_method_from_native>` or :ref:`Object.get_property_list<class_Object_method_get_property_list>` instead.
10891091

1090-
\ **Note:** Cannot be used to serialize objects with built-in scripts attached or objects allocated within built-in scripts.
1092+
Returns the passed ``instance`` converted to a Dictionary. Can be useful for serializing.
10911093

10921094
::
10931095

@@ -1104,6 +1106,10 @@ Prints out:
11041106
[@subpath, @path, foo]
11051107
[, res://test.gd, bar]
11061108
1109+
\ **Note:** This function can only be used to serialize objects with an attached :ref:`GDScript<class_GDScript>` stored in a separate file. Objects without an attached script, with a script written in another language, or with a built-in script are not supported.
1110+
1111+
\ **Note:** This function is not recursive, which means that nested objects will not be represented as dictionaries. Also, properties passed by reference (:ref:`Object<class_Object>`, :ref:`Dictionary<class_Dictionary>`, :ref:`Array<class_Array>`, and packed arrays) are copied by reference, not duplicated.
1112+
11071113
.. rst-class:: classref-item-separator
11081114

11091115
----

classes/class_audiostreammp3.rst

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ Description
2121

2222
MP3 audio stream driver. See :ref:`data<class_AudioStreamMP3_property_data>` if you want to load an MP3 file at run-time.
2323

24+
\ **Note:** This class can optionally support legacy MP1 and MP2 formats, provided that the engine is compiled with the ``minimp3_extra_formats=yes`` SCons option. These extra formats are not enabled by default.
25+
2426
.. rst-class:: classref-reftable-group
2527

2628
Properties
@@ -43,6 +45,20 @@ Properties
4345
| :ref:`float<class_float>` | :ref:`loop_offset<class_AudioStreamMP3_property_loop_offset>` | ``0.0`` |
4446
+-----------------------------------------------+---------------------------------------------------------------+-----------------------+
4547

48+
.. rst-class:: classref-reftable-group
49+
50+
Methods
51+
-------
52+
53+
.. table::
54+
:widths: auto
55+
56+
+---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
57+
| :ref:`AudioStreamMP3<class_AudioStreamMP3>` | :ref:`load_from_buffer<class_AudioStreamMP3_method_load_from_buffer>`\ (\ stream_data\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) |static| |
58+
+---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
59+
| :ref:`AudioStreamMP3<class_AudioStreamMP3>` | :ref:`load_from_file<class_AudioStreamMP3_method_load_from_file>`\ (\ path\: :ref:`String<class_String>`\ ) |static| |
60+
+---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
61+
4662
.. rst-class:: classref-section-separator
4763

4864
----
@@ -183,6 +199,35 @@ If ``true``, the stream will automatically loop when it reaches the end.
183199

184200
Time in seconds at which the stream starts after being looped.
185201

202+
.. rst-class:: classref-section-separator
203+
204+
----
205+
206+
.. rst-class:: classref-descriptions-group
207+
208+
Method Descriptions
209+
-------------------
210+
211+
.. _class_AudioStreamMP3_method_load_from_buffer:
212+
213+
.. rst-class:: classref-method
214+
215+
:ref:`AudioStreamMP3<class_AudioStreamMP3>` **load_from_buffer**\ (\ stream_data\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) |static| :ref:`🔗<class_AudioStreamMP3_method_load_from_buffer>`
216+
217+
Creates a new **AudioStreamMP3** instance from the given buffer. The buffer must contain MP3 data.
218+
219+
.. rst-class:: classref-item-separator
220+
221+
----
222+
223+
.. _class_AudioStreamMP3_method_load_from_file:
224+
225+
.. rst-class:: classref-method
226+
227+
:ref:`AudioStreamMP3<class_AudioStreamMP3>` **load_from_file**\ (\ path\: :ref:`String<class_String>`\ ) |static| :ref:`🔗<class_AudioStreamMP3_method_load_from_file>`
228+
229+
Creates a new **AudioStreamMP3** instance from the given file path. The file must be in MP3 format.
230+
186231
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
187232
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
188233
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`

classes/class_audiostreamoggvorbis.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ Methods
5858
.. table::
5959
:widths: auto
6060

61-
+---------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
62-
| :ref:`AudioStreamOggVorbis<class_AudioStreamOggVorbis>` | :ref:`load_from_buffer<class_AudioStreamOggVorbis_method_load_from_buffer>`\ (\ buffer\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) |static| |
63-
+---------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
64-
| :ref:`AudioStreamOggVorbis<class_AudioStreamOggVorbis>` | :ref:`load_from_file<class_AudioStreamOggVorbis_method_load_from_file>`\ (\ path\: :ref:`String<class_String>`\ ) |static| |
65-
+---------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
61+
+---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
62+
| :ref:`AudioStreamOggVorbis<class_AudioStreamOggVorbis>` | :ref:`load_from_buffer<class_AudioStreamOggVorbis_method_load_from_buffer>`\ (\ stream_data\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) |static| |
63+
+---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
64+
| :ref:`AudioStreamOggVorbis<class_AudioStreamOggVorbis>` | :ref:`load_from_file<class_AudioStreamOggVorbis_method_load_from_file>`\ (\ path\: :ref:`String<class_String>`\ ) |static| |
65+
+---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
6666

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

@@ -190,9 +190,9 @@ Method Descriptions
190190

191191
.. rst-class:: classref-method
192192

193-
:ref:`AudioStreamOggVorbis<class_AudioStreamOggVorbis>` **load_from_buffer**\ (\ buffer\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) |static| :ref:`🔗<class_AudioStreamOggVorbis_method_load_from_buffer>`
193+
:ref:`AudioStreamOggVorbis<class_AudioStreamOggVorbis>` **load_from_buffer**\ (\ stream_data\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) |static| :ref:`🔗<class_AudioStreamOggVorbis_method_load_from_buffer>`
194194

195-
Creates a new AudioStreamOggVorbis instance from the given buffer. The buffer must contain Ogg Vorbis data.
195+
Creates a new **AudioStreamOggVorbis** instance from the given buffer. The buffer must contain Ogg Vorbis data.
196196

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

@@ -204,7 +204,7 @@ Creates a new AudioStreamOggVorbis instance from the given buffer. The buffer mu
204204

205205
:ref:`AudioStreamOggVorbis<class_AudioStreamOggVorbis>` **load_from_file**\ (\ path\: :ref:`String<class_String>`\ ) |static| :ref:`🔗<class_AudioStreamOggVorbis_method_load_from_file>`
206206

207-
Creates a new AudioStreamOggVorbis instance from the given file path. The file must be in Ogg Vorbis format.
207+
Creates a new **AudioStreamOggVorbis** instance from the given file path. The file must be in Ogg Vorbis format.
208208

209209
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
210210
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`

classes/class_audiostreamwav.rst

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ Methods
6262
.. table::
6363
:widths: auto
6464

65-
+---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
66-
| :ref:`AudioStreamWAV<class_AudioStreamWAV>` | :ref:`load_from_buffer<class_AudioStreamWAV_method_load_from_buffer>`\ (\ buffer\: :ref:`PackedByteArray<class_PackedByteArray>`, options\: :ref:`Dictionary<class_Dictionary>` = {}\ ) |static| |
67-
+---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
68-
| :ref:`AudioStreamWAV<class_AudioStreamWAV>` | :ref:`load_from_file<class_AudioStreamWAV_method_load_from_file>`\ (\ path\: :ref:`String<class_String>`, options\: :ref:`Dictionary<class_Dictionary>` = {}\ ) |static| |
69-
+---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
70-
| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`save_to_wav<class_AudioStreamWAV_method_save_to_wav>`\ (\ path\: :ref:`String<class_String>`\ ) |
71-
+---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
65+
+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
66+
| :ref:`AudioStreamWAV<class_AudioStreamWAV>` | :ref:`load_from_buffer<class_AudioStreamWAV_method_load_from_buffer>`\ (\ stream_data\: :ref:`PackedByteArray<class_PackedByteArray>`, options\: :ref:`Dictionary<class_Dictionary>` = {}\ ) |static| |
67+
+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
68+
| :ref:`AudioStreamWAV<class_AudioStreamWAV>` | :ref:`load_from_file<class_AudioStreamWAV_method_load_from_file>`\ (\ path\: :ref:`String<class_String>`, options\: :ref:`Dictionary<class_Dictionary>` = {}\ ) |static| |
69+
+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
70+
| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`save_to_wav<class_AudioStreamWAV_method_save_to_wav>`\ (\ path\: :ref:`String<class_String>`\ ) |
71+
+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
7272

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

@@ -306,11 +306,11 @@ Method Descriptions
306306

307307
.. rst-class:: classref-method
308308

309-
:ref:`AudioStreamWAV<class_AudioStreamWAV>` **load_from_buffer**\ (\ buffer\: :ref:`PackedByteArray<class_PackedByteArray>`, options\: :ref:`Dictionary<class_Dictionary>` = {}\ ) |static| :ref:`🔗<class_AudioStreamWAV_method_load_from_buffer>`
309+
:ref:`AudioStreamWAV<class_AudioStreamWAV>` **load_from_buffer**\ (\ stream_data\: :ref:`PackedByteArray<class_PackedByteArray>`, options\: :ref:`Dictionary<class_Dictionary>` = {}\ ) |static| :ref:`🔗<class_AudioStreamWAV_method_load_from_buffer>`
310310

311-
Creates a new **AudioStreamWAV** instance from the given buffer. The keys and values of ``options`` match the properties of :ref:`ResourceImporterWAV<class_ResourceImporterWAV>`.
311+
Creates a new **AudioStreamWAV** instance from the given buffer. The buffer must contain WAV data.
312312

313-
The usage of ``options`` is identical to :ref:`load_from_file<class_AudioStreamWAV_method_load_from_file>`.
313+
The keys and values of ``options`` match the properties of :ref:`ResourceImporterWAV<class_ResourceImporterWAV>`. The usage of ``options`` is identical to :ref:`load_from_file<class_AudioStreamWAV_method_load_from_file>`.
314314

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

@@ -322,7 +322,9 @@ The usage of ``options`` is identical to :ref:`load_from_file<class_AudioStreamW
322322

323323
:ref:`AudioStreamWAV<class_AudioStreamWAV>` **load_from_file**\ (\ path\: :ref:`String<class_String>`, options\: :ref:`Dictionary<class_Dictionary>` = {}\ ) |static| :ref:`🔗<class_AudioStreamWAV_method_load_from_file>`
324324

325-
Creates a new **AudioStreamWAV** instance from the given file path. The keys and values of ``options`` match the properties of :ref:`ResourceImporterWAV<class_ResourceImporterWAV>`.
325+
Creates a new **AudioStreamWAV** instance from the given file path. The file must be in WAV format.
326+
327+
The keys and values of ``options`` match the properties of :ref:`ResourceImporterWAV<class_ResourceImporterWAV>`.
326328

327329
\ **Example:** Load the first file dropped as a WAV and play it:
328330

classes/class_basis.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ The order of each consecutive rotation can be changed with ``order`` (see :ref:`
489489

490490
Returns this basis's rotation as a :ref:`Quaternion<class_Quaternion>`.
491491

492-
\ **Note:** Quatenions are much more suitable for 3D math but are less intuitive. For user interfaces, consider using the :ref:`get_euler<class_Basis_method_get_euler>` method, which returns Euler angles.
492+
\ **Note:** Quaternions are much more suitable for 3D math but are less intuitive. For user interfaces, consider using the :ref:`get_euler<class_Basis_method_get_euler>` method, which returns Euler angles.
493493

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

classes/class_collisionpolygon2d.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Description
2121

2222
A node that provides a polygon shape to a :ref:`CollisionObject2D<class_CollisionObject2D>` parent and allows to edit it. The polygon can be concave or convex. This can give a detection shape to an :ref:`Area2D<class_Area2D>`, turn :ref:`PhysicsBody2D<class_PhysicsBody2D>` into a solid object, or give a hollow shape to a :ref:`StaticBody2D<class_StaticBody2D>`.
2323

24-
\ **Warning:** A non-uniformly scaled :ref:`CollisionShape2D<class_CollisionShape2D>` will likely not behave as expected. Make sure to keep its scale the same on all axes and adjust its shape resource instead.
24+
\ **Warning:** A non-uniformly scaled **CollisionPolygon2D** will likely not behave as expected. Make sure to keep its scale the same on all axes and adjust its polygon instead.
2525

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

classes/class_colorpicker.rst

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,6 @@ Theme Properties
111111
+-----------------------------------+----------------------------------------------------------------------------------------+---------+
112112
| :ref:`Texture2D<class_Texture2D>` | :ref:`color_hue<class_ColorPicker_theme_icon_color_hue>` | |
113113
+-----------------------------------+----------------------------------------------------------------------------------------+---------+
114-
| :ref:`Texture2D<class_Texture2D>` | :ref:`color_okhsl_hue<class_ColorPicker_theme_icon_color_okhsl_hue>` | |
115-
+-----------------------------------+----------------------------------------------------------------------------------------+---------+
116114
| :ref:`Texture2D<class_Texture2D>` | :ref:`expanded_arrow<class_ColorPicker_theme_icon_expanded_arrow>` | |
117115
+-----------------------------------+----------------------------------------------------------------------------------------+---------+
118116
| :ref:`Texture2D<class_Texture2D>` | :ref:`folded_arrow<class_ColorPicker_theme_icon_folded_arrow>` | |
@@ -668,18 +666,6 @@ Custom texture for the hue selection slider on the right.
668666

669667
----
670668

671-
.. _class_ColorPicker_theme_icon_color_okhsl_hue:
672-
673-
.. rst-class:: classref-themeproperty
674-
675-
:ref:`Texture2D<class_Texture2D>` **color_okhsl_hue** :ref:`🔗<class_ColorPicker_theme_icon_color_okhsl_hue>`
676-
677-
Custom texture for the H slider in the OKHSL color mode.
678-
679-
.. rst-class:: classref-item-separator
680-
681-
----
682-
683669
.. _class_ColorPicker_theme_icon_expanded_arrow:
684670

685671
.. rst-class:: classref-themeproperty

0 commit comments

Comments
 (0)