diff --git a/classes/class_@gdscript.rst b/classes/class_@gdscript.rst index 741629bf2..b08de8e6c 100644 --- a/classes/class_@gdscript.rst +++ b/classes/class_@gdscript.rst @@ -299,8 +299,8 @@ Returns an array with the given range. Range can be 1 argument ``N`` (0 to ``N`` Returns an array with the given range. ``range()`` can have 1 argument N (``0`` to ``N - 1``), two arguments (``initial``, ``final - 1``) or three arguments (``initial``, ``final - 1``, ``increment``). ``increment`` can be negative. If ``increment`` is negative, ``final - 1`` will become ``final + 1``. Also, the initial value must be greater than the final value for the loop to run. -:: - +\ ``range()(/code] converts all arguments to :ref:`int` before processing. +[codeblock] print(range(4)) print(range(2, 5)) print(range(0, 6, 2)) @@ -331,6 +331,21 @@ Output: 6 3 +To iterate over :ref:`float`, convert them in the loop. + +:: + + for i in range (3, 0, -1): + print(i / 10.0) + +Output: + +:: + + 0.3 + 0.2 + 0.1 + ---- .. _class_@GDScript_method_str: diff --git a/classes/class_@globalscope.rst b/classes/class_@globalscope.rst index babc262f9..7cdce8ad8 100644 --- a/classes/class_@globalscope.rst +++ b/classes/class_@globalscope.rst @@ -230,8 +230,6 @@ Methods +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`range_lerp` **(** :ref:`float` value, :ref:`float` istart, :ref:`float` istop, :ref:`float` ostart, :ref:`float` ostop **)** | +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`range_step_decimals` **(** :ref:`float` x **)** | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rid_allocate_id` **(** **)** | +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`rid_from_int64` **(** :ref:`int` base **)** | @@ -456,6 +454,8 @@ enum **InlineAlignment**: .. _enum_@GlobalScope_Key: +.. _class_@GlobalScope_constant_KEY_NONE: + .. _class_@GlobalScope_constant_KEY_SPECIAL: .. _class_@GlobalScope_constant_KEY_ESCAPE: @@ -944,6 +944,8 @@ enum **InlineAlignment**: enum **Key**: +- **KEY_NONE** = **0** --- Enum value which doesn't correspond to any key. This is used to initialize :ref:`Key` properties with a generic state. + - **KEY_SPECIAL** = **16777216** --- Keycodes with this bit applied are non-printable. - **KEY_ESCAPE** = **16777217** --- Escape key. @@ -1476,6 +1478,8 @@ enum **KeyModifierMask**: .. _enum_@GlobalScope_MouseButton: +.. _class_@GlobalScope_constant_MOUSE_BUTTON_NONE: + .. _class_@GlobalScope_constant_MOUSE_BUTTON_LEFT: .. _class_@GlobalScope_constant_MOUSE_BUTTON_RIGHT: @@ -1506,6 +1510,8 @@ enum **KeyModifierMask**: enum **MouseButton**: +- **MOUSE_BUTTON_NONE** = **0** --- Enum value which doesn't correspond to any mouse button. This is used to initialize :ref:`MouseButton` properties with a generic state. + - **MOUSE_BUTTON_LEFT** = **1** --- Left mouse button. - **MOUSE_BUTTON_RIGHT** = **2** --- Right mouse button. @@ -1688,6 +1694,8 @@ enum **JoyAxis**: .. _enum_@GlobalScope_MIDIMessage: +.. _class_@GlobalScope_constant_MIDI_MESSAGE_NONE: + .. _class_@GlobalScope_constant_MIDI_MESSAGE_NOTE_OFF: .. _class_@GlobalScope_constant_MIDI_MESSAGE_NOTE_ON: @@ -1726,6 +1734,8 @@ enum **JoyAxis**: enum **MIDIMessage**: +- **MIDI_MESSAGE_NONE** = **0** --- Enum value which doesn't correspond to any MIDI message. This is used to initialize :ref:`MIDIMessage` properties with a generic state. + - **MIDI_MESSAGE_NOTE_OFF** = **8** --- MIDI note OFF message. See the documentation of :ref:`InputEventMIDI` for information of how to use MIDI inputs. - **MIDI_MESSAGE_NOTE_ON** = **9** --- MIDI note ON message. See the documentation of :ref:`InputEventMIDI` for information of how to use MIDI inputs. @@ -2063,6 +2073,8 @@ Since :ref:`OK` has value 0, and all other failu .. _class_@GlobalScope_constant_PROPERTY_HINT_LOCALE_ID: +.. _class_@GlobalScope_constant_PROPERTY_HINT_LOCALIZABLE_STRING: + .. _class_@GlobalScope_constant_PROPERTY_HINT_MAX: enum **PropertyHint**: @@ -2164,7 +2176,9 @@ Unlike :ref:`PROPERTY_HINT_ENUM` - **PROPERTY_HINT_LOCALE_ID** = **41** --- Hints that a string property is a locale code. Editing it will show a locale dialog for picking language and country. -- **PROPERTY_HINT_MAX** = **42** +- **PROPERTY_HINT_LOCALIZABLE_STRING** = **42** --- Hints that a dictionary property is string translation map. Dictionary keys are locale codes and, values are translated strings. + +- **PROPERTY_HINT_MAX** = **43** ---- @@ -3821,12 +3835,6 @@ Maps a ``value`` from range ``[istart, istop]`` to ``[ostart, ostop]``. ---- -.. _class_@GlobalScope_method_range_step_decimals: - -- :ref:`int` **range_step_decimals** **(** :ref:`float` x **)** - ----- - .. _class_@GlobalScope_method_rid_allocate_id: - :ref:`int` **rid_allocate_id** **(** **)** diff --git a/classes/class_area2d.rst b/classes/class_area2d.rst index 49d4ef847..10b0ee464 100644 --- a/classes/class_area2d.rst +++ b/classes/class_area2d.rst @@ -110,9 +110,9 @@ Emitted when one of another Area2D's :ref:`Shape2D`\ s enters one \ ``area`` the other Area2D. -\ ``area_shape_index`` the index of the :ref:`Shape2D` of the other Area2D used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``area.shape_owner_get_owner(area_shape_index)``. +\ ``area_shape_index`` the index of the :ref:`Shape2D` of the other Area2D used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``area.shape_owner_get_owner(area.shape_find_owner(area_shape_index))``. -\ ``local_shape_index`` the index of the :ref:`Shape2D` of this Area2D used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``self.shape_owner_get_owner(local_shape_index)``. +\ ``local_shape_index`` the index of the :ref:`Shape2D` of this Area2D used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. ---- @@ -126,9 +126,9 @@ Emitted when one of another Area2D's :ref:`Shape2D`\ s exits one \ ``area`` the other Area2D. -\ ``area_shape_index`` the index of the :ref:`Shape2D` of the other Area2D used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``area.shape_owner_get_owner(area_shape_index)``. +\ ``area_shape_index`` the index of the :ref:`Shape2D` of the other Area2D used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``area.shape_owner_get_owner(area.shape_find_owner(area_shape_index))``. -\ ``local_shape_index`` the index of the :ref:`Shape2D` of this Area2D used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``self.shape_owner_get_owner(local_shape_index)``. +\ ``local_shape_index`` the index of the :ref:`Shape2D` of this Area2D used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. ---- @@ -162,9 +162,9 @@ Emitted when one of a :ref:`PhysicsBody2D` or :ref:`TileMap \ ``body`` the :ref:`Node`, if it exists in the tree, of the :ref:`PhysicsBody2D` or :ref:`TileMap`. -\ ``body_shape_index`` the index of the :ref:`Shape2D` of the :ref:`PhysicsBody2D` or :ref:`TileMap` used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``body.shape_owner_get_owner(body_shape_index)``. +\ ``body_shape_index`` the index of the :ref:`Shape2D` of the :ref:`PhysicsBody2D` or :ref:`TileMap` used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))``. -\ ``local_shape_index`` the index of the :ref:`Shape2D` of this Area2D used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``self.shape_owner_get_owner(local_shape_index)``. +\ ``local_shape_index`` the index of the :ref:`Shape2D` of this Area2D used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. ---- @@ -178,9 +178,9 @@ Emitted when one of a :ref:`PhysicsBody2D` or :ref:`TileMap \ ``body`` the :ref:`Node`, if it exists in the tree, of the :ref:`PhysicsBody2D` or :ref:`TileMap`. -\ ``body_shape_index`` the index of the :ref:`Shape2D` of the :ref:`PhysicsBody2D` or :ref:`TileMap` used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``body.shape_owner_get_owner(body_shape_index)``. +\ ``body_shape_index`` the index of the :ref:`Shape2D` of the :ref:`PhysicsBody2D` or :ref:`TileMap` used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))``. -\ ``local_shape_index`` the index of the :ref:`Shape2D` of this Area2D used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``self.shape_owner_get_owner(local_shape_index)``. +\ ``local_shape_index`` the index of the :ref:`Shape2D` of this Area2D used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. Enumerations ------------ diff --git a/classes/class_area3d.rst b/classes/class_area3d.rst index b3c6e622b..ab098557e 100644 --- a/classes/class_area3d.rst +++ b/classes/class_area3d.rst @@ -120,9 +120,9 @@ Emitted when one of another Area3D's :ref:`Shape3D`\ s enters one \ ``area`` the other Area3D. -\ ``area_shape_index`` the index of the :ref:`Shape3D` of the other Area3D used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``area.shape_owner_get_owner(area_shape_index)``. +\ ``area_shape_index`` the index of the :ref:`Shape3D` of the other Area3D used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``area.shape_owner_get_owner(area.shape_find_owner(area_shape_index))``. -\ ``local_shape_index`` the index of the :ref:`Shape3D` of this Area3D used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``self.shape_owner_get_owner(local_shape_index)``. +\ ``local_shape_index`` the index of the :ref:`Shape3D` of this Area3D used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. ---- @@ -136,9 +136,9 @@ Emitted when one of another Area3D's :ref:`Shape3D`\ s exits one \ ``area`` the other Area3D. -\ ``area_shape_index`` the index of the :ref:`Shape3D` of the other Area3D used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``area.shape_owner_get_owner(area_shape_index)``. +\ ``area_shape_index`` the index of the :ref:`Shape3D` of the other Area3D used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``area.shape_owner_get_owner(area.shape_find_owner(area_shape_index))``. -\ ``local_shape_index`` the index of the :ref:`Shape3D` of this Area3D used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``self.shape_owner_get_owner(local_shape_index)``. +\ ``local_shape_index`` the index of the :ref:`Shape3D` of this Area3D used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. ---- @@ -172,9 +172,9 @@ Emitted when one of a :ref:`PhysicsBody3D` or :ref:`GridMap \ ``body`` the :ref:`Node`, if it exists in the tree, of the :ref:`PhysicsBody3D` or :ref:`GridMap`. -\ ``body_shape_index`` the index of the :ref:`Shape3D` of the :ref:`PhysicsBody3D` or :ref:`GridMap` used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``body.shape_owner_get_owner(body_shape_index)``. +\ ``body_shape_index`` the index of the :ref:`Shape3D` of the :ref:`PhysicsBody3D` or :ref:`GridMap` used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))``. -\ ``local_shape_index`` the index of the :ref:`Shape3D` of this Area3D used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``self.shape_owner_get_owner(local_shape_index)``. +\ ``local_shape_index`` the index of the :ref:`Shape3D` of this Area3D used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. ---- @@ -188,9 +188,9 @@ Emitted when one of a :ref:`PhysicsBody3D` or :ref:`GridMap \ ``body`` the :ref:`Node`, if it exists in the tree, of the :ref:`PhysicsBody3D` or :ref:`GridMap`. -\ ``body_shape_index`` the index of the :ref:`Shape3D` of the :ref:`PhysicsBody3D` or :ref:`GridMap` used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``body.shape_owner_get_owner(body_shape_index)``. +\ ``body_shape_index`` the index of the :ref:`Shape3D` of the :ref:`PhysicsBody3D` or :ref:`GridMap` used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))``. -\ ``local_shape_index`` the index of the :ref:`Shape3D` of this Area3D used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``self.shape_owner_get_owner(local_shape_index)``. +\ ``local_shape_index`` the index of the :ref:`Shape3D` of this Area3D used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. Enumerations ------------ diff --git a/classes/class_aspectratiocontainer.rst b/classes/class_aspectratiocontainer.rst index 2c7edda05..acf1f06cd 100644 --- a/classes/class_aspectratiocontainer.rst +++ b/classes/class_aspectratiocontainer.rst @@ -54,7 +54,7 @@ enum **StretchMode**: - **STRETCH_COVER** = **3** --- The width and height of child controls is automatically adjusted to make their bounding rectangle cover the entire area of the container while keeping the aspect ratio. -When the bounding rectangle of child controls exceed the container's size and :ref:`Control.rect_clip_content` is enabled, this allows to show only the container's area restricted by its own bounding rectangle. +When the bounding rectangle of child controls exceed the container's size and :ref:`Control.clip_contents` is enabled, this allows to show only the container's area restricted by its own bounding rectangle. ---- diff --git a/classes/class_audioeffect.rst b/classes/class_audioeffect.rst index 725971d6d..cdade00f3 100644 --- a/classes/class_audioeffect.rst +++ b/classes/class_audioeffect.rst @@ -25,6 +25,20 @@ Tutorials - `Audio Mic Record Demo `__ +Methods +------- + ++-------------------------------------------------------+----------------------------------------------------------------------------------+ +| :ref:`AudioEffectInstance` | :ref:`_instantiate` **(** **)** |virtual| | ++-------------------------------------------------------+----------------------------------------------------------------------------------+ + +Method Descriptions +------------------- + +.. _class_AudioEffect_method__instantiate: + +- :ref:`AudioEffectInstance` **_instantiate** **(** **)** |virtual| + .. |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.)` diff --git a/classes/class_audioeffectinstance.rst b/classes/class_audioeffectinstance.rst index cdce8cffa..7cd20efa5 100644 --- a/classes/class_audioeffectinstance.rst +++ b/classes/class_audioeffectinstance.rst @@ -15,6 +15,28 @@ AudioEffectInstance +Methods +------- + ++-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_process` **(** const void* src_buffer, AudioFrame* dst_buffer, :ref:`int` frame_count **)** |virtual| | ++-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_process_silence` **(** **)** |virtual| |const| | ++-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Method Descriptions +------------------- + +.. _class_AudioEffectInstance_method__process: + +- void **_process** **(** const void* src_buffer, AudioFrame* dst_buffer, :ref:`int` frame_count **)** |virtual| + +---- + +.. _class_AudioEffectInstance_method__process_silence: + +- :ref:`bool` **_process_silence** **(** **)** |virtual| |const| + .. |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.)` diff --git a/classes/class_audiostream.rst b/classes/class_audiostream.rst index 3d6f3eef4..cc96788f7 100644 --- a/classes/class_audiostream.rst +++ b/classes/class_audiostream.rst @@ -45,6 +45,8 @@ Methods +-------------------------------------------------------+------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_length` **(** **)** |const| | +-------------------------------------------------------+------------------------------------------------------------------------------------------------------+ +| :ref:`AudioStreamPlayback` | :ref:`instance_playback` **(** **)** | ++-------------------------------------------------------+------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_monophonic` **(** **)** |const| | +-------------------------------------------------------+------------------------------------------------------------------------------------------------------+ @@ -83,6 +85,14 @@ Returns the length of the audio stream in seconds. ---- +.. _class_AudioStream_method_instance_playback: + +- :ref:`AudioStreamPlayback` **instance_playback** **(** **)** + +Returns an AudioStreamPlayback. Useful for when you want to extend `_instance_playback` but call `instance_playback` from an internally held AudioStream subresource. An example of this can be found in the source files for `AudioStreamRandomPitch::instance_playback`. + +---- + .. _class_AudioStream_method_is_monophonic: - :ref:`bool` **is_monophonic** **(** **)** |const| diff --git a/classes/class_audiostreamgenerator.rst b/classes/class_audiostreamgenerator.rst index a0a0b0fc6..979569436 100644 --- a/classes/class_audiostreamgenerator.rst +++ b/classes/class_audiostreamgenerator.rst @@ -20,7 +20,7 @@ This audio stream does not play back sounds, but expects a script to generate au See also :ref:`AudioEffectSpectrumAnalyzer` for performing real-time audio spectrum analysis. -\ **Note:** Due to performance constraints, this class is best used from C# or from a compiled language via GDNative. If you still want to use this class from GDScript, consider using a lower :ref:`mix_rate` such as 11,025 Hz or 22,050 Hz. +\ **Note:** Due to performance constraints, this class is best used from C# or from a compiled language via GDExtension. If you still want to use this class from GDScript, consider using a lower :ref:`mix_rate` such as 11,025 Hz or 22,050 Hz. Tutorials --------- diff --git a/classes/class_audiostreamgeneratorplayback.rst b/classes/class_audiostreamgeneratorplayback.rst index 143d04804..d863d827e 100644 --- a/classes/class_audiostreamgeneratorplayback.rst +++ b/classes/class_audiostreamgeneratorplayback.rst @@ -79,7 +79,7 @@ Returns the number of audio data frames left to play. If this returned number re - :ref:`bool` **push_buffer** **(** :ref:`PackedVector2Array` frames **)** -Pushes several audio data frames to the buffer. This is usually more efficient than :ref:`push_frame` in C# and compiled languages via GDNative, but :ref:`push_buffer` may be *less* efficient in GDScript. +Pushes several audio data frames to the buffer. This is usually more efficient than :ref:`push_frame` in C# and compiled languages via GDExtension, but :ref:`push_buffer` may be *less* efficient in GDScript. ---- @@ -87,7 +87,7 @@ Pushes several audio data frames to the buffer. This is usually more efficient t - :ref:`bool` **push_frame** **(** :ref:`Vector2` frame **)** -Pushes a single audio data frame to the buffer. This is usually less efficient than :ref:`push_buffer` in C# and compiled languages via GDNative, but :ref:`push_frame` may be *more* efficient in GDScript. +Pushes a single audio data frame to the buffer. This is usually less efficient than :ref:`push_buffer` in C# and compiled languages via GDExtension, but :ref:`push_frame` may be *more* efficient in GDScript. .. |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.)` diff --git a/classes/class_audiostreamplaybackresampled.rst b/classes/class_audiostreamplaybackresampled.rst index 68c8aa009..85a4f067c 100644 --- a/classes/class_audiostreamplaybackresampled.rst +++ b/classes/class_audiostreamplaybackresampled.rst @@ -15,6 +15,36 @@ AudioStreamPlaybackResampled +Methods +------- + ++---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`_get_stream_sampling_rate` **(** **)** |virtual| |const| | ++---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_mix_resampled` **(** AudioFrame* dst_buffer, :ref:`int` frame_count **)** |virtual| | ++---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`begin_resample` **(** **)** | ++---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Method Descriptions +------------------- + +.. _class_AudioStreamPlaybackResampled_method__get_stream_sampling_rate: + +- :ref:`float` **_get_stream_sampling_rate** **(** **)** |virtual| |const| + +---- + +.. _class_AudioStreamPlaybackResampled_method__mix_resampled: + +- :ref:`int` **_mix_resampled** **(** AudioFrame* dst_buffer, :ref:`int` frame_count **)** |virtual| + +---- + +.. _class_AudioStreamPlaybackResampled_method_begin_resample: + +- void **begin_resample** **(** **)** + .. |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.)` diff --git a/classes/class_basematerial3d.rst b/classes/class_basematerial3d.rst index 1ad5f1d8b..27f7a4612 100644 --- a/classes/class_basematerial3d.rst +++ b/classes/class_basematerial3d.rst @@ -75,7 +75,7 @@ Properties +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`bool` | :ref:`clearcoat_enabled` | ``false`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`clearcoat_gloss` | ``0.5`` | +| :ref:`float` | :ref:`clearcoat_roughness` | ``0.5`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`Texture2D` | :ref:`clearcoat_texture` | | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ @@ -706,10 +706,6 @@ enum **DiffuseMode**: .. _class_BaseMaterial3D_constant_SPECULAR_SCHLICK_GGX: -.. _class_BaseMaterial3D_constant_SPECULAR_BLINN: - -.. _class_BaseMaterial3D_constant_SPECULAR_PHONG: - .. _class_BaseMaterial3D_constant_SPECULAR_TOON: .. _class_BaseMaterial3D_constant_SPECULAR_DISABLED: @@ -718,13 +714,9 @@ enum **SpecularMode**: - **SPECULAR_SCHLICK_GGX** = **0** --- Default specular blob. -- **SPECULAR_BLINN** = **1** --- Older specular algorithm, included for compatibility. +- **SPECULAR_TOON** = **1** --- Toon blob which changes size based on roughness. -- **SPECULAR_PHONG** = **2** --- Older specular algorithm, included for compatibility. - -- **SPECULAR_TOON** = **3** --- Toon blob which changes size based on roughness. - -- **SPECULAR_DISABLED** = **4** --- No specular blob. +- **SPECULAR_DISABLED** = **2** --- No specular blob. ---- @@ -1179,19 +1171,19 @@ If ``true``, clearcoat rendering is enabled. Adds a secondary transparent pass t ---- -.. _class_BaseMaterial3D_property_clearcoat_gloss: +.. _class_BaseMaterial3D_property_clearcoat_roughness: -- :ref:`float` **clearcoat_gloss** +- :ref:`float` **clearcoat_roughness** -+-----------+----------------------------+ -| *Default* | ``0.5`` | -+-----------+----------------------------+ -| *Setter* | set_clearcoat_gloss(value) | -+-----------+----------------------------+ -| *Getter* | get_clearcoat_gloss() | -+-----------+----------------------------+ ++-----------+--------------------------------+ +| *Default* | ``0.5`` | ++-----------+--------------------------------+ +| *Setter* | set_clearcoat_roughness(value) | ++-----------+--------------------------------+ +| *Getter* | get_clearcoat_roughness() | ++-----------+--------------------------------+ -Sets the roughness of the clearcoat pass. A higher value results in a smoother clearcoat while a lower value results in a rougher clearcoat. +Sets the roughness of the clearcoat pass. A higher value results in a rougher clearcoat while a lower value results in a smoother clearcoat. ---- @@ -2149,6 +2141,8 @@ If ``true``, enables the "shadow to opacity" render mode where lighting modifies The method for rendering the specular blob. See :ref:`SpecularMode`. +\ **Note:** Only applies to the specular blob. Does not affect specular reflections from the Sky, SSR, or ReflectionProbes. + ---- .. _class_BaseMaterial3D_property_subsurf_scatter_enabled: diff --git a/classes/class_characterbody2d.rst b/classes/class_characterbody2d.rst index 3e2982657..b9f9ffc67 100644 --- a/classes/class_characterbody2d.rst +++ b/classes/class_characterbody2d.rst @@ -53,8 +53,6 @@ Properties +----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+--------------------+ | :ref:`MotionMode` | :ref:`motion_mode` | ``0`` | +----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+--------------------+ -| :ref:`Vector2` | :ref:`motion_velocity` | ``Vector2(0, 0)`` | -+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+--------------------+ | :ref:`MovingPlatformApplyVelocityOnLeave` | :ref:`moving_platform_apply_velocity_on_leave` | ``0`` | +----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+--------------------+ | :ref:`int` | :ref:`moving_platform_floor_layers` | ``4294967295`` | @@ -65,6 +63,8 @@ Properties +----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+--------------------+ | :ref:`Vector2` | :ref:`up_direction` | ``Vector2(0, -1)`` | +----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+--------------------+ +| :ref:`Vector2` | :ref:`velocity` | ``Vector2(0, 0)`` | ++----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+--------------------+ | :ref:`float` | :ref:`wall_min_slide_angle` | ``0.261799`` | +----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+--------------------+ @@ -134,9 +134,9 @@ enum **MotionMode**: enum **MovingPlatformApplyVelocityOnLeave**: -- **PLATFORM_VEL_ON_LEAVE_ALWAYS** = **0** --- Add the last platform velocity to the :ref:`motion_velocity` when you leave a moving platform. +- **PLATFORM_VEL_ON_LEAVE_ALWAYS** = **0** --- Add the last platform velocity to the :ref:`velocity` when you leave a moving platform. -- **PLATFORM_VEL_ON_LEAVE_UPWARD_ONLY** = **1** --- Add the last platform velocity to the :ref:`motion_velocity` when you leave a moving platform, but any downward motion is ignored. It's useful to keep full jump height even when the platform is moving down. +- **PLATFORM_VEL_ON_LEAVE_UPWARD_ONLY** = **1** --- Add the last platform velocity to the :ref:`velocity` when you leave a moving platform, but any downward motion is ignored. It's useful to keep full jump height even when the platform is moving down. - **PLATFORM_VEL_ON_LEAVE_NEVER** = **2** --- Do nothing when leaving a platform. @@ -247,7 +247,7 @@ As long as the snapping vector is in contact with the ground and the body moves If ``true``, the body will not slide on slopes when calling :ref:`move_and_slide` when the body is standing still. -If ``false``, the body will slide on floor's slopes when :ref:`motion_velocity` applies a downward force. +If ``false``, the body will slide on floor's slopes when :ref:`velocity` applies a downward force. ---- @@ -283,22 +283,6 @@ Sets the motion mode which defines the behavior of :ref:`move_and_slide` **motion_velocity** - -+-----------+----------------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+----------------------------+ -| *Setter* | set_motion_velocity(value) | -+-----------+----------------------------+ -| *Getter* | get_motion_velocity() | -+-----------+----------------------------+ - -Current velocity vector in pixels per second, used and modified during calls to :ref:`move_and_slide`. - ----- - .. _class_CharacterBody2D_property_moving_platform_apply_velocity_on_leave: - :ref:`MovingPlatformApplyVelocityOnLeave` **moving_platform_apply_velocity_on_leave** @@ -379,6 +363,22 @@ Direction vector used to determine what is a wall and what is a floor (or a ceil ---- +.. _class_CharacterBody2D_property_velocity: + +- :ref:`Vector2` **velocity** + ++-----------+---------------------+ +| *Default* | ``Vector2(0, 0)`` | ++-----------+---------------------+ +| *Setter* | set_velocity(value) | ++-----------+---------------------+ +| *Getter* | get_velocity() | ++-----------+---------------------+ + +Current velocity vector in pixels per second, used and modified during calls to :ref:`move_and_slide`. + +---- + .. _class_CharacterBody2D_property_wall_min_slide_angle: - :ref:`float` **wall_min_slide_angle** @@ -448,7 +448,7 @@ Returns the travel (position delta) that occurred during the last call to :ref:` - :ref:`Vector2` **get_real_velocity** **(** **)** |const| -Returns the current real velocity since the last call to :ref:`move_and_slide`. For example, when you climb a slope, you will move diagonally even though the velocity is horizontal. This method returns the diagonal movement, as opposed to :ref:`motion_velocity` which returns the requested velocity. +Returns the current real velocity since the last call to :ref:`move_and_slide`. For example, when you climb a slope, you will move diagonally even though the velocity is horizontal. This method returns the diagonal movement, as opposed to :ref:`velocity` which returns the requested velocity. ---- @@ -549,9 +549,9 @@ Returns ``true`` if the body collided only with a wall on the last call of :ref: - :ref:`bool` **move_and_slide** **(** **)** -Moves the body based on :ref:`motion_velocity`. If the body collides with another, it will slide along the other body (by default only on floor) rather than stop immediately. If the other body is a ``CharacterBody2D`` or :ref:`RigidDynamicBody2D`, it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes. +Moves the body based on :ref:`velocity`. If the body collides with another, it will slide along the other body (by default only on floor) rather than stop immediately. If the other body is a ``CharacterBody2D`` or :ref:`RigidDynamicBody2D`, it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes. -Modifies :ref:`motion_velocity` if a slide collision occurred. To get the latest collision call :ref:`get_last_slide_collision`, for detailed information about collisions that occurred, use :ref:`get_slide_collision`. +Modifies :ref:`velocity` if a slide collision occurred. To get the latest collision call :ref:`get_last_slide_collision`, for detailed information about collisions that occurred, use :ref:`get_slide_collision`. When the body touches a moving platform, the platform's velocity is automatically added to the body motion. If a collision occurs due to the platform's motion, it will always be first in the slide collisions. diff --git a/classes/class_characterbody3d.rst b/classes/class_characterbody3d.rst index 49cef588a..f5721e753 100644 --- a/classes/class_characterbody3d.rst +++ b/classes/class_characterbody3d.rst @@ -55,8 +55,6 @@ Properties +----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------+ | :ref:`MotionMode` | :ref:`motion_mode` | ``0`` | +----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`motion_velocity` | ``Vector3(0, 0, 0)`` | -+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------+ | :ref:`MovingPlatformApplyVelocityOnLeave` | :ref:`moving_platform_apply_velocity_on_leave` | ``0`` | +----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------+ | :ref:`int` | :ref:`moving_platform_floor_layers` | ``4294967295`` | @@ -67,6 +65,8 @@ Properties +----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------+ | :ref:`Vector3` | :ref:`up_direction` | ``Vector3(0, 1, 0)`` | +----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------+ +| :ref:`Vector3` | :ref:`velocity` | ``Vector3(0, 0, 0)`` | ++----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------+ | :ref:`float` | :ref:`wall_min_slide_angle` | ``0.261799`` | +----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------+ @@ -136,9 +136,9 @@ enum **MotionMode**: enum **MovingPlatformApplyVelocityOnLeave**: -- **PLATFORM_VEL_ON_LEAVE_ALWAYS** = **0** --- Add the last platform velocity to the :ref:`motion_velocity` when you leave a moving platform. +- **PLATFORM_VEL_ON_LEAVE_ALWAYS** = **0** --- Add the last platform velocity to the :ref:`velocity` when you leave a moving platform. -- **PLATFORM_VEL_ON_LEAVE_UPWARD_ONLY** = **1** --- Add the last platform velocity to the :ref:`motion_velocity` when you leave a moving platform, but any downward motion is ignored. It's useful to keep full jump height even when the platform is moving down. +- **PLATFORM_VEL_ON_LEAVE_UPWARD_ONLY** = **1** --- Add the last platform velocity to the :ref:`velocity` when you leave a moving platform, but any downward motion is ignored. It's useful to keep full jump height even when the platform is moving down. - **PLATFORM_VEL_ON_LEAVE_NEVER** = **2** --- Do nothing when leaving a platform. @@ -249,7 +249,7 @@ As long as the snapping vector is in contact with the ground and the body moves If ``true``, the body will not slide on slopes when calling :ref:`move_and_slide` when the body is standing still. -If ``false``, the body will slide on floor's slopes when :ref:`motion_velocity` applies a downward force. +If ``false``, the body will slide on floor's slopes when :ref:`velocity` applies a downward force. ---- @@ -285,22 +285,6 @@ Sets the motion mode which defines the behavior of :ref:`move_and_slide` **motion_velocity** - -+-----------+----------------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+----------------------------+ -| *Setter* | set_motion_velocity(value) | -+-----------+----------------------------+ -| *Getter* | get_motion_velocity() | -+-----------+----------------------------+ - -Current velocity vector (typically meters per second), used and modified during calls to :ref:`move_and_slide`. - ----- - .. _class_CharacterBody3D_property_moving_platform_apply_velocity_on_leave: - :ref:`MovingPlatformApplyVelocityOnLeave` **moving_platform_apply_velocity_on_leave** @@ -381,6 +365,22 @@ Direction vector used to determine what is a wall and what is a floor (or a ceil ---- +.. _class_CharacterBody3D_property_velocity: + +- :ref:`Vector3` **velocity** + ++-----------+----------------------+ +| *Default* | ``Vector3(0, 0, 0)`` | ++-----------+----------------------+ +| *Setter* | set_velocity(value) | ++-----------+----------------------+ +| *Getter* | get_velocity() | ++-----------+----------------------+ + +Current velocity vector (typically meters per second), used and modified during calls to :ref:`move_and_slide`. + +---- + .. _class_CharacterBody3D_property_wall_min_slide_angle: - :ref:`float` **wall_min_slide_angle** @@ -450,7 +450,7 @@ Returns the travel (position delta) that occurred during the last call to :ref:` - :ref:`Vector3` **get_real_velocity** **(** **)** |const| -Returns the current real velocity since the last call to :ref:`move_and_slide`. For example, when you climb a slope, you will move diagonally even though the velocity is horizontal. This method returns the diagonal movement, as opposed to :ref:`motion_velocity` which returns the requested velocity. +Returns the current real velocity since the last call to :ref:`move_and_slide`. For example, when you climb a slope, you will move diagonally even though the velocity is horizontal. This method returns the diagonal movement, as opposed to :ref:`velocity` which returns the requested velocity. ---- @@ -530,9 +530,9 @@ Returns ``true`` if the body collided only with a wall on the last call of :ref: - :ref:`bool` **move_and_slide** **(** **)** -Moves the body based on :ref:`motion_velocity`. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a ``CharacterBody3D`` or :ref:`RigidDynamicBody3D`, it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes. +Moves the body based on :ref:`velocity`. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a ``CharacterBody3D`` or :ref:`RigidDynamicBody3D`, it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes. -Modifies :ref:`motion_velocity` if a slide collision occurred. To get the latest collision call :ref:`get_last_slide_collision`, for more detailed information about collisions that occurred, use :ref:`get_slide_collision`. +Modifies :ref:`velocity` if a slide collision occurred. To get the latest collision call :ref:`get_last_slide_collision`, for more detailed information about collisions that occurred, use :ref:`get_slide_collision`. When the body touches a moving platform, the platform's velocity is automatically added to the body motion. If a collision occurs due to the platform's motion, it will always be first in the slide collisions. diff --git a/classes/class_colorpickerbutton.rst b/classes/class_colorpickerbutton.rst index 0bb2de788..c73b57718 100644 --- a/classes/class_colorpickerbutton.rst +++ b/classes/class_colorpickerbutton.rst @@ -20,7 +20,7 @@ Encapsulates a :ref:`ColorPicker` making it accessible by pre See also :ref:`BaseButton` which contains common properties and methods associated with this node. -\ **Note:** By default, the button may not be wide enough for the color preview swatch to be visible. Make sure to set :ref:`Control.rect_min_size` to a big enough value to give the button enough space. +\ **Note:** By default, the button may not be wide enough for the color preview swatch to be visible. Make sure to set :ref:`Control.minimum_size` to a big enough value to give the button enough space. Tutorials --------- diff --git a/classes/class_streamcubemap.rst b/classes/class_compressedcubemap.rst similarity index 68% rename from classes/class_streamcubemap.rst rename to classes/class_compressedcubemap.rst index effcd41c4..17a8d9c92 100644 --- a/classes/class_streamcubemap.rst +++ b/classes/class_compressedcubemap.rst @@ -1,15 +1,15 @@ :github_url: hide .. Generated automatically by doc/tools/make_rst.py in Godot's source tree. -.. DO NOT EDIT THIS FILE, but the StreamCubemap.xml source instead. +.. DO NOT EDIT THIS FILE, but the CompressedCubemap.xml source instead. .. The source is found in doc/classes or modules//doc_classes. -.. _class_StreamCubemap: +.. _class_CompressedCubemap: -StreamCubemap -============= +CompressedCubemap +================= -**Inherits:** :ref:`StreamTextureLayered` **<** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**Inherits:** :ref:`CompressedTextureLayered` **<** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` diff --git a/classes/class_pluginscript.rst b/classes/class_compressedcubemaparray.rst similarity index 53% rename from classes/class_pluginscript.rst rename to classes/class_compressedcubemaparray.rst index 615c16caa..13e64cf8e 100644 --- a/classes/class_pluginscript.rst +++ b/classes/class_compressedcubemaparray.rst @@ -1,34 +1,18 @@ :github_url: hide .. Generated automatically by doc/tools/make_rst.py in Godot's source tree. -.. DO NOT EDIT THIS FILE, but the PluginScript.xml source instead. +.. DO NOT EDIT THIS FILE, but the CompressedCubemapArray.xml source instead. .. The source is found in doc/classes or modules//doc_classes. -.. _class_PluginScript: +.. _class_CompressedCubemapArray: -PluginScript -============ +CompressedCubemapArray +====================== -**Inherits:** :ref:`Script` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**Inherits:** :ref:`CompressedTextureLayered` **<** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Methods -------- - -+-------------------------------+--------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`new` **(** ... **)** |vararg| | -+-------------------------------+--------------------------------------------------------------------+ - -Method Descriptions -------------------- - -.. _class_PluginScript_method_new: - -- :ref:`Variant` **new** **(** ... **)** |vararg| - -Returns a new instance of the script. - .. |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.)` diff --git a/classes/class_streamtexture2d.rst b/classes/class_compressedtexture2d.rst similarity index 73% rename from classes/class_streamtexture2d.rst rename to classes/class_compressedtexture2d.rst index fe40df8a8..17d9b26e3 100644 --- a/classes/class_streamtexture2d.rst +++ b/classes/class_compressedtexture2d.rst @@ -1,41 +1,41 @@ :github_url: hide .. Generated automatically by doc/tools/make_rst.py in Godot's source tree. -.. DO NOT EDIT THIS FILE, but the StreamTexture2D.xml source instead. +.. DO NOT EDIT THIS FILE, but the CompressedTexture2D.xml source instead. .. The source is found in doc/classes or modules//doc_classes. -.. _class_StreamTexture2D: +.. _class_CompressedTexture2D: -StreamTexture2D -=============== +CompressedTexture2D +=================== **Inherits:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -A ``.stex`` texture. +A ``.ctex`` texture. Description ----------- -A texture that is loaded from a ``.stex`` file. +A texture that is loaded from a ``.ctex`` file. Properties ---------- -+-----------------------------+------------------------------------------------------------+--------+ -| :ref:`String` | :ref:`load_path` | ``""`` | -+-----------------------------+------------------------------------------------------------+--------+ ++-----------------------------+----------------------------------------------------------------+--------+ +| :ref:`String` | :ref:`load_path` | ``""`` | ++-----------------------------+----------------------------------------------------------------+--------+ Methods ------- -+---------------------------------------+---------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`load` **(** :ref:`String` path **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------+ ++---------------------------------------+-------------------------------------------------------------------------------------------------+ +| :ref:`Error` | :ref:`load` **(** :ref:`String` path **)** | ++---------------------------------------+-------------------------------------------------------------------------------------------------+ Property Descriptions --------------------- -.. _class_StreamTexture2D_property_load_path: +.. _class_CompressedTexture2D_property_load_path: - :ref:`String` **load_path** @@ -47,12 +47,12 @@ Property Descriptions | *Getter* | get_load_path() | +-----------+-----------------+ -The StreamTexture's file path to a ``.stex`` file. +The CompressedTexture's file path to a ``.ctex`` file. Method Descriptions ------------------- -.. _class_StreamTexture2D_method_load: +.. _class_CompressedTexture2D_method_load: - :ref:`Error` **load** **(** :ref:`String` path **)** diff --git a/classes/class_compressedtexture2darray.rst b/classes/class_compressedtexture2darray.rst new file mode 100644 index 000000000..2f5f90b75 --- /dev/null +++ b/classes/class_compressedtexture2darray.rst @@ -0,0 +1,21 @@ +:github_url: hide + +.. Generated automatically by doc/tools/make_rst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the CompressedTexture2DArray.xml source instead. +.. The source is found in doc/classes or modules//doc_classes. + +.. _class_CompressedTexture2DArray: + +CompressedTexture2DArray +======================== + +**Inherits:** :ref:`CompressedTextureLayered` **<** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + + + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_streamtexture3d.rst b/classes/class_compressedtexture3d.rst similarity index 76% rename from classes/class_streamtexture3d.rst rename to classes/class_compressedtexture3d.rst index 9aabfab1f..2c8426413 100644 --- a/classes/class_streamtexture3d.rst +++ b/classes/class_compressedtexture3d.rst @@ -1,13 +1,13 @@ :github_url: hide .. Generated automatically by doc/tools/make_rst.py in Godot's source tree. -.. DO NOT EDIT THIS FILE, but the StreamTexture3D.xml source instead. +.. DO NOT EDIT THIS FILE, but the CompressedTexture3D.xml source instead. .. The source is found in doc/classes or modules//doc_classes. -.. _class_StreamTexture3D: +.. _class_CompressedTexture3D: -StreamTexture3D -=============== +CompressedTexture3D +=================== **Inherits:** :ref:`Texture3D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` @@ -16,21 +16,21 @@ StreamTexture3D Properties ---------- -+-----------------------------+------------------------------------------------------------+--------+ -| :ref:`String` | :ref:`load_path` | ``""`` | -+-----------------------------+------------------------------------------------------------+--------+ ++-----------------------------+----------------------------------------------------------------+--------+ +| :ref:`String` | :ref:`load_path` | ``""`` | ++-----------------------------+----------------------------------------------------------------+--------+ Methods ------- -+---------------------------------------+---------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`load` **(** :ref:`String` path **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------+ ++---------------------------------------+-------------------------------------------------------------------------------------------------+ +| :ref:`Error` | :ref:`load` **(** :ref:`String` path **)** | ++---------------------------------------+-------------------------------------------------------------------------------------------------+ Property Descriptions --------------------- -.. _class_StreamTexture3D_property_load_path: +.. _class_CompressedTexture3D_property_load_path: - :ref:`String` **load_path** @@ -45,7 +45,7 @@ Property Descriptions Method Descriptions ------------------- -.. _class_StreamTexture3D_method_load: +.. _class_CompressedTexture3D_method_load: - :ref:`Error` **load** **(** :ref:`String` path **)** diff --git a/classes/class_streamtexturelayered.rst b/classes/class_compressedtexturelayered.rst similarity index 69% rename from classes/class_streamtexturelayered.rst rename to classes/class_compressedtexturelayered.rst index 8dd549cd4..70c817c66 100644 --- a/classes/class_streamtexturelayered.rst +++ b/classes/class_compressedtexturelayered.rst @@ -1,38 +1,38 @@ :github_url: hide .. Generated automatically by doc/tools/make_rst.py in Godot's source tree. -.. DO NOT EDIT THIS FILE, but the StreamTextureLayered.xml source instead. +.. DO NOT EDIT THIS FILE, but the CompressedTextureLayered.xml source instead. .. The source is found in doc/classes or modules//doc_classes. -.. _class_StreamTextureLayered: +.. _class_CompressedTextureLayered: -StreamTextureLayered -==================== +CompressedTextureLayered +======================== **Inherits:** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`StreamCubemap`, :ref:`StreamCubemapArray`, :ref:`StreamTexture2DArray` +**Inherited By:** :ref:`CompressedCubemap`, :ref:`CompressedCubemapArray`, :ref:`CompressedTexture2DArray` Properties ---------- -+-----------------------------+-----------------------------------------------------------------+--------+ -| :ref:`String` | :ref:`load_path` | ``""`` | -+-----------------------------+-----------------------------------------------------------------+--------+ ++-----------------------------+---------------------------------------------------------------------+--------+ +| :ref:`String` | :ref:`load_path` | ``""`` | ++-----------------------------+---------------------------------------------------------------------+--------+ Methods ------- -+---------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`load` **(** :ref:`String` path **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------+ ++---------------------------------------+------------------------------------------------------------------------------------------------------+ +| :ref:`Error` | :ref:`load` **(** :ref:`String` path **)** | ++---------------------------------------+------------------------------------------------------------------------------------------------------+ Property Descriptions --------------------- -.. _class_StreamTextureLayered_property_load_path: +.. _class_CompressedTextureLayered_property_load_path: - :ref:`String` **load_path** @@ -47,7 +47,7 @@ Property Descriptions Method Descriptions ------------------- -.. _class_StreamTextureLayered_method_load: +.. _class_CompressedTextureLayered_method_load: - :ref:`Error` **load** **(** :ref:`String` path **)** diff --git a/classes/class_control.rst b/classes/class_control.rst index 4a2cc4136..13ac74abe 100644 --- a/classes/class_control.rst +++ b/classes/class_control.rst @@ -63,6 +63,8 @@ Properties +------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ | :ref:`bool` | :ref:`auto_translate` | ``true`` | +------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ +| :ref:`bool` | :ref:`clip_contents` | ``false`` | ++------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ | :ref:`FocusMode` | :ref:`focus_mode` | ``0`` | +------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ | :ref:`NodePath` | :ref:`focus_neighbor_bottom` | ``NodePath("")`` | @@ -77,6 +79,8 @@ Properties +------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ | :ref:`NodePath` | :ref:`focus_previous` | ``NodePath("")`` | +------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ +| :ref:`Vector2` | :ref:`global_position` | | ++------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ | :ref:`GrowDirection` | :ref:`grow_horizontal` | ``1`` | +------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ | :ref:`GrowDirection` | :ref:`grow_vertical` | ``1`` | @@ -85,6 +89,8 @@ Properties +------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ | :ref:`LayoutDirection` | :ref:`layout_direction` | ``0`` | +------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ +| :ref:`Vector2` | :ref:`minimum_size` | ``Vector2(0, 0)`` | ++------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ | :ref:`CursorShape` | :ref:`mouse_default_cursor_shape` | ``0`` | +------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ | :ref:`MouseFilter` | :ref:`mouse_filter` | ``0`` | @@ -97,21 +103,15 @@ Properties +------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ | :ref:`float` | :ref:`offset_top` | ``0.0`` | +------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`rect_clip_content` | ``false`` | +| :ref:`Vector2` | :ref:`pivot_offset` | ``Vector2(0, 0)`` | +------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`rect_global_position` | | +| :ref:`Vector2` | :ref:`position` | ``Vector2(0, 0)`` | +------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`rect_min_size` | ``Vector2(0, 0)`` | +| :ref:`float` | :ref:`rotation` | ``0.0`` | +------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`rect_pivot_offset` | ``Vector2(0, 0)`` | +| :ref:`Vector2` | :ref:`scale` | ``Vector2(1, 1)`` | +------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`rect_position` | ``Vector2(0, 0)`` | -+------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`rect_rotation` | ``0.0`` | -+------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`rect_scale` | ``Vector2(1, 1)`` | -+------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`rect_size` | ``Vector2(0, 0)`` | +| :ref:`Vector2` | :ref:`size` | ``Vector2(0, 0)`` | +------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ | :ref:`int` | :ref:`size_flags_horizontal` | ``1`` | +------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ @@ -353,7 +353,7 @@ If you want to check whether the mouse truly left the area, ignoring any top nod :: func _on_mouse_exited(): - if not Rect2(Vector2(), rect_size).has_point(get_local_mouse_position()): + if not Rect2(Vector2(), size).has_point(get_local_mouse_position()): # Not hovering over area. ---- @@ -746,7 +746,7 @@ Constants .. _class_Control_constant_NOTIFICATION_LAYOUT_DIRECTION_CHANGED: -- **NOTIFICATION_RESIZED** = **40** --- Sent when the node changes size. Use :ref:`rect_size` to get the new size. +- **NOTIFICATION_RESIZED** = **40** --- Sent when the node changes size. Use :ref:`size` to get the new size. - **NOTIFICATION_MOUSE_ENTER** = **41** --- Sent when the mouse pointer enters the node. @@ -841,6 +841,22 @@ Also decides if the node's strings should be parsed for POT generation. ---- +.. _class_Control_property_clip_contents: + +- :ref:`bool` **clip_contents** + ++-----------+--------------------------+ +| *Default* | ``false`` | ++-----------+--------------------------+ +| *Setter* | set_clip_contents(value) | ++-----------+--------------------------+ +| *Getter* | is_clipping_contents() | ++-----------+--------------------------+ + +Enables whether rendering of :ref:`CanvasItem` based children should be clipped to this control's rectangle. If ``true``, parts of a child which would be visibly outside of this control's rectangle will not be rendered and won't receive input. + +---- + .. _class_Control_property_focus_mode: - :ref:`FocusMode` **focus_mode** @@ -957,6 +973,18 @@ If this property is not set, Godot will select a "best guess" based on surroundi ---- +.. _class_Control_property_global_position: + +- :ref:`Vector2` **global_position** + ++----------+-----------------------+ +| *Getter* | get_global_position() | ++----------+-----------------------+ + +The node's global position, relative to the world (usually to the top-left corner of the window). + +---- + .. _class_Control_property_grow_horizontal: - :ref:`GrowDirection` **grow_horizontal** @@ -1044,6 +1072,22 @@ Controls layout direction and text writing direction. Right-to-left layouts are ---- +.. _class_Control_property_minimum_size: + +- :ref:`Vector2` **minimum_size** + ++-----------+--------------------------------+ +| *Default* | ``Vector2(0, 0)`` | ++-----------+--------------------------------+ +| *Setter* | set_custom_minimum_size(value) | ++-----------+--------------------------------+ +| *Getter* | get_custom_minimum_size() | ++-----------+--------------------------------+ + +The minimum size of the node's bounding rectangle. If you set it to a value greater than (0, 0), the node's bounding rectangle will always have at least this size, even if its content is smaller. If it's set to (0, 0), the node sizes automatically to fit its content, be it a texture or child nodes. + +---- + .. _class_Control_property_mouse_default_cursor_shape: - :ref:`CursorShape` **mouse_default_cursor_shape** @@ -1150,53 +1194,9 @@ Offsets are often controlled by one or multiple parent :ref:`Container` **rect_clip_content** - -+-----------+--------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------+ -| *Setter* | set_clip_contents(value) | -+-----------+--------------------------+ -| *Getter* | is_clipping_contents() | -+-----------+--------------------------+ - -Enables whether rendering of :ref:`CanvasItem` based children should be clipped to this control's rectangle. If ``true``, parts of a child which would be visibly outside of this control's rectangle will not be rendered and won't receive input. - ----- - -.. _class_Control_property_rect_global_position: - -- :ref:`Vector2` **rect_global_position** - -+----------+-----------------------+ -| *Getter* | get_global_position() | -+----------+-----------------------+ - -The node's global position, relative to the world (usually to the top-left corner of the window). - ----- - -.. _class_Control_property_rect_min_size: - -- :ref:`Vector2` **rect_min_size** - -+-----------+--------------------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+--------------------------------+ -| *Setter* | set_custom_minimum_size(value) | -+-----------+--------------------------------+ -| *Getter* | get_custom_minimum_size() | -+-----------+--------------------------------+ - -The minimum size of the node's bounding rectangle. If you set it to a value greater than (0, 0), the node's bounding rectangle will always have at least this size, even if its content is smaller. If it's set to (0, 0), the node sizes automatically to fit its content, be it a texture or child nodes. - ----- - -.. _class_Control_property_rect_pivot_offset: - -- :ref:`Vector2` **rect_pivot_offset** +- :ref:`Vector2` **pivot_offset** +-----------+-------------------------+ | *Default* | ``Vector2(0, 0)`` | @@ -1206,13 +1206,13 @@ The minimum size of the node's bounding rectangle. If you set it to a value grea | *Getter* | get_pivot_offset() | +-----------+-------------------------+ -By default, the node's pivot is its top-left corner. When you change its :ref:`rect_scale`, it will scale around this pivot. Set this property to :ref:`rect_size` / 2 to center the pivot in the node's rectangle. +By default, the node's pivot is its top-left corner. When you change its :ref:`rotation` or :ref:`scale`, it will rotate or scale around this pivot. Set this property to :ref:`size` / 2 to pivot around the Control's center. ---- -.. _class_Control_property_rect_position: +.. _class_Control_property_position: -- :ref:`Vector2` **rect_position** +- :ref:`Vector2` **position** +-----------+-------------------+ | *Default* | ``Vector2(0, 0)`` | @@ -1220,13 +1220,13 @@ By default, the node's pivot is its top-left corner. When you change its :ref:`r | *Getter* | get_position() | +-----------+-------------------+ -The node's position, relative to its parent. It corresponds to the rectangle's top-left corner. The property is not affected by :ref:`rect_pivot_offset`. +The node's position, relative to its parent. It corresponds to the rectangle's top-left corner. The property is not affected by :ref:`pivot_offset`. ---- -.. _class_Control_property_rect_rotation: +.. _class_Control_property_rotation: -- :ref:`float` **rect_rotation** +- :ref:`float` **rotation** +-----------+---------------------+ | *Default* | ``0.0`` | @@ -1236,13 +1236,13 @@ The node's position, relative to its parent. It corresponds to the rectangle's t | *Getter* | get_rotation() | +-----------+---------------------+ -The node's rotation around its pivot, in radians. See :ref:`rect_pivot_offset` to change the pivot's position. +The node's rotation around its pivot, in radians. See :ref:`pivot_offset` to change the pivot's position. ---- -.. _class_Control_property_rect_scale: +.. _class_Control_property_scale: -- :ref:`Vector2` **rect_scale** +- :ref:`Vector2` **scale** +-----------+-------------------+ | *Default* | ``Vector2(1, 1)`` | @@ -1252,17 +1252,17 @@ The node's rotation around its pivot, in radians. See :ref:`rect_pivot_offset`. Change this property to scale the node around its :ref:`rect_pivot_offset`. The Control's :ref:`hint_tooltip` will also scale according to this value. +The node's scale, relative to its :ref:`size`. Change this property to scale the node around its :ref:`pivot_offset`. The Control's :ref:`hint_tooltip` will also scale according to this value. \ **Note:** This property is mainly intended to be used for animation purposes. Text inside the Control will look pixelated or blurry when the Control is scaled. To support multiple resolutions in your project, use an appropriate viewport stretch mode as described in the :doc:`documentation <../tutorials/viewports/multiple_resolutions>` instead of scaling Controls individually. -\ **Note:** If the Control node is a child of a :ref:`Container` node, the scale will be reset to ``Vector2(1, 1)`` when the scene is instantiated. To set the Control's scale when it's instantiated, wait for one frame using ``await get_tree().process_frame`` then set its :ref:`rect_scale` property. +\ **Note:** If the Control node is a child of a :ref:`Container` node, the scale will be reset to ``Vector2(1, 1)`` when the scene is instantiated. To set the Control's scale when it's instantiated, wait for one frame using ``await get_tree().process_frame`` then set its :ref:`scale` property. ---- -.. _class_Control_property_rect_size: +.. _class_Control_property_size: -- :ref:`Vector2` **rect_size** +- :ref:`Vector2` **size** +-----------+-------------------+ | *Default* | ``Vector2(0, 0)`` | @@ -1456,7 +1456,7 @@ A preview that will follow the mouse that should represent the data can be set w - :ref:`Vector2` **_get_minimum_size** **(** **)** |virtual| |const| -Virtual method to be implemented by the user. Returns the minimum size for this control. Alternative to :ref:`rect_min_size` for controlling minimum size via code. The actual minimum size will be the max value of these two (in each axis separately). +Virtual method to be implemented by the user. Returns the minimum size for this control. Alternative to :ref:`minimum_size` for controlling minimum size via code. The actual minimum size will be the max value of these two (in each axis separately). If not overridden, defaults to :ref:`Vector2.ZERO`. @@ -1508,7 +1508,7 @@ The event won't trigger if: \* control's parent has :ref:`mouse_filter` set to :ref:`MOUSE_FILTER_STOP` or has accepted the event; -\* it happens outside the parent's rectangle and the parent has either :ref:`rect_clip_content` enabled. +\* it happens outside the parent's rectangle and the parent has either :ref:`clip_contents` enabled. \ **Note:** Event position is relative to the control origin. @@ -1536,7 +1536,7 @@ The returned node must be of type ``Control`` or Control-derived. It can have ch The returned node will be added as child to a :ref:`PopupPanel`, so you should only provide the contents of that panel. That :ref:`PopupPanel` can be themed using :ref:`Theme.set_stylebox` for the type ``"TooltipPanel"`` (see :ref:`hint_tooltip` for an example). -\ **Note:** The tooltip is shrunk to minimal size. If you want to ensure it's fully visible, you might want to set its :ref:`rect_min_size` to some non-zero value. +\ **Note:** The tooltip is shrunk to minimal size. If you want to ensure it's fully visible, you might want to set its :ref:`minimum_size` to some non-zero value. \ **Note:** The node (and any relevant children) should be :ref:`CanvasItem.visible` when returned, otherwise, the viewport that instantiates it will not be able to calculate its minimum size reliably. @@ -1776,7 +1776,7 @@ Returns the anchor for the specified :ref:`Side`. A gett - :ref:`Vector2` **get_begin** **(** **)** |const| -Returns :ref:`offset_left` and :ref:`offset_top`. See also :ref:`rect_position`. +Returns :ref:`offset_left` and :ref:`offset_top`. See also :ref:`position`. ---- @@ -1784,7 +1784,7 @@ Returns :ref:`offset_left` and :ref:`offset_ - :ref:`Vector2` **get_combined_minimum_size** **(** **)** |const| -Returns combined minimum size from :ref:`rect_min_size` and :ref:`get_minimum_size`. +Returns combined minimum size from :ref:`minimum_size` and :ref:`get_minimum_size`. ---- @@ -1816,7 +1816,7 @@ Returns the focus neighbor for the specified :ref:`Side` - :ref:`Rect2` **get_global_rect** **(** **)** |const| -Returns the position and size of the control relative to the top-left corner of the screen. See :ref:`rect_position` and :ref:`rect_size`. +Returns the position and size of the control relative to the top-left corner of the screen. See :ref:`position` and :ref:`size`. ---- @@ -1824,7 +1824,7 @@ Returns the position and size of the control relative to the top-left corner of - :ref:`Vector2` **get_minimum_size** **(** **)** |const| -Returns the minimum size for this control. See :ref:`rect_min_size`. +Returns the minimum size for this control. See :ref:`minimum_size`. ---- @@ -1856,7 +1856,7 @@ Returns the parent control node. - :ref:`Rect2` **get_rect** **(** **)** |const| -Returns the position and size of the control relative to the top-left corner of the parent Control. See :ref:`rect_position` and :ref:`rect_size`. +Returns the position and size of the control relative to the top-left corner of the parent Control. See :ref:`position` and :ref:`size`. ---- @@ -2264,7 +2264,7 @@ If ``keep_offsets`` is ``true``, control's position will also be updated. - void **set_begin** **(** :ref:`Vector2` position **)** -Sets :ref:`offset_left` and :ref:`offset_top` at the same time. Equivalent of changing :ref:`rect_position`. +Sets :ref:`offset_left` and :ref:`offset_top` at the same time. Equivalent of changing :ref:`position`. ---- @@ -2359,7 +2359,7 @@ Shows the given control at the mouse pointer. A good time to call this method is # Use a control that is not in the tree var cpb = ColorPickerButton.new() cpb.color = color - cpb.rect_size = Vector2(50, 50) + cpb.size = Vector2(50, 50) set_drag_preview(cpb) return color @@ -2402,7 +2402,7 @@ Sets the anchor for the specified :ref:`Side` to the ``C - void **set_global_position** **(** :ref:`Vector2` position, :ref:`bool` keep_offsets=false **)** -Sets the :ref:`rect_global_position` to given ``position``. +Sets the :ref:`global_position` to given ``position``. If ``keep_offsets`` is ``true``, control's anchors will be updated instead of offsets. @@ -2432,7 +2432,7 @@ Use parameter ``margin`` to determine the gap between the ``Control`` and the ed - void **set_position** **(** :ref:`Vector2` position, :ref:`bool` keep_offsets=false **)** -Sets the :ref:`rect_position` to given ``position``. +Sets the :ref:`position` to given ``position``. If ``keep_offsets`` is ``true``, control's anchors will be updated instead of offsets. @@ -2442,7 +2442,7 @@ If ``keep_offsets`` is ``true``, control's anchors will be updated instead of of - void **set_size** **(** :ref:`Vector2` size, :ref:`bool` keep_offsets=false **)** -Sets the size (see :ref:`rect_size`). +Sets the size (see :ref:`size`). If ``keep_offsets`` is ``true``, control's anchors will be updated instead of offsets. @@ -2452,7 +2452,7 @@ If ``keep_offsets`` is ``true``, control's anchors will be updated instead of of - void **update_minimum_size** **(** **)** -Invalidates the size cache in this node and in parent nodes up to top level. Intended to be used with :ref:`get_minimum_size` when the return value is changed. Setting :ref:`rect_min_size` directly calls this method automatically. +Invalidates the size cache in this node and in parent nodes up to top level. Intended to be used with :ref:`get_minimum_size` when the return value is changed. Setting :ref:`minimum_size` directly calls this method automatically. ---- @@ -2460,7 +2460,7 @@ Invalidates the size cache in this node and in parent nodes up to top level. Int - void **warp_mouse** **(** :ref:`Vector2` to_position **)** -Moves the mouse cursor to ``to_position``, relative to :ref:`rect_position` of this ``Control``. +Moves the mouse cursor to ``to_position``, relative to :ref:`position` of this ``Control``. .. |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.)` diff --git a/classes/class_curve2d.rst b/classes/class_curve2d.rst index a42732763..299aaf4fd 100644 --- a/classes/class_curve2d.rst +++ b/classes/class_curve2d.rst @@ -92,7 +92,7 @@ Method Descriptions - void **add_point** **(** :ref:`Vector2` position, :ref:`Vector2` in=Vector2(0, 0), :ref:`Vector2` out=Vector2(0, 0), :ref:`int` at_position=-1 **)** -Adds a point to a curve at ``position`` relative to the Curve2D's position, with control points ``in`` and ``out``. +Adds a point to a curve at ``position``, with control points ``in`` and ``out``. If ``at_position`` is given, the point is inserted before the point number ``at_position``, moving that point (and every point after) after the inserted point. If ``at_position`` is not given, or is an illegal value (``at_position <0`` or ``at_position >= [method get_point_count]``), the point will be appended at the end of the point list. diff --git a/classes/class_displayserver.rst b/classes/class_displayserver.rst index 92f1f3ba7..246d55db4 100644 --- a/classes/class_displayserver.rst +++ b/classes/class_displayserver.rst @@ -167,6 +167,8 @@ Methods +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`window_can_draw` **(** :ref:`int` window_id=0 **)** |const| | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`window_get_active_popup` **(** **)** |const| | ++----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`window_get_attached_instance_id` **(** :ref:`int` window_id=0 **)** |const| | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`window_get_current_screen` **(** :ref:`int` window_id=0 **)** |const| | @@ -181,6 +183,8 @@ Methods +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`window_get_native_handle` **(** :ref:`HandleType` handle_type, :ref:`int` window_id=0 **)** |const| | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Rect2i` | :ref:`window_get_popup_safe_rect` **(** :ref:`int` window **)** |const| | ++----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2i` | :ref:`window_get_position` **(** :ref:`int` window_id=0 **)** |const| | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2i` | :ref:`window_get_real_size` **(** :ref:`int` window_id=0 **)** |const| | @@ -217,6 +221,8 @@ Methods +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`window_set_mouse_passthrough` **(** :ref:`PackedVector2Array` region, :ref:`int` window_id=0 **)** | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`window_set_popup_safe_rect` **(** :ref:`int` window, :ref:`Rect2i` rect **)** | ++----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`window_set_position` **(** :ref:`Vector2i` position, :ref:`int` window_id=0 **)** | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`window_set_rect_changed_callback` **(** :ref:`Callable` callback, :ref:`int` window_id=0 **)** | @@ -497,21 +503,25 @@ Regardless of the platform, enabling fullscreen will change the window size to m .. _class_DisplayServer_constant_WINDOW_FLAG_NO_FOCUS: +.. _class_DisplayServer_constant_WINDOW_FLAG_POPUP: + .. _class_DisplayServer_constant_WINDOW_FLAG_MAX: enum **WindowFlags**: -- **WINDOW_FLAG_RESIZE_DISABLED** = **0** +- **WINDOW_FLAG_RESIZE_DISABLED** = **0** --- Window can't be resizing by dragging its resize grip. It's still possible to resize the window using :ref:`window_set_size`. This flag is ignored for full screen windows. -- **WINDOW_FLAG_BORDERLESS** = **1** +- **WINDOW_FLAG_BORDERLESS** = **1** --- Window do not have native title bar and other decorations. This flag is ignored for full-screen windows. -- **WINDOW_FLAG_ALWAYS_ON_TOP** = **2** +- **WINDOW_FLAG_ALWAYS_ON_TOP** = **2** --- Window is floating above other regular windows. This flag is ignored for full-screen windows. -- **WINDOW_FLAG_TRANSPARENT** = **3** +- **WINDOW_FLAG_TRANSPARENT** = **3** --- Window is will be destroyed with its transient parent and displayed on top of non-exclusive full-screen parent window. Transient windows can't enter full-screen mode. -- **WINDOW_FLAG_NO_FOCUS** = **4** +- **WINDOW_FLAG_NO_FOCUS** = **4** --- Window can't be focused. No-focus window will ignore all input, except mouse clicks. -- **WINDOW_FLAG_MAX** = **5** +- **WINDOW_FLAG_POPUP** = **5** --- Window is part of menu or :ref:`OptionButton` dropdown. This flag can't be changed when window is visible. An active popup window will exclusivly receive all input, without stealing focus from its parent. Popup windows are automatically closed when uses click outside it, or when an application is switched. Popup window must have :ref:`WINDOW_FLAG_TRANSPARENT` set. + +- **WINDOW_FLAG_MAX** = **6** ---- @@ -1192,6 +1202,14 @@ Shows the virtual keyboard if the platform has one. ---- +.. _class_DisplayServer_method_window_get_active_popup: + +- :ref:`int` **window_get_active_popup** **(** **)** |const| + +Returns ID of the active popup window, or :ref:`INVALID_WINDOW_ID` if there is none. + +---- + .. _class_DisplayServer_method_window_get_attached_instance_id: - :ref:`int` **window_get_attached_instance_id** **(** :ref:`int` window_id=0 **)** |const| @@ -1242,6 +1260,14 @@ Returns internal structure pointers for use in plugins. ---- +.. _class_DisplayServer_method_window_get_popup_safe_rect: + +- :ref:`Rect2i` **window_get_popup_safe_rect** **(** :ref:`int` window **)** |const| + +Returns the bounding box of control, or menu item that was used to open the popup window, in the screen coordinate system. + +---- + .. _class_DisplayServer_method_window_get_position: - :ref:`Vector2i` **window_get_position** **(** :ref:`int` window_id=0 **)** |const| @@ -1405,6 +1431,14 @@ Passing an empty array will disable passthrough support (all mouse events will b ---- +.. _class_DisplayServer_method_window_set_popup_safe_rect: + +- void **window_set_popup_safe_rect** **(** :ref:`int` window, :ref:`Rect2i` rect **)** + +Sets the bounding box of control, or menu item that was used to open the popup window, in the screen coordinate system. Clicking this area will not auto-close this popup. + +---- + .. _class_DisplayServer_method_window_set_position: - void **window_set_position** **(** :ref:`Vector2i` position, :ref:`int` window_id=0 **)** diff --git a/classes/class_editorsettings.rst b/classes/class_editorsettings.rst index 26a3cb24c..a7c6a032c 100644 --- a/classes/class_editorsettings.rst +++ b/classes/class_editorsettings.rst @@ -53,8 +53,12 @@ Methods +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_property_info` **(** :ref:`Dictionary` info **)** | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`check_changed_settings_in_group` **(** :ref:`String` setting_prefix **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`erase` **(** :ref:`String` property **)** | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_changed_settings` **(** **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`get_favorites` **(** **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`get_project_metadata` **(** :ref:`String` section, :ref:`String` key, :ref:`Variant` default=null **)** |const| | @@ -67,6 +71,8 @@ Methods +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_setting` **(** :ref:`String` name **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`mark_setting_changed` **(** :ref:`String` setting **)** | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`property_can_revert` **(** :ref:`String` name **)** | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`property_get_revert` **(** :ref:`String` name **)** | @@ -151,6 +157,14 @@ Adds a custom property info to a property. The dictionary must contain: +---- + +.. _class_EditorSettings_method_check_changed_settings_in_group: + +- :ref:`bool` **check_changed_settings_in_group** **(** :ref:`String` setting_prefix **)** |const| + +Checks if any settings with the prefix ``setting_prefix`` exist in the set of changed settings. See also :ref:`get_changed_settings`. + ---- .. _class_EditorSettings_method_erase: @@ -161,6 +175,14 @@ Erases the setting whose name is specified by ``property``. ---- +.. _class_EditorSettings_method_get_changed_settings: + +- :ref:`Array` **get_changed_settings** **(** **)** |const| + +Gets an array of the settings which have been changed since the last save. Note that internally ``changed_settings`` is cleared after a successful save, so generally the most appropriate place to use this method is when processing :ref:`NOTIFICATION_EDITOR_SETTINGS_CHANGED` + +---- + .. _class_EditorSettings_method_get_favorites: - :ref:`PackedStringArray` **get_favorites** **(** **)** |const| @@ -209,6 +231,14 @@ Returns ``true`` if the setting specified by ``name`` exists, ``false`` otherwis ---- +.. _class_EditorSettings_method_mark_setting_changed: + +- void **mark_setting_changed** **(** :ref:`String` setting **)** + +Marks the passed editor setting as being changed, see :ref:`get_changed_settings`. Only settings which exist (see :ref:`has_setting`) will be accepted. + +---- + .. _class_EditorSettings_method_property_can_revert: - :ref:`bool` **property_can_revert** **(** :ref:`String` name **)** diff --git a/classes/class_editorvcsinterface.rst b/classes/class_editorvcsinterface.rst index 5752d10eb..b075a0974 100644 --- a/classes/class_editorvcsinterface.rst +++ b/classes/class_editorvcsinterface.rst @@ -16,7 +16,7 @@ Version Control System (VCS) interface which reads and writes to the local VCS i Description ----------- -Used by the editor to display VCS extracted information in the editor. The implementation of this API is included in VCS addons, which are essentially GDNative plugins that need to be put into the project folder. These VCS addons are scripts which are attached (on demand) to the object instance of ``EditorVCSInterface``. All the functions listed below, instead of performing the task themselves, they call the internally defined functions in the VCS addons to provide a plug-n-play experience. +Used by the editor to display VCS extracted information in the editor. The implementation of this API is included in VCS addons, which are essentially GDExtension plugins that need to be put into the project folder. These VCS addons are scripts which are attached (on demand) to the object instance of ``EditorVCSInterface``. All the functions listed below, instead of performing the task themselves, they call the internally defined functions in the VCS addons to provide a plug-n-play experience. Methods ------- diff --git a/classes/class_fogvolume.rst b/classes/class_fogvolume.rst index aabdd747f..8827430fc 100644 --- a/classes/class_fogvolume.rst +++ b/classes/class_fogvolume.rst @@ -48,6 +48,8 @@ Property Descriptions Sets the size of the ``FogVolume`` when :ref:`shape` is :ref:`RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID` or :ref:`RenderingServer.FOG_VOLUME_SHAPE_BOX`. +\ **Note:** Thin fog volumes may appear to flicker when the camera moves or rotates. This can be alleviated by increasing :ref:`ProjectSettings.rendering/environment/volumetric_fog/volume_depth` (at a performance cost) or by decreasing :ref:`Environment.volumetric_fog_length` (at no performance cost, but at the cost of lower fog range). Alternatively, the ``FogVolume`` can be made thicker and use a lower density in the :ref:`material`. + ---- .. _class_FogVolume_property_material: diff --git a/classes/class_fontdata.rst b/classes/class_fontdata.rst index 9ecc48431..a831a28f9 100644 --- a/classes/class_fontdata.rst +++ b/classes/class_fontdata.rst @@ -24,35 +24,39 @@ Supported font formats: Properties ---------- -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`antialiased` | ``true`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`PackedByteArray` | :ref:`data` | ``PackedByteArray()`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`fixed_size` | ``0`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`String` | :ref:`font_name` | ``""`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`font_style` | ``0`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`force_autohinter` | ``false`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Hinting` | :ref:`hinting` | ``1`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`msdf_pixel_range` | ``16`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`msdf_size` | ``48`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`multichannel_signed_distance_field` | ``false`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Dictionary` | :ref:`opentype_feature_overrides` | ``{}`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`oversampling` | ``0.0`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`String` | :ref:`style_name` | ``""`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`SubpixelPositioning` | :ref:`subpixel_positioning` | ``1`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ ++-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`bool` | :ref:`antialiased` | ``true`` | ++-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`PackedByteArray` | :ref:`data` | ``PackedByteArray()`` | ++-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`embolden` | ``0.0`` | ++-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`int` | :ref:`fixed_size` | ``0`` | ++-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`String` | :ref:`font_name` | ``""`` | ++-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`int` | :ref:`font_style` | ``0`` | ++-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`bool` | :ref:`force_autohinter` | ``false`` | ++-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`Hinting` | :ref:`hinting` | ``1`` | ++-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`int` | :ref:`msdf_pixel_range` | ``16`` | ++-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`int` | :ref:`msdf_size` | ``48`` | ++-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`bool` | :ref:`multichannel_signed_distance_field` | ``false`` | ++-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`Dictionary` | :ref:`opentype_feature_overrides` | ``{}`` | ++-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`oversampling` | ``0.0`` | ++-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`String` | :ref:`style_name` | ``""`` | ++-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`SubpixelPositioning` | :ref:`subpixel_positioning` | ``1`` | ++-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`Transform2D` | :ref:`transform` | ``Transform2D(1, 0, 0, 1, 0, 0)`` | ++-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------------------+ Methods ------- @@ -226,6 +230,22 @@ Contents of the dynamic font source file. ---- +.. _class_FontData_property_embolden: + +- :ref:`float` **embolden** + ++-----------+---------------------+ +| *Default* | ``0.0`` | ++-----------+---------------------+ +| *Setter* | set_embolden(value) | ++-----------+---------------------+ +| *Getter* | get_embolden() | ++-----------+---------------------+ + +If is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness. + +---- + .. _class_FontData_property_fixed_size: - :ref:`int` **fixed_size** @@ -416,6 +436,24 @@ Font style name. Font glyph sub-pixel positioning mode. Subpixel positioning provides shaper text and better kerning for smaller font sizes, at the cost of memory usage and font rasterization speed. Use :ref:`TextServer.SUBPIXEL_POSITIONING_AUTO` to automatically enable it based on the font size. +---- + +.. _class_FontData_property_transform: + +- :ref:`Transform2D` **transform** + ++-----------+-----------------------------------+ +| *Default* | ``Transform2D(1, 0, 0, 1, 0, 0)`` | ++-----------+-----------------------------------+ +| *Setter* | set_transform(value) | ++-----------+-----------------------------------+ +| *Getter* | get_transform() | ++-----------+-----------------------------------+ + +2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs. + +For example, to simulate italic typeface by slanting, apply the following transform ``Transform2D(1.0, slant, 0.0, 1.0, 0.0, 0.0)``. + Method Descriptions ------------------- diff --git a/classes/class_gdnative.rst b/classes/class_gdnative.rst deleted file mode 100644 index 032937276..000000000 --- a/classes/class_gdnative.rst +++ /dev/null @@ -1,71 +0,0 @@ -:github_url: hide - -.. Generated automatically by doc/tools/make_rst.py in Godot's source tree. -.. DO NOT EDIT THIS FILE, but the GDNative.xml source instead. -.. The source is found in doc/classes or modules//doc_classes. - -.. _class_GDNative: - -GDNative -======== - -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` - - - -Properties ----------- - -+-----------------------------------------------+-------------------------------------------------+ -| :ref:`GDNativeLibrary` | :ref:`library` | -+-----------------------------------------------+-------------------------------------------------+ - -Methods -------- - -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`call_native` **(** :ref:`StringName` calling_type, :ref:`StringName` procedure_name, :ref:`Array` arguments **)** | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`initialize` **(** **)** | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`terminate` **(** **)** | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - -Property Descriptions ---------------------- - -.. _class_GDNative_property_library: - -- :ref:`GDNativeLibrary` **library** - -+----------+--------------------+ -| *Setter* | set_library(value) | -+----------+--------------------+ -| *Getter* | get_library() | -+----------+--------------------+ - -Method Descriptions -------------------- - -.. _class_GDNative_method_call_native: - -- :ref:`Variant` **call_native** **(** :ref:`StringName` calling_type, :ref:`StringName` procedure_name, :ref:`Array` arguments **)** - ----- - -.. _class_GDNative_method_initialize: - -- :ref:`bool` **initialize** **(** **)** - ----- - -.. _class_GDNative_method_terminate: - -- :ref:`bool` **terminate** **(** **)** - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_gdnativelibrary.rst b/classes/class_gdnativelibrary.rst deleted file mode 100644 index 9e59ff951..000000000 --- a/classes/class_gdnativelibrary.rst +++ /dev/null @@ -1,161 +0,0 @@ -:github_url: hide - -.. Generated automatically by doc/tools/make_rst.py in Godot's source tree. -.. DO NOT EDIT THIS FILE, but the GDNativeLibrary.xml source instead. -.. The source is found in doc/classes or modules//doc_classes. - -.. _class_GDNativeLibrary: - -GDNativeLibrary -=============== - -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -An external library containing functions or script classes to use in Godot. - -Description ------------ - -A GDNative library can implement :ref:`NativeScript`\ s, global functions to call with the :ref:`GDNative` class, or low-level engine extensions through interfaces such as XRInterfaceGDNative. The library must be compiled for each platform and architecture that the project will run on. - -Tutorials ---------- - -- :doc:`GDNative C example <../tutorials/scripting/gdnative/gdnative_c_example>` - -- :doc:`GDNative C++ example <../tutorials/scripting/gdnative/gdnative_cpp_example>` - -Properties ----------- - -+-------------------------------------+--------------------------------------------------------------------+--------------+ -| :ref:`ConfigFile` | :ref:`config_file` | | -+-------------------------------------+--------------------------------------------------------------------+--------------+ -| :ref:`bool` | :ref:`load_once` | ``true`` | -+-------------------------------------+--------------------------------------------------------------------+--------------+ -| :ref:`bool` | :ref:`reloadable` | ``true`` | -+-------------------------------------+--------------------------------------------------------------------+--------------+ -| :ref:`bool` | :ref:`singleton` | ``false`` | -+-------------------------------------+--------------------------------------------------------------------+--------------+ -| :ref:`String` | :ref:`symbol_prefix` | ``"godot_"`` | -+-------------------------------------+--------------------------------------------------------------------+--------------+ - -Methods -------- - -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_current_dependencies` **(** **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_current_library_path` **(** **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------+ - -Property Descriptions ---------------------- - -.. _class_GDNativeLibrary_property_config_file: - -- :ref:`ConfigFile` **config_file** - -+----------+------------------------+ -| *Setter* | set_config_file(value) | -+----------+------------------------+ -| *Getter* | get_config_file() | -+----------+------------------------+ - -This resource in INI-style :ref:`ConfigFile` format, as in ``.gdnlib`` files. - ----- - -.. _class_GDNativeLibrary_property_load_once: - -- :ref:`bool` **load_once** - -+-----------+----------------------+ -| *Default* | ``true`` | -+-----------+----------------------+ -| *Setter* | set_load_once(value) | -+-----------+----------------------+ -| *Getter* | should_load_once() | -+-----------+----------------------+ - -If ``true``, Godot loads only one copy of the library and each script that references the library will share static data like static or global variables. - -If ``false``, Godot loads a separate copy of the library into memory for each script that references it. - ----- - -.. _class_GDNativeLibrary_property_reloadable: - -- :ref:`bool` **reloadable** - -+-----------+-----------------------+ -| *Default* | ``true`` | -+-----------+-----------------------+ -| *Setter* | set_reloadable(value) | -+-----------+-----------------------+ -| *Getter* | is_reloadable() | -+-----------+-----------------------+ - -If ``true``, the editor will temporarily unload the library whenever the user switches away from the editor window, allowing the user to recompile the library without restarting Godot. - -\ **Note:** If the library defines tool scripts that run inside the editor, ``reloadable`` must be ``false``. Otherwise, the editor will attempt to unload the tool scripts while they're in use and crash. - ----- - -.. _class_GDNativeLibrary_property_singleton: - -- :ref:`bool` **singleton** - -+-----------+----------------------+ -| *Default* | ``false`` | -+-----------+----------------------+ -| *Setter* | set_singleton(value) | -+-----------+----------------------+ -| *Getter* | is_singleton() | -+-----------+----------------------+ - -If ``true``, Godot loads the library at startup rather than the first time a script uses the library, calling ``{prefix}gdnative_singleton`` after initializing the library (where ``{prefix}`` is the value of :ref:`symbol_prefix`). The library remains loaded as long as Godot is running. - -\ **Note:** A singleton library cannot be :ref:`reloadable`. - ----- - -.. _class_GDNativeLibrary_property_symbol_prefix: - -- :ref:`String` **symbol_prefix** - -+-----------+--------------------------+ -| *Default* | ``"godot_"`` | -+-----------+--------------------------+ -| *Setter* | set_symbol_prefix(value) | -+-----------+--------------------------+ -| *Getter* | get_symbol_prefix() | -+-----------+--------------------------+ - -The prefix this library's entry point functions begin with. For example, a GDNativeLibrary would declare its ``gdnative_init`` function as ``godot_gdnative_init`` by default. - -On platforms that require statically linking libraries (currently only iOS), each library must have a different ``symbol_prefix``. - -Method Descriptions -------------------- - -.. _class_GDNativeLibrary_method_get_current_dependencies: - -- :ref:`PackedStringArray` **get_current_dependencies** **(** **)** |const| - -Returns paths to all dependency libraries for the current platform and architecture. - ----- - -.. _class_GDNativeLibrary_method_get_current_library_path: - -- :ref:`String` **get_current_library_path** **(** **)** |const| - -Returns the path to the dynamic library file for the current platform and architecture. - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_geometry2d.rst b/classes/class_geometry2d.rst index 07a648ffe..2db1932d1 100644 --- a/classes/class_geometry2d.rst +++ b/classes/class_geometry2d.rst @@ -341,7 +341,7 @@ Triangulates the area specified by discrete set of ``points`` such that no point - :ref:`PackedInt32Array` **triangulate_polygon** **(** :ref:`PackedVector2Array` polygon **)** -Triangulates the polygon specified by the points in ``polygon``. Returns a :ref:`PackedInt32Array` where each triangle consists of three consecutive point indices into ``polygon`` (i.e. the returned array will have ``n * 3`` elements, with ``n`` being the number of found triangles). If the triangulation did not succeed, an empty :ref:`PackedInt32Array` is returned. +Triangulates the polygon specified by the points in ``polygon``. Returns a :ref:`PackedInt32Array` where each triangle consists of three consecutive point indices into ``polygon`` (i.e. the returned array will have ``n * 3`` elements, with ``n`` being the number of found triangles). Output triangles will always be counter clockwise, and the contour will be flipped if it's clockwise. If the triangulation did not succeed, an empty :ref:`PackedInt32Array` is returned. .. |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.)` diff --git a/classes/class_graphedit.rst b/classes/class_graphedit.rst index a63fa32c2..a7175f19c 100644 --- a/classes/class_graphedit.rst +++ b/classes/class_graphedit.rst @@ -23,41 +23,41 @@ It is greatly advised to enable low-processor usage mode (see :ref:`OS.low_proce Properties ---------- -+----------------------------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`connection_lines_antialiased` | ``true`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`connection_lines_thickness` | ``2.0`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`FocusMode` | focus_mode | ``2`` (overrides :ref:`Control`) | -+----------------------------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`minimap_enabled` | ``true`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`minimap_opacity` | ``0.65`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`minimap_size` | ``Vector2(240, 160)`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`PanningScheme` | :ref:`panning_scheme` | ``0`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`bool` | rect_clip_content | ``true`` (overrides :ref:`Control`) | -+----------------------------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`right_disconnects` | ``false`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`scroll_offset` | ``Vector2(0, 0)`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`show_zoom_label` | ``false`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`snap_distance` | ``20`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`use_snap` | ``true`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`zoom` | ``1.0`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`zoom_max` | ``2.0736`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`zoom_min` | ``0.232568`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`zoom_step` | ``1.2`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ ++----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`bool` | clip_contents | ``true`` (overrides :ref:`Control`) | ++----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`connection_lines_antialiased` | ``true`` | ++----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`float` | :ref:`connection_lines_thickness` | ``2.0`` | ++----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`FocusMode` | focus_mode | ``2`` (overrides :ref:`Control`) | ++----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`minimap_enabled` | ``true`` | ++----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`float` | :ref:`minimap_opacity` | ``0.65`` | ++----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`minimap_size` | ``Vector2(240, 160)`` | ++----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`PanningScheme` | :ref:`panning_scheme` | ``0`` | ++----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`right_disconnects` | ``false`` | ++----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`scroll_offset` | ``Vector2(0, 0)`` | ++----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`show_zoom_label` | ``false`` | ++----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`int` | :ref:`snap_distance` | ``20`` | ++----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`use_snap` | ``true`` | ++----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`float` | :ref:`zoom` | ``1.0`` | ++----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`float` | :ref:`zoom_max` | ``2.0736`` | ++----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`float` | :ref:`zoom_min` | ``0.232568`` | ++----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`float` | :ref:`zoom_step` | ``1.2`` | ++----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ Methods ------- diff --git a/classes/class_gridmap.rst b/classes/class_gridmap.rst index 9b03dd0b6..dfe410002 100644 --- a/classes/class_gridmap.rst +++ b/classes/class_gridmap.rst @@ -67,45 +67,43 @@ Properties Methods ------- -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_baked_meshes` **(** **)** | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_bake_mesh_instance` **(** :ref:`int` idx **)** | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_bake_meshes` **(** **)** | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_cell_item` **(** :ref:`Vector3i` position **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_cell_item_orientation` **(** :ref:`Vector3i` position **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_collision_layer_value` **(** :ref:`int` layer_number **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_collision_mask_value` **(** :ref:`int` layer_number **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_meshes` **(** **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_used_cells` **(** **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_used_cells_by_item` **(** :ref:`int` item **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`make_baked_meshes` **(** :ref:`bool` gen_lightmap_uv=false, :ref:`float` lightmap_uv_texel_size=0.1 **)** | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`map_to_world` **(** :ref:`Vector3i` map_position **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`resource_changed` **(** :ref:`Resource` resource **)** | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_cell_item` **(** :ref:`Vector3i` position, :ref:`int` item, :ref:`int` orientation=0 **)** | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_clip` **(** :ref:`bool` enabled, :ref:`bool` clipabove=true, :ref:`int` floor=0, Vector3.Axis axis=0 **)** | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_collision_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_collision_mask_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3i` | :ref:`world_to_map` **(** :ref:`Vector3` world_position **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_baked_meshes` **(** **)** | ++---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`get_bake_mesh_instance` **(** :ref:`int` idx **)** | ++---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_bake_meshes` **(** **)** | ++---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_cell_item` **(** :ref:`Vector3i` position **)** |const| | ++---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_cell_item_orientation` **(** :ref:`Vector3i` position **)** |const| | ++---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_collision_layer_value` **(** :ref:`int` layer_number **)** |const| | ++---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_collision_mask_value` **(** :ref:`int` layer_number **)** |const| | ++---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_meshes` **(** **)** |const| | ++---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_used_cells` **(** **)** |const| | ++---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_used_cells_by_item` **(** :ref:`int` item **)** |const| | ++---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`make_baked_meshes` **(** :ref:`bool` gen_lightmap_uv=false, :ref:`float` lightmap_uv_texel_size=0.1 **)** | ++---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`map_to_world` **(** :ref:`Vector3i` map_position **)** |const| | ++---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`resource_changed` **(** :ref:`Resource` resource **)** | ++---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_cell_item` **(** :ref:`Vector3i` position, :ref:`int` item, :ref:`int` orientation=0 **)** | ++---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_collision_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | ++---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_collision_mask_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | ++---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3i` | :ref:`world_to_map` **(** :ref:`Vector3` world_position **)** |const| | ++---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- @@ -437,12 +435,6 @@ Optionally, the item's orientation can be passed. For valid orientation values, ---- -.. _class_GridMap_method_set_clip: - -- void **set_clip** **(** :ref:`bool` enabled, :ref:`bool` clipabove=true, :ref:`int` floor=0, Vector3.Axis axis=0 **)** - ----- - .. _class_GridMap_method_set_collision_layer_value: - void **set_collision_layer_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** diff --git a/classes/class_imagetexture.rst b/classes/class_imagetexture.rst index 30195c47b..6a7504f50 100644 --- a/classes/class_imagetexture.rst +++ b/classes/class_imagetexture.rst @@ -35,7 +35,7 @@ This way, textures can be created at run-time by loading images both from within var texture = load("res://icon.png") $Sprite2D.texture = texture -This is because images have to be imported as a :ref:`StreamTexture2D` first to be loaded with :ref:`@GDScript.load`. If you'd still like to load an image file just like any other :ref:`Resource`, import it as an :ref:`Image` resource instead, and then load it normally using the :ref:`@GDScript.load` method. +This is because images have to be imported as a :ref:`CompressedTexture2D` first to be loaded with :ref:`@GDScript.load`. If you'd still like to load an image file just like any other :ref:`Resource`, import it as an :ref:`Image` resource instead, and then load it normally using the :ref:`@GDScript.load` method. \ **Note:** The image can be retrieved from an imported texture using the :ref:`Texture2D.get_image` method, which returns a copy of the image: diff --git a/classes/class_itemlist.rst b/classes/class_itemlist.rst index d6223eccb..d3904aed1 100644 --- a/classes/class_itemlist.rst +++ b/classes/class_itemlist.rst @@ -25,37 +25,37 @@ Item text only supports single-line strings, newline characters (e.g. ``\n``) in Properties ---------- -+------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`allow_reselect` | ``false`` | -+------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`allow_rmb_select` | ``false`` | -+------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`auto_height` | ``false`` | -+------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`fixed_column_width` | ``0`` | -+------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`fixed_icon_size` | ``Vector2(0, 0)`` | -+------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`FocusMode` | focus_mode | ``2`` (overrides :ref:`Control`) | -+------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`IconMode` | :ref:`icon_mode` | ``1`` | -+------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`icon_scale` | ``1.0`` | -+------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`item_count` | ``0`` | -+------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`max_columns` | ``1`` | -+------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`max_text_lines` | ``1`` | -+------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`bool` | rect_clip_content | ``true`` (overrides :ref:`Control`) | -+------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`same_column_width` | ``false`` | -+------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`SelectMode` | :ref:`select_mode` | ``0`` | -+------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`OverrunBehavior` | :ref:`text_overrun_behavior` | ``0`` | -+------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ ++------------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`allow_reselect` | ``false`` | ++------------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`allow_rmb_select` | ``false`` | ++------------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`auto_height` | ``false`` | ++------------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`bool` | clip_contents | ``true`` (overrides :ref:`Control`) | ++------------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`int` | :ref:`fixed_column_width` | ``0`` | ++------------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`fixed_icon_size` | ``Vector2(0, 0)`` | ++------------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`FocusMode` | focus_mode | ``2`` (overrides :ref:`Control`) | ++------------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`IconMode` | :ref:`icon_mode` | ``1`` | ++------------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`float` | :ref:`icon_scale` | ``1.0`` | ++------------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`int` | :ref:`item_count` | ``0`` | ++------------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`int` | :ref:`max_columns` | ``1`` | ++------------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`int` | :ref:`max_text_lines` | ``1`` | ++------------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`same_column_width` | ``false`` | ++------------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`SelectMode` | :ref:`select_mode` | ``0`` | ++------------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`OverrunBehavior` | :ref:`text_overrun_behavior` | ``3`` | ++------------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ Methods ------- @@ -491,7 +491,7 @@ Allows single or multiple item selection. See the :ref:`SelectMode` **text_overrun_behavior** +-----------+----------------------------------+ -| *Default* | ``0`` | +| *Default* | ``3`` | +-----------+----------------------------------+ | *Setter* | set_text_overrun_behavior(value) | +-----------+----------------------------------+ diff --git a/classes/class_light3d.rst b/classes/class_light3d.rst index b48b50b76..f23f6d57d 100644 --- a/classes/class_light3d.rst +++ b/classes/class_light3d.rst @@ -30,6 +30,14 @@ Tutorials Properties ---------- ++----------------------------------------+------------------------------------------------------------------------------------+-----------------------+ +| :ref:`float` | :ref:`distance_fade_begin` | ``40.0`` | ++----------------------------------------+------------------------------------------------------------------------------------+-----------------------+ +| :ref:`bool` | :ref:`distance_fade_enabled` | ``false`` | ++----------------------------------------+------------------------------------------------------------------------------------+-----------------------+ +| :ref:`float` | :ref:`distance_fade_length` | ``10.0`` | ++----------------------------------------+------------------------------------------------------------------------------------+-----------------------+ +| :ref:`float` | :ref:`distance_fade_shadow` | ``50.0`` | +----------------------------------------+------------------------------------------------------------------------------------+-----------------------+ | :ref:`bool` | :ref:`editor_only` | ``false`` | +----------------------------------------+------------------------------------------------------------------------------------+-----------------------+ @@ -57,8 +65,6 @@ Properties +----------------------------------------+------------------------------------------------------------------------------------+-----------------------+ | :ref:`float` | :ref:`shadow_blur` | ``1.0`` | +----------------------------------------+------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Color` | :ref:`shadow_color` | ``Color(0, 0, 0, 1)`` | -+----------------------------------------+------------------------------------------------------------------------------------+-----------------------+ | :ref:`bool` | :ref:`shadow_enabled` | ``false`` | +----------------------------------------+------------------------------------------------------------------------------------+-----------------------+ | :ref:`float` | :ref:`shadow_fog_fade` | ``0.1`` | @@ -189,6 +195,80 @@ enum **BakeMode**: Property Descriptions --------------------- +.. _class_Light3D_property_distance_fade_begin: + +- :ref:`float` **distance_fade_begin** + ++-----------+--------------------------------+ +| *Default* | ``40.0`` | ++-----------+--------------------------------+ +| *Setter* | set_distance_fade_begin(value) | ++-----------+--------------------------------+ +| *Getter* | get_distance_fade_begin() | ++-----------+--------------------------------+ + +The distance from the camera at which the light begins to fade away (in 3D units). + +\ **Note:** Only effective for :ref:`OmniLight3D` and :ref:`SpotLight3D`. + +---- + +.. _class_Light3D_property_distance_fade_enabled: + +- :ref:`bool` **distance_fade_enabled** + ++-----------+---------------------------------+ +| *Default* | ``false`` | ++-----------+---------------------------------+ +| *Setter* | set_enable_distance_fade(value) | ++-----------+---------------------------------+ +| *Getter* | is_distance_fade_enabled() | ++-----------+---------------------------------+ + +If ``true``, the light will smoothly fade away when far from the active :ref:`Camera3D` starting at :ref:`distance_fade_begin`. This acts as a form of level of detail (LOD). The light will fade out over :ref:`distance_fade_begin` + :ref:`distance_fade_length`, after which it will be culled and not sent to the shader at all. Use this to reduce the number of active lights in a scene and thus improve performance. + +\ **Note:** Only effective for :ref:`OmniLight3D` and :ref:`SpotLight3D`. + +---- + +.. _class_Light3D_property_distance_fade_length: + +- :ref:`float` **distance_fade_length** + ++-----------+---------------------------------+ +| *Default* | ``10.0`` | ++-----------+---------------------------------+ +| *Setter* | set_distance_fade_length(value) | ++-----------+---------------------------------+ +| *Getter* | get_distance_fade_length() | ++-----------+---------------------------------+ + +Distance over which the light fades. The light's energy is progressively reduced over this distance and is completely invisible at the end. + +\ **Note:** Only effective for :ref:`OmniLight3D` and :ref:`SpotLight3D`. + +---- + +.. _class_Light3D_property_distance_fade_shadow: + +- :ref:`float` **distance_fade_shadow** + ++-----------+---------------------------------+ +| *Default* | ``50.0`` | ++-----------+---------------------------------+ +| *Setter* | set_distance_fade_shadow(value) | ++-----------+---------------------------------+ +| *Getter* | get_distance_fade_shadow() | ++-----------+---------------------------------+ + +The distance from the camera at which the light's shadow cuts off (in 3D units). Set this to a value lower than :ref:`distance_fade_begin` + :ref:`distance_fade_length` to further improve performance, as shadow rendering is often more expensive than light rendering itself. + +\ **Note:** Only effective for :ref:`OmniLight3D` and :ref:`SpotLight3D`, and only when :ref:`shadow_enabled` is ``true``. + +\ **Note:** Due to a rendering engine limitation, shadows will be disabled instantly instead of fading smoothly according to :ref:`distance_fade_length`. This may result in visible pop-in depending on the scene topography. + +---- + .. _class_Light3D_property_editor_only: - :ref:`bool` **editor_only** @@ -399,22 +479,6 @@ Blurs the edges of the shadow. Can be used to hide pixel artifacts in low-resolu ---- -.. _class_Light3D_property_shadow_color: - -- :ref:`Color` **shadow_color** - -+-----------+-------------------------+ -| *Default* | ``Color(0, 0, 0, 1)`` | -+-----------+-------------------------+ -| *Setter* | set_shadow_color(value) | -+-----------+-------------------------+ -| *Getter* | get_shadow_color() | -+-----------+-------------------------+ - -The color of shadows cast by this light. - ----- - .. _class_Light3D_property_shadow_enabled: - :ref:`bool` **shadow_enabled** @@ -427,7 +491,7 @@ The color of shadows cast by this light. | *Getter* | has_shadow() | +-----------+-------------------+ -If ``true``, the light will cast shadows. +If ``true``, the light will cast real-time shadows. This has a significant performance cost. Only enable shadow rendering when it makes a noticeable difference in the scene's appearance, and consider using :ref:`distance_fade_enabled` to hide the light when far away from the :ref:`Camera3D`. ---- diff --git a/classes/class_line2d.rst b/classes/class_line2d.rst index 4dfaa1e5c..6857b2d83 100644 --- a/classes/class_line2d.rst +++ b/classes/class_line2d.rst @@ -124,9 +124,9 @@ enum **LineTextureMode**: - **LINE_TEXTURE_NONE** = **0** --- Takes the left pixels of the texture and renders it over the whole line. -- **LINE_TEXTURE_TILE** = **1** --- Tiles the texture over the line. The texture must be imported with **Repeat** enabled for it to work properly. +- **LINE_TEXTURE_TILE** = **1** --- Tiles the texture over the line. :ref:`CanvasItem.texture_repeat` of the ``Line2D`` node must be :ref:`CanvasItem.TEXTURE_REPEAT_ENABLED` or :ref:`CanvasItem.TEXTURE_REPEAT_MIRROR` for it to work properly. -- **LINE_TEXTURE_STRETCH** = **2** --- Stretches the texture across the line. Import the texture with **Repeat** disabled for best results. +- **LINE_TEXTURE_STRETCH** = **2** --- Stretches the texture across the line. :ref:`CanvasItem.texture_repeat` of the ``Line2D`` node must be :ref:`CanvasItem.TEXTURE_REPEAT_DISABLED` for best results. Property Descriptions --------------------- diff --git a/classes/class_material.rst b/classes/class_material.rst index 33bbd3864..3faa2957c 100644 --- a/classes/class_material.rst +++ b/classes/class_material.rst @@ -30,18 +30,26 @@ Tutorials Properties ---------- -+---------------------------------+-----------------------------------------------------------------+-------+ -| :ref:`Material` | :ref:`next_pass` | | -+---------------------------------+-----------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`render_priority` | ``0`` | -+---------------------------------+-----------------------------------------------------------------+-------+ ++---------------------------------+-----------------------------------------------------------------+ +| :ref:`Material` | :ref:`next_pass` | ++---------------------------------+-----------------------------------------------------------------+ +| :ref:`int` | :ref:`render_priority` | ++---------------------------------+-----------------------------------------------------------------+ Methods ------- -+------+-------------------------------------------------------------------------------------------------+ -| void | :ref:`inspect_native_shader_code` **(** **)** | -+------+-------------------------------------------------------------------------------------------------+ ++-------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_can_do_next_pass` **(** **)** |virtual| |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_can_use_render_priority` **(** **)** |virtual| |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`Mode` | :ref:`_get_shader_mode` **(** **)** |virtual| |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`_get_shader_rid` **(** **)** |virtual| |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`inspect_native_shader_code` **(** **)** | ++-------------------------------+---------------------------------------------------------------------------------------------------------------+ Constants --------- @@ -77,13 +85,11 @@ Sets the ``Material`` to be used for the next pass. This renders the object agai - :ref:`int` **render_priority** -+-----------+----------------------------+ -| *Default* | ``0`` | -+-----------+----------------------------+ -| *Setter* | set_render_priority(value) | -+-----------+----------------------------+ -| *Getter* | get_render_priority() | -+-----------+----------------------------+ ++----------+----------------------------+ +| *Setter* | set_render_priority(value) | ++----------+----------------------------+ +| *Getter* | get_render_priority() | ++----------+----------------------------+ Sets the render priority for transparent objects in 3D scenes. Higher priority objects will be sorted in front of lower priority objects. @@ -94,6 +100,30 @@ Sets the render priority for transparent objects in 3D scenes. Higher priority o Method Descriptions ------------------- +.. _class_Material_method__can_do_next_pass: + +- :ref:`bool` **_can_do_next_pass** **(** **)** |virtual| |const| + +---- + +.. _class_Material_method__can_use_render_priority: + +- :ref:`bool` **_can_use_render_priority** **(** **)** |virtual| |const| + +---- + +.. _class_Material_method__get_shader_mode: + +- :ref:`Mode` **_get_shader_mode** **(** **)** |virtual| |const| + +---- + +.. _class_Material_method__get_shader_rid: + +- :ref:`RID` **_get_shader_rid** **(** **)** |virtual| |const| + +---- + .. _class_Material_method_inspect_native_shader_code: - void **inspect_native_shader_code** **(** **)** diff --git a/classes/class_mesh.rst b/classes/class_mesh.rst index 35dc28c74..01a23f10c 100644 --- a/classes/class_mesh.rst +++ b/classes/class_mesh.rst @@ -41,29 +41,57 @@ Properties Methods ------- -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Shape3D` | :ref:`create_convex_shape` **(** :ref:`bool` clean=true, :ref:`bool` simplify=false **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Mesh` | :ref:`create_outline` **(** :ref:`float` margin **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Shape3D` | :ref:`create_trimesh_shape` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TriangleMesh` | :ref:`generate_triangle_mesh` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`AABB` | :ref:`get_aabb` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector3Array` | :ref:`get_faces` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_surface_count` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`surface_get_arrays` **(** :ref:`int` surf_idx **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`surface_get_blend_shape_arrays` **(** :ref:`int` surf_idx **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Material` | :ref:`surface_get_material` **(** :ref:`int` surf_idx **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`surface_set_material` **(** :ref:`int` surf_idx, :ref:`Material` material **)** | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`AABB` | :ref:`_get_aabb` **(** **)** |virtual| |const| | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_get_blend_shape_count` **(** **)** |virtual| |const| | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringName` | :ref:`_get_blend_shape_name` **(** :ref:`int` index **)** |virtual| |const| | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_get_surface_count` **(** **)** |virtual| |const| | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_set_blend_shape_name` **(** :ref:`int` index, :ref:`StringName` name **)** |virtual| | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_surface_get_array_index_len` **(** :ref:`int` index **)** |virtual| |const| | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_surface_get_array_len` **(** :ref:`int` index **)** |virtual| |const| | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`_surface_get_arrays` **(** :ref:`int` index **)** |virtual| |const| | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`_surface_get_blend_shape_arrays` **(** :ref:`int` index **)** |virtual| |const| | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_surface_get_format` **(** :ref:`int` index **)** |virtual| |const| | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`_surface_get_lods` **(** :ref:`int` index **)** |virtual| |const| | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Material` | :ref:`_surface_get_material` **(** :ref:`int` index **)** |virtual| |const| | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_surface_get_primitive_type` **(** :ref:`int` index **)** |virtual| |const| | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_surface_set_material` **(** :ref:`int` index, :ref:`Material` material **)** |virtual| | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Shape3D` | :ref:`create_convex_shape` **(** :ref:`bool` clean=true, :ref:`bool` simplify=false **)** |const| | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Mesh` | :ref:`create_outline` **(** :ref:`float` margin **)** |const| | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Shape3D` | :ref:`create_trimesh_shape` **(** **)** |const| | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`TriangleMesh` | :ref:`generate_triangle_mesh` **(** **)** |const| | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`AABB` | :ref:`get_aabb` **(** **)** |const| | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedVector3Array` | :ref:`get_faces` **(** **)** |const| | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_surface_count` **(** **)** |const| | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`surface_get_arrays` **(** :ref:`int` surf_idx **)** |const| | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`surface_get_blend_shape_arrays` **(** :ref:`int` surf_idx **)** |const| | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Material` | :ref:`surface_get_material` **(** :ref:`int` surf_idx **)** |const| | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`surface_set_material` **(** :ref:`int` surf_idx, :ref:`Material` material **)** | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Enumerations ------------ @@ -338,6 +366,90 @@ Sets a hint to be used for lightmap resolution. Method Descriptions ------------------- +.. _class_Mesh_method__get_aabb: + +- :ref:`AABB` **_get_aabb** **(** **)** |virtual| |const| + +---- + +.. _class_Mesh_method__get_blend_shape_count: + +- :ref:`int` **_get_blend_shape_count** **(** **)** |virtual| |const| + +---- + +.. _class_Mesh_method__get_blend_shape_name: + +- :ref:`StringName` **_get_blend_shape_name** **(** :ref:`int` index **)** |virtual| |const| + +---- + +.. _class_Mesh_method__get_surface_count: + +- :ref:`int` **_get_surface_count** **(** **)** |virtual| |const| + +---- + +.. _class_Mesh_method__set_blend_shape_name: + +- void **_set_blend_shape_name** **(** :ref:`int` index, :ref:`StringName` name **)** |virtual| + +---- + +.. _class_Mesh_method__surface_get_array_index_len: + +- :ref:`int` **_surface_get_array_index_len** **(** :ref:`int` index **)** |virtual| |const| + +---- + +.. _class_Mesh_method__surface_get_array_len: + +- :ref:`int` **_surface_get_array_len** **(** :ref:`int` index **)** |virtual| |const| + +---- + +.. _class_Mesh_method__surface_get_arrays: + +- :ref:`Array` **_surface_get_arrays** **(** :ref:`int` index **)** |virtual| |const| + +---- + +.. _class_Mesh_method__surface_get_blend_shape_arrays: + +- :ref:`Array` **_surface_get_blend_shape_arrays** **(** :ref:`int` index **)** |virtual| |const| + +---- + +.. _class_Mesh_method__surface_get_format: + +- :ref:`int` **_surface_get_format** **(** :ref:`int` index **)** |virtual| |const| + +---- + +.. _class_Mesh_method__surface_get_lods: + +- :ref:`Dictionary` **_surface_get_lods** **(** :ref:`int` index **)** |virtual| |const| + +---- + +.. _class_Mesh_method__surface_get_material: + +- :ref:`Material` **_surface_get_material** **(** :ref:`int` index **)** |virtual| |const| + +---- + +.. _class_Mesh_method__surface_get_primitive_type: + +- :ref:`int` **_surface_get_primitive_type** **(** :ref:`int` index **)** |virtual| |const| + +---- + +.. _class_Mesh_method__surface_set_material: + +- void **_surface_set_material** **(** :ref:`int` index, :ref:`Material` material **)** |virtual| + +---- + .. _class_Mesh_method_create_convex_shape: - :ref:`Shape3D` **create_convex_shape** **(** :ref:`bool` clean=true, :ref:`bool` simplify=false **)** |const| diff --git a/classes/class_nativeextension.rst b/classes/class_nativeextension.rst index 051fc4552..a93a56186 100644 --- a/classes/class_nativeextension.rst +++ b/classes/class_nativeextension.rst @@ -39,6 +39,8 @@ Enumerations .. _class_NativeExtension_constant_INITIALIZATION_LEVEL_SCENE: +.. _class_NativeExtension_constant_INITIALIZATION_LEVEL_DRIVER: + .. _class_NativeExtension_constant_INITIALIZATION_LEVEL_EDITOR: enum **InitializationLevel**: @@ -49,7 +51,9 @@ enum **InitializationLevel**: - **INITIALIZATION_LEVEL_SCENE** = **2** -- **INITIALIZATION_LEVEL_EDITOR** = **3** +- **INITIALIZATION_LEVEL_DRIVER** = **3** + +- **INITIALIZATION_LEVEL_EDITOR** = **4** Method Descriptions ------------------- diff --git a/classes/class_nativescript.rst b/classes/class_nativescript.rst deleted file mode 100644 index f8612f3de..000000000 --- a/classes/class_nativescript.rst +++ /dev/null @@ -1,147 +0,0 @@ -:github_url: hide - -.. Generated automatically by doc/tools/make_rst.py in Godot's source tree. -.. DO NOT EDIT THIS FILE, but the NativeScript.xml source instead. -.. The source is found in doc/classes or modules//doc_classes. - -.. _class_NativeScript: - -NativeScript -============ - -**Inherits:** :ref:`Script` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - - - -Properties ----------- - -+-----------------------------------------------+-----------------------------------------------------------------------------------+--------+ -| :ref:`String` | :ref:`class_name` | ``""`` | -+-----------------------------------------------+-----------------------------------------------------------------------------------+--------+ -| :ref:`GDNativeLibrary` | :ref:`library` | | -+-----------------------------------------------+-----------------------------------------------------------------------------------+--------+ -| :ref:`String` | :ref:`script_class_icon_path` | ``""`` | -+-----------------------------------------------+-----------------------------------------------------------------------------------+--------+ -| :ref:`String` | :ref:`script_class_name` | ``""`` | -+-----------------------------------------------+-----------------------------------------------------------------------------------+--------+ - -Methods -------- - -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_class_documentation` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_method_documentation` **(** :ref:`StringName` method **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_property_documentation` **(** :ref:`StringName` path **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_signal_documentation` **(** :ref:`StringName` signal_name **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`new` **(** ... **)** |vararg| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ - -Property Descriptions ---------------------- - -.. _class_NativeScript_property_class_name: - -- :ref:`String` **class_name** - -+-----------+-----------------------+ -| *Default* | ``""`` | -+-----------+-----------------------+ -| *Setter* | set_class_name(value) | -+-----------+-----------------------+ -| *Getter* | get_class_name() | -+-----------+-----------------------+ - ----- - -.. _class_NativeScript_property_library: - -- :ref:`GDNativeLibrary` **library** - -+----------+--------------------+ -| *Setter* | set_library(value) | -+----------+--------------------+ -| *Getter* | get_library() | -+----------+--------------------+ - ----- - -.. _class_NativeScript_property_script_class_icon_path: - -- :ref:`String` **script_class_icon_path** - -+-----------+-----------------------------------+ -| *Default* | ``""`` | -+-----------+-----------------------------------+ -| *Setter* | set_script_class_icon_path(value) | -+-----------+-----------------------------------+ -| *Getter* | get_script_class_icon_path() | -+-----------+-----------------------------------+ - ----- - -.. _class_NativeScript_property_script_class_name: - -- :ref:`String` **script_class_name** - -+-----------+------------------------------+ -| *Default* | ``""`` | -+-----------+------------------------------+ -| *Setter* | set_script_class_name(value) | -+-----------+------------------------------+ -| *Getter* | get_script_class_name() | -+-----------+------------------------------+ - -Method Descriptions -------------------- - -.. _class_NativeScript_method_get_class_documentation: - -- :ref:`String` **get_class_documentation** **(** **)** |const| - -Returns the documentation string that was previously set with ``godot_nativescript_set_class_documentation``. - ----- - -.. _class_NativeScript_method_get_method_documentation: - -- :ref:`String` **get_method_documentation** **(** :ref:`StringName` method **)** |const| - -Returns the documentation string that was previously set with ``godot_nativescript_set_method_documentation``. - ----- - -.. _class_NativeScript_method_get_property_documentation: - -- :ref:`String` **get_property_documentation** **(** :ref:`StringName` path **)** |const| - -Returns the documentation string that was previously set with ``godot_nativescript_set_property_documentation``. - ----- - -.. _class_NativeScript_method_get_signal_documentation: - -- :ref:`String` **get_signal_documentation** **(** :ref:`StringName` signal_name **)** |const| - -Returns the documentation string that was previously set with ``godot_nativescript_set_signal_documentation``. - ----- - -.. _class_NativeScript_method_new: - -- :ref:`Variant` **new** **(** ... **)** |vararg| - -Constructs a new object of the base type with a script of this type already attached. - -\ **Note:** Any arguments passed to this function will be ignored and not passed to the native constructor function. This will change with in a future API extension. - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_openxraction.rst b/classes/class_openxraction.rst new file mode 100644 index 000000000..00b79ce0e --- /dev/null +++ b/classes/class_openxraction.rst @@ -0,0 +1,115 @@ +:github_url: hide + +.. Generated automatically by doc/tools/make_rst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the OpenXRAction.xml source instead. +.. The source is found in doc/classes or modules//doc_classes. + +.. _class_OpenXRAction: + +OpenXRAction +============ + +**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +An OpenXR action. + +Description +----------- + +This resource defines an OpenXR action. Actions can be used both for inputs (buttons/joystick/trigger/etc) and outputs (haptics). + +OpenXR performs automatic conversion between action type and input type whenever possible. An analogue trigger bound to a boolean action will thus return ``false[/core] if the trigger is depressed and [code]true`` if pressed fully. + +Actions are not directly bound to specific devices, instead OpenXR recognises a limited number of top level paths that identify devices by usage. We can restrict which devices an action can be bound to by these top level paths. For instance an action that should only be used for hand held controllers can have the top level paths "/user/hand/left" and "/user/hand/right" associated with them. See the `reserved path section in the OpenXR specification `__ for more info on the top level paths. + +Note that the name of the resource is used to register the action with. + +Properties +---------- + ++---------------------------------------------------+-------------------------------------------------------------------+-------------------------+ +| :ref:`ActionType` | :ref:`action_type` | ``1`` | ++---------------------------------------------------+-------------------------------------------------------------------+-------------------------+ +| :ref:`String` | :ref:`localized_name` | ``""`` | ++---------------------------------------------------+-------------------------------------------------------------------+-------------------------+ +| :ref:`PackedStringArray` | :ref:`toplevel_paths` | ``PackedStringArray()`` | ++---------------------------------------------------+-------------------------------------------------------------------+-------------------------+ + +Enumerations +------------ + +.. _enum_OpenXRAction_ActionType: + +.. _class_OpenXRAction_constant_OPENXR_ACTION_BOOL: + +.. _class_OpenXRAction_constant_OPENXR_ACTION_FLOAT: + +.. _class_OpenXRAction_constant_OPENXR_ACTION_VECTOR2: + +.. _class_OpenXRAction_constant_OPENXR_ACTION_POSE: + +enum **ActionType**: + +- **OPENXR_ACTION_BOOL** = **0** --- This action provides a boolean value. + +- **OPENXR_ACTION_FLOAT** = **1** --- This action provides a float value between ``0.0`` and ``1.0`` for any analogue input such as triggers. + +- **OPENXR_ACTION_VECTOR2** = **2** --- This action provides a vector2 value and can be bound to embedded trackpads and joysticks + +- **OPENXR_ACTION_POSE** = **3** + +Property Descriptions +--------------------- + +.. _class_OpenXRAction_property_action_type: + +- :ref:`ActionType` **action_type** + ++-----------+------------------------+ +| *Default* | ``1`` | ++-----------+------------------------+ +| *Setter* | set_action_type(value) | ++-----------+------------------------+ +| *Getter* | get_action_type() | ++-----------+------------------------+ + +The type of action. + +---- + +.. _class_OpenXRAction_property_localized_name: + +- :ref:`String` **localized_name** + ++-----------+---------------------------+ +| *Default* | ``""`` | ++-----------+---------------------------+ +| *Setter* | set_localized_name(value) | ++-----------+---------------------------+ +| *Getter* | get_localized_name() | ++-----------+---------------------------+ + +The localised description of this action. + +---- + +.. _class_OpenXRAction_property_toplevel_paths: + +- :ref:`PackedStringArray` **toplevel_paths** + ++-----------+---------------------------+ +| *Default* | ``PackedStringArray()`` | ++-----------+---------------------------+ +| *Setter* | set_toplevel_paths(value) | ++-----------+---------------------------+ +| *Getter* | get_toplevel_paths() | ++-----------+---------------------------+ + +A collections of toplevel paths to which this action can be bound. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_openxractionmap.rst b/classes/class_openxractionmap.rst new file mode 100644 index 000000000..c03b9b0d7 --- /dev/null +++ b/classes/class_openxractionmap.rst @@ -0,0 +1,124 @@ +:github_url: hide + +.. Generated automatically by doc/tools/make_rst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the OpenXRActionMap.xml source instead. +.. The source is found in doc/classes or modules//doc_classes. + +.. _class_OpenXRActionMap: + +OpenXRActionMap +=============== + +**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +Collection of :ref:`OpenXRActionSet` and :ref:`OpenXRInteractionProfile` resources for the OpenXR module. + +Description +----------- + +OpenXR uses an action system similar to Godots Input map system to bind inputs and outputs on various types of XR controllers to named actions. OpenXR specifies more detail on these inputs and outputs than Godot supports. + +Another important distinction is that OpenXR offers no control over these bindings. The bindings we register are suggestions, it is up to the XR runtime to offer users the ability to change these bindings. This allows the XR runtime to fill in the gaps if new hardware becomes available. + +The action map therefor needs to be loaded at startup and can't be changed afterwards. This resource is a container for the entire action map. + +Properties +---------- + ++---------------------------+----------------------------------------------------------------------------------+--------+ +| :ref:`Array` | :ref:`action_sets` | ``[]`` | ++---------------------------+----------------------------------------------------------------------------------+--------+ +| :ref:`Array` | :ref:`interaction_profiles` | ``[]`` | ++---------------------------+----------------------------------------------------------------------------------+--------+ + +Methods +------- + ++------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_action_set` **(** :ref:`OpenXRActionSet` action_set **)** | ++------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_interaction_profile` **(** :ref:`OpenXRInteractionProfile` interaction_profile **)** | ++------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`create_default_action_sets` **(** **)** | ++------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_action_set` **(** :ref:`OpenXRActionSet` action_set **)** | ++------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_interaction_profile` **(** :ref:`OpenXRInteractionProfile` interaction_profile **)** | ++------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Property Descriptions +--------------------- + +.. _class_OpenXRActionMap_property_action_sets: + +- :ref:`Array` **action_sets** + ++-----------+------------------------+ +| *Default* | ``[]`` | ++-----------+------------------------+ +| *Setter* | set_action_sets(value) | ++-----------+------------------------+ +| *Getter* | get_action_sets() | ++-----------+------------------------+ + +---- + +.. _class_OpenXRActionMap_property_interaction_profiles: + +- :ref:`Array` **interaction_profiles** + ++-----------+---------------------------------+ +| *Default* | ``[]`` | ++-----------+---------------------------------+ +| *Setter* | set_interaction_profiles(value) | ++-----------+---------------------------------+ +| *Getter* | get_interaction_profiles() | ++-----------+---------------------------------+ + +Method Descriptions +------------------- + +.. _class_OpenXRActionMap_method_add_action_set: + +- void **add_action_set** **(** :ref:`OpenXRActionSet` action_set **)** + +Add an action set. + +---- + +.. _class_OpenXRActionMap_method_add_interaction_profile: + +- void **add_interaction_profile** **(** :ref:`OpenXRInteractionProfile` interaction_profile **)** + +Add an interaction profile. + +---- + +.. _class_OpenXRActionMap_method_create_default_action_sets: + +- void **create_default_action_sets** **(** **)** + +Setup this action set with our default actions. + +---- + +.. _class_OpenXRActionMap_method_remove_action_set: + +- void **remove_action_set** **(** :ref:`OpenXRActionSet` action_set **)** + +Remove an action set. + +---- + +.. _class_OpenXRActionMap_method_remove_interaction_profile: + +- void **remove_interaction_profile** **(** :ref:`OpenXRInteractionProfile` interaction_profile **)** + +Remove an interaction profile. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_openxractionset.rst b/classes/class_openxractionset.rst new file mode 100644 index 000000000..3824f11cd --- /dev/null +++ b/classes/class_openxractionset.rst @@ -0,0 +1,116 @@ +:github_url: hide + +.. Generated automatically by doc/tools/make_rst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the OpenXRActionSet.xml source instead. +.. The source is found in doc/classes or modules//doc_classes. + +.. _class_OpenXRActionSet: + +OpenXRActionSet +=============== + +**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +Collection of :ref:`OpenXRAction` resources that make up an action set. + +Description +----------- + +Action sets in OpenXR define a collection of actions that can be activated in unison. This allows games to easily change between different states that require different inputs or need to reinterpret inputs. For instance we could have an action set that is active when a menu is open, an action set that is active when the player is freely walking around and an action set that is active when the player is controlling a vehicle. + +Action sets can contain the same actions, or actions with the same name, if such action sets are active at the same time the action set with the highest priority defines which binding is active. + +Note that the name of the resource is used to identify the action set within OpenXR. + +Properties +---------- + ++-----------------------------+----------------------------------------------------------------------+--------+ +| :ref:`Array` | :ref:`actions` | ``[]`` | ++-----------------------------+----------------------------------------------------------------------+--------+ +| :ref:`String` | :ref:`localized_name` | ``""`` | ++-----------------------------+----------------------------------------------------------------------+--------+ +| :ref:`int` | :ref:`priority` | ``0`` | ++-----------------------------+----------------------------------------------------------------------+--------+ + +Methods +------- + ++------+-----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_action` **(** :ref:`OpenXRAction` action **)** | ++------+-----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_action` **(** :ref:`OpenXRAction` action **)** | ++------+-----------------------------------------------------------------------------------------------------------------------------+ + +Property Descriptions +--------------------- + +.. _class_OpenXRActionSet_property_actions: + +- :ref:`Array` **actions** + ++-----------+--------------------+ +| *Default* | ``[]`` | ++-----------+--------------------+ +| *Setter* | set_actions(value) | ++-----------+--------------------+ +| *Getter* | get_actions() | ++-----------+--------------------+ + +Collection of actions for this action set. + +---- + +.. _class_OpenXRActionSet_property_localized_name: + +- :ref:`String` **localized_name** + ++-----------+---------------------------+ +| *Default* | ``""`` | ++-----------+---------------------------+ +| *Setter* | set_localized_name(value) | ++-----------+---------------------------+ +| *Getter* | get_localized_name() | ++-----------+---------------------------+ + +The localised name of this action set. + +---- + +.. _class_OpenXRActionSet_property_priority: + +- :ref:`int` **priority** + ++-----------+---------------------+ +| *Default* | ``0`` | ++-----------+---------------------+ +| *Setter* | set_priority(value) | ++-----------+---------------------+ +| *Getter* | get_priority() | ++-----------+---------------------+ + +The priority for this action set. + +Method Descriptions +------------------- + +.. _class_OpenXRActionSet_method_add_action: + +- void **add_action** **(** :ref:`OpenXRAction` action **)** + +Add an action to this action set. + +---- + +.. _class_OpenXRActionSet_method_remove_action: + +- void **remove_action** **(** :ref:`OpenXRAction` action **)** + +Remove an action from this action set. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_openxrinteractionprofile.rst b/classes/class_openxrinteractionprofile.rst new file mode 100644 index 000000000..53fff6094 --- /dev/null +++ b/classes/class_openxrinteractionprofile.rst @@ -0,0 +1,70 @@ +:github_url: hide + +.. Generated automatically by doc/tools/make_rst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the OpenXRInteractionProfile.xml source instead. +.. The source is found in doc/classes or modules//doc_classes. + +.. _class_OpenXRInteractionProfile: + +OpenXRInteractionProfile +======================== + +**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +Suggested bindings object for OpenXR. + +Description +----------- + +This object stores suggested bindings for an interaction profile. Interaction profiles define the meta data for a tracked XR device such as an XR controller. + +For more information see the `interaction profiles info in the OpenXR specification `__. + +Properties +---------- + ++-----------------------------+---------------------------------------------------------------------------------------------------+--------+ +| :ref:`Array` | :ref:`bindings` | ``[]`` | ++-----------------------------+---------------------------------------------------------------------------------------------------+--------+ +| :ref:`String` | :ref:`interaction_profile_path` | ``""`` | ++-----------------------------+---------------------------------------------------------------------------------------------------+--------+ + +Property Descriptions +--------------------- + +.. _class_OpenXRInteractionProfile_property_bindings: + +- :ref:`Array` **bindings** + ++-----------+---------------------+ +| *Default* | ``[]`` | ++-----------+---------------------+ +| *Setter* | set_bindings(value) | ++-----------+---------------------+ +| *Getter* | get_bindings() | ++-----------+---------------------+ + +Action bindings for this interaction profile. + +---- + +.. _class_OpenXRInteractionProfile_property_interaction_profile_path: + +- :ref:`String` **interaction_profile_path** + ++-----------+-------------------------------------+ +| *Default* | ``""`` | ++-----------+-------------------------------------+ +| *Setter* | set_interaction_profile_path(value) | ++-----------+-------------------------------------+ +| *Getter* | get_interaction_profile_path() | ++-----------+-------------------------------------+ + +The interaction profile path identifying the XR device. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_openxrinterface.rst b/classes/class_openxrinterface.rst new file mode 100644 index 000000000..7bf67cfb1 --- /dev/null +++ b/classes/class_openxrinterface.rst @@ -0,0 +1,74 @@ +:github_url: hide + +.. Generated automatically by doc/tools/make_rst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the OpenXRInterface.xml source instead. +.. The source is found in doc/classes or modules//doc_classes. + +.. _class_OpenXRInterface: + +OpenXRInterface +=============== + +**Inherits:** :ref:`XRInterface` **<** :ref:`RefCounted` **<** :ref:`Object` + +Our OpenXR interface. + +Description +----------- + +The OpenXR interface allows Godot to interact with OpenXR runtimes and make it possible to create XR experiences and games. + +Due to the needs of OpenXR this interface works slightly different then other plugin based XR interfaces. It needs to be initialised when Godot starts. You need to enable OpenXR, settings for this can be found in your games project settings under the XR heading. You do need to mark a viewport for use with XR in order for Godot to know which render result should be output to the headset. + +Tutorials +--------- + +- :doc:`OpenXR documentation <../tutorials/vr/openxr/index>` + +Signals +------- + +.. _class_OpenXRInterface_signal_pose_recentered: + +- **pose_recentered** **(** **)** + +Informs the user queued a recenter of the player position. + +---- + +.. _class_OpenXRInterface_signal_session_begun: + +- **session_begun** **(** **)** + +Informs our OpenXR session has been started. + +---- + +.. _class_OpenXRInterface_signal_session_focussed: + +- **session_focussed** **(** **)** + +Informs our OpenXR session now has focus. + +---- + +.. _class_OpenXRInterface_signal_session_stopping: + +- **session_stopping** **(** **)** + +Informs our OpenXR session is stopping. + +---- + +.. _class_OpenXRInterface_signal_session_visible: + +- **session_visible** **(** **)** + +Informs our OpenXR session is now visible (output is being sent to the HMD). + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_openxripbinding.rst b/classes/class_openxripbinding.rst new file mode 100644 index 000000000..85015cc8a --- /dev/null +++ b/classes/class_openxripbinding.rst @@ -0,0 +1,66 @@ +:github_url: hide + +.. Generated automatically by doc/tools/make_rst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the OpenXRIPBinding.xml source instead. +.. The source is found in doc/classes or modules//doc_classes. + +.. _class_OpenXRIPBinding: + +OpenXRIPBinding +=============== + +**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +Defines a binding between an :ref:`OpenXRAction` and an XR input or output. + +Description +----------- + +This binding resource binds an OpenXR action to inputs or outputs. As most controllers have left hand and right versions that are handled by the same interaction profile we can specify multiple bindings. For instance an action "Fire" could be bound to both "/user/hand/left/input/trigger" and "/user/hand/right/input/trigger". + +Properties +---------- + ++---------------------------------------------------+------------------------------------------------------+-------------------------+ +| :ref:`OpenXRAction` | :ref:`action` | | ++---------------------------------------------------+------------------------------------------------------+-------------------------+ +| :ref:`PackedStringArray` | :ref:`paths` | ``PackedStringArray()`` | ++---------------------------------------------------+------------------------------------------------------+-------------------------+ + +Property Descriptions +--------------------- + +.. _class_OpenXRIPBinding_property_action: + +- :ref:`OpenXRAction` **action** + ++----------+-------------------+ +| *Setter* | set_action(value) | ++----------+-------------------+ +| *Getter* | get_action() | ++----------+-------------------+ + +Action that is bound to these paths. + +---- + +.. _class_OpenXRIPBinding_property_paths: + +- :ref:`PackedStringArray` **paths** + ++-----------+-------------------------+ +| *Default* | ``PackedStringArray()`` | ++-----------+-------------------------+ +| *Setter* | set_paths(value) | ++-----------+-------------------------+ +| *Getter* | get_paths() | ++-----------+-------------------------+ + +Paths that define the inputs or outputs bound on the device. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_packedscene.rst b/classes/class_packedscene.rst index 6ea25bd03..ba0cfba5c 100644 --- a/classes/class_packedscene.rst +++ b/classes/class_packedscene.rst @@ -116,7 +116,7 @@ Methods +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`can_instantiate` **(** **)** |const| | +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`SceneState` | :ref:`get_state` **(** **)** | +| :ref:`SceneState` | :ref:`get_state` **(** **)** |const| | +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Node` | :ref:`instantiate` **(** :ref:`GenEditState` edit_state=0 **)** |const| | +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ @@ -180,7 +180,7 @@ Returns ``true`` if the scene file has nodes. .. _class_PackedScene_method_get_state: -- :ref:`SceneState` **get_state** **(** **)** +- :ref:`SceneState` **get_state** **(** **)** |const| Returns the ``SceneState`` representing the scene file contents. diff --git a/classes/class_particlesmaterial.rst b/classes/class_particlesmaterial.rst index a2db5c960..729037756 100644 --- a/classes/class_particlesmaterial.rst +++ b/classes/class_particlesmaterial.rst @@ -538,7 +538,7 @@ True if the interaction with particle attractors is enabled. | *Getter* | get_collision_bounce() | +-----------+-----------------------------+ -Collision bouncyness. +Collision bounciness. ---- diff --git a/classes/class_physicalbone3d.rst b/classes/class_physicalbone3d.rst index 23a7dbcc1..1053fd138 100644 --- a/classes/class_physicalbone3d.rst +++ b/classes/class_physicalbone3d.rst @@ -21,12 +21,16 @@ Properties +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ | :ref:`DampMode` | :ref:`angular_damp_mode` | ``0`` | +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ +| :ref:`Vector3` | :ref:`angular_velocity` | ``Vector3(0, 0, 0)`` | ++-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ | :ref:`Transform3D` | :ref:`body_offset` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ | :ref:`float` | :ref:`bounce` | ``0.0`` | +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ | :ref:`bool` | :ref:`can_sleep` | ``true`` | +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ +| :ref:`bool` | :ref:`custom_integrator` | ``false`` | ++-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ | :ref:`float` | :ref:`friction` | ``1.0`` | +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ | :ref:`float` | :ref:`gravity_scale` | ``1.0`` | @@ -41,12 +45,16 @@ Properties +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ | :ref:`DampMode` | :ref:`linear_damp_mode` | ``0`` | +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ +| :ref:`Vector3` | :ref:`linear_velocity` | ``Vector3(0, 0, 0)`` | ++-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ | :ref:`float` | :ref:`mass` | ``1.0`` | +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ Methods ------- ++-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_integrate_forces` **(** :ref:`PhysicsDirectBodyState3D` state **)** |virtual| | +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`apply_central_impulse` **(** :ref:`Vector3` impulse **)** | +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -141,6 +149,22 @@ Defines how :ref:`angular_damp` is a ---- +.. _class_PhysicalBone3D_property_angular_velocity: + +- :ref:`Vector3` **angular_velocity** + ++-----------+-----------------------------+ +| *Default* | ``Vector3(0, 0, 0)`` | ++-----------+-----------------------------+ +| *Setter* | set_angular_velocity(value) | ++-----------+-----------------------------+ +| *Getter* | get_angular_velocity() | ++-----------+-----------------------------+ + +The PhysicalBone3D's rotational velocity in *radians* per second. + +---- + .. _class_PhysicalBone3D_property_body_offset: - :ref:`Transform3D` **body_offset** @@ -189,6 +213,22 @@ If ``true``, the body is deactivated when there is no movement, so it will not t ---- +.. _class_PhysicalBone3D_property_custom_integrator: + +- :ref:`bool` **custom_integrator** + ++-----------+----------------------------------+ +| *Default* | ``false`` | ++-----------+----------------------------------+ +| *Setter* | set_use_custom_integrator(value) | ++-----------+----------------------------------+ +| *Getter* | is_using_custom_integrator() | ++-----------+----------------------------------+ + +If ``true``, internal force integration will be disabled (like gravity or air friction) for this body. Other than collision response, the body will only move as determined by the :ref:`_integrate_forces` function, if defined. + +---- + .. _class_PhysicalBone3D_property_friction: - :ref:`float` **friction** @@ -303,6 +343,22 @@ Defines how :ref:`linear_damp` is app ---- +.. _class_PhysicalBone3D_property_linear_velocity: + +- :ref:`Vector3` **linear_velocity** + ++-----------+----------------------------+ +| *Default* | ``Vector3(0, 0, 0)`` | ++-----------+----------------------------+ +| *Setter* | set_linear_velocity(value) | ++-----------+----------------------------+ +| *Getter* | get_linear_velocity() | ++-----------+----------------------------+ + +The body's linear velocity in units per second. Can be used sporadically, but **don't set this every frame**, because physics may run in another thread and runs at a different granularity. Use :ref:`_integrate_forces` as your process loop for precise control of the body state. + +---- + .. _class_PhysicalBone3D_property_mass: - :ref:`float` **mass** @@ -320,6 +376,14 @@ The body's mass. Method Descriptions ------------------- +.. _class_PhysicalBone3D_method__integrate_forces: + +- void **_integrate_forces** **(** :ref:`PhysicsDirectBodyState3D` state **)** |virtual| + +Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default, it works in addition to the usual physics behavior, but the :ref:`custom_integrator` property allows you to disable the default behavior and do fully custom force integration for a body. + +---- + .. _class_PhysicalBone3D_method_apply_central_impulse: - void **apply_central_impulse** **(** :ref:`Vector3` impulse **)** diff --git a/classes/class_popup.rst b/classes/class_popup.rst index 8c61aa844..a2cf21fd9 100644 --- a/classes/class_popup.rst +++ b/classes/class_popup.rst @@ -18,24 +18,24 @@ Popup is a base window container for popup-like subwindows. Description ----------- -Popup is a base window container for popup-like subwindows. It's a modal by default (see :ref:`close_on_parent_focus`) and has helpers for custom popup behavior. +Popup is a base window container for popup-like subwindows. It's a modal by default (see :ref:`popup_window`) and has helpers for custom popup behavior. Properties ---------- -+-------------------------+--------------------------------------------------------------------------+-------------------------------------------------------------------------+ -| :ref:`bool` | borderless | ``true`` (overrides :ref:`Window`) | -+-------------------------+--------------------------------------------------------------------------+-------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`close_on_parent_focus` | ``true`` | -+-------------------------+--------------------------------------------------------------------------+-------------------------------------------------------------------------+ -| :ref:`bool` | transient | ``true`` (overrides :ref:`Window`) | -+-------------------------+--------------------------------------------------------------------------+-------------------------------------------------------------------------+ -| :ref:`bool` | unresizable | ``true`` (overrides :ref:`Window`) | -+-------------------------+--------------------------------------------------------------------------+-------------------------------------------------------------------------+ -| :ref:`bool` | visible | ``false`` (overrides :ref:`Window`) | -+-------------------------+--------------------------------------------------------------------------+-------------------------------------------------------------------------+ -| :ref:`bool` | wrap_controls | ``true`` (overrides :ref:`Window`) | -+-------------------------+--------------------------------------------------------------------------+-------------------------------------------------------------------------+ ++-------------------------+---------------+-------------------------------------------------------------------------+ +| :ref:`bool` | borderless | ``true`` (overrides :ref:`Window`) | ++-------------------------+---------------+-------------------------------------------------------------------------+ +| :ref:`bool` | popup_window | ``true`` (overrides :ref:`Window`) | ++-------------------------+---------------+-------------------------------------------------------------------------+ +| :ref:`bool` | transient | ``true`` (overrides :ref:`Window`) | ++-------------------------+---------------+-------------------------------------------------------------------------+ +| :ref:`bool` | unresizable | ``true`` (overrides :ref:`Window`) | ++-------------------------+---------------+-------------------------------------------------------------------------+ +| :ref:`bool` | visible | ``false`` (overrides :ref:`Window`) | ++-------------------------+---------------+-------------------------------------------------------------------------+ +| :ref:`bool` | wrap_controls | ``true`` (overrides :ref:`Window`) | ++-------------------------+---------------+-------------------------------------------------------------------------+ Signals ------- @@ -46,23 +46,6 @@ Signals Emitted when the popup is hidden. -Property Descriptions ---------------------- - -.. _class_Popup_property_close_on_parent_focus: - -- :ref:`bool` **close_on_parent_focus** - -+-----------+----------------------------------+ -| *Default* | ``true`` | -+-----------+----------------------------------+ -| *Setter* | set_close_on_parent_focus(value) | -+-----------+----------------------------------+ -| *Getter* | get_close_on_parent_focus() | -+-----------+----------------------------------+ - -If true, the ``Popup`` will close when its parent :ref:`Window` is focused. - .. |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.)` diff --git a/classes/class_primitivemesh.rst b/classes/class_primitivemesh.rst index d200affa8..8f9337247 100644 --- a/classes/class_primitivemesh.rst +++ b/classes/class_primitivemesh.rst @@ -34,9 +34,11 @@ Properties Methods ------- -+---------------------------+----------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_mesh_arrays` **(** **)** |const| | -+---------------------------+----------------------------------------------------------------------------------------+ ++---------------------------+--------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`_create_mesh_array` **(** **)** |virtual| |const| | ++---------------------------+--------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_mesh_arrays` **(** **)** |const| | ++---------------------------+--------------------------------------------------------------------------------------------------------+ Property Descriptions --------------------- @@ -90,6 +92,12 @@ The current :ref:`Material` of the primitive mesh. Method Descriptions ------------------- +.. _class_PrimitiveMesh_method__create_mesh_array: + +- :ref:`Array` **_create_mesh_array** **(** **)** |virtual| |const| + +---- + .. _class_PrimitiveMesh_method_get_mesh_arrays: - :ref:`Array` **get_mesh_arrays** **(** **)** |const| diff --git a/classes/class_projectsettings.rst b/classes/class_projectsettings.rst index e0b2bc7fa..9515f33c4 100644 --- a/classes/class_projectsettings.rst +++ b/classes/class_projectsettings.rst @@ -57,6 +57,8 @@ Properties +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`application/config/name` | ``""`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`application/config/name_localized` | ``{}`` | ++---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`application/config/project_settings_override` | ``""`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`application/config/use_custom_user_dir` | ``false`` | @@ -1121,10 +1123,6 @@ Properties +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`rendering/shader_compiler/shader_cache/use_zstd_compression` | ``true`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/shading/overrides/force_blinn_over_ggx` | ``false`` | -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/shading/overrides/force_blinn_over_ggx.mobile` | ``true`` | -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`rendering/shading/overrides/force_lambert_over_burley` | ``false`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`rendering/shading/overrides/force_lambert_over_burley.mobile` | ``true`` | @@ -1193,7 +1191,17 @@ Properties +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/vulkan/staging_buffer/texture_upload_region_size_px` | ``64`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/xr/enabled` | ``false`` | +| :ref:`String` | :ref:`xr/openxr/default_action_map` | ``"res://default_action_map.tres"`` | ++---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`xr/openxr/enabled` | ``false`` | ++---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`xr/openxr/form_factor` | ``"0"`` | ++---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`xr/openxr/reference_space` | ``"1"`` | ++---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`xr/openxr/view_configuration` | ``"1"`` | ++---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`xr/shaders/enabled` | ``false`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ Methods @@ -1360,6 +1368,18 @@ The project's name. It is used both by the Project Manager and by exporters. The ---- +.. _class_ProjectSettings_property_application/config/name_localized: + +- :ref:`Dictionary` **application/config/name_localized** + ++-----------+--------+ +| *Default* | ``{}`` | ++-----------+--------+ + +Translations of the project's name. This setting is used by OS tools to translate application name on Android, iOS and macOS. + +---- + .. _class_ProjectSettings_property_application/config/project_settings_override: - :ref:`String` **application/config/project_settings_override** @@ -6052,7 +6072,7 @@ The default linear damp in 3D. Sets which physics engine to use for 3D physics. -"DEFAULT" is currently the `Bullet `__ physics engine. The "GodotPhysics3D" engine is still supported as an alternative. +"DEFAULT" and "GodotPhysics3D" are the same, as there is currently no alternative 3D physics server implemented. ---- @@ -7412,30 +7432,6 @@ Scales the 3D render buffer based on the viewport size uses an image filter spec ---- -.. _class_ProjectSettings_property_rendering/shading/overrides/force_blinn_over_ggx: - -- :ref:`bool` **rendering/shading/overrides/force_blinn_over_ggx** - -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ - -If ``true``, uses faster but lower-quality Blinn model to generate blurred reflections instead of the GGX model. - ----- - -.. _class_ProjectSettings_property_rendering/shading/overrides/force_blinn_over_ggx.mobile: - -- :ref:`bool` **rendering/shading/overrides/force_blinn_over_ggx.mobile** - -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ - -Lower-end override for :ref:`rendering/shading/overrides/force_blinn_over_ggx` on mobile devices, due to performance concerns or driver support. - ----- - .. _class_ProjectSettings_property_rendering/shading/overrides/force_lambert_over_burley: - :ref:`bool` **rendering/shading/overrides/force_lambert_over_burley** @@ -7844,15 +7840,75 @@ If ``true``, the texture importer will import VRAM-compressed textures using the ---- -.. _class_ProjectSettings_property_rendering/xr/enabled: +.. _class_ProjectSettings_property_xr/openxr/default_action_map: -- :ref:`bool` **rendering/xr/enabled** +- :ref:`String` **xr/openxr/default_action_map** + ++-----------+-------------------------------------+ +| *Default* | ``"res://default_action_map.tres"`` | ++-----------+-------------------------------------+ + +Action map configuration to load by default. + +---- + +.. _class_ProjectSettings_property_xr/openxr/enabled: + +- :ref:`bool` **xr/openxr/enabled** +-----------+-----------+ | *Default* | ``false`` | +-----------+-----------+ -If ``true``, XR support is enabled in Godot, this ensures required shaders are compiled. +If ``true`` Godot will setup and initialise OpenXR on startup. + +---- + +.. _class_ProjectSettings_property_xr/openxr/form_factor: + +- :ref:`int` **xr/openxr/form_factor** + ++-----------+---------+ +| *Default* | ``"0"`` | ++-----------+---------+ + +Specify whether OpenXR should be configured for an HMD or a hand held device. + +---- + +.. _class_ProjectSettings_property_xr/openxr/reference_space: + +- :ref:`int` **xr/openxr/reference_space** + ++-----------+---------+ +| *Default* | ``"1"`` | ++-----------+---------+ + +Specify the default reference space. + +---- + +.. _class_ProjectSettings_property_xr/openxr/view_configuration: + +- :ref:`int` **xr/openxr/view_configuration** + ++-----------+---------+ +| *Default* | ``"1"`` | ++-----------+---------+ + +Specify the view configuration with which to configure OpenXR settting up either Mono or Stereo rendering. + +---- + +.. _class_ProjectSettings_property_xr/shaders/enabled: + +- :ref:`bool` **xr/shaders/enabled** + ++-----------+-----------+ +| *Default* | ``false`` | ++-----------+-----------+ + +If ``true``, Godot will compile shaders required for XR. Method Descriptions ------------------- diff --git a/classes/class_range.rst b/classes/class_range.rst index 86bb3d767..b1596a98a 100644 --- a/classes/class_range.rst +++ b/classes/class_range.rst @@ -48,11 +48,13 @@ Properties Methods ------- -+------+---------------------------------------------------------------------------------+ -| void | :ref:`share` **(** :ref:`Node` with **)** | -+------+---------------------------------------------------------------------------------+ -| void | :ref:`unshare` **(** **)** | -+------+---------------------------------------------------------------------------------+ ++------+-----------------------------------------------------------------------------------------------------------+ +| void | :ref:`_value_changed` **(** :ref:`float` **)** |virtual| | ++------+-----------------------------------------------------------------------------------------------------------+ +| void | :ref:`share` **(** :ref:`Node` with **)** | ++------+-----------------------------------------------------------------------------------------------------------+ +| void | :ref:`unshare` **(** **)** | ++------+-----------------------------------------------------------------------------------------------------------+ Signals ------- @@ -233,6 +235,12 @@ Range's current value. Method Descriptions ------------------- +.. _class_Range_method__value_changed: + +- void **_value_changed** **(** :ref:`float` **)** |virtual| + +---- + .. _class_Range_method_share: - void **share** **(** :ref:`Node` with **)** diff --git a/classes/class_rect2i.rst b/classes/class_rect2i.rst index 05fd56c5f..ff22cb802 100644 --- a/classes/class_rect2i.rst +++ b/classes/class_rect2i.rst @@ -293,8 +293,6 @@ If the rectangles do not intersect, an empty ``Rect2i`` is returned. Returns ``true`` if the ``Rect2i`` overlaps with ``b`` (i.e. they have at least one point in common). -If ``include_borders`` is ``true``, they will also be considered overlapping if their borders touch, even without intersection. - ---- .. _class_Rect2i_method_merge: diff --git a/classes/class_refcounted.rst b/classes/class_refcounted.rst index 5d9f53182..7cb551e38 100644 --- a/classes/class_refcounted.rst +++ b/classes/class_refcounted.rst @@ -11,7 +11,7 @@ RefCounted **Inherits:** :ref:`Object` -**Inherited By:** :ref:`AESContext`, :ref:`AStar`, :ref:`AStar2D`, :ref:`AnimationTrackEditPlugin`, :ref:`AudioEffectInstance`, :ref:`AudioStreamPlayback`, :ref:`CameraFeed`, :ref:`CharFXTransform`, :ref:`ConfigFile`, :ref:`Crypto`, :ref:`DTLSServer`, :ref:`Directory`, :ref:`ENetConnection`, :ref:`EditorExportPlugin`, :ref:`EditorFeatureProfile`, :ref:`EditorInspectorPlugin`, :ref:`EditorResourceConversionPlugin`, :ref:`EditorResourcePreviewGenerator`, :ref:`EditorSceneFormatImporter`, :ref:`EditorScenePostImport`, :ref:`EditorScenePostImportPlugin`, :ref:`EditorScript`, :ref:`EditorTranslationParserPlugin`, :ref:`EncodedObjectAsID`, :ref:`EngineProfiler`, :ref:`Expression`, :ref:`File`, :ref:`GDNative`, :ref:`HMACContext`, :ref:`HTTPClient`, :ref:`HashingContext`, :ref:`JSON`, :ref:`JavaClass`, :ref:`JavaScriptObject`, :ref:`KinematicCollision2D`, :ref:`KinematicCollision3D`, :ref:`Lightmapper`, :ref:`MeshDataTool`, :ref:`MultiplayerAPI`, :ref:`Mutex`, :ref:`Node3DGizmo`, :ref:`OGGPacketSequencePlayback`, :ref:`PCKPacker`, :ref:`PackedDataContainerRef`, :ref:`PacketPeer`, :ref:`PhysicsPointQueryParameters2D`, :ref:`PhysicsPointQueryParameters3D`, :ref:`PhysicsRayQueryParameters2D`, :ref:`PhysicsRayQueryParameters3D`, :ref:`PhysicsShapeQueryParameters2D`, :ref:`PhysicsShapeQueryParameters3D`, :ref:`PhysicsTestMotionParameters2D`, :ref:`PhysicsTestMotionParameters3D`, :ref:`PhysicsTestMotionResult2D`, :ref:`PhysicsTestMotionResult3D`, :ref:`RDAttachmentFormat`, :ref:`RDFramebufferPass`, :ref:`RDPipelineColorBlendState`, :ref:`RDPipelineColorBlendStateAttachment`, :ref:`RDPipelineDepthStencilState`, :ref:`RDPipelineMultisampleState`, :ref:`RDPipelineRasterizationState`, :ref:`RDPipelineSpecializationConstant`, :ref:`RDSamplerState`, :ref:`RDShaderSource`, :ref:`RDTextureFormat`, :ref:`RDTextureView`, :ref:`RDUniform`, :ref:`RDVertexAttribute`, :ref:`RandomNumberGenerator`, :ref:`RegEx`, :ref:`RegExMatch`, :ref:`Resource`, :ref:`ResourceFormatLoader`, :ref:`ResourceFormatSaver`, :ref:`ResourceImporter`, :ref:`SceneState`, :ref:`SceneTreeTimer`, :ref:`Semaphore`, :ref:`SkinReference`, :ref:`StreamPeer`, :ref:`SurfaceTool`, :ref:`TCPServer`, :ref:`TextLine`, :ref:`TextParagraph`, :ref:`TextServer`, :ref:`Thread`, :ref:`TriangleMesh`, :ref:`Tween`, :ref:`Tweener`, :ref:`UDPServer`, :ref:`UPNP`, :ref:`UPNPDevice`, :ref:`VelocityTracker3D`, :ref:`VisualScriptFunctionState`, :ref:`WeakRef`, :ref:`WebRTCPeerConnection`, :ref:`XMLParser`, :ref:`XRInterface`, :ref:`XRPose`, :ref:`XRPositionalTracker` +**Inherited By:** :ref:`AESContext`, :ref:`AStar`, :ref:`AStar2D`, :ref:`AnimationTrackEditPlugin`, :ref:`AudioEffectInstance`, :ref:`AudioStreamPlayback`, :ref:`CameraFeed`, :ref:`CharFXTransform`, :ref:`ConfigFile`, :ref:`Crypto`, :ref:`DTLSServer`, :ref:`Directory`, :ref:`ENetConnection`, :ref:`EditorExportPlugin`, :ref:`EditorFeatureProfile`, :ref:`EditorInspectorPlugin`, :ref:`EditorResourceConversionPlugin`, :ref:`EditorResourcePreviewGenerator`, :ref:`EditorSceneFormatImporter`, :ref:`EditorScenePostImport`, :ref:`EditorScenePostImportPlugin`, :ref:`EditorScript`, :ref:`EditorTranslationParserPlugin`, :ref:`EncodedObjectAsID`, :ref:`EngineProfiler`, :ref:`Expression`, :ref:`File`, :ref:`HMACContext`, :ref:`HTTPClient`, :ref:`HashingContext`, :ref:`JSON`, :ref:`JavaClass`, :ref:`JavaScriptObject`, :ref:`KinematicCollision2D`, :ref:`KinematicCollision3D`, :ref:`Lightmapper`, :ref:`MeshDataTool`, :ref:`MultiplayerAPI`, :ref:`Mutex`, :ref:`Node3DGizmo`, :ref:`OGGPacketSequencePlayback`, :ref:`PCKPacker`, :ref:`PackedDataContainerRef`, :ref:`PacketPeer`, :ref:`PhysicsPointQueryParameters2D`, :ref:`PhysicsPointQueryParameters3D`, :ref:`PhysicsRayQueryParameters2D`, :ref:`PhysicsRayQueryParameters3D`, :ref:`PhysicsShapeQueryParameters2D`, :ref:`PhysicsShapeQueryParameters3D`, :ref:`PhysicsTestMotionParameters2D`, :ref:`PhysicsTestMotionParameters3D`, :ref:`PhysicsTestMotionResult2D`, :ref:`PhysicsTestMotionResult3D`, :ref:`RDAttachmentFormat`, :ref:`RDFramebufferPass`, :ref:`RDPipelineColorBlendState`, :ref:`RDPipelineColorBlendStateAttachment`, :ref:`RDPipelineDepthStencilState`, :ref:`RDPipelineMultisampleState`, :ref:`RDPipelineRasterizationState`, :ref:`RDPipelineSpecializationConstant`, :ref:`RDSamplerState`, :ref:`RDShaderSource`, :ref:`RDTextureFormat`, :ref:`RDTextureView`, :ref:`RDUniform`, :ref:`RDVertexAttribute`, :ref:`RandomNumberGenerator`, :ref:`RegEx`, :ref:`RegExMatch`, :ref:`Resource`, :ref:`ResourceFormatLoader`, :ref:`ResourceFormatSaver`, :ref:`ResourceImporter`, :ref:`SceneState`, :ref:`SceneTreeTimer`, :ref:`Semaphore`, :ref:`SkinReference`, :ref:`StreamPeer`, :ref:`SurfaceTool`, :ref:`TCPServer`, :ref:`TextLine`, :ref:`TextParagraph`, :ref:`TextServer`, :ref:`Thread`, :ref:`TriangleMesh`, :ref:`Tween`, :ref:`Tweener`, :ref:`UDPServer`, :ref:`UPNP`, :ref:`UPNPDevice`, :ref:`VelocityTracker3D`, :ref:`VisualScriptFunctionState`, :ref:`WeakRef`, :ref:`WebRTCPeerConnection`, :ref:`XMLParser`, :ref:`XRInterface`, :ref:`XRPose`, :ref:`XRPositionalTracker` Base class for reference-counted objects. diff --git a/classes/class_renderingserver.rst b/classes/class_renderingserver.rst index f4fd1c639..473bce717 100644 --- a/classes/class_renderingserver.rst +++ b/classes/class_renderingserver.rst @@ -452,6 +452,8 @@ Methods +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`light_set_cull_mask` **(** :ref:`RID` light, :ref:`int` mask **)** | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`light_set_distance_fade` **(** :ref:`RID` decal, :ref:`bool` enabled, :ref:`float` begin, :ref:`float` shadow, :ref:`float` length **)** | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`light_set_max_sdfgi_cascade` **(** :ref:`RID` light, :ref:`int` cascade **)** | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`light_set_negative` **(** :ref:`RID` light, :ref:`bool` enable **)** | @@ -464,8 +466,6 @@ Methods +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`light_set_shadow` **(** :ref:`RID` light, :ref:`bool` enabled **)** | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`light_set_shadow_color` **(** :ref:`RID` light, :ref:`Color` color **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`lightmap_create` **(** **)** | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedInt32Array` | :ref:`lightmap_get_probe_capture_bsp_tree` **(** :ref:`RID` lightmap **)** |const| | @@ -2221,23 +2221,23 @@ enum **EnvironmentToneMapper**: .. _enum_RenderingServer_EnvironmentSSRRoughnessQuality: -.. _class_RenderingServer_constant_ENV_SSR_ROUGNESS_QUALITY_DISABLED: +.. _class_RenderingServer_constant_ENV_SSR_ROUGHNESS_QUALITY_DISABLED: -.. _class_RenderingServer_constant_ENV_SSR_ROUGNESS_QUALITY_LOW: +.. _class_RenderingServer_constant_ENV_SSR_ROUGHNESS_QUALITY_LOW: -.. _class_RenderingServer_constant_ENV_SSR_ROUGNESS_QUALITY_MEDIUM: +.. _class_RenderingServer_constant_ENV_SSR_ROUGHNESS_QUALITY_MEDIUM: -.. _class_RenderingServer_constant_ENV_SSR_ROUGNESS_QUALITY_HIGH: +.. _class_RenderingServer_constant_ENV_SSR_ROUGHNESS_QUALITY_HIGH: enum **EnvironmentSSRRoughnessQuality**: -- **ENV_SSR_ROUGNESS_QUALITY_DISABLED** = **0** +- **ENV_SSR_ROUGHNESS_QUALITY_DISABLED** = **0** --- Lowest quality of roughness filter for screen-space reflections. Rough materials will not have blurrier screen-space reflections compared to smooth (non-rough) materials. This is the fastest option. -- **ENV_SSR_ROUGNESS_QUALITY_LOW** = **1** +- **ENV_SSR_ROUGHNESS_QUALITY_LOW** = **1** --- Low quality of roughness filter for screen-space reflections. -- **ENV_SSR_ROUGNESS_QUALITY_MEDIUM** = **2** +- **ENV_SSR_ROUGHNESS_QUALITY_MEDIUM** = **2** --- Medium quality of roughness filter for screen-space reflections. -- **ENV_SSR_ROUGNESS_QUALITY_HIGH** = **3** +- **ENV_SSR_ROUGHNESS_QUALITY_HIGH** = **3** --- High quality of roughness filter for screen-space reflections. This is the slowest option. ---- @@ -4524,6 +4524,14 @@ Sets the cull mask for this Light3D. Lights only affect objects in the selected ---- +.. _class_RenderingServer_method_light_set_distance_fade: + +- void **light_set_distance_fade** **(** :ref:`RID` decal, :ref:`bool` enabled, :ref:`float` begin, :ref:`float` shadow, :ref:`float` length **)** + +Sets the distance fade for this Light3D. This acts as a form of level of detail (LOD) and can be used to improve performance. Equivalent to :ref:`Light3D.distance_fade_enabled`, :ref:`Light3D.distance_fade_begin`, :ref:`Light3D.distance_fade_shadow`, and :ref:`Light3D.distance_fade_length`. + +---- + .. _class_RenderingServer_method_light_set_max_sdfgi_cascade: - void **light_set_max_sdfgi_cascade** **(** :ref:`RID` light, :ref:`int` cascade **)** @@ -4570,14 +4578,6 @@ If ``true``, light will cast shadows. Equivalent to :ref:`Light3D.shadow_enabled ---- -.. _class_RenderingServer_method_light_set_shadow_color: - -- void **light_set_shadow_color** **(** :ref:`RID` light, :ref:`Color` color **)** - -Sets the color of the shadow cast by the light. Equivalent to :ref:`Light3D.shadow_color`. - ----- - .. _class_RenderingServer_method_lightmap_create: - :ref:`RID` **lightmap_create** **(** **)** diff --git a/classes/class_resource.rst b/classes/class_resource.rst index 39b3fbd32..c3266fffa 100644 --- a/classes/class_resource.rst +++ b/classes/class_resource.rst @@ -11,7 +11,7 @@ Resource **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`Animation`, :ref:`AnimationNode`, :ref:`AnimationNodeStateMachinePlayback`, :ref:`AnimationNodeStateMachineTransition`, :ref:`AudioBusLayout`, :ref:`AudioEffect`, :ref:`AudioStream`, :ref:`BitMap`, :ref:`ButtonGroup`, :ref:`CameraEffects`, :ref:`CryptoKey`, :ref:`Curve`, :ref:`Curve2D`, :ref:`Curve3D`, :ref:`EditorNode3DGizmoPlugin`, :ref:`EditorSettings`, :ref:`Environment`, :ref:`Font`, :ref:`FontData`, :ref:`GDNativeLibrary`, :ref:`GLTFAccessor`, :ref:`GLTFAnimation`, :ref:`GLTFBufferView`, :ref:`GLTFCamera`, :ref:`GLTFDocument`, :ref:`GLTFDocumentExtension`, :ref:`GLTFLight`, :ref:`GLTFMesh`, :ref:`GLTFNode`, :ref:`GLTFSkeleton`, :ref:`GLTFSkin`, :ref:`GLTFSpecGloss`, :ref:`GLTFState`, :ref:`GLTFTexture`, :ref:`Gradient`, :ref:`Image`, :ref:`ImporterMesh`, :ref:`InputEvent`, :ref:`LightmapGIData`, :ref:`Material`, :ref:`Mesh`, :ref:`MeshLibrary`, :ref:`MultiMesh`, :ref:`NativeExtension`, :ref:`NavigationMesh`, :ref:`NavigationPolygon`, :ref:`OGGPacketSequence`, :ref:`Occluder3D`, :ref:`OccluderPolygon2D`, :ref:`OpenSimplexNoise`, :ref:`PackedDataContainer`, :ref:`PackedScene`, :ref:`PhysicsMaterial`, :ref:`PolygonPathFinder`, :ref:`RDShaderFile`, :ref:`RDShaderSPIRV`, :ref:`RichTextEffect`, :ref:`SceneReplicationConfig`, :ref:`Script`, :ref:`Shader`, :ref:`Shape2D`, :ref:`Shape3D`, :ref:`Shortcut`, :ref:`SkeletonModification2D`, :ref:`SkeletonModification3D`, :ref:`SkeletonModificationStack2D`, :ref:`SkeletonModificationStack3D`, :ref:`Skin`, :ref:`Sky`, :ref:`SpriteFrames`, :ref:`StyleBox`, :ref:`SyntaxHighlighter`, :ref:`Texture`, :ref:`Theme`, :ref:`TileMapPattern`, :ref:`TileSet`, :ref:`TileSetSource`, :ref:`Translation`, :ref:`VideoStream`, :ref:`VisualScriptNode`, :ref:`VisualShaderNode`, :ref:`VoxelGIData`, :ref:`World2D`, :ref:`World3D`, :ref:`X509Certificate` +**Inherited By:** :ref:`Animation`, :ref:`AnimationNode`, :ref:`AnimationNodeStateMachinePlayback`, :ref:`AnimationNodeStateMachineTransition`, :ref:`AudioBusLayout`, :ref:`AudioEffect`, :ref:`AudioStream`, :ref:`BitMap`, :ref:`ButtonGroup`, :ref:`CameraEffects`, :ref:`CryptoKey`, :ref:`Curve`, :ref:`Curve2D`, :ref:`Curve3D`, :ref:`EditorNode3DGizmoPlugin`, :ref:`EditorSettings`, :ref:`Environment`, :ref:`Font`, :ref:`FontData`, :ref:`GLTFAccessor`, :ref:`GLTFAnimation`, :ref:`GLTFBufferView`, :ref:`GLTFCamera`, :ref:`GLTFDocument`, :ref:`GLTFDocumentExtension`, :ref:`GLTFLight`, :ref:`GLTFMesh`, :ref:`GLTFNode`, :ref:`GLTFSkeleton`, :ref:`GLTFSkin`, :ref:`GLTFSpecGloss`, :ref:`GLTFState`, :ref:`GLTFTexture`, :ref:`Gradient`, :ref:`Image`, :ref:`ImporterMesh`, :ref:`InputEvent`, :ref:`LightmapGIData`, :ref:`Material`, :ref:`Mesh`, :ref:`MeshLibrary`, :ref:`MultiMesh`, :ref:`NativeExtension`, :ref:`NavigationMesh`, :ref:`NavigationPolygon`, :ref:`OGGPacketSequence`, :ref:`Occluder3D`, :ref:`OccluderPolygon2D`, :ref:`OpenSimplexNoise`, :ref:`OpenXRAction`, :ref:`OpenXRActionMap`, :ref:`OpenXRActionSet`, :ref:`OpenXRIPBinding`, :ref:`OpenXRInteractionProfile`, :ref:`PackedDataContainer`, :ref:`PackedScene`, :ref:`PhysicsMaterial`, :ref:`PolygonPathFinder`, :ref:`RDShaderFile`, :ref:`RDShaderSPIRV`, :ref:`RichTextEffect`, :ref:`SceneReplicationConfig`, :ref:`Script`, :ref:`Shader`, :ref:`Shape2D`, :ref:`Shape3D`, :ref:`Shortcut`, :ref:`SkeletonModification2D`, :ref:`SkeletonModification3D`, :ref:`SkeletonModificationStack2D`, :ref:`SkeletonModificationStack3D`, :ref:`Skin`, :ref:`Sky`, :ref:`SpriteFrames`, :ref:`StyleBox`, :ref:`SyntaxHighlighter`, :ref:`Texture`, :ref:`Theme`, :ref:`TileMapPattern`, :ref:`TileSet`, :ref:`TileSetSource`, :ref:`Translation`, :ref:`VideoStream`, :ref:`VisualScriptNode`, :ref:`VisualShaderNode`, :ref:`VoxelGIData`, :ref:`World2D`, :ref:`World3D`, :ref:`X509Certificate` Base class for all resources. @@ -43,6 +43,8 @@ Properties Methods ------- ++---------------------------------+------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`_get_rid` **(** **)** |virtual| | +---------------------------------+------------------------------------------------------------------------------------------------------------------+ | :ref:`Resource` | :ref:`duplicate` **(** :ref:`bool` subresources=false **)** |const| | +---------------------------------+------------------------------------------------------------------------------------------------------------------+ @@ -126,6 +128,12 @@ The path to the resource. In case it has its own file, it will return its filepa Method Descriptions ------------------- +.. _class_Resource_method__get_rid: + +- :ref:`RID` **_get_rid** **(** **)** |virtual| + +---- + .. _class_Resource_method_duplicate: - :ref:`Resource` **duplicate** **(** :ref:`bool` subresources=false **)** |const| diff --git a/classes/class_resourceformatloader.rst b/classes/class_resourceformatloader.rst index 26d3ce413..28f4aa552 100644 --- a/classes/class_resourceformatloader.rst +++ b/classes/class_resourceformatloader.rst @@ -20,7 +20,7 @@ Godot loads resources in the editor or in exported games using ResourceFormatLoa Extending this class allows you to define your own loader. Be sure to respect the documented return types and values. You should give it a global class name with ``class_name`` for it to be registered. Like built-in ResourceFormatLoaders, it will be called automatically when loading resources of its handled type(s). You may also implement a :ref:`ResourceFormatSaver`. -\ **Note:** You can also extend :ref:`EditorImportPlugin` if the resource type you need exists but Godot is unable to load its format. Choosing one way over another depends on if the format is suitable or not for the final exported game. For example, it's better to import ``.png`` textures as ``.stex`` (:ref:`StreamTexture2D`) first, so they can be loaded with better efficiency on the graphics card. +\ **Note:** You can also extend :ref:`EditorImportPlugin` if the resource type you need exists but Godot is unable to load its format. Choosing one way over another depends on if the format is suitable or not for the final exported game. For example, it's better to import ``.png`` textures as ``.ctex`` (:ref:`CompressedTexture2D`) first, so they can be loaded with better efficiency on the graphics card. Methods ------- diff --git a/classes/class_resourcesaver.rst b/classes/class_resourcesaver.rst index 7b6938832..88825b477 100644 --- a/classes/class_resourcesaver.rst +++ b/classes/class_resourcesaver.rst @@ -23,17 +23,19 @@ It uses the many :ref:`ResourceFormatSaver` classes r Methods ------- -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_recognized_extensions` **(** :ref:`Resource` type **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`save` **(** :ref:`String` path, :ref:`Resource` resource, :ref:`SaverFlags` flags=0 **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedStringArray` | :ref:`get_recognized_extensions` **(** :ref:`Resource` type **)** | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Error` | :ref:`save` **(** :ref:`String` path, :ref:`Resource` resource, :ref:`int` flags=0 **)** | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Enumerations ------------ .. _enum_ResourceSaver_SaverFlags: +.. _class_ResourceSaver_constant_FLAG_NONE: + .. _class_ResourceSaver_constant_FLAG_RELATIVE_PATHS: .. _class_ResourceSaver_constant_FLAG_BUNDLE_RESOURCES: @@ -50,6 +52,8 @@ Enumerations enum **SaverFlags**: +- **FLAG_NONE** = **0** --- No resource saving option. + - **FLAG_RELATIVE_PATHS** = **1** --- Save the resource with a path relative to the scene which uses it. - **FLAG_BUNDLE_RESOURCES** = **2** --- Bundles external resources. @@ -77,11 +81,11 @@ Returns the list of extensions available for saving a resource of a given type. .. _class_ResourceSaver_method_save: -- :ref:`Error` **save** **(** :ref:`String` path, :ref:`Resource` resource, :ref:`SaverFlags` flags=0 **)** +- :ref:`Error` **save** **(** :ref:`String` path, :ref:`Resource` resource, :ref:`int` flags=0 **)** Saves a resource to disk to the given path, using a :ref:`ResourceFormatSaver` that recognizes the resource object. -The ``flags`` bitmask can be specified to customize the save behavior. +The ``flags`` bitmask can be specified to customize the save behavior using :ref:`SaverFlags` flags. Returns :ref:`@GlobalScope.OK` on success. diff --git a/classes/class_richtextlabel.rst b/classes/class_richtextlabel.rst index 2c6c9684e..5d0b2fe55 100644 --- a/classes/class_richtextlabel.rst +++ b/classes/class_richtextlabel.rst @@ -38,47 +38,47 @@ Tutorials Properties ---------- -+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`AutowrapMode` | :ref:`autowrap_mode` | ``3`` | -+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`bbcode_enabled` | ``false`` | -+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`custom_effects` | ``[]`` | -+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`deselect_on_focus_loss_enabled` | ``true`` | -+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`fit_content_height` | ``false`` | -+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`language` | ``""`` | -+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`meta_underlined` | ``true`` | -+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`override_selected_font_color` | ``false`` | -+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`percent_visible` | ``1.0`` | -+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`bool` | rect_clip_content | ``true`` (overrides :ref:`Control`) | -+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`scroll_active` | ``true`` | -+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`scroll_following` | ``false`` | -+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`selection_enabled` | ``false`` | -+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`StructuredTextParser` | :ref:`structured_text_bidi_override` | ``0`` | -+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`structured_text_bidi_override_options` | ``[]`` | -+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`tab_size` | ``4`` | -+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`text` | ``""`` | -+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`TextDirection` | :ref:`text_direction` | ``0`` | -+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`visible_characters` | ``-1`` | -+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`VisibleCharactersBehavior` | :ref:`visible_characters_behavior` | ``0`` | -+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ ++--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`AutowrapMode` | :ref:`autowrap_mode` | ``3`` | ++--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`bbcode_enabled` | ``false`` | ++--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`bool` | clip_contents | ``true`` (overrides :ref:`Control`) | ++--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`custom_effects` | ``[]`` | ++--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`deselect_on_focus_loss_enabled` | ``true`` | ++--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`fit_content_height` | ``false`` | ++--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`String` | :ref:`language` | ``""`` | ++--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`meta_underlined` | ``true`` | ++--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`override_selected_font_color` | ``false`` | ++--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`float` | :ref:`percent_visible` | ``1.0`` | ++--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`scroll_active` | ``true`` | ++--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`scroll_following` | ``false`` | ++--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`selection_enabled` | ``false`` | ++--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`StructuredTextParser` | :ref:`structured_text_bidi_override` | ``0`` | ++--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`structured_text_bidi_override_options` | ``[]`` | ++--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`int` | :ref:`tab_size` | ``4`` | ++--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`String` | :ref:`text` | ``""`` | ++--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`TextDirection` | :ref:`text_direction` | ``0`` | ++--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`int` | :ref:`visible_characters` | ``-1`` | ++--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`VisibleCharactersBehavior` | :ref:`visible_characters_behavior` | ``0`` | ++--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ Methods ------- diff --git a/classes/class_rigiddynamicbody2d.rst b/classes/class_rigiddynamicbody2d.rst index 75e1bc32b..76d1b3b18 100644 --- a/classes/class_rigiddynamicbody2d.rst +++ b/classes/class_rigiddynamicbody2d.rst @@ -148,9 +148,9 @@ Emitted when one of this RigidDynamicBody2D's :ref:`Shape2D`\ s c \ ``body`` the :ref:`Node`, if it exists in the tree, of the other :ref:`PhysicsBody2D` or :ref:`TileMap`. -\ ``body_shape_index`` the index of the :ref:`Shape2D` of the other :ref:`PhysicsBody2D` or :ref:`TileMap` used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``body.shape_owner_get_owner(body_shape_index)``. +\ ``body_shape_index`` the index of the :ref:`Shape2D` of the other :ref:`PhysicsBody2D` or :ref:`TileMap` used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))``. -\ ``local_shape_index`` the index of the :ref:`Shape2D` of this RigidDynamicBody2D used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``self.shape_owner_get_owner(local_shape_index)``. +\ ``local_shape_index`` the index of the :ref:`Shape2D` of this RigidDynamicBody2D used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. ---- @@ -164,9 +164,9 @@ Emitted when the collision between one of this RigidDynamicBody2D's :ref:`Shape2 \ ``body`` the :ref:`Node`, if it exists in the tree, of the other :ref:`PhysicsBody2D` or :ref:`TileMap`. -\ ``body_shape_index`` the index of the :ref:`Shape2D` of the other :ref:`PhysicsBody2D` or :ref:`TileMap` used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``body.shape_owner_get_owner(body_shape_index)``. +\ ``body_shape_index`` the index of the :ref:`Shape2D` of the other :ref:`PhysicsBody2D` or :ref:`TileMap` used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))``. -\ ``local_shape_index`` the index of the :ref:`Shape2D` of this RigidDynamicBody2D used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``self.shape_owner_get_owner(local_shape_index)``. +\ ``local_shape_index`` the index of the :ref:`Shape2D` of this RigidDynamicBody2D used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. ---- diff --git a/classes/class_rigiddynamicbody3d.rst b/classes/class_rigiddynamicbody3d.rst index a7aea261c..272ed346c 100644 --- a/classes/class_rigiddynamicbody3d.rst +++ b/classes/class_rigiddynamicbody3d.rst @@ -150,11 +150,9 @@ Emitted when one of this RigidDynamicBody3D's :ref:`Shape3D`\ s c \ ``body`` the :ref:`Node`, if it exists in the tree, of the other :ref:`PhysicsBody3D` or :ref:`GridMap`. -\ ``body_shape_index`` the index of the :ref:`Shape3D` of the other :ref:`PhysicsBody3D` or :ref:`GridMap` used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``body.shape_owner_get_owner(body_shape_index)``. +\ ``body_shape_index`` the index of the :ref:`Shape3D` of the other :ref:`PhysicsBody3D` or :ref:`GridMap` used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))``. -\ ``local_shape_index`` the index of the :ref:`Shape3D` of this RigidDynamicBody3D used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``self.shape_owner_get_owner(local_shape_index)``. - -\ **Note:** Bullet physics cannot identify the shape index when using a :ref:`ConcavePolygonShape3D`. Don't use multiple :ref:`CollisionShape3D`\ s when using a :ref:`ConcavePolygonShape3D` with Bullet physics if you need shape indices. +\ ``local_shape_index`` the index of the :ref:`Shape3D` of this RigidDynamicBody3D used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. ---- @@ -168,11 +166,9 @@ Emitted when the collision between one of this RigidDynamicBody3D's :ref:`Shape3 \ ``body`` the :ref:`Node`, if it exists in the tree, of the other :ref:`PhysicsBody3D` or :ref:`GridMap`. -\ ``body_shape_index`` the index of the :ref:`Shape3D` of the other :ref:`PhysicsBody3D` or :ref:`GridMap` used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``body.shape_owner_get_owner(body_shape_index)``. +\ ``body_shape_index`` the index of the :ref:`Shape3D` of the other :ref:`PhysicsBody3D` or :ref:`GridMap` used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))``. -\ ``local_shape_index`` the index of the :ref:`Shape3D` of this RigidDynamicBody3D used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``self.shape_owner_get_owner(local_shape_index)``. - -\ **Note:** Bullet physics cannot identify the shape index when using a :ref:`ConcavePolygonShape3D`. Don't use multiple :ref:`CollisionShape3D`\ s when using a :ref:`ConcavePolygonShape3D` with Bullet physics if you need shape indices. +\ ``local_shape_index`` the index of the :ref:`Shape3D` of this RigidDynamicBody3D used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. ---- diff --git a/classes/class_scenetree.rst b/classes/class_scenetree.rst index 808d2b350..3d6317ba0 100644 --- a/classes/class_scenetree.rst +++ b/classes/class_scenetree.rst @@ -100,14 +100,6 @@ Methods Signals ------- -.. _class_SceneTree_signal_files_dropped: - -- **files_dropped** **(** :ref:`PackedStringArray` files, :ref:`int` screen **)** - -Emitted when files are dragged from the OS file manager and dropped in the game window. The arguments are a list of file paths and the identifier of the screen where the drag originated. - ----- - .. _class_SceneTree_signal_node_added: - **node_added** **(** :ref:`Node` node **)** diff --git a/classes/class_script.rst b/classes/class_script.rst index e6050b054..1c8f828c0 100644 --- a/classes/class_script.rst +++ b/classes/class_script.rst @@ -11,7 +11,7 @@ Script **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`CSharpScript`, :ref:`GDScript`, :ref:`NativeScript`, :ref:`PluginScript`, :ref:`VisualScript` +**Inherited By:** :ref:`CSharpScript`, :ref:`GDScript`, :ref:`VisualScript` A class stored as a resource. diff --git a/classes/class_scrollcontainer.rst b/classes/class_scrollcontainer.rst index 37e2fbf43..7ef08595d 100644 --- a/classes/class_scrollcontainer.rst +++ b/classes/class_scrollcontainer.rst @@ -20,28 +20,28 @@ Description A ScrollContainer node meant to contain a :ref:`Control` child. -ScrollContainers will automatically create a scrollbar child (:ref:`HScrollBar`, :ref:`VScrollBar`, or both) when needed and will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the :ref:`Control.rect_min_size` of the Control relative to the ScrollContainer. +ScrollContainers will automatically create a scrollbar child (:ref:`HScrollBar`, :ref:`VScrollBar`, or both) when needed and will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the :ref:`Control.minimum_size` of the Control relative to the ScrollContainer. Works great with a :ref:`Panel` control. You can set ``EXPAND`` on the children's size flags, so they will upscale to the ScrollContainer's size if it's larger (scroll is invisible for the chosen dimension). Properties ---------- -+----------------------------------------------------+--------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`follow_focus` | ``false`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`ScrollMode` | :ref:`horizontal_scroll_mode` | ``1`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`bool` | rect_clip_content | ``true`` (overrides :ref:`Control`) | -+----------------------------------------------------+--------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`scroll_deadzone` | ``0`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`scroll_horizontal` | ``0`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`scroll_vertical` | ``0`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`ScrollMode` | :ref:`vertical_scroll_mode` | ``1`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ ++----------------------------------------------------+--------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`bool` | clip_contents | ``true`` (overrides :ref:`Control`) | ++----------------------------------------------------+--------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`follow_focus` | ``false`` | ++----------------------------------------------------+--------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`ScrollMode` | :ref:`horizontal_scroll_mode` | ``1`` | ++----------------------------------------------------+--------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`int` | :ref:`scroll_deadzone` | ``0`` | ++----------------------------------------------------+--------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`int` | :ref:`scroll_horizontal` | ``0`` | ++----------------------------------------------------+--------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`int` | :ref:`scroll_vertical` | ``0`` | ++----------------------------------------------------+--------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`ScrollMode` | :ref:`vertical_scroll_mode` | ``1`` | ++----------------------------------------------------+--------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ Methods ------- diff --git a/classes/class_string.rst b/classes/class_string.rst index c074ef0dc..20f5df81a 100644 --- a/classes/class_string.rst +++ b/classes/class_string.rst @@ -298,7 +298,11 @@ Returns ``true`` if the string begins with the given string. - :ref:`PackedStringArray` **bigrams** **(** **)** |const| -Returns the bigrams (pairs of consecutive letters) of this string. +Returns an array containing the bigrams (pairs of consecutive letters) of this string. + +:: + + print("Bigrams".bigrams()) # Prints "[Bi, ig, gr, ra, am, ms]" ---- @@ -369,6 +373,13 @@ To get a boolean result from a string comparison, use the ``==`` operator instea - :ref:`String` **chr** **(** :ref:`int` char **)** |static| +Directly converts an decimal integer to a unicode character. Tables of these characters can be found in various locations, for example `here. `__\ + +:: + + print(String.chr(65)) # Prints "A" + print(String.chr(129302)) # Prints "🤖" (robot face emoji) + ---- .. _class_String_method_contains: @@ -565,6 +576,10 @@ Converts a string containing a hexadecimal number into an integer. Hexadecimal s - :ref:`String` **humanize_size** **(** :ref:`int` size **)** |static| +Converts an integer representing a number of bytes into a human-readable form. + +Note that this output is in `IEC prefix format `__, and includes ``B``, ``KiB``, ``MiB``, ``GiB``, ``TiB``, ``PiB``, and ``EiB``. + ---- .. _class_String_method_indent: @@ -641,7 +656,15 @@ Returns ``true`` if this string is free from characters that aren't allowed in f - :ref:`bool` **is_valid_float** **(** **)** |const| -Returns ``true`` if this string contains a valid float. +Returns ``true`` if this string contains a valid float. This is inclusive of integers, and also supports exponents: + +:: + + print("1.7".is_valid_float()) # Prints "true" + print("24".is_valid_float()) # Prints "true" + print("7e3".is_valid_float()) # Prints "true" + print("24".is_valid_float()) # Prints "true" + print("Hello".is_valid_float()) # Prints "false" ---- @@ -667,6 +690,12 @@ Returns ``true`` if this string contains a valid color in hexadecimal HTML notat Returns ``true`` if this string is a valid identifier. A valid identifier may contain only letters, digits and underscores (``_``) and the first character may not be a digit. +:: + + print("good_ident_1".is_valid_identifier()) # Prints "true" + print("1st_bad_ident".is_valid_identifier()) # Prints "false" + print("bad_ident_#2".is_valid_identifier()) # Prints "false" + ---- .. _class_String_method_is_valid_int: @@ -675,6 +704,14 @@ Returns ``true`` if this string is a valid identifier. A valid identifier may co Returns ``true`` if this string contains a valid integer. +:: + + print("7".is_valid_int()) # Prints "true" + print("14.6".is_valid_int()) # Prints "false" + print("L".is_valid_int()) # Prints "false" + print("+3".is_valid_int()) # Prints "true" + print("-12".is_valid_int()) # Prints "true" + ---- .. _class_String_method_is_valid_ip_address: @@ -1015,7 +1052,14 @@ Returns the SHA-256 hash of the string as a string. - :ref:`float` **similarity** **(** :ref:`String` text **)** |const| -Returns the similarity index of the text compared to this string. 1 means totally similar and 0 means totally dissimilar. +Returns the similarity index (`Sorensen-Dice coefficient `__) this string compared to another. 1.0 means totally similar and 0.0 means totally dissimilar. + +:: + + print("ABC123".similarity("ABC123")) # Prints "1" + print("ABC123".similarity("XYZ456")) # Prints "0" + print("ABC123".similarity("123ABC")) # Prints "0.8" + print("ABC123".similarity("abc123")) # Prints "0.4" ---- diff --git a/classes/class_stylebox.rst b/classes/class_stylebox.rst index 1b10f9b6b..105771b7c 100644 --- a/classes/class_stylebox.rst +++ b/classes/class_stylebox.rst @@ -38,6 +38,16 @@ Properties Methods ------- ++-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_draw` **(** :ref:`RID` to_canvas_item, :ref:`Rect2` rect **)** |virtual| |const| | ++-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`_get_center_size` **(** **)** |virtual| |const| | ++-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Rect2` | :ref:`_get_draw_rect` **(** :ref:`Rect2` rect **)** |virtual| |const| | ++-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`_get_style_margin` **(** :ref:`Side` side **)** |virtual| |const| | ++-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_test_mask` **(** :ref:`Vector2` point, :ref:`Rect2` rect **)** |virtual| |const| | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`draw` **(** :ref:`RID` canvas_item, :ref:`Rect2` rect **)** |const| | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -138,6 +148,36 @@ Refer to :ref:`content_margin_bottom` to_canvas_item, :ref:`Rect2` rect **)** |virtual| |const| + +---- + +.. _class_StyleBox_method__get_center_size: + +- :ref:`Vector2` **_get_center_size** **(** **)** |virtual| |const| + +---- + +.. _class_StyleBox_method__get_draw_rect: + +- :ref:`Rect2` **_get_draw_rect** **(** :ref:`Rect2` rect **)** |virtual| |const| + +---- + +.. _class_StyleBox_method__get_style_margin: + +- :ref:`float` **_get_style_margin** **(** :ref:`Side` side **)** |virtual| |const| + +---- + +.. _class_StyleBox_method__test_mask: + +- :ref:`bool` **_test_mask** **(** :ref:`Vector2` point, :ref:`Rect2` rect **)** |virtual| |const| + +---- + .. _class_StyleBox_method_draw: - void **draw** **(** :ref:`RID` canvas_item, :ref:`Rect2` rect **)** |const| diff --git a/classes/class_subviewport.rst b/classes/class_subviewport.rst index 414c86f9b..41da5cbc2 100644 --- a/classes/class_subviewport.rst +++ b/classes/class_subviewport.rst @@ -13,6 +13,11 @@ SubViewport Creates a sub-view into the screen. +Description +----------- + +``SubViewport`` is a :ref:`Viewport` that isn't a :ref:`Window`, i.e. it doesn't draw anything by itself. To display something, ``SubViewport``'s :ref:`size` must be non-zero and it should be either put inside a :ref:`SubViewportContainer` or assigned to a :ref:`ViewportTexture`. + Tutorials --------- diff --git a/classes/class_subviewportcontainer.rst b/classes/class_subviewportcontainer.rst index ea84753fa..09e922e0e 100644 --- a/classes/class_subviewportcontainer.rst +++ b/classes/class_subviewportcontainer.rst @@ -16,9 +16,9 @@ Control for holding :ref:`SubViewport`\ s. Description ----------- -A :ref:`Container` node that holds a :ref:`SubViewport`, automatically setting its size. +A :ref:`Container` node that holds a :ref:`SubViewport`. It uses the :ref:`SubViewport`'s size as minimum size, unless :ref:`stretch` is enabled. -\ **Note:** Changing a SubViewportContainer's :ref:`Control.rect_scale` will cause its contents to appear distorted. To change its visual size without causing distortion, adjust the node's margins instead (if it's not already in a container). +\ **Note:** Changing a SubViewportContainer's :ref:`Control.scale` will cause its contents to appear distorted. To change its visual size without causing distortion, adjust the node's margins instead (if it's not already in a container). \ **Note:** The SubViewportContainer forwards mouse-enter and mouse-exit notifications to its sub-viewports. @@ -46,7 +46,7 @@ Property Descriptions | *Getter* | is_stretch_enabled() | +-----------+----------------------+ -If ``true``, the sub-viewport will be scaled to the control's size. +If ``true``, the sub-viewport will be automatically resized to the control's size. ---- diff --git a/classes/class_surfacetool.rst b/classes/class_surfacetool.rst index 7b0f7e248..d2c3561a7 100644 --- a/classes/class_surfacetool.rst +++ b/classes/class_surfacetool.rst @@ -27,7 +27,7 @@ The ``SurfaceTool`` is used to construct a :ref:`Mesh` by specifying st.begin(Mesh.PRIMITIVE_TRIANGLES) st.set_color(Color(1, 0, 0)) st.set_uv(Vector2(0, 0)) - st.set_vertex(Vector3(0, 0, 0)) + st.add_vertex(Vector3(0, 0, 0)) .. code-tab:: csharp @@ -35,7 +35,7 @@ The ``SurfaceTool`` is used to construct a :ref:`Mesh` by specifying st.Begin(Mesh.PrimitiveType.Triangles); st.SetColor(new Color(1, 0, 0)); st.SetUv(new Vector2(0, 0)); - st.SetVertex(new Vector3(0, 0, 0)); + st.AddVertex(new Vector3(0, 0, 0)); diff --git a/classes/class_tabbar.rst b/classes/class_tabbar.rst index 126830289..95af62bf6 100644 --- a/classes/class_tabbar.rst +++ b/classes/class_tabbar.rst @@ -28,6 +28,8 @@ Properties +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`drag_to_rearrange_enabled` | ``false`` | +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ +| :ref:`int` | :ref:`max_tab_width` | ``0`` | ++-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`scroll_to_selected` | ``true`` | +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`scrolling_enabled` | ``true`` | @@ -40,6 +42,8 @@ Properties +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ | :ref:`int` | :ref:`tab_count` | ``0`` | +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ +| :ref:`int` | :ref:`tabs_rearrange_group` | ``-1`` | ++-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ Methods ------- @@ -59,6 +63,8 @@ Methods +--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Texture2D` | :ref:`get_tab_icon` **(** :ref:`int` tab_idx **)** |const| | +--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_tab_idx_at_point` **(** :ref:`Vector2` point **)** |const| | ++--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_tab_language` **(** :ref:`int` tab_idx **)** |const| | +--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_tab_offset` **(** **)** |const| | @@ -71,8 +77,6 @@ Methods +--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_tab_title` **(** :ref:`int` tab_idx **)** |const| | +--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_tabs_rearrange_group` **(** **)** |const| | -+--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_tab_disabled` **(** :ref:`int` tab_idx **)** |const| | +--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_tab_hidden` **(** :ref:`int` tab_idx **)** |const| | @@ -97,8 +101,6 @@ Methods +--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_tab_title` **(** :ref:`int` tab_idx, :ref:`String` title **)** | +--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_tabs_rearrange_group` **(** :ref:`int` group_id **)** | -+--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Theme Properties ---------------- @@ -317,6 +319,22 @@ If ``true``, tabs can be rearranged with mouse drag. ---- +.. _class_TabBar_property_max_tab_width: + +- :ref:`int` **max_tab_width** + ++-----------+--------------------------+ +| *Default* | ``0`` | ++-----------+--------------------------+ +| *Setter* | set_max_tab_width(value) | ++-----------+--------------------------+ +| *Getter* | get_max_tab_width() | ++-----------+--------------------------+ + +Sets the maximum width which all tabs should be limited to. Unlimited if set to ``0``. + +---- + .. _class_TabBar_property_scroll_to_selected: - :ref:`bool` **scroll_to_selected** @@ -411,6 +429,24 @@ Sets when the close button will appear on the tabs. See :ref:`CloseButtonDisplay The number of tabs currently in the bar. +---- + +.. _class_TabBar_property_tabs_rearrange_group: + +- :ref:`int` **tabs_rearrange_group** + ++-----------+---------------------------------+ +| *Default* | ``-1`` | ++-----------+---------------------------------+ +| *Setter* | set_tabs_rearrange_group(value) | ++-----------+---------------------------------+ +| *Getter* | get_tabs_rearrange_group() | ++-----------+---------------------------------+ + +``TabBar``\ s with the same rearrange group ID will allow dragging the tabs between them. Enable drag with :ref:`drag_to_rearrange_enabled`. + +Setting this to ``-1`` will disable rearranging between ``TabBar``\ s. + Method Descriptions ------------------- @@ -470,6 +506,14 @@ Returns the :ref:`Texture2D` for the tab at index ``tab_idx`` o ---- +.. _class_TabBar_method_get_tab_idx_at_point: + +- :ref:`int` **get_tab_idx_at_point** **(** :ref:`Vector2` point **)** |const| + +Returns the index of the tab at local coordinates ``point``. Returns ``-1`` if the point is outside the control boundaries or if there's no tab at the queried position. + +---- + .. _class_TabBar_method_get_tab_language: - :ref:`String` **get_tab_language** **(** :ref:`int` tab_idx **)** |const| @@ -518,14 +562,6 @@ Returns the title of the tab at index ``tab_idx``. ---- -.. _class_TabBar_method_get_tabs_rearrange_group: - -- :ref:`int` **get_tabs_rearrange_group** **(** **)** |const| - -Returns the ``TabBar``'s rearrange group ID. - ----- - .. _class_TabBar_method_is_tab_disabled: - :ref:`bool` **is_tab_disabled** **(** :ref:`int` tab_idx **)** |const| @@ -620,14 +656,6 @@ Sets tab title base writing direction. Sets a ``title`` for the tab at index ``tab_idx``. ----- - -.. _class_TabBar_method_set_tabs_rearrange_group: - -- void **set_tabs_rearrange_group** **(** :ref:`int` group_id **)** - -Defines the rearrange group ID. Choose for each ``TabBar`` the same value to dragging tabs between ``TabBar``. Enable drag with :ref:`drag_to_rearrange_enabled`. - Theme Property Descriptions --------------------------- diff --git a/classes/class_tabcontainer.rst b/classes/class_tabcontainer.rst index 1022c2f6b..1608e5738 100644 --- a/classes/class_tabcontainer.rst +++ b/classes/class_tabcontainer.rst @@ -25,19 +25,23 @@ Ignores non-:ref:`Control` children. Properties ---------- -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`all_tabs_in_front` | ``false`` | -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`current_tab` | ``0`` | -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`drag_to_rearrange_enabled` | ``false`` | -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ -| :ref:`AlignmentMode` | :ref:`tab_alignment` | ``1`` | -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`tabs_visible` | ``true`` | -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`use_hidden_tabs_for_min_size` | ``false`` | -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ ++-------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ +| :ref:`bool` | :ref:`all_tabs_in_front` | ``false`` | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ +| :ref:`bool` | :ref:`clip_tabs` | ``true`` | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ +| :ref:`int` | :ref:`current_tab` | ``0`` | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ +| :ref:`bool` | :ref:`drag_to_rearrange_enabled` | ``false`` | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ +| :ref:`AlignmentMode` | :ref:`tab_alignment` | ``1`` | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ +| :ref:`int` | :ref:`tabs_rearrange_group` | ``-1`` | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ +| :ref:`bool` | :ref:`tabs_visible` | ``true`` | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ +| :ref:`bool` | :ref:`use_hidden_tabs_for_min_size` | ``false`` | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ Methods ------- @@ -53,17 +57,17 @@ Methods +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_tab_count` **(** **)** |const| | +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_tab_disabled` **(** :ref:`int` tab_idx **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_tab_hidden` **(** :ref:`int` tab_idx **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Texture2D` | :ref:`get_tab_icon` **(** :ref:`int` tab_idx **)** |const| | +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_tab_idx_at_point` **(** :ref:`Vector2` point **)** |const| | +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_tab_idx_from_control` **(** :ref:`Control` control **)** |const| | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_tab_title` **(** :ref:`int` tab_idx **)** |const| | +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_tabs_rearrange_group` **(** **)** |const| | +| :ref:`bool` | :ref:`is_tab_disabled` **(** :ref:`int` tab_idx **)** |const| | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_tab_hidden` **(** :ref:`int` tab_idx **)** |const| | +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_popup` **(** :ref:`Node` popup **)** | +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -75,8 +79,6 @@ Methods +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_tab_title` **(** :ref:`int` tab_idx, :ref:`String` title **)** | +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_tabs_rearrange_group` **(** :ref:`int` group_id **)** | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ Theme Properties ---------------- @@ -146,25 +148,6 @@ Emitted when switching to another tab. Emitted when a tab is selected, even if it is the current tab. -Enumerations ------------- - -.. _enum_TabContainer_AlignmentMode: - -.. _class_TabContainer_constant_ALIGNMENT_LEFT: - -.. _class_TabContainer_constant_ALIGNMENT_CENTER: - -.. _class_TabContainer_constant_ALIGNMENT_RIGHT: - -enum **AlignmentMode**: - -- **ALIGNMENT_LEFT** = **0** - -- **ALIGNMENT_CENTER** = **1** - -- **ALIGNMENT_RIGHT** = **2** - Property Descriptions --------------------- @@ -184,6 +167,22 @@ If ``true``, all tabs are drawn in front of the panel. If ``false``, inactive ta ---- +.. _class_TabContainer_property_clip_tabs: + +- :ref:`bool` **clip_tabs** + ++-----------+----------------------+ +| *Default* | ``true`` | ++-----------+----------------------+ +| *Setter* | set_clip_tabs(value) | ++-----------+----------------------+ +| *Getter* | get_clip_tabs() | ++-----------+----------------------+ + +If ``true``, tabs overflowing this node's width will be hidden, displaying two navigation buttons instead. Otherwise, this node's minimum size is updated so that all tabs are visible. + +---- + .. _class_TabContainer_property_current_tab: - :ref:`int` **current_tab** @@ -218,7 +217,7 @@ If ``true``, tabs can be rearranged with mouse drag. .. _class_TabContainer_property_tab_alignment: -- :ref:`AlignmentMode` **tab_alignment** +- :ref:`AlignmentMode` **tab_alignment** +-----------+--------------------------+ | *Default* | ``1`` | @@ -228,6 +227,26 @@ If ``true``, tabs can be rearranged with mouse drag. | *Getter* | get_tab_alignment() | +-----------+--------------------------+ +Sets the position at which tabs will be placed. See :ref:`AlignmentMode` for details. + +---- + +.. _class_TabContainer_property_tabs_rearrange_group: + +- :ref:`int` **tabs_rearrange_group** + ++-----------+---------------------------------+ +| *Default* | ``-1`` | ++-----------+---------------------------------+ +| *Setter* | set_tabs_rearrange_group(value) | ++-----------+---------------------------------+ +| *Getter* | get_tabs_rearrange_group() | ++-----------+---------------------------------+ + +``TabContainer``\ s with the same rearrange group ID will allow dragging the tabs between them. Enable drag with :ref:`drag_to_rearrange_enabled`. + +Setting this to ``-1`` will disable rearranging between ``TabContainer``\ s. + ---- .. _class_TabContainer_property_tabs_visible: @@ -305,22 +324,6 @@ Returns the number of tabs. ---- -.. _class_TabContainer_method_get_tab_disabled: - -- :ref:`bool` **get_tab_disabled** **(** :ref:`int` tab_idx **)** |const| - -Returns ``true`` if the tab at index ``tab_idx`` is disabled. - ----- - -.. _class_TabContainer_method_get_tab_hidden: - -- :ref:`bool` **get_tab_hidden** **(** :ref:`int` tab_idx **)** |const| - -Returns ``true`` if the tab at index ``tab_idx`` is hidden. - ----- - .. _class_TabContainer_method_get_tab_icon: - :ref:`Texture2D` **get_tab_icon** **(** :ref:`int` tab_idx **)** |const| @@ -337,6 +340,14 @@ Returns the index of the tab at local coordinates ``point``. Returns ``-1`` if t ---- +.. _class_TabContainer_method_get_tab_idx_from_control: + +- :ref:`int` **get_tab_idx_from_control** **(** :ref:`Control` control **)** |const| + +Returns the index of the tab tied to the given ``control``. The control must be a child of the ``TabContainer``. + +---- + .. _class_TabContainer_method_get_tab_title: - :ref:`String` **get_tab_title** **(** :ref:`int` tab_idx **)** |const| @@ -345,11 +356,19 @@ Returns the title of the tab at index ``tab_idx``. Tab titles default to the nam ---- -.. _class_TabContainer_method_get_tabs_rearrange_group: +.. _class_TabContainer_method_is_tab_disabled: -- :ref:`int` **get_tabs_rearrange_group** **(** **)** |const| +- :ref:`bool` **is_tab_disabled** **(** :ref:`int` tab_idx **)** |const| -Returns the ``TabContainer`` rearrange group id. +Returns ``true`` if the tab at index ``tab_idx`` is disabled. + +---- + +.. _class_TabContainer_method_is_tab_hidden: + +- :ref:`bool` **is_tab_hidden** **(** :ref:`int` tab_idx **)** |const| + +Returns ``true`` if the tab at index ``tab_idx`` is hidden. ---- @@ -357,7 +376,7 @@ Returns the ``TabContainer`` rearrange group id. - void **set_popup** **(** :ref:`Node` popup **)** -If set on a :ref:`Popup` node instance, a popup menu icon appears in the top-right corner of the ``TabContainer``. Clicking it will expand the :ref:`Popup` node. +If set on a :ref:`Popup` node instance, a popup menu icon appears in the top-right corner of the ``TabContainer`` (setting it to ``null`` will make it go away). Clicking it will expand the :ref:`Popup` node. ---- @@ -389,15 +408,7 @@ Sets an icon for the tab at index ``tab_idx``. - void **set_tab_title** **(** :ref:`int` tab_idx, :ref:`String` title **)** -Sets a title for the tab at index ``tab_idx``. Tab titles default to the name of the indexed child node. - ----- - -.. _class_TabContainer_method_set_tabs_rearrange_group: - -- void **set_tabs_rearrange_group** **(** :ref:`int` group_id **)** - -Defines rearrange group id, choose for each ``TabContainer`` the same value to enable tab drag between ``TabContainer``. Enable drag with :ref:`drag_to_rearrange_enabled`. +Sets a custom title for the tab at index ``tab_idx`` (tab titles default to the name of the indexed child node). Set it back to the child's name to make the tab default to it again. Theme Property Descriptions --------------------------- @@ -482,7 +493,9 @@ The size of the tab text outline. | *Default* | ``8`` | +-----------+-------+ -The space at the left and right edges of the tab bar. +The space at the left or right edges of the tab bar, accordingly with the current :ref:`tab_alignment`. + +The margin is ignored with ``ALIGNMENT_RIGHT`` if the tabs are clipped (see :ref:`clip_tabs`) or a popup has been set (see :ref:`set_popup`). The margin is always ignored with ``ALIGNMENT_CENTER``. ---- diff --git a/classes/class_textserver.rst b/classes/class_textserver.rst index 4ce36bdf7..7b6dec250 100644 --- a/classes/class_textserver.rst +++ b/classes/class_textserver.rst @@ -46,6 +46,8 @@ Methods +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`font_get_descent` **(** :ref:`RID` font_rid, :ref:`int` size **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`font_get_embolden` **(** :ref:`RID` font_rid **)** |const| | ++-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`font_get_fixed_size` **(** :ref:`RID` font_rid **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`font_get_global_oversampling` **(** **)** |const| | @@ -110,6 +112,8 @@ Methods +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedInt32Array` | :ref:`font_get_texture_offsets` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform2D` | :ref:`font_get_transform` **(** :ref:`RID` font_rid **)** |const| | ++-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`font_get_underline_position` **(** :ref:`RID` font_rid, :ref:`int` size **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`font_get_underline_thickness` **(** :ref:`RID` font_rid, :ref:`int` size **)** |const| | @@ -152,6 +156,8 @@ Methods +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`font_set_descent` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` descent **)** | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_set_embolden` **(** :ref:`RID` font_rid, :ref:`float` strength **)** | ++-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`font_set_fixed_size` **(** :ref:`RID` font_rid, :ref:`int` fixed_size **)** | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`font_set_force_autohinter` **(** :ref:`RID` font_rid, :ref:`bool` force_autohinter **)** | @@ -202,6 +208,8 @@ Methods +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`font_set_texture_offsets` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index, :ref:`PackedInt32Array` offset **)** | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_set_transform` **(** :ref:`RID` font_rid, :ref:`Transform2D` transform **)** | ++-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`font_set_underline_position` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` underline_position **)** | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`font_set_underline_thickness` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` underline_thickness **)** | @@ -781,6 +789,14 @@ Returns the font descent (number of pixels below the baseline). ---- +.. _class_TextServer_method_font_get_embolden: + +- :ref:`float` **font_get_embolden** **(** :ref:`RID` font_rid **)** |const| + +Returns font embolden strength. + +---- + .. _class_TextServer_method_font_get_fixed_size: - :ref:`int` **font_get_fixed_size** **(** :ref:`RID` font_rid **)** |const| @@ -1045,6 +1061,14 @@ Returns array containing the first free pixel in the each column of texture. Sho ---- +.. _class_TextServer_method_font_get_transform: + +- :ref:`Transform2D` **font_get_transform** **(** :ref:`RID` font_rid **)** |const| + +Returns 2D transform applied to the font outlines. + +---- + .. _class_TextServer_method_font_get_underline_position: - :ref:`float` **font_get_underline_position** **(** :ref:`RID` font_rid, :ref:`int` size **)** |const| @@ -1217,6 +1241,14 @@ Sets the font descent (number of pixels below the baseline). ---- +.. _class_TextServer_method_font_set_embolden: + +- void **font_set_embolden** **(** :ref:`RID` font_rid, :ref:`float` strength **)** + +Sets font embolden strength. If ``strength`` is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness. + +---- + .. _class_TextServer_method_font_set_fixed_size: - void **font_set_fixed_size** **(** :ref:`RID` font_rid, :ref:`int` fixed_size **)** @@ -1423,6 +1455,16 @@ Sets array containing the first free pixel in the each column of texture. Should ---- +.. _class_TextServer_method_font_set_transform: + +- void **font_set_transform** **(** :ref:`RID` font_rid, :ref:`Transform2D` transform **)** + +Sets 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs. + +For example, to simulate italic typeface by slanting, apply the following transform ``Transform2D(1.0, slant, 0.0, 1.0, 0.0, 0.0)``. + +---- + .. _class_TextServer_method_font_set_underline_position: - void **font_set_underline_position** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` underline_position **)** diff --git a/classes/class_textserverextension.rst b/classes/class_textserverextension.rst index 7ac45377f..92220ddc3 100644 --- a/classes/class_textserverextension.rst +++ b/classes/class_textserverextension.rst @@ -44,6 +44,8 @@ Methods +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`_font_get_descent` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`_font_get_embolden` **(** :ref:`RID` font_rid **)** |virtual| |const| | ++-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`_font_get_fixed_size` **(** :ref:`RID` font_rid **)** |virtual| |const| | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`_font_get_global_oversampling` **(** **)** |virtual| |const| | @@ -108,6 +110,8 @@ Methods +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedInt32Array` | :ref:`_font_get_texture_offsets` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index **)** |virtual| |const| | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform2D` | :ref:`_font_get_transform` **(** :ref:`RID` font_rid **)** |virtual| |const| | ++-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`_font_get_underline_position` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`_font_get_underline_thickness` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | @@ -152,6 +156,8 @@ Methods +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_font_set_descent` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` descent **)** |virtual| | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_font_set_embolden` **(** :ref:`RID` font_rid, :ref:`float` strength **)** |virtual| | ++-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_font_set_fixed_size` **(** :ref:`RID` font_rid, :ref:`int` fixed_size **)** |virtual| | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_font_set_force_autohinter` **(** :ref:`RID` font_rid, :ref:`bool` force_autohinter **)** |virtual| | @@ -202,6 +208,8 @@ Methods +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_font_set_texture_offsets` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index, :ref:`PackedInt32Array` offset **)** |virtual| | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_font_set_transform` **(** :ref:`RID` font_rid, :ref:`Transform2D` transform **)** |virtual| | ++-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_font_set_underline_position` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` underline_position **)** |virtual| | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_font_set_underline_thickness` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` underline_thickness **)** |virtual| | @@ -466,6 +474,14 @@ Returns the font descent (number of pixels below the baseline). ---- +.. _class_TextServerExtension_method__font_get_embolden: + +- :ref:`float` **_font_get_embolden** **(** :ref:`RID` font_rid **)** |virtual| |const| + +Returns font embolden strength. + +---- + .. _class_TextServerExtension_method__font_get_fixed_size: - :ref:`int` **_font_get_fixed_size** **(** :ref:`RID` font_rid **)** |virtual| |const| @@ -730,6 +746,14 @@ Returns array containing the first free pixel in the each column of texture. Sho ---- +.. _class_TextServerExtension_method__font_get_transform: + +- :ref:`Transform2D` **_font_get_transform** **(** :ref:`RID` font_rid **)** |virtual| |const| + +Retruns 2D transform applied to the font outlines. + +---- + .. _class_TextServerExtension_method__font_get_underline_position: - :ref:`float` **_font_get_underline_position** **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| @@ -910,6 +934,14 @@ Sets bitmap font fixed size. If set to value greater than zero, same cache entry ---- +.. _class_TextServerExtension_method__font_set_embolden: + +- void **_font_set_embolden** **(** :ref:`RID` font_rid, :ref:`float` strength **)** |virtual| + +Sets font embolden strength. If ``strength`` is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness. + +---- + .. _class_TextServerExtension_method__font_set_fixed_size: - void **_font_set_fixed_size** **(** :ref:`RID` font_rid, :ref:`int` fixed_size **)** |virtual| @@ -1114,6 +1146,16 @@ Sets array containing the first free pixel in the each column of texture. Should ---- +.. _class_TextServerExtension_method__font_set_transform: + +- void **_font_set_transform** **(** :ref:`RID` font_rid, :ref:`Transform2D` transform **)** |virtual| + +Sets 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs. + +For example, to simulate italic typeface by slanting, apply the following transform ``Transform2D(1.0, slant, 0.0, 1.0, 0.0, 0.0)``. + +---- + .. _class_TextServerExtension_method__font_set_underline_position: - void **_font_set_underline_position** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` underline_position **)** |virtual| diff --git a/classes/class_texture2d.rst b/classes/class_texture2d.rst index f579c9c7c..3efa0a1cb 100644 --- a/classes/class_texture2d.rst +++ b/classes/class_texture2d.rst @@ -11,7 +11,7 @@ Texture2D **Inherits:** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`AnimatedTexture`, :ref:`AtlasTexture`, :ref:`CameraTexture`, :ref:`CanvasTexture`, :ref:`CurveTexture`, :ref:`CurveXYZTexture`, :ref:`GradientTexture1D`, :ref:`GradientTexture2D`, :ref:`ImageTexture`, :ref:`MeshTexture`, :ref:`NoiseTexture`, :ref:`ProxyTexture`, :ref:`StreamTexture2D`, :ref:`ViewportTexture` +**Inherited By:** :ref:`AnimatedTexture`, :ref:`AtlasTexture`, :ref:`CameraTexture`, :ref:`CanvasTexture`, :ref:`CompressedTexture2D`, :ref:`CurveTexture`, :ref:`CurveXYZTexture`, :ref:`GradientTexture1D`, :ref:`GradientTexture2D`, :ref:`ImageTexture`, :ref:`MeshTexture`, :ref:`NoiseTexture`, :ref:`ProxyTexture`, :ref:`ViewportTexture` Texture for 2D and 3D. @@ -29,6 +29,20 @@ Textures are often created by loading them from a file. See :ref:`@GDScript.load Methods ------- ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_draw` **(** :ref:`RID` to_canvas_item, :ref:`Vector2` pos, :ref:`Color` modulate, :ref:`bool` transpose **)** |virtual| |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_draw_rect` **(** :ref:`RID` to_canvas_item, :ref:`Rect2` rect, :ref:`bool` tile, :ref:`Color` modulate, :ref:`bool` transpose **)** |virtual| |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_draw_rect_region` **(** :ref:`RID` tp_canvas_item, :ref:`Rect2` rect, :ref:`Rect2` src_rect, :ref:`Color` modulate, :ref:`bool` transpose, :ref:`bool` clip_uv **)** |virtual| |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_get_height` **(** **)** |virtual| |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_get_width` **(** **)** |virtual| |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_has_alpha` **(** **)** |virtual| |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_is_pixel_opaque` **(** :ref:`int` x, :ref:`int` y **)** |virtual| |const| | +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`draw` **(** :ref:`RID` canvas_item, :ref:`Vector2` position, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`bool` transpose=false **)** |const| | +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -50,6 +64,48 @@ Methods Method Descriptions ------------------- +.. _class_Texture2D_method__draw: + +- void **_draw** **(** :ref:`RID` to_canvas_item, :ref:`Vector2` pos, :ref:`Color` modulate, :ref:`bool` transpose **)** |virtual| |const| + +---- + +.. _class_Texture2D_method__draw_rect: + +- void **_draw_rect** **(** :ref:`RID` to_canvas_item, :ref:`Rect2` rect, :ref:`bool` tile, :ref:`Color` modulate, :ref:`bool` transpose **)** |virtual| |const| + +---- + +.. _class_Texture2D_method__draw_rect_region: + +- void **_draw_rect_region** **(** :ref:`RID` tp_canvas_item, :ref:`Rect2` rect, :ref:`Rect2` src_rect, :ref:`Color` modulate, :ref:`bool` transpose, :ref:`bool` clip_uv **)** |virtual| |const| + +---- + +.. _class_Texture2D_method__get_height: + +- :ref:`int` **_get_height** **(** **)** |virtual| |const| + +---- + +.. _class_Texture2D_method__get_width: + +- :ref:`int` **_get_width** **(** **)** |virtual| |const| + +---- + +.. _class_Texture2D_method__has_alpha: + +- :ref:`bool` **_has_alpha** **(** **)** |virtual| |const| + +---- + +.. _class_Texture2D_method__is_pixel_opaque: + +- :ref:`bool` **_is_pixel_opaque** **(** :ref:`int` x, :ref:`int` y **)** |virtual| |const| + +---- + .. _class_Texture2D_method_draw: - void **draw** **(** :ref:`RID` canvas_item, :ref:`Vector2` position, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`bool` transpose=false **)** |const| diff --git a/classes/class_texture3d.rst b/classes/class_texture3d.rst index ee84ad7e7..e8b21a366 100644 --- a/classes/class_texture3d.rst +++ b/classes/class_texture3d.rst @@ -11,30 +11,78 @@ Texture3D **Inherits:** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`ImageTexture3D`, :ref:`StreamTexture3D` +**Inherited By:** :ref:`CompressedTexture3D`, :ref:`ImageTexture3D` Methods ------- -+----------------------------------+----------------------------------------------------------------------------+ -| :ref:`Image[]` | :ref:`get_data` **(** **)** |const| | -+----------------------------------+----------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_depth` **(** **)** |const| | -+----------------------------------+----------------------------------------------------------------------------+ -| :ref:`Format` | :ref:`get_format` **(** **)** |const| | -+----------------------------------+----------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_height` **(** **)** |const| | -+----------------------------------+----------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_width` **(** **)** |const| | -+----------------------------------+----------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_mipmaps` **(** **)** |const| | -+----------------------------------+----------------------------------------------------------------------------+ ++----------------------------------+----------------------------------------------------------------------------------------+ +| :ref:`Image[]` | :ref:`_get_data` **(** **)** |virtual| |const| | ++----------------------------------+----------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_get_depth` **(** **)** |virtual| |const| | ++----------------------------------+----------------------------------------------------------------------------------------+ +| :ref:`Format` | :ref:`_get_format` **(** **)** |virtual| |const| | ++----------------------------------+----------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_get_height` **(** **)** |virtual| |const| | ++----------------------------------+----------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_get_width` **(** **)** |virtual| |const| | ++----------------------------------+----------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_has_mipmaps` **(** **)** |virtual| |const| | ++----------------------------------+----------------------------------------------------------------------------------------+ +| :ref:`Image[]` | :ref:`get_data` **(** **)** |const| | ++----------------------------------+----------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_depth` **(** **)** |const| | ++----------------------------------+----------------------------------------------------------------------------------------+ +| :ref:`Format` | :ref:`get_format` **(** **)** |const| | ++----------------------------------+----------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_height` **(** **)** |const| | ++----------------------------------+----------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_width` **(** **)** |const| | ++----------------------------------+----------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_mipmaps` **(** **)** |const| | ++----------------------------------+----------------------------------------------------------------------------------------+ Method Descriptions ------------------- +.. _class_Texture3D_method__get_data: + +- :ref:`Image[]` **_get_data** **(** **)** |virtual| |const| + +---- + +.. _class_Texture3D_method__get_depth: + +- :ref:`int` **_get_depth** **(** **)** |virtual| |const| + +---- + +.. _class_Texture3D_method__get_format: + +- :ref:`Format` **_get_format** **(** **)** |virtual| |const| + +---- + +.. _class_Texture3D_method__get_height: + +- :ref:`int` **_get_height** **(** **)** |virtual| |const| + +---- + +.. _class_Texture3D_method__get_width: + +- :ref:`int` **_get_width** **(** **)** |virtual| |const| + +---- + +.. _class_Texture3D_method__has_mipmaps: + +- :ref:`bool` **_has_mipmaps** **(** **)** |virtual| |const| + +---- + .. _class_Texture3D_method_get_data: - :ref:`Image[]` **get_data** **(** **)** |const| diff --git a/classes/class_texturelayered.rst b/classes/class_texturelayered.rst index 62198da48..316975d4d 100644 --- a/classes/class_texturelayered.rst +++ b/classes/class_texturelayered.rst @@ -11,7 +11,7 @@ TextureLayered **Inherits:** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`ImageTextureLayered`, :ref:`StreamTextureLayered` +**Inherited By:** :ref:`CompressedTextureLayered`, :ref:`ImageTextureLayered` Base class for 3D texture types. @@ -23,21 +23,35 @@ Base class for :ref:`Texture2DArray`, :ref:`Cubemap` | :ref:`get_format` **(** **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_height` **(** **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| :ref:`Image` | :ref:`get_layer_data` **(** :ref:`int` layer **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| :ref:`LayeredType` | :ref:`get_layered_type` **(** **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_layers` **(** **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_width` **(** **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_mipmaps` **(** **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Format` | :ref:`_get_format` **(** **)** |virtual| |const| | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_get_height` **(** **)** |virtual| |const| | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Image` | :ref:`_get_layer_data` **(** :ref:`int` layer_index **)** |virtual| |const| | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_get_layered_type` **(** **)** |virtual| |const| | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_get_layers` **(** **)** |virtual| |const| | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_get_width` **(** **)** |virtual| |const| | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_has_mipmaps` **(** **)** |virtual| |const| | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Format` | :ref:`get_format` **(** **)** |const| | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_height` **(** **)** |const| | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Image` | :ref:`get_layer_data` **(** :ref:`int` layer **)** |const| | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`LayeredType` | :ref:`get_layered_type` **(** **)** |const| | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_layers` **(** **)** |const| | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_width` **(** **)** |const| | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_mipmaps` **(** **)** |const| | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ Enumerations ------------ @@ -61,6 +75,48 @@ enum **LayeredType**: Method Descriptions ------------------- +.. _class_TextureLayered_method__get_format: + +- :ref:`Format` **_get_format** **(** **)** |virtual| |const| + +---- + +.. _class_TextureLayered_method__get_height: + +- :ref:`int` **_get_height** **(** **)** |virtual| |const| + +---- + +.. _class_TextureLayered_method__get_layer_data: + +- :ref:`Image` **_get_layer_data** **(** :ref:`int` layer_index **)** |virtual| |const| + +---- + +.. _class_TextureLayered_method__get_layered_type: + +- :ref:`int` **_get_layered_type** **(** **)** |virtual| |const| + +---- + +.. _class_TextureLayered_method__get_layers: + +- :ref:`int` **_get_layers** **(** **)** |virtual| |const| + +---- + +.. _class_TextureLayered_method__get_width: + +- :ref:`int` **_get_width** **(** **)** |virtual| |const| + +---- + +.. _class_TextureLayered_method__has_mipmaps: + +- :ref:`bool` **_has_mipmaps** **(** **)** |virtual| |const| + +---- + .. _class_TextureLayered_method_get_format: - :ref:`Format` **get_format** **(** **)** |const| diff --git a/classes/class_tilemap.rst b/classes/class_tilemap.rst index 003328b49..ca212594a 100644 --- a/classes/class_tilemap.rst +++ b/classes/class_tilemap.rst @@ -64,6 +64,8 @@ Methods +---------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`clear_layer` **(** :ref:`int` layer **)** | +---------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`erase_cell` **(** :ref:`int` layer, :ref:`Vector2i` coords **)** | ++---------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`fix_invalid_tiles` **(** **)** | +---------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`force_update` **(** :ref:`int` layer=-1 **)** | @@ -108,7 +110,7 @@ Methods +---------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`remove_layer` **(** :ref:`int` layer **)** | +---------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_cell` **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`int` source_id=-1, :ref:`Vector2i` atlas_coords=Vector2i(-1, -1), :ref:`int` alternative_tile=-1 **)** | +| void | :ref:`set_cell` **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`int` source_id=-1, :ref:`Vector2i` atlas_coords=Vector2i(-1, -1), :ref:`int` alternative_tile=0 **)** | +---------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_cells_from_surrounding_terrains` **(** :ref:`int` layer, :ref:`Vector2i[]` cells, :ref:`int` terrain_set, :ref:`bool` ignore_empty_terrains=true **)** | +---------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -289,6 +291,14 @@ Clears all cells on the given layer. ---- +.. _class_TileMap_method_erase_cell: + +- void **erase_cell** **(** :ref:`int` layer, :ref:`Vector2i` coords **)** + +Erases the cell on layer ``layer`` at coordinates ``coords``. + +---- + .. _class_TileMap_method_fix_invalid_tiles: - void **fix_invalid_tiles** **(** **)** @@ -471,7 +481,7 @@ Removes the layer at index ``layer``. .. _class_TileMap_method_set_cell: -- void **set_cell** **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`int` source_id=-1, :ref:`Vector2i` atlas_coords=Vector2i(-1, -1), :ref:`int` alternative_tile=-1 **)** +- void **set_cell** **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`int` source_id=-1, :ref:`Vector2i` atlas_coords=Vector2i(-1, -1), :ref:`int` alternative_tile=0 **)** Sets the tile indentifiers for the cell on layer ``layer`` at coordinates ``coords``. Each tile of the :ref:`TileSet` is identified using three parts: diff --git a/classes/class_time.rst b/classes/class_time.rst index d558ae2b8..5cb9bf24a 100644 --- a/classes/class_time.rst +++ b/classes/class_time.rst @@ -50,6 +50,8 @@ Methods +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_datetime_string_from_unix_time` **(** :ref:`int` unix_time_val, :ref:`bool` use_space=false **)** |const| | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_offset_string_from_offset_minutes` **(** :ref:`int` offset_minutes **)** |const| | ++-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_ticks_msec` **(** **)** |const| | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_ticks_usec` **(** **)** |const| | @@ -263,6 +265,14 @@ If ``use_space`` is true, use a space instead of the letter T in the middle. ---- +.. _class_Time_method_get_offset_string_from_offset_minutes: + +- :ref:`String` **get_offset_string_from_offset_minutes** **(** :ref:`int` offset_minutes **)** |const| + +Converts the given timezone offset in minutes to a timezone offset string. For example, -480 returns "-08:00", 345 returns "+05:45", and 0 returns "+00:00". + +---- + .. _class_Time_method_get_ticks_msec: - :ref:`int` **get_ticks_msec** **(** **)** |const| diff --git a/classes/class_timer.rst b/classes/class_timer.rst index d2899100b..1f635056c 100644 --- a/classes/class_timer.rst +++ b/classes/class_timer.rst @@ -189,7 +189,7 @@ Returns ``true`` if the timer is stopped. - void **start** **(** :ref:`float` time_sec=-1 **)** -Starts the timer. Sets ``wait_time`` to ``time_sec`` if ``time_sec > 0``. This also resets the remaining time to ``wait_time``. +Starts the timer. Sets :ref:`wait_time` to ``time_sec`` if ``time_sec > 0``. This also resets the remaining time to :ref:`wait_time`. \ **Note:** This method will not resume a paused timer. See :ref:`paused`. diff --git a/classes/class_tree.rst b/classes/class_tree.rst index 4674242f7..ef9e0d16f 100644 --- a/classes/class_tree.rst +++ b/classes/class_tree.rst @@ -54,31 +54,31 @@ To iterate over all the :ref:`TreeItem` objects in a ``Tree`` ob Properties ---------- -+------------------------------------------+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`allow_reselect` | ``false`` | -+------------------------------------------+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`allow_rmb_select` | ``false`` | -+------------------------------------------+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`column_titles_visible` | ``false`` | -+------------------------------------------+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`columns` | ``1`` | -+------------------------------------------+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`drop_mode_flags` | ``0`` | -+------------------------------------------+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`FocusMode` | focus_mode | ``2`` (overrides :ref:`Control`) | -+------------------------------------------+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`hide_folding` | ``false`` | -+------------------------------------------+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`hide_root` | ``false`` | -+------------------------------------------+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`bool` | rect_clip_content | ``true`` (overrides :ref:`Control`) | -+------------------------------------------+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`scroll_horizontal_enabled` | ``true`` | -+------------------------------------------+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`scroll_vertical_enabled` | ``true`` | -+------------------------------------------+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`SelectMode` | :ref:`select_mode` | ``0`` | -+------------------------------------------+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ ++------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`allow_reselect` | ``false`` | ++------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`allow_rmb_select` | ``false`` | ++------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`bool` | clip_contents | ``true`` (overrides :ref:`Control`) | ++------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`column_titles_visible` | ``false`` | ++------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`int` | :ref:`columns` | ``1`` | ++------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`int` | :ref:`drop_mode_flags` | ``0`` | ++------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`FocusMode` | focus_mode | ``2`` (overrides :ref:`Control`) | ++------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`hide_folding` | ``false`` | ++------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`hide_root` | ``false`` | ++------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`scroll_horizontal_enabled` | ``true`` | ++------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`scroll_vertical_enabled` | ``true`` | ++------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`SelectMode` | :ref:`select_mode` | ``0`` | ++------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ Methods ------- diff --git a/classes/class_variant.rst b/classes/class_variant.rst index 15acf74aa..6b644c4c7 100644 --- a/classes/class_variant.rst +++ b/classes/class_variant.rst @@ -45,8 +45,6 @@ Godot tracks all scripting API variables within Variants. Without even realizing - C# is statically typed, but uses the Mono ``object`` type in place of Godot's Variant class when it needs to represent a dynamic value. ``object`` is the Mono runtime's equivalent of the same concept. -- The statically-typed language NativeScript C++ does not define a built-in Variant-like class. Godot's GDNative bindings provide their own godot::Variant class for users; Any point at which the C++ code starts interacting with the Godot runtime is a place where you might have to start wrapping data inside Variant objects. - The global :ref:`@GlobalScope.typeof` function returns the enumerated value of the Variant type stored in the current variable (see :ref:`Variant.Type`). diff --git a/classes/class_videostream.rst b/classes/class_videostream.rst index 97d662d19..642e2f8e7 100644 --- a/classes/class_videostream.rst +++ b/classes/class_videostream.rst @@ -11,7 +11,7 @@ VideoStream **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`VideoStreamGDNative`, :ref:`VideoStreamTheora` +**Inherited By:** :ref:`VideoStreamTheora` Base resource for video streams. diff --git a/classes/class_videostreamgdnative.rst b/classes/class_videostreamgdnative.rst deleted file mode 100644 index 683989799..000000000 --- a/classes/class_videostreamgdnative.rst +++ /dev/null @@ -1,54 +0,0 @@ -:github_url: hide - -.. Generated automatically by doc/tools/make_rst.py in Godot's source tree. -.. DO NOT EDIT THIS FILE, but the VideoStreamGDNative.xml source instead. -.. The source is found in doc/classes or modules//doc_classes. - -.. _class_VideoStreamGDNative: - -VideoStreamGDNative -=================== - -**Inherits:** :ref:`VideoStream` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -:ref:`VideoStream` resource for for video formats implemented via GDNative. - -Description ------------ - -:ref:`VideoStream` resource for for video formats implemented via GDNative. - -It can be used via `godot-videodecoder `__ which uses the `FFmpeg `__ library. - -Methods -------- - -+-----------------------------+---------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_file` **(** **)** | -+-----------------------------+---------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_file` **(** :ref:`String` file **)** | -+-----------------------------+---------------------------------------------------------------------------------------------------------+ - -Method Descriptions -------------------- - -.. _class_VideoStreamGDNative_method_get_file: - -- :ref:`String` **get_file** **(** **)** - -Returns the video file handled by this ``VideoStreamGDNative``. - ----- - -.. _class_VideoStreamGDNative_method_set_file: - -- void **set_file** **(** :ref:`String` file **)** - -Sets the video file that this ``VideoStreamGDNative`` resource handles. The supported extensions depend on the GDNative plugins used to expose video formats. - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_videostreamplayer.rst b/classes/class_videostreamplayer.rst index 5edd66d2f..e0e689e8f 100644 --- a/classes/class_videostreamplayer.rst +++ b/classes/class_videostreamplayer.rst @@ -18,7 +18,7 @@ Description Control node for playing video streams using :ref:`VideoStream` resources. -Supported video formats are `Ogg Theora `__ (``.ogv``, :ref:`VideoStreamTheora`) and any format exposed via a GDNative plugin using :ref:`VideoStreamGDNative`. +Supported video formats are `Ogg Theora `__ (``.ogv``, :ref:`VideoStreamTheora`) and any format exposed via a GDExtension plugin. \ **Note:** Due to a bug, VideoStreamPlayer does not support localization remapping yet. @@ -198,7 +198,7 @@ The assigned video stream. See description for supported formats. The current position of the stream, in seconds. -\ **Note:** Changing this value won't have any effect as seeking is not implemented yet, except in video formats implemented by a GDNative add-on. +\ **Note:** Changing this value won't have any effect as seeking is not implemented yet, except in video formats implemented by a GDExtension add-on. ---- diff --git a/classes/class_viewport.rst b/classes/class_viewport.rst index addf67e05..d38f63582 100644 --- a/classes/class_viewport.rst +++ b/classes/class_viewport.rst @@ -13,7 +13,7 @@ Viewport **Inherited By:** :ref:`SubViewport`, :ref:`Window` -Creates a sub-view into the screen. +Base class for viewports. Description ----------- @@ -22,8 +22,6 @@ A Viewport creates a different view into the screen, or a sub-view inside anothe Optionally, a viewport can have its own 2D or 3D world, so they don't share what they draw with other viewports. -If a viewport is a child of a :ref:`SubViewportContainer`, it will automatically take up its size, otherwise it must be set manually. - Viewports can also choose to be audio listeners, so they generate positional audio depending on a 2D or 3D camera child of it. Also, viewports can be assigned to different screens in case the devices have multiple screens. diff --git a/classes/class_visualinstance3d.rst b/classes/class_visualinstance3d.rst index 19517c4dc..a64cab03e 100644 --- a/classes/class_visualinstance3d.rst +++ b/classes/class_visualinstance3d.rst @@ -30,6 +30,8 @@ Properties Methods ------- ++-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`AABB` | :ref:`_get_aabb` **(** **)** |virtual| |const| | +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`AABB` | :ref:`get_aabb` **(** **)** |const| | +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -68,6 +70,12 @@ This object will only be visible for :ref:`Camera3D`\ s whose cu Method Descriptions ------------------- +.. _class_VisualInstance3D_method__get_aabb: + +- :ref:`AABB` **_get_aabb** **(** **)** |virtual| |const| + +---- + .. _class_VisualInstance3D_method_get_aabb: - :ref:`AABB` **get_aabb** **(** **)** |const| diff --git a/classes/class_visualshader.rst b/classes/class_visualshader.rst index 53f215aff..be45e524f 100644 --- a/classes/class_visualshader.rst +++ b/classes/class_visualshader.rst @@ -35,6 +35,8 @@ Methods +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_node` **(** :ref:`Type` type, :ref:`VisualShaderNode` node, :ref:`Vector2` position, :ref:`int` id **)** | +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_varying` **(** :ref:`String` name, :ref:`VaryingMode` mode, :ref:`VaryingType` type **)** | ++-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`can_connect_nodes` **(** :ref:`Type` type, :ref:`int` from_node, :ref:`int` from_port, :ref:`int` to_node, :ref:`int` to_port **)** |const| | +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`connect_nodes` **(** :ref:`Type` type, :ref:`int` from_node, :ref:`int` from_port, :ref:`int` to_node, :ref:`int` to_port **)** | @@ -53,10 +55,14 @@ Methods +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_valid_node_id` **(** :ref:`Type` type **)** |const| | +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_varying` **(** :ref:`String` name **)** |const| | ++-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_node_connection` **(** :ref:`Type` type, :ref:`int` from_node, :ref:`int` from_port, :ref:`int` to_node, :ref:`int` to_port **)** |const| | +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`remove_node` **(** :ref:`Type` type, :ref:`int` id **)** | +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_varying` **(** :ref:`String` name **)** | ++-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`replace_node` **(** :ref:`Type` type, :ref:`int` id, :ref:`StringName` new_class **)** | +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_mode` **(** :ref:`Mode` mode **)** | @@ -115,6 +121,54 @@ enum **Type**: - **TYPE_MAX** = **10** --- Represents the size of the :ref:`Type` enum. +---- + +.. _enum_VisualShader_VaryingMode: + +.. _class_VisualShader_constant_VARYING_MODE_VERTEX_TO_FRAG_LIGHT: + +.. _class_VisualShader_constant_VARYING_MODE_FRAG_TO_LIGHT: + +.. _class_VisualShader_constant_VARYING_MODE_MAX: + +enum **VaryingMode**: + +- **VARYING_MODE_VERTEX_TO_FRAG_LIGHT** = **0** + +- **VARYING_MODE_FRAG_TO_LIGHT** = **1** + +- **VARYING_MODE_MAX** = **2** + +---- + +.. _enum_VisualShader_VaryingType: + +.. _class_VisualShader_constant_VARYING_TYPE_FLOAT: + +.. _class_VisualShader_constant_VARYING_TYPE_VECTOR_2D: + +.. _class_VisualShader_constant_VARYING_TYPE_VECTOR_3D: + +.. _class_VisualShader_constant_VARYING_TYPE_COLOR: + +.. _class_VisualShader_constant_VARYING_TYPE_TRANSFORM: + +.. _class_VisualShader_constant_VARYING_TYPE_MAX: + +enum **VaryingType**: + +- **VARYING_TYPE_FLOAT** = **0** + +- **VARYING_TYPE_VECTOR_2D** = **1** + +- **VARYING_TYPE_VECTOR_3D** = **2** + +- **VARYING_TYPE_COLOR** = **3** + +- **VARYING_TYPE_TRANSFORM** = **4** + +- **VARYING_TYPE_MAX** = **5** + Constants --------- @@ -172,6 +226,12 @@ Adds the specified node to the shader. ---- +.. _class_VisualShader_method_add_varying: + +- void **add_varying** **(** :ref:`String` name, :ref:`VaryingMode` mode, :ref:`VaryingType` type **)** + +---- + .. _class_VisualShader_method_can_connect_nodes: - :ref:`bool` **can_connect_nodes** **(** :ref:`Type` type, :ref:`int` from_node, :ref:`int` from_port, :ref:`int` to_node, :ref:`int` to_port **)** |const| @@ -242,6 +302,12 @@ Returns the position of the specified node within the shader graph. ---- +.. _class_VisualShader_method_has_varying: + +- :ref:`bool` **has_varying** **(** :ref:`String` name **)** |const| + +---- + .. _class_VisualShader_method_is_node_connection: - :ref:`bool` **is_node_connection** **(** :ref:`Type` type, :ref:`int` from_node, :ref:`int` from_port, :ref:`int` to_node, :ref:`int` to_port **)** |const| @@ -258,6 +324,12 @@ Removes the specified node from the shader. ---- +.. _class_VisualShader_method_remove_varying: + +- void **remove_varying** **(** :ref:`String` name **)** + +---- + .. _class_VisualShader_method_replace_node: - void **replace_node** **(** :ref:`Type` type, :ref:`int` id, :ref:`StringName` new_class **)** diff --git a/classes/class_visualshadernode.rst b/classes/class_visualshadernode.rst index 86b00876d..9f809a03f 100644 --- a/classes/class_visualshadernode.rst +++ b/classes/class_visualshadernode.rst @@ -11,7 +11,7 @@ VisualShaderNode **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`VisualShaderNodeBillboard`, :ref:`VisualShaderNodeClamp`, :ref:`VisualShaderNodeColorFunc`, :ref:`VisualShaderNodeColorOp`, :ref:`VisualShaderNodeCompare`, :ref:`VisualShaderNodeConstant`, :ref:`VisualShaderNodeCubemap`, :ref:`VisualShaderNodeCustom`, :ref:`VisualShaderNodeDerivativeFunc`, :ref:`VisualShaderNodeDeterminant`, :ref:`VisualShaderNodeDotProduct`, :ref:`VisualShaderNodeFloatFunc`, :ref:`VisualShaderNodeFloatOp`, :ref:`VisualShaderNodeFresnel`, :ref:`VisualShaderNodeIf`, :ref:`VisualShaderNodeInput`, :ref:`VisualShaderNodeIntFunc`, :ref:`VisualShaderNodeIntOp`, :ref:`VisualShaderNodeIs`, :ref:`VisualShaderNodeMix`, :ref:`VisualShaderNodeMultiplyAdd`, :ref:`VisualShaderNodeOuterProduct`, :ref:`VisualShaderNodeOutput`, :ref:`VisualShaderNodeParticleAccelerator`, :ref:`VisualShaderNodeParticleConeVelocity`, :ref:`VisualShaderNodeParticleEmit`, :ref:`VisualShaderNodeParticleEmitter`, :ref:`VisualShaderNodeParticleMultiplyByAxisAngle`, :ref:`VisualShaderNodeParticleRandomness`, :ref:`VisualShaderNodeResizableBase`, :ref:`VisualShaderNodeSDFRaymarch`, :ref:`VisualShaderNodeSDFToScreenUV`, :ref:`VisualShaderNodeSample3D`, :ref:`VisualShaderNodeScreenUVToSDF`, :ref:`VisualShaderNodeSmoothStep`, :ref:`VisualShaderNodeStep`, :ref:`VisualShaderNodeSwitch`, :ref:`VisualShaderNodeTexture`, :ref:`VisualShaderNodeTextureSDF`, :ref:`VisualShaderNodeTextureSDFNormal`, :ref:`VisualShaderNodeTransformCompose`, :ref:`VisualShaderNodeTransformDecompose`, :ref:`VisualShaderNodeTransformFunc`, :ref:`VisualShaderNodeTransformOp`, :ref:`VisualShaderNodeTransformVecMult`, :ref:`VisualShaderNodeUVFunc`, :ref:`VisualShaderNodeUniform`, :ref:`VisualShaderNodeUniformRef`, :ref:`VisualShaderNodeVectorBase`, :ref:`VisualShaderNodeVectorRefract` +**Inherited By:** :ref:`VisualShaderNodeBillboard`, :ref:`VisualShaderNodeClamp`, :ref:`VisualShaderNodeColorFunc`, :ref:`VisualShaderNodeColorOp`, :ref:`VisualShaderNodeCompare`, :ref:`VisualShaderNodeConstant`, :ref:`VisualShaderNodeCubemap`, :ref:`VisualShaderNodeCustom`, :ref:`VisualShaderNodeDerivativeFunc`, :ref:`VisualShaderNodeDeterminant`, :ref:`VisualShaderNodeDotProduct`, :ref:`VisualShaderNodeFloatFunc`, :ref:`VisualShaderNodeFloatOp`, :ref:`VisualShaderNodeFresnel`, :ref:`VisualShaderNodeIf`, :ref:`VisualShaderNodeInput`, :ref:`VisualShaderNodeIntFunc`, :ref:`VisualShaderNodeIntOp`, :ref:`VisualShaderNodeIs`, :ref:`VisualShaderNodeMix`, :ref:`VisualShaderNodeMultiplyAdd`, :ref:`VisualShaderNodeOuterProduct`, :ref:`VisualShaderNodeOutput`, :ref:`VisualShaderNodeParticleAccelerator`, :ref:`VisualShaderNodeParticleConeVelocity`, :ref:`VisualShaderNodeParticleEmit`, :ref:`VisualShaderNodeParticleEmitter`, :ref:`VisualShaderNodeParticleMultiplyByAxisAngle`, :ref:`VisualShaderNodeParticleRandomness`, :ref:`VisualShaderNodeResizableBase`, :ref:`VisualShaderNodeSDFRaymarch`, :ref:`VisualShaderNodeSDFToScreenUV`, :ref:`VisualShaderNodeSample3D`, :ref:`VisualShaderNodeScreenUVToSDF`, :ref:`VisualShaderNodeSmoothStep`, :ref:`VisualShaderNodeStep`, :ref:`VisualShaderNodeSwitch`, :ref:`VisualShaderNodeTexture`, :ref:`VisualShaderNodeTextureSDF`, :ref:`VisualShaderNodeTextureSDFNormal`, :ref:`VisualShaderNodeTransformCompose`, :ref:`VisualShaderNodeTransformDecompose`, :ref:`VisualShaderNodeTransformFunc`, :ref:`VisualShaderNodeTransformOp`, :ref:`VisualShaderNodeTransformVecMult`, :ref:`VisualShaderNodeUVFunc`, :ref:`VisualShaderNodeUniform`, :ref:`VisualShaderNodeUniformRef`, :ref:`VisualShaderNodeVarying`, :ref:`VisualShaderNodeVectorBase`, :ref:`VisualShaderNodeVectorRefract` Base class for nodes in a visual shader graph. diff --git a/classes/class_visualshadernodecustom.rst b/classes/class_visualshadernodecustom.rst index 8e17e2cf7..387608330 100644 --- a/classes/class_visualshadernodecustom.rst +++ b/classes/class_visualshadernodecustom.rst @@ -41,6 +41,8 @@ Methods +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`_get_description` **(** **)** |virtual| |const| | +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`_get_func_code` **(** :ref:`Mode` mode, :ref:`Type` type **)** |virtual| |const| | ++-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`_get_global_code` **(** :ref:`Mode` mode **)** |virtual| |const| | +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`_get_input_port_count` **(** **)** |virtual| |const| | @@ -59,6 +61,8 @@ Methods +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`_get_return_icon_type` **(** **)** |virtual| |const| | +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_is_available` **(** :ref:`Mode` mode, :ref:`Type` type **)** |virtual| |const| | ++-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`_is_highend` **(** **)** |virtual| |const| | +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -101,6 +105,20 @@ Defining this method is **optional**. ---- +.. _class_VisualShaderNodeCustom_method__get_func_code: + +- :ref:`String` **_get_func_code** **(** :ref:`Mode` mode, :ref:`Type` type **)** |virtual| |const| + +Override this method to add a shader code to the beginning of each shader function (once). The shader code should be returned as a string, which can have multiple lines (the ``"""`` multiline string construct can be used for convenience). + +If there are multiple custom nodes of different types which use this feature the order of each insertion is undefined. + +You can customize the generated code based on the shader ``mode`` (see :ref:`Mode`) and/or ``type`` (see :ref:`Type`). + +Defining this method is **optional**. + +---- + .. _class_VisualShaderNodeCustom_method__get_global_code: - :ref:`String` **_get_global_code** **(** :ref:`Mode` mode **)** |virtual| |const| @@ -195,13 +213,23 @@ Defining this method is **optional**. If not overridden, no return icon is shown ---- +.. _class_VisualShaderNodeCustom_method__is_available: + +- :ref:`bool` **_is_available** **(** :ref:`Mode` mode, :ref:`Type` type **)** |virtual| |const| + +Override this method to prevent the node to be visible in the member dialog for the certain ``mode`` (see :ref:`Mode`) and/or ``type`` (see :ref:`Type`). + +Defining this method is **optional**. If not overridden, it's ``true``. + +---- + .. _class_VisualShaderNodeCustom_method__is_highend: - :ref:`bool` **_is_highend** **(** **)** |virtual| |const| Override this method to enable high-end mark in the Visual Shader Editor's members dialog. -Defining this method is **optional**. If not overridden, it's false. +Defining this method is **optional**. If not overridden, it's ``false``. .. |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.)` diff --git a/classes/class_visualshadernodevarying.rst b/classes/class_visualshadernodevarying.rst new file mode 100644 index 000000000..2b28c321c --- /dev/null +++ b/classes/class_visualshadernodevarying.rst @@ -0,0 +1,61 @@ +:github_url: hide + +.. Generated automatically by doc/tools/make_rst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the VisualShaderNodeVarying.xml source instead. +.. The source is found in doc/classes or modules//doc_classes. + +.. _class_VisualShaderNodeVarying: + +VisualShaderNodeVarying +======================= + +**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +**Inherited By:** :ref:`VisualShaderNodeVaryingGetter`, :ref:`VisualShaderNodeVaryingSetter` + + + +Properties +---------- + ++---------------------------------------------------+--------------------------------------------------------------------------+--------------+ +| :ref:`String` | :ref:`varying_name` | ``"[None]"`` | ++---------------------------------------------------+--------------------------------------------------------------------------+--------------+ +| :ref:`VaryingType` | :ref:`varying_type` | ``0`` | ++---------------------------------------------------+--------------------------------------------------------------------------+--------------+ + +Property Descriptions +--------------------- + +.. _class_VisualShaderNodeVarying_property_varying_name: + +- :ref:`String` **varying_name** + ++-----------+-------------------------+ +| *Default* | ``"[None]"`` | ++-----------+-------------------------+ +| *Setter* | set_varying_name(value) | ++-----------+-------------------------+ +| *Getter* | get_varying_name() | ++-----------+-------------------------+ + +---- + +.. _class_VisualShaderNodeVarying_property_varying_type: + +- :ref:`VaryingType` **varying_type** + ++-----------+-------------------------+ +| *Default* | ``0`` | ++-----------+-------------------------+ +| *Setter* | set_varying_type(value) | ++-----------+-------------------------+ +| *Getter* | get_varying_type() | ++-----------+-------------------------+ + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_streamcubemaparray.rst b/classes/class_visualshadernodevaryinggetter.rst similarity index 67% rename from classes/class_streamcubemaparray.rst rename to classes/class_visualshadernodevaryinggetter.rst index 6349d6a2e..d5d3962d9 100644 --- a/classes/class_streamcubemaparray.rst +++ b/classes/class_visualshadernodevaryinggetter.rst @@ -1,15 +1,15 @@ :github_url: hide .. Generated automatically by doc/tools/make_rst.py in Godot's source tree. -.. DO NOT EDIT THIS FILE, but the StreamCubemapArray.xml source instead. +.. DO NOT EDIT THIS FILE, but the VisualShaderNodeVaryingGetter.xml source instead. .. The source is found in doc/classes or modules//doc_classes. -.. _class_StreamCubemapArray: +.. _class_VisualShaderNodeVaryingGetter: -StreamCubemapArray -================== +VisualShaderNodeVaryingGetter +============================= -**Inherits:** :ref:`StreamTextureLayered` **<** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**Inherits:** :ref:`VisualShaderNodeVarying` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` diff --git a/classes/class_streamtexture2darray.rst b/classes/class_visualshadernodevaryingsetter.rst similarity index 67% rename from classes/class_streamtexture2darray.rst rename to classes/class_visualshadernodevaryingsetter.rst index 8542c5bc0..e714a7f2e 100644 --- a/classes/class_streamtexture2darray.rst +++ b/classes/class_visualshadernodevaryingsetter.rst @@ -1,15 +1,15 @@ :github_url: hide .. Generated automatically by doc/tools/make_rst.py in Godot's source tree. -.. DO NOT EDIT THIS FILE, but the StreamTexture2DArray.xml source instead. +.. DO NOT EDIT THIS FILE, but the VisualShaderNodeVaryingSetter.xml source instead. .. The source is found in doc/classes or modules//doc_classes. -.. _class_StreamTexture2DArray: +.. _class_VisualShaderNodeVaryingSetter: -StreamTexture2DArray -==================== +VisualShaderNodeVaryingSetter +============================= -**Inherits:** :ref:`StreamTextureLayered` **<** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**Inherits:** :ref:`VisualShaderNodeVarying` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` diff --git a/classes/class_window.rst b/classes/class_window.rst index 73033cc38..fa2a5f70a 100644 --- a/classes/class_window.rst +++ b/classes/class_window.rst @@ -48,6 +48,8 @@ Properties +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ | :ref:`Mode` | :ref:`mode` | ``0`` | +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ +| :ref:`bool` | :ref:`popup_window` | ``false`` | ++-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ | :ref:`Vector2i` | :ref:`position` | ``Vector2i(0, 0)`` | +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ | :ref:`Vector2i` | :ref:`size` | ``Vector2i(100, 100)`` | @@ -210,6 +212,8 @@ Signals - **files_dropped** **(** :ref:`PackedStringArray` files **)** +Emitted when files are dragged from the OS file manager and dropped in the game window. The argument is a list of file paths. + ---- .. _class_Window_signal_focus_entered: @@ -305,6 +309,8 @@ Regardless of the platform, enabling fullscreen will change the window size to m .. _class_Window_constant_FLAG_NO_FOCUS: +.. _class_Window_constant_FLAG_POPUP: + .. _class_Window_constant_FLAG_MAX: enum **Flags**: @@ -319,7 +325,9 @@ enum **Flags**: - **FLAG_NO_FOCUS** = **4** -- **FLAG_MAX** = **5** +- **FLAG_POPUP** = **5** + +- **FLAG_MAX** = **6** ---- @@ -577,6 +585,20 @@ Set's the window's current mode. ---- +.. _class_Window_property_popup_window: + +- :ref:`bool` **popup_window** + ++-----------+-----------------+ +| *Default* | ``false`` | ++-----------+-----------------+ +| *Setter* | set_flag(value) | ++-----------+-----------------+ +| *Getter* | get_flag() | ++-----------+-----------------+ + +---- + .. _class_Window_property_position: - :ref:`Vector2i` **position** diff --git a/classes/class_xrcontroller3d.rst b/classes/class_xrcontroller3d.rst index 2f4498958..1214428cd 100644 --- a/classes/class_xrcontroller3d.rst +++ b/classes/class_xrcontroller3d.rst @@ -29,13 +29,6 @@ Tutorials - :doc:`VR documentation index <../tutorials/vr/index>` -Properties ----------- - -+---------------------------+-----------------------------------------------------+---------+ -| :ref:`float` | :ref:`rumble` | ``0.0`` | -+---------------------------+-----------------------------------------------------+---------+ - Methods ------- @@ -82,25 +75,6 @@ Emitted when a thumbstick or thumbpad on this controller is moved. Emitted when a trigger or similar input on this controller changes value. -Property Descriptions ---------------------- - -.. _class_XRController3D_property_rumble: - -- :ref:`float` **rumble** - -+-----------+-------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------+ -| *Setter* | set_rumble(value) | -+-----------+-------------------+ -| *Getter* | get_rumble() | -+-----------+-------------------+ - -The degree to which the controller vibrates. Ranges from ``0.0`` to ``1.0`` with precision ``.01``. If changed, updates :ref:`XRPositionalTracker.rumble` accordingly. - -This is a useful property to animate if you want the controller to vibrate for a limited duration. - Method Descriptions ------------------- diff --git a/classes/class_xrinterface.rst b/classes/class_xrinterface.rst index b1bf499f1..542db5e09 100644 --- a/classes/class_xrinterface.rst +++ b/classes/class_xrinterface.rst @@ -11,14 +11,14 @@ XRInterface **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`MobileVRInterface`, :ref:`WebXRInterface`, :ref:`XRInterfaceExtension` +**Inherited By:** :ref:`MobileVRInterface`, :ref:`OpenXRInterface`, :ref:`WebXRInterface`, :ref:`XRInterfaceExtension` Base class for an XR interface implementation. Description ----------- -This class needs to be implemented to make an AR or VR platform available to Godot and these should be implemented as C++ modules or GDNative modules (note that for GDNative the subclass XRScriptInterface should be used). Part of the interface is exposed to GDScript so you can detect, enable and configure an AR or VR platform. +This class needs to be implemented to make an AR or VR platform available to Godot and these should be implemented as C++ modules or GDExtension modules. Part of the interface is exposed to GDScript so you can detect, enable and configure an AR or VR platform. Interfaces should be written in such a way that simply enabling them will give us a working setup. You can query the available interfaces through :ref:`XRServer`. diff --git a/classes/class_xrpositionaltracker.rst b/classes/class_xrpositionaltracker.rst index dd57be1cc..e80e1cbcc 100644 --- a/classes/class_xrpositionaltracker.rst +++ b/classes/class_xrpositionaltracker.rst @@ -37,7 +37,7 @@ Properties +----------------------------------------------------------+--------------------------------------------------------------------+----------------+ | :ref:`StringName` | :ref:`name` | ``&"Unknown"`` | +----------------------------------------------------------+--------------------------------------------------------------------+----------------+ -| :ref:`float` | :ref:`rumble` | ``0.0`` | +| :ref:`String` | :ref:`profile` | ``""`` | +----------------------------------------------------------+--------------------------------------------------------------------+----------------+ | :ref:`TrackerType` | :ref:`type` | ``128`` | +----------------------------------------------------------+--------------------------------------------------------------------+----------------+ @@ -100,6 +100,14 @@ Emitted when a trigger or similar input on this tracker changes value. Emitted when the state of a pose tracked by this tracker changes. +---- + +.. _class_XRPositionalTracker_signal_profile_changed: + +- **profile_changed** **(** :ref:`String` role **)** + +Emitted when the profile of our tracker changes. + Enumerations ------------ @@ -174,19 +182,19 @@ The unique name of this tracker. The trackers that are available differ between ---- -.. _class_XRPositionalTracker_property_rumble: +.. _class_XRPositionalTracker_property_profile: -- :ref:`float` **rumble** +- :ref:`String` **profile** -+-----------+-------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------+ -| *Setter* | set_rumble(value) | -+-----------+-------------------+ -| *Getter* | get_rumble() | -+-----------+-------------------+ ++-----------+----------------------------+ +| *Default* | ``""`` | ++-----------+----------------------------+ +| *Setter* | set_tracker_profile(value) | ++-----------+----------------------------+ +| *Getter* | get_tracker_profile() | ++-----------+----------------------------+ -The degree to which the tracker rumbles. Ranges from ``0.0`` to ``1.0`` with precision ``.01``. +The profile associated with this tracker, interface dependent but will indicate the type of controller being tracked. ----