From fa8c14368bc858fe734f14bc24483fee84588419 Mon Sep 17 00:00:00 2001 From: Godot Organization Date: Sat, 23 Nov 2024 03:22:22 +0000 Subject: [PATCH] classref: Sync with current master branch (0c45ace) --- classes/class_@globalscope.rst | 10 +++- classes/class_aabb.rst | 6 +- classes/class_animationmixer.rst | 66 ++++++++++++++++----- classes/class_animationnodetimeseek.rst | 34 +++++++++++ classes/class_audiostream.rst | 2 +- classes/class_audiostreamplayer.rst | 2 + classes/class_codeedit.rst | 62 +++++++++---------- classes/class_curve3d.rst | 33 ++++++++--- classes/class_editorsettings.rst | 2 +- classes/class_editorspinslider.rst | 12 ++++ classes/class_engine.rst | 21 +------ classes/class_fileaccess.rst | 30 +++++++++- classes/class_geometry3d.rst | 8 +-- classes/class_lookatmodifier3d.rst | 12 ++-- classes/class_packedint64array.rst | 2 +- classes/class_packedvector4array.rst | 2 + classes/class_physicsserver3d.rst | 16 ++--- classes/class_physicsserver3dextension.rst | 16 ++--- classes/class_projection.rst | 43 +++++++++----- classes/class_renderingserver.rst | 20 ++++++- classes/class_spritebase3d.rst | 8 +-- classes/class_streampeer.rst | 28 +++++++++ classes/class_subviewportcontainer.rst | 35 ++++++++--- classes/class_textedit.rst | 54 ++++++++--------- classes/class_textureprogressbar.rst | 2 + classes/class_translationserver.rst | 6 +- classes/class_vector2.rst | 27 +++++++-- classes/class_vector2i.rst | 27 +++++++-- classes/class_vector3.rst | 31 +++++++--- classes/class_vector3i.rst | 31 +++++++--- classes/class_vector4.rst | 35 +++++++---- classes/class_vector4i.rst | 35 +++++++---- classes/class_viewport.rst | 2 + classes/class_visualshadernodecolorfunc.rst | 43 +++++++++++++- classes/index.rst | 1 + 35 files changed, 553 insertions(+), 211 deletions(-) diff --git a/classes/class_@globalscope.rst b/classes/class_@globalscope.rst index 3009c6c4ff2..5b0726e2e08 100644 --- a/classes/class_@globalscope.rst +++ b/classes/class_@globalscope.rst @@ -3867,11 +3867,19 @@ Hints that a :ref:`Callable` property should be displayed as a c \ **Note:** A :ref:`Callable` cannot be properly serialized and stored in a file, so it is recommended to use :ref:`PROPERTY_USAGE_EDITOR` instead of :ref:`PROPERTY_USAGE_DEFAULT`. +.. _class_@GlobalScope_constant_PROPERTY_HINT_ONESHOT: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_ONESHOT** = ``40`` + +Hints that a property will be changed on its own after setting, such as :ref:`AudioStreamPlayer.playing` or :ref:`GPUParticles3D.emitting`. + .. _class_@GlobalScope_constant_PROPERTY_HINT_MAX: .. rst-class:: classref-enumeration-constant -:ref:`PropertyHint` **PROPERTY_HINT_MAX** = ``40`` +:ref:`PropertyHint` **PROPERTY_HINT_MAX** = ``41`` Represents the size of the :ref:`PropertyHint` enum. diff --git a/classes/class_aabb.rst b/classes/class_aabb.rst index 16261e2cf9b..47a0d137c12 100644 --- a/classes/class_aabb.rst +++ b/classes/class_aabb.rst @@ -163,7 +163,7 @@ Property Descriptions :ref:`Vector3` **end** = ``Vector3(0, 0, 0)`` :ref:`🔗` -The ending point. This is usually the corner on the top-right and forward of the bounding box, and is equivalent to ``position + size``. Setting this point affects the :ref:`size`. +The ending point. This is usually the corner on the top-right and back of the bounding box, and is equivalent to ``position + size``. Setting this point affects the :ref:`size`. .. rst-class:: classref-item-separator @@ -175,7 +175,7 @@ The ending point. This is usually the corner on the top-right and forward of the :ref:`Vector3` **position** = ``Vector3(0, 0, 0)`` :ref:`🔗` -The origin point. This is usually the corner on the bottom-left and back of the bounding box. +The origin point. This is usually the corner on the bottom-left and forward of the bounding box. .. rst-class:: classref-item-separator @@ -189,7 +189,7 @@ The origin point. This is usually the corner on the bottom-left and back of the The bounding box's width, height, and depth starting from :ref:`position`. Setting this value also affects the :ref:`end` point. -\ **Note:** It's recommended setting the width, height, and depth to non-negative values. This is because most methods in Godot assume that the :ref:`position` is the bottom-left-back corner, and the :ref:`end` is the top-right-forward corner. To get an equivalent bounding box with non-negative size, use :ref:`abs`. +\ **Note:** It's recommended setting the width, height, and depth to non-negative values. This is because most methods in Godot assume that the :ref:`position` is the bottom-left-forward corner, and the :ref:`end` is the top-right-back corner. To get an equivalent bounding box with non-negative size, use :ref:`abs`. .. rst-class:: classref-section-separator diff --git a/classes/class_animationmixer.rst b/classes/class_animationmixer.rst index 918f870a69b..b85842942f0 100644 --- a/classes/class_animationmixer.rst +++ b/classes/class_animationmixer.rst @@ -55,6 +55,8 @@ Properties +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+--------------------+ | :ref:`bool` | :ref:`reset_on_save` | ``true`` | +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+--------------------+ + | :ref:`bool` | :ref:`root_motion_local` | | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+--------------------+ | :ref:`NodePath` | :ref:`root_motion_track` | ``NodePath("")`` | +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+--------------------+ | :ref:`NodePath` | :ref:`root_node` | ``NodePath("..")`` | @@ -474,6 +476,23 @@ This makes it more convenient to preview and edit animations in the editor, as c ---- +.. _class_AnimationMixer_property_root_motion_local: + +.. rst-class:: classref-property + +:ref:`bool` **root_motion_local** :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_root_motion_local**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_root_motion_local**\ (\ ) + +If ``true``, :ref:`get_root_motion_position` value is extracted as a local translation value before blending. In other words, it is treated like the translation is done after the rotation. + +.. rst-class:: classref-item-separator + +---- + .. _class_AnimationMixer_property_root_motion_track: .. rst-class:: classref-property @@ -684,13 +703,13 @@ The most basic example is applying position to :ref:`CharacterBody3D` is ``true``, return the pre-multiplied translation value with the inverted rotation. + +In this case, the code can be written as follows: + + +.. tabs:: + + .. code-tab:: gdscript + + func _process(delta): + if Input.is_action_just_pressed("animate"): + state_machine.travel("Animate") + set_quaternion(get_quaternion() * animation_tree.get_root_motion_rotation()) + var velocity = get_quaternion() * animation_tree.get_root_motion_position() / delta set_velocity(velocity) move_and_slide() @@ -734,13 +772,13 @@ For example, if an animation with only one key ``Vector3(0, 0, 0)`` is played in .. code-tab:: gdscript - var prev_root_motion_position_accumulator: Vector3 + var prev_root_motion_position_accumulator func _process(delta): if Input.is_action_just_pressed("animate"): state_machine.travel("Animate") - var current_root_motion_position_accumulator: Vector3 = animation_tree.get_root_motion_position_accumulator() - var difference: Vector3 = current_root_motion_position_accumulator - prev_root_motion_position_accumulator + var current_root_motion_position_accumulator = animation_tree.get_root_motion_position_accumulator() + var difference = current_root_motion_position_accumulator - prev_root_motion_position_accumulator prev_root_motion_position_accumulator = current_root_motion_position_accumulator transform.origin += difference @@ -801,13 +839,13 @@ For example, if an animation with only one key ``Quaternion(0, 0, 0, 1)`` is pla .. code-tab:: gdscript - var prev_root_motion_rotation_accumulator: Quaternion + var prev_root_motion_rotation_accumulator func _process(delta): if Input.is_action_just_pressed("animate"): state_machine.travel("Animate") - var current_root_motion_rotation_accumulator: Quaternion = animation_tree.get_root_motion_rotation_accumulator() - var difference: Quaternion = prev_root_motion_rotation_accumulator.inverse() * current_root_motion_rotation_accumulator + var current_root_motion_rotation_accumulator = animation_tree.get_root_motion_rotation_accumulator() + var difference = prev_root_motion_rotation_accumulator.inverse() * current_root_motion_rotation_accumulator prev_root_motion_rotation_accumulator = current_root_motion_rotation_accumulator transform.basis *= Basis(difference) @@ -838,8 +876,8 @@ The most basic example is applying scale to :ref:`CharacterBody3D` +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-------------------------+------------------------------------------------------------------------------+----------+ + | :ref:`bool` | :ref:`explicit_elapse` | ``true`` | + +-------------------------+------------------------------------------------------------------------------+----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_AnimationNodeTimeSeek_property_explicit_elapse: + +.. rst-class:: classref-property + +:ref:`bool` **explicit_elapse** = ``true`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_explicit_elapse**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_explicit_elapse**\ (\ ) + +If ``true``, some processes are executed to handle keys between seeks, such as calculating root motion and finding the nearest discrete key. + .. |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 00ef203ba4d..284aa39ef7a 100644 --- a/classes/class_audiostream.rst +++ b/classes/class_audiostream.rst @@ -168,7 +168,7 @@ Override this method to customize the name assigned to this audio stream. Unused :ref:`AudioStreamPlayback` **_instantiate_playback**\ (\ ) |virtual| |const| :ref:`🔗` -Override this method to customize the returned value of :ref:`instantiate_playback`. Should returned a new :ref:`AudioStreamPlayback` created when the stream is played (such as by an :ref:`AudioStreamPlayer`).. +Override this method to customize the returned value of :ref:`instantiate_playback`. Should return a new :ref:`AudioStreamPlayback` created when the stream is played (such as by an :ref:`AudioStreamPlayer`). .. rst-class:: classref-item-separator diff --git a/classes/class_audiostreamplayer.rst b/classes/class_audiostreamplayer.rst index 5e8de34ce13..14b47bfc958 100644 --- a/classes/class_audiostreamplayer.rst +++ b/classes/class_audiostreamplayer.rst @@ -355,6 +355,8 @@ Returns the position in the :ref:`AudioStream` of the latest \ **Note:** The position is not always accurate, as the :ref:`AudioServer` does not mix audio every processed frame. To get more accurate results, add :ref:`AudioServer.get_time_since_last_mix` to the returned position. +\ **Note:** This method always returns ``0.0`` if the :ref:`stream` is an :ref:`AudioStreamInteractive`, since it can have multiple clips playing at once. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_codeedit.rst b/classes/class_codeedit.rst index 53aea592f48..f748b6be313 100644 --- a/classes/class_codeedit.rst +++ b/classes/class_codeedit.rst @@ -320,7 +320,7 @@ Emitted when a breakpoint is added or removed from a line. If the line is moved **code_completion_requested**\ (\ ) :ref:`🔗` -Emitted when the user requests code completion. +Emitted when the user requests code completion. This signal will not be sent if :ref:`_request_code_completion` is overridden or :ref:`code_completion_enabled` is ``false``. .. rst-class:: classref-item-separator @@ -503,7 +503,7 @@ Property Descriptions - |void| **set_auto_brace_completion_enabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_auto_brace_completion_enabled**\ (\ ) -Sets whether brace pairs should be autocompleted. +If ``true``, uses :ref:`auto_brace_completion_pairs` to automatically insert the closing brace when the opening brace is inserted by typing or autocompletion. Also automatically removes the closing brace when using backspace on the opening brace. .. rst-class:: classref-item-separator @@ -520,7 +520,7 @@ Sets whether brace pairs should be autocompleted. - |void| **set_highlight_matching_braces_enabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_highlight_matching_braces_enabled**\ (\ ) -Highlight mismatching brace pairs. +If ``true``, highlights brace pairs when the caret is on either one, using :ref:`auto_brace_completion_pairs`. If matching, the pairs will be underlined. If a brace is unmatched, it is colored with :ref:`brace_mismatch_color`. .. rst-class:: classref-item-separator @@ -537,7 +537,7 @@ Highlight mismatching brace pairs. - |void| **set_auto_brace_completion_pairs**\ (\ value\: :ref:`Dictionary`\ ) - :ref:`Dictionary` **get_auto_brace_completion_pairs**\ (\ ) -Sets the brace pairs to be autocompleted. +Sets the brace pairs to be autocompleted. For each entry in the dictionary, the key is the opening brace and the value is the closing brace that matches it. A brace is a :ref:`String` made of symbols. See :ref:`auto_brace_completion_enabled` and :ref:`auto_brace_completion_highlight_matching`. .. rst-class:: classref-item-separator @@ -554,7 +554,7 @@ Sets the brace pairs to be autocompleted. - |void| **set_code_completion_enabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_code_completion_enabled**\ (\ ) -Sets whether code completion is allowed. +If ``true``, the :ref:`ProjectSettings.input/ui_text_completion_query` action requests code completion. To handle it, see :ref:`_request_code_completion` or :ref:`code_completion_requested`. .. rst-class:: classref-item-separator @@ -622,7 +622,7 @@ Sets the string delimiters. All existing string delimiters will be removed. - |void| **set_draw_bookmarks_gutter**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_drawing_bookmarks_gutter**\ (\ ) -Sets if bookmarked should be drawn in the gutter. This gutter is shared with breakpoints and executing lines. +If ``true``, bookmarks are drawn in the gutter. This gutter is shared with breakpoints and executing lines. See :ref:`set_line_as_bookmarked`. .. rst-class:: classref-item-separator @@ -639,7 +639,7 @@ Sets if bookmarked should be drawn in the gutter. This gutter is shared with bre - |void| **set_draw_breakpoints_gutter**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_drawing_breakpoints_gutter**\ (\ ) -Sets if breakpoints should be drawn in the gutter. This gutter is shared with bookmarks and executing lines. +If ``true``, breakpoints are drawn in the gutter. This gutter is shared with bookmarks and executing lines. Clicking the gutter will toggle the breakpoint for the line, see :ref:`set_line_as_breakpoint`. .. rst-class:: classref-item-separator @@ -656,7 +656,7 @@ Sets if breakpoints should be drawn in the gutter. This gutter is shared with bo - |void| **set_draw_executing_lines_gutter**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_drawing_executing_lines_gutter**\ (\ ) -Sets if executing lines should be marked in the gutter. This gutter is shared with breakpoints and bookmarks lines. +If ``true``, executing lines are marked in the gutter. This gutter is shared with breakpoints and bookmarks. See :ref:`set_line_as_executing`. .. rst-class:: classref-item-separator @@ -673,7 +673,7 @@ Sets if executing lines should be marked in the gutter. This gutter is shared wi - |void| **set_draw_fold_gutter**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_drawing_fold_gutter**\ (\ ) -Sets if foldable lines icons should be drawn in the gutter. +If ``true``, the fold gutter is drawn. In this gutter, the :ref:`can_fold_code_region` icon is drawn for each foldable line (see :ref:`can_fold_line`) and the :ref:`folded_code_region` icon is drawn for each folded line (see :ref:`is_line_folded`). These icons can be clicked to toggle the fold state, see :ref:`toggle_foldable_line`. :ref:`line_folding` must be ``true`` to show icons. .. rst-class:: classref-item-separator @@ -690,7 +690,7 @@ Sets if foldable lines icons should be drawn in the gutter. - |void| **set_draw_line_numbers**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_draw_line_numbers_enabled**\ (\ ) -Sets if line numbers should be drawn in the gutter. +If ``true``, the line number gutter is drawn. Line numbers start at ``1`` and are incremented for each line of text. Clicking and dragging in the line number gutter will select entire lines of text. .. rst-class:: classref-item-separator @@ -707,7 +707,7 @@ Sets if line numbers should be drawn in the gutter. - |void| **set_line_numbers_zero_padded**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_line_numbers_zero_padded**\ (\ ) -Sets if line numbers drawn in the gutter are zero padded. +If ``true``, line numbers drawn in the gutter are zero padded based on the total line count. Requires :ref:`gutters_draw_line_numbers` to be set to ``true``. .. rst-class:: classref-item-separator @@ -724,7 +724,7 @@ Sets if line numbers drawn in the gutter are zero padded. - |void| **set_auto_indent_enabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_auto_indent_enabled**\ (\ ) -Sets whether automatic indent are enabled, this will add an extra indent if a prefix or brace is found. +If ``true``, an extra indent is automatically inserted when a new line is added and a prefix in :ref:`indent_automatic_prefixes` is found. If a brace pair opening key is found, the matching closing brace will be moved to another new line (see :ref:`auto_brace_completion_pairs`). .. rst-class:: classref-item-separator @@ -741,7 +741,7 @@ Sets whether automatic indent are enabled, this will add an extra indent if a pr - |void| **set_auto_indent_prefixes**\ (\ value\: :ref:`Array`\[:ref:`String`\]\ ) - :ref:`Array`\[:ref:`String`\] **get_auto_indent_prefixes**\ (\ ) -Prefixes to trigger an automatic indent. +Prefixes to trigger an automatic indent. Used when :ref:`indent_automatic` is set to ``true``. .. rst-class:: classref-item-separator @@ -792,7 +792,7 @@ Use spaces instead of tabs for indentation. - |void| **set_line_folding_enabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_line_folding_enabled**\ (\ ) -Sets whether line folding is allowed. +If ``true``, lines can be folded. Otherwise, line folding methods like :ref:`fold_line` will not work and :ref:`can_fold_line` will always return ``false``. See :ref:`gutters_draw_fold_gutter`. .. rst-class:: classref-item-separator @@ -939,7 +939,7 @@ If ``line_only`` is ``true`` or ``end_key`` is an empty :ref:`String` **can_fold_line**\ (\ line\: :ref:`int`\ ) |const| :ref:`🔗` -Returns if the given line is foldable, that is, it has indented lines right below it or a comment / string block. +Returns ``true`` if the given line is foldable. A line is foldable if it is the start of a valid code region (see :ref:`get_code_region_start_tag`), if it is the start of a comment or string block, or if the next non-empty line is more indented (see :ref:`TextEdit.get_indent_level`). .. rst-class:: classref-item-separator @@ -1079,7 +1079,7 @@ Deletes all lines that are selected or have a caret on them. |void| **do_indent**\ (\ ) :ref:`🔗` -Perform an indent as if the user activated the "ui_text_indent" action. +If there is no selection, indentation is inserted at the caret. Otherwise, the selected lines are indented like :ref:`indent_lines`. Equivalent to the :ref:`ProjectSettings.input/ui_text_indent` action. The indentation characters used depend on :ref:`indent_use_spaces` and :ref:`indent_size`. .. rst-class:: classref-item-separator @@ -1307,7 +1307,7 @@ Gets all executing lines. :ref:`Array`\[:ref:`int`\] **get_folded_lines**\ (\ ) |const| :ref:`🔗` -Returns all lines that are current folded. +Returns all lines that are currently folded. .. rst-class:: classref-item-separator @@ -1403,7 +1403,7 @@ Returns ``true`` if string ``start_key`` exists. |void| **indent_lines**\ (\ ) :ref:`🔗` -Indents selected lines, or in the case of no selection the caret line by one. +Indents all lines that are selected or have a caret on them. Uses spaces or a tab depending on :ref:`indent_use_spaces`. See :ref:`unindent_lines`. .. rst-class:: classref-item-separator @@ -1439,7 +1439,7 @@ Returns the delimiter index if ``line`` ``column`` is in a string. If ``column`` :ref:`bool` **is_line_bookmarked**\ (\ line\: :ref:`int`\ ) |const| :ref:`🔗` -Returns whether the line at the specified index is bookmarked or not. +Returns ``true`` if the given line is bookmarked. See :ref:`set_line_as_bookmarked`. .. rst-class:: classref-item-separator @@ -1451,7 +1451,7 @@ Returns whether the line at the specified index is bookmarked or not. :ref:`bool` **is_line_breakpointed**\ (\ line\: :ref:`int`\ ) |const| :ref:`🔗` -Returns whether the line at the specified index is breakpointed or not. +Returns ``true`` if the given line is breakpointed. See :ref:`set_line_as_breakpoint`. .. rst-class:: classref-item-separator @@ -1463,7 +1463,7 @@ Returns whether the line at the specified index is breakpointed or not. :ref:`bool` **is_line_code_region_end**\ (\ line\: :ref:`int`\ ) |const| :ref:`🔗` -Returns whether the line at the specified index is a code region end. +Returns ``true`` if the given line is a code region end. See :ref:`set_code_region_tags`. .. rst-class:: classref-item-separator @@ -1475,7 +1475,7 @@ Returns whether the line at the specified index is a code region end. :ref:`bool` **is_line_code_region_start**\ (\ line\: :ref:`int`\ ) |const| :ref:`🔗` -Returns whether the line at the specified index is a code region start. +Returns ``true`` if the given line is a code region start. See :ref:`set_code_region_tags`. .. rst-class:: classref-item-separator @@ -1487,7 +1487,7 @@ Returns whether the line at the specified index is a code region start. :ref:`bool` **is_line_executing**\ (\ line\: :ref:`int`\ ) |const| :ref:`🔗` -Returns whether the line at the specified index is marked as executing or not. +Returns ``true`` if the given line is marked as executing. See :ref:`set_line_as_executing`. .. rst-class:: classref-item-separator @@ -1499,7 +1499,7 @@ Returns whether the line at the specified index is marked as executing or not. :ref:`bool` **is_line_folded**\ (\ line\: :ref:`int`\ ) |const| :ref:`🔗` -Returns whether the line at the specified index is folded or not. +Returns ``true`` if the given line is folded. See :ref:`fold_line`. .. rst-class:: classref-item-separator @@ -1595,7 +1595,7 @@ Sets the code hint text. Pass an empty string to clear. |void| **set_code_hint_draw_below**\ (\ draw_below\: :ref:`bool`\ ) :ref:`🔗` -Sets if the code hint should draw below the text. +If ``true``, the code hint will draw below the main caret. If ``false``, the code hint will draw above the main caret. See :ref:`set_code_hint`. .. rst-class:: classref-item-separator @@ -1619,7 +1619,7 @@ Sets the code region start and end tags (without comment delimiter). |void| **set_line_as_bookmarked**\ (\ line\: :ref:`int`, bookmarked\: :ref:`bool`\ ) :ref:`🔗` -Sets the line as bookmarked. +Sets the given line as bookmarked. If ``true`` and :ref:`gutters_draw_bookmarks` is ``true``, draws the :ref:`bookmark` icon in the gutter for this line. See :ref:`get_bookmarked_lines` and :ref:`is_line_bookmarked`. .. rst-class:: classref-item-separator @@ -1631,7 +1631,7 @@ Sets the line as bookmarked. |void| **set_line_as_breakpoint**\ (\ line\: :ref:`int`, breakpointed\: :ref:`bool`\ ) :ref:`🔗` -Sets the line as breakpointed. +Sets the given line as a breakpoint. If ``true`` and :ref:`gutters_draw_breakpoints_gutter` is ``true``, draws the :ref:`breakpoint` icon in the gutter for this line. See :ref:`get_breakpointed_lines` and :ref:`is_line_breakpointed`. .. rst-class:: classref-item-separator @@ -1643,7 +1643,7 @@ Sets the line as breakpointed. |void| **set_line_as_executing**\ (\ line\: :ref:`int`, executing\: :ref:`bool`\ ) :ref:`🔗` -Sets the line as executing. +Sets the given line as executing. If ``true`` and :ref:`gutters_draw_executing_lines` is ``true``, draws the :ref:`executing_line` icon in the gutter for this line. See :ref:`get_executing_lines` and :ref:`is_line_executing`. .. rst-class:: classref-item-separator @@ -1691,7 +1691,7 @@ Toggle the folding of the code block on all lines with a caret on them. |void| **unfold_all_lines**\ (\ ) :ref:`🔗` -Unfolds all lines, folded or not. +Unfolds all lines that are folded. .. rst-class:: classref-item-separator @@ -1703,7 +1703,7 @@ Unfolds all lines, folded or not. |void| **unfold_line**\ (\ line\: :ref:`int`\ ) :ref:`🔗` -Unfolds all lines that were previously folded. +Unfolds the given line if it is folded or if it is hidden under a folded line. .. rst-class:: classref-item-separator @@ -1715,7 +1715,7 @@ Unfolds all lines that were previously folded. |void| **unindent_lines**\ (\ ) :ref:`🔗` -Unindents selected lines, or in the case of no selection the caret line by one. Same as performing "ui_text_unindent" action. +Unindents all lines that are selected or have a caret on them. Uses spaces or a tab depending on :ref:`indent_use_spaces`. Equivalent to the :ref:`ProjectSettings.input/ui_text_dedent` action. See :ref:`indent_lines`. .. rst-class:: classref-item-separator diff --git a/classes/class_curve3d.rst b/classes/class_curve3d.rst index 4b4c4b35538..6727f668fb6 100644 --- a/classes/class_curve3d.rst +++ b/classes/class_curve3d.rst @@ -31,13 +31,15 @@ Properties .. table:: :widths: auto - +---------------------------+--------------------------------------------------------------------+----------+ - | :ref:`float` | :ref:`bake_interval` | ``0.2`` | - +---------------------------+--------------------------------------------------------------------+----------+ - | :ref:`int` | :ref:`point_count` | ``0`` | - +---------------------------+--------------------------------------------------------------------+----------+ - | :ref:`bool` | :ref:`up_vector_enabled` | ``true`` | - +---------------------------+--------------------------------------------------------------------+----------+ + +---------------------------+--------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`bake_interval` | ``0.2`` | + +---------------------------+--------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`closed` | ``false`` | + +---------------------------+--------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`point_count` | ``0`` | + +---------------------------+--------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`up_vector_enabled` | ``true`` | + +---------------------------+--------------------------------------------------------------------+-----------+ .. rst-class:: classref-reftable-group @@ -123,6 +125,23 @@ The distance in meters between two adjacent cached points. Changing it forces th ---- +.. _class_Curve3D_property_closed: + +.. rst-class:: classref-property + +:ref:`bool` **closed** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_closed**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_closed**\ (\ ) + +If ``true``, and the curve has more than 2 control points, the last point and the first one will be connected in a loop. + +.. rst-class:: classref-item-separator + +---- + .. _class_Curve3D_property_point_count: .. rst-class:: classref-property diff --git a/classes/class_editorsettings.rst b/classes/class_editorsettings.rst index 919310155db..f8f66ffef5b 100644 --- a/classes/class_editorsettings.rst +++ b/classes/class_editorsettings.rst @@ -5107,7 +5107,7 @@ If ``true``, adds :doc:`GDScript static typing <../tutorials/scripting/gdscript/ :ref:`bool` **text_editor/completion/auto_brace_complete** :ref:`🔗` -If ``true``, automatically completes braces when making use of code completion. +If ``true``, automatically inserts the matching closing brace when the opening brace is inserted by typing or autocompletion. Also automatically removes the closing brace when pressing :kbd:`Backspace` on the opening brace. This includes brackets (``()``, ``[]``, ``{}``), string quotation marks (``''``, ``""``), and comments (``/**/``) if the language supports it. .. rst-class:: classref-item-separator diff --git a/classes/class_editorspinslider.rst b/classes/class_editorspinslider.rst index 0699cf88e13..e6146384540 100644 --- a/classes/class_editorspinslider.rst +++ b/classes/class_editorspinslider.rst @@ -96,6 +96,18 @@ Emitted when the spinner/slider is ungrabbed. ---- +.. _class_EditorSpinSlider_signal_updown_pressed: + +.. rst-class:: classref-signal + +**updown_pressed**\ (\ ) :ref:`🔗` + +Emitted when the updown button is pressed. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSpinSlider_signal_value_focus_entered: .. rst-class:: classref-signal diff --git a/classes/class_engine.rst b/classes/class_engine.rst index 5c315325d6c..36c3c59f1f5 100644 --- a/classes/class_engine.rst +++ b/classes/class_engine.rst @@ -280,26 +280,7 @@ Method Descriptions Returns the name of the CPU architecture the Godot binary was built for. Possible return values include ``"x86_64"``, ``"x86_32"``, ``"arm64"``, ``"arm32"``, ``"rv64"``, ``"riscv"``, ``"ppc64"``, ``"ppc"``, ``"wasm64"``, and ``"wasm32"``. -To detect whether the current build is 64-bit, you can use the fact that all 64-bit architecture names contain ``64`` in their name: - - -.. tabs:: - - .. code-tab:: gdscript - - if "64" in Engine.get_architecture_name(): - print("Running a 64-bit build of Godot.") - else: - print("Running a 32-bit build of Godot.") - - .. code-tab:: csharp - - if (Engine.GetArchitectureName().Contains("64")) - GD.Print("Running a 64-bit build of Godot."); - else - GD.Print("Running a 32-bit build of Godot."); - - +To detect whether the current build is 64-bit, or the type of architecture, don't use the architecture name. Instead, use :ref:`OS.has_feature` to check for the ``"64"`` feature tag, or tags such as ``"x86"`` or ``"arm"``. See the :doc:`Feature Tags <../tutorials/export/feature_tags>` documentation for more details. \ **Note:** This method does *not* return the name of the system's CPU architecture (like :ref:`OS.get_processor_name`). For example, when running an ``x86_32`` Godot binary on an ``x86_64`` system, the returned value will still be ``"x86_32"``. diff --git a/classes/class_fileaccess.rst b/classes/class_fileaccess.rst index 98633df0970..571587f64cc 100644 --- a/classes/class_fileaccess.rst +++ b/classes/class_fileaccess.rst @@ -19,7 +19,7 @@ Provides methods for file reading and writing operations. Description ----------- -This class can be used to permanently store data in the user device's file system and to read from it. This is useful for store game save data or player configuration files. +This class can be used to permanently store data in the user device's file system and to read from it. This is useful for storing game save data or player configuration files. Here's a sample on how to write and read from a file: @@ -126,6 +126,8 @@ Methods +-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_float`\ (\ ) |const| | +-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_half`\ (\ ) |const| | + +-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`get_hidden_attribute`\ (\ file\: :ref:`String`\ ) |static| | +-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_length`\ (\ ) |const| | @@ -194,6 +196,8 @@ Methods +-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`store_float`\ (\ value\: :ref:`float`\ ) | +-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`store_half`\ (\ value\: :ref:`float`\ ) | + +-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`store_line`\ (\ line\: :ref:`String`\ ) | +-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`store_pascal_string`\ (\ string\: :ref:`String`\ ) | @@ -684,6 +688,18 @@ Returns the next 32 bits from the file as a floating-point number. ---- +.. _class_FileAccess_method_get_half: + +.. rst-class:: classref-method + +:ref:`float` **get_half**\ (\ ) |const| :ref:`🔗` + +Returns the next 16 bits from the file as a half-precision floating-point number. + +.. rst-class:: classref-item-separator + +---- + .. _class_FileAccess_method_get_hidden_attribute: .. rst-class:: classref-method @@ -1179,6 +1195,18 @@ Stores a floating-point number as 32 bits in the file. ---- +.. _class_FileAccess_method_store_half: + +.. rst-class:: classref-method + +|void| **store_half**\ (\ value\: :ref:`float`\ ) :ref:`🔗` + +Stores a half-precision floating-point number as 16 bits in the file. + +.. rst-class:: classref-item-separator + +---- + .. _class_FileAccess_method_store_line: .. rst-class:: classref-method diff --git a/classes/class_geometry3d.rst b/classes/class_geometry3d.rst index 193910e88d7..f2063673f9d 100644 --- a/classes/class_geometry3d.rst +++ b/classes/class_geometry3d.rst @@ -32,9 +32,9 @@ Methods +--------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`Plane`\] | :ref:`build_box_planes`\ (\ extents\: :ref:`Vector3`\ ) | +--------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array`\[:ref:`Plane`\] | :ref:`build_capsule_planes`\ (\ radius\: :ref:`float`, height\: :ref:`float`, sides\: :ref:`int`, lats\: :ref:`int`, axis\: Vector3.Axis = 2\ ) | + | :ref:`Array`\[:ref:`Plane`\] | :ref:`build_capsule_planes`\ (\ radius\: :ref:`float`, height\: :ref:`float`, sides\: :ref:`int`, lats\: :ref:`int`, axis\: :ref:`Axis` = 2\ ) | +--------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array`\[:ref:`Plane`\] | :ref:`build_cylinder_planes`\ (\ radius\: :ref:`float`, height\: :ref:`float`, sides\: :ref:`int`, axis\: Vector3.Axis = 2\ ) | + | :ref:`Array`\[:ref:`Plane`\] | :ref:`build_cylinder_planes`\ (\ radius\: :ref:`float`, height\: :ref:`float`, sides\: :ref:`int`, axis\: :ref:`Axis` = 2\ ) | +--------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedVector3Array` | :ref:`clip_polygon`\ (\ points\: :ref:`PackedVector3Array`, plane\: :ref:`Plane`\ ) | +--------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -86,7 +86,7 @@ Returns an array with 6 :ref:`Plane`\ s that describe the sides of .. rst-class:: classref-method -:ref:`Array`\[:ref:`Plane`\] **build_capsule_planes**\ (\ radius\: :ref:`float`, height\: :ref:`float`, sides\: :ref:`int`, lats\: :ref:`int`, axis\: Vector3.Axis = 2\ ) :ref:`🔗` +:ref:`Array`\[:ref:`Plane`\] **build_capsule_planes**\ (\ radius\: :ref:`float`, height\: :ref:`float`, sides\: :ref:`int`, lats\: :ref:`int`, axis\: :ref:`Axis` = 2\ ) :ref:`🔗` Returns an array of :ref:`Plane`\ s closely bounding a faceted capsule centered at the origin with radius ``radius`` and height ``height``. The parameter ``sides`` defines how many planes will be generated for the side part of the capsule, whereas ``lats`` gives the number of latitudinal steps at the bottom and top of the capsule. The parameter ``axis`` describes the axis along which the capsule is oriented (0 for X, 1 for Y, 2 for Z). @@ -98,7 +98,7 @@ Returns an array of :ref:`Plane`\ s closely bounding a faceted caps .. rst-class:: classref-method -:ref:`Array`\[:ref:`Plane`\] **build_cylinder_planes**\ (\ radius\: :ref:`float`, height\: :ref:`float`, sides\: :ref:`int`, axis\: Vector3.Axis = 2\ ) :ref:`🔗` +:ref:`Array`\[:ref:`Plane`\] **build_cylinder_planes**\ (\ radius\: :ref:`float`, height\: :ref:`float`, sides\: :ref:`int`, axis\: :ref:`Axis` = 2\ ) :ref:`🔗` Returns an array of :ref:`Plane`\ s closely bounding a faceted cylinder centered at the origin with radius ``radius`` and height ``height``. The parameter ``sides`` defines how many planes will be generated for the round part of the cylinder. The parameter ``axis`` describes the axis along which the cylinder is oriented (0 for X, 1 for Y, 2 for Z). diff --git a/classes/class_lookatmodifier3d.rst b/classes/class_lookatmodifier3d.rst index 1ce32a9abb9..145210c1351 100644 --- a/classes/class_lookatmodifier3d.rst +++ b/classes/class_lookatmodifier3d.rst @@ -12,14 +12,14 @@ LookAtModifier3D **Inherits:** :ref:`SkeletonModifier3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -The :ref:`SkeletonModifier3D` rotates a bone to look a target. +The **LookAtModifier3D** rotates a bone to look at a target. .. rst-class:: classref-introduction-group Description ----------- -This :ref:`SkeletonModifier3D` rotates a bone to look a target. This is helpful for moving character's head to look at the player, rotating a turret to look at a target, or any other case where you want to make a bone rotate towards something quickly and easily. +This :ref:`SkeletonModifier3D` rotates a bone to look at a target. This is helpful for moving a character's head to look at the player, rotating a turret to look at a target, or any other case where you want to make a bone rotate towards something quickly and easily. When applying multiple **LookAtModifier3D**\ s, the **LookAtModifier3D** assigned to the parent bone must be put above the **LookAtModifier3D** assigned to the child bone in the list in order for the child bone results to be correct. @@ -62,7 +62,7 @@ Properties +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+ | :ref:`float` | :ref:`primary_positive_limit_angle` | | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+ - | Vector3.Axis | :ref:`primary_rotation_axis` | ``1`` | + | :ref:`Axis` | :ref:`primary_rotation_axis` | ``1`` | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+ | :ref:`float` | :ref:`secondary_damp_threshold` | | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+ @@ -482,12 +482,12 @@ The limit angle of positive side of the primary rotation when :ref:`symmetry_lim .. rst-class:: classref-property -Vector3.Axis **primary_rotation_axis** = ``1`` :ref:`🔗` +:ref:`Axis` **primary_rotation_axis** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_primary_rotation_axis**\ (\ value\: Vector3.Axis\ ) -- Vector3.Axis **get_primary_rotation_axis**\ (\ ) +- |void| **set_primary_rotation_axis**\ (\ value\: :ref:`Axis`\ ) +- :ref:`Axis` **get_primary_rotation_axis**\ (\ ) The axis of the first rotation. This :ref:`SkeletonModifier3D` works by compositing the rotation by Euler angles to prevent to rotate the :ref:`forward_axis`. diff --git a/classes/class_packedint64array.rst b/classes/class_packedint64array.rst index 745f91dda52..a6a01d8d49f 100644 --- a/classes/class_packedint64array.rst +++ b/classes/class_packedint64array.rst @@ -21,7 +21,7 @@ An array specifically designed to hold 64-bit integer values. Packs data tightly \ **Note:** This type stores signed 64-bit integers, which means it can take values in the interval ``[-2^63, 2^63 - 1]``, i.e. ``[-9223372036854775808, 9223372036854775807]``. Exceeding those bounds will wrap around. If you only need to pack 32-bit integers tightly, see :ref:`PackedInt32Array` for a more memory-friendly alternative. -\ **Differences between packed arrays, typed arrays, and untyped arrays:** Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. :ref:`PackedInt32Array` versus ``Array[int]``). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as :ref:`Array.map`. Typed arrays are in turn faster to iterate on and modify than untyped arrays. +\ **Differences between packed arrays, typed arrays, and untyped arrays:** Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. **PackedInt64Array** versus ``Array[int]``). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as :ref:`Array.map`. Typed arrays are in turn faster to iterate on and modify than untyped arrays. \ **Note:** Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use :ref:`duplicate`. This is *not* the case for built-in properties and methods. The returned packed array of these are a copies, and changing it will *not* affect the original value. To update a built-in property you need to modify the returned array, and then assign it to the property again. diff --git a/classes/class_packedvector4array.rst b/classes/class_packedvector4array.rst index 119b8ffb415..4d9b87f9b36 100644 --- a/classes/class_packedvector4array.rst +++ b/classes/class_packedvector4array.rst @@ -19,6 +19,8 @@ Description An array specifically designed to hold :ref:`Vector4`. Packs data tightly, so it saves memory for large array sizes. +\ **Differences between packed arrays, typed arrays, and untyped arrays:** Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. **PackedVector4Array** versus ``Array[Vector4]``). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as :ref:`Array.map`. Typed arrays are in turn faster to iterate on and modify than untyped arrays. + \ **Note:** Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use :ref:`duplicate`. This is *not* the case for built-in properties and methods. The returned packed array of these are a copies, and changing it will *not* affect the original value. To update a built-in property you need to modify the returned array, and then assign it to the property again. .. note:: diff --git a/classes/class_physicsserver3d.rst b/classes/class_physicsserver3d.rst index cd8e76c55ed..c63ca7d0eab 100644 --- a/classes/class_physicsserver3d.rst +++ b/classes/class_physicsserver3d.rst @@ -228,13 +228,13 @@ Methods +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`free_rid`\ (\ rid\: :ref:`RID`\ ) | +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`generic_6dof_joint_get_flag`\ (\ joint\: :ref:`RID`, axis\: Vector3.Axis, flag\: :ref:`G6DOFJointAxisFlag`\ ) |const| | + | :ref:`bool` | :ref:`generic_6dof_joint_get_flag`\ (\ joint\: :ref:`RID`, axis\: :ref:`Axis`, flag\: :ref:`G6DOFJointAxisFlag`\ ) |const| | +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`generic_6dof_joint_get_param`\ (\ joint\: :ref:`RID`, axis\: Vector3.Axis, param\: :ref:`G6DOFJointAxisParam`\ ) |const| | + | :ref:`float` | :ref:`generic_6dof_joint_get_param`\ (\ joint\: :ref:`RID`, axis\: :ref:`Axis`, param\: :ref:`G6DOFJointAxisParam`\ ) |const| | +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`generic_6dof_joint_set_flag`\ (\ joint\: :ref:`RID`, axis\: Vector3.Axis, flag\: :ref:`G6DOFJointAxisFlag`, enable\: :ref:`bool`\ ) | + | |void| | :ref:`generic_6dof_joint_set_flag`\ (\ joint\: :ref:`RID`, axis\: :ref:`Axis`, flag\: :ref:`G6DOFJointAxisFlag`, enable\: :ref:`bool`\ ) | +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`generic_6dof_joint_set_param`\ (\ joint\: :ref:`RID`, axis\: Vector3.Axis, param\: :ref:`G6DOFJointAxisParam`, value\: :ref:`float`\ ) | + | |void| | :ref:`generic_6dof_joint_set_param`\ (\ joint\: :ref:`RID`, axis\: :ref:`Axis`, param\: :ref:`G6DOFJointAxisParam`, value\: :ref:`float`\ ) | +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_process_info`\ (\ process_info\: :ref:`ProcessInfo`\ ) | +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -3043,7 +3043,7 @@ Destroys any of the objects created by PhysicsServer3D. If the :ref:`RID` **generic_6dof_joint_get_flag**\ (\ joint\: :ref:`RID`, axis\: Vector3.Axis, flag\: :ref:`G6DOFJointAxisFlag`\ ) |const| :ref:`🔗` +:ref:`bool` **generic_6dof_joint_get_flag**\ (\ joint\: :ref:`RID`, axis\: :ref:`Axis`, flag\: :ref:`G6DOFJointAxisFlag`\ ) |const| :ref:`🔗` Returns the value of a generic 6DOF joint flag. See :ref:`G6DOFJointAxisFlag` for the list of available flags. @@ -3055,7 +3055,7 @@ Returns the value of a generic 6DOF joint flag. See :ref:`G6DOFJointAxisFlag` **generic_6dof_joint_get_param**\ (\ joint\: :ref:`RID`, axis\: Vector3.Axis, param\: :ref:`G6DOFJointAxisParam`\ ) |const| :ref:`🔗` +:ref:`float` **generic_6dof_joint_get_param**\ (\ joint\: :ref:`RID`, axis\: :ref:`Axis`, param\: :ref:`G6DOFJointAxisParam`\ ) |const| :ref:`🔗` Returns the value of a generic 6DOF joint parameter. See :ref:`G6DOFJointAxisParam` for the list of available parameters. @@ -3067,7 +3067,7 @@ Returns the value of a generic 6DOF joint parameter. See :ref:`G6DOFJointAxisPar .. rst-class:: classref-method -|void| **generic_6dof_joint_set_flag**\ (\ joint\: :ref:`RID`, axis\: Vector3.Axis, flag\: :ref:`G6DOFJointAxisFlag`, enable\: :ref:`bool`\ ) :ref:`🔗` +|void| **generic_6dof_joint_set_flag**\ (\ joint\: :ref:`RID`, axis\: :ref:`Axis`, flag\: :ref:`G6DOFJointAxisFlag`, enable\: :ref:`bool`\ ) :ref:`🔗` Sets the value of a given generic 6DOF joint flag. See :ref:`G6DOFJointAxisFlag` for the list of available flags. @@ -3079,7 +3079,7 @@ Sets the value of a given generic 6DOF joint flag. See :ref:`G6DOFJointAxisFlag< .. rst-class:: classref-method -|void| **generic_6dof_joint_set_param**\ (\ joint\: :ref:`RID`, axis\: Vector3.Axis, param\: :ref:`G6DOFJointAxisParam`, value\: :ref:`float`\ ) :ref:`🔗` +|void| **generic_6dof_joint_set_param**\ (\ joint\: :ref:`RID`, axis\: :ref:`Axis`, param\: :ref:`G6DOFJointAxisParam`, value\: :ref:`float`\ ) :ref:`🔗` Sets the value of a given generic 6DOF joint parameter. See :ref:`G6DOFJointAxisParam` for the list of available parameters. diff --git a/classes/class_physicsserver3dextension.rst b/classes/class_physicsserver3dextension.rst index 91e6c462e0b..a0ec519d531 100644 --- a/classes/class_physicsserver3dextension.rst +++ b/classes/class_physicsserver3dextension.rst @@ -230,13 +230,13 @@ Methods +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_free_rid`\ (\ rid\: :ref:`RID`\ ) |virtual| | +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_generic_6dof_joint_get_flag`\ (\ joint\: :ref:`RID`, axis\: Vector3.Axis, flag\: :ref:`G6DOFJointAxisFlag`\ ) |virtual| |const| | + | :ref:`bool` | :ref:`_generic_6dof_joint_get_flag`\ (\ joint\: :ref:`RID`, axis\: :ref:`Axis`, flag\: :ref:`G6DOFJointAxisFlag`\ ) |virtual| |const| | +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_generic_6dof_joint_get_param`\ (\ joint\: :ref:`RID`, axis\: Vector3.Axis, param\: :ref:`G6DOFJointAxisParam`\ ) |virtual| |const| | + | :ref:`float` | :ref:`_generic_6dof_joint_get_param`\ (\ joint\: :ref:`RID`, axis\: :ref:`Axis`, param\: :ref:`G6DOFJointAxisParam`\ ) |virtual| |const| | +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_generic_6dof_joint_set_flag`\ (\ joint\: :ref:`RID`, axis\: Vector3.Axis, flag\: :ref:`G6DOFJointAxisFlag`, enable\: :ref:`bool`\ ) |virtual| | + | |void| | :ref:`_generic_6dof_joint_set_flag`\ (\ joint\: :ref:`RID`, axis\: :ref:`Axis`, flag\: :ref:`G6DOFJointAxisFlag`, enable\: :ref:`bool`\ ) |virtual| | +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_generic_6dof_joint_set_param`\ (\ joint\: :ref:`RID`, axis\: Vector3.Axis, param\: :ref:`G6DOFJointAxisParam`, value\: :ref:`float`\ ) |virtual| | + | |void| | :ref:`_generic_6dof_joint_set_param`\ (\ joint\: :ref:`RID`, axis\: :ref:`Axis`, param\: :ref:`G6DOFJointAxisParam`, value\: :ref:`float`\ ) |virtual| | +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`_get_process_info`\ (\ process_info\: :ref:`ProcessInfo`\ ) |virtual| | +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -1812,7 +1812,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool` **_generic_6dof_joint_get_flag**\ (\ joint\: :ref:`RID`, axis\: Vector3.Axis, flag\: :ref:`G6DOFJointAxisFlag`\ ) |virtual| |const| :ref:`🔗` +:ref:`bool` **_generic_6dof_joint_get_flag**\ (\ joint\: :ref:`RID`, axis\: :ref:`Axis`, flag\: :ref:`G6DOFJointAxisFlag`\ ) |virtual| |const| :ref:`🔗` .. container:: contribute @@ -1826,7 +1826,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`float` **_generic_6dof_joint_get_param**\ (\ joint\: :ref:`RID`, axis\: Vector3.Axis, param\: :ref:`G6DOFJointAxisParam`\ ) |virtual| |const| :ref:`🔗` +:ref:`float` **_generic_6dof_joint_get_param**\ (\ joint\: :ref:`RID`, axis\: :ref:`Axis`, param\: :ref:`G6DOFJointAxisParam`\ ) |virtual| |const| :ref:`🔗` .. container:: contribute @@ -1840,7 +1840,7 @@ Method Descriptions .. rst-class:: classref-method -|void| **_generic_6dof_joint_set_flag**\ (\ joint\: :ref:`RID`, axis\: Vector3.Axis, flag\: :ref:`G6DOFJointAxisFlag`, enable\: :ref:`bool`\ ) |virtual| :ref:`🔗` +|void| **_generic_6dof_joint_set_flag**\ (\ joint\: :ref:`RID`, axis\: :ref:`Axis`, flag\: :ref:`G6DOFJointAxisFlag`, enable\: :ref:`bool`\ ) |virtual| :ref:`🔗` .. container:: contribute @@ -1854,7 +1854,7 @@ Method Descriptions .. rst-class:: classref-method -|void| **_generic_6dof_joint_set_param**\ (\ joint\: :ref:`RID`, axis\: Vector3.Axis, param\: :ref:`G6DOFJointAxisParam`, value\: :ref:`float`\ ) |virtual| :ref:`🔗` +|void| **_generic_6dof_joint_set_param**\ (\ joint\: :ref:`RID`, axis\: :ref:`Axis`, param\: :ref:`G6DOFJointAxisParam`, value\: :ref:`float`\ ) |virtual| :ref:`🔗` .. container:: contribute diff --git a/classes/class_projection.rst b/classes/class_projection.rst index 78f2f98c452..0bfdeeaac13 100644 --- a/classes/class_projection.rst +++ b/classes/class_projection.rst @@ -151,57 +151,72 @@ Operators .. rst-class:: classref-descriptions-group -Constants ---------- +Enumerations +------------ + +.. _enum_Projection_Planes: + +.. rst-class:: classref-enumeration + +enum **Planes**: :ref:`🔗` .. _class_Projection_constant_PLANE_NEAR: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**PLANE_NEAR** = ``0`` :ref:`🔗` +:ref:`Planes` **PLANE_NEAR** = ``0`` The index value of the projection's near clipping plane. .. _class_Projection_constant_PLANE_FAR: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**PLANE_FAR** = ``1`` :ref:`🔗` +:ref:`Planes` **PLANE_FAR** = ``1`` The index value of the projection's far clipping plane. .. _class_Projection_constant_PLANE_LEFT: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**PLANE_LEFT** = ``2`` :ref:`🔗` +:ref:`Planes` **PLANE_LEFT** = ``2`` The index value of the projection's left clipping plane. .. _class_Projection_constant_PLANE_TOP: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**PLANE_TOP** = ``3`` :ref:`🔗` +:ref:`Planes` **PLANE_TOP** = ``3`` The index value of the projection's top clipping plane. .. _class_Projection_constant_PLANE_RIGHT: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**PLANE_RIGHT** = ``4`` :ref:`🔗` +:ref:`Planes` **PLANE_RIGHT** = ``4`` The index value of the projection's right clipping plane. .. _class_Projection_constant_PLANE_BOTTOM: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**PLANE_BOTTOM** = ``5`` :ref:`🔗` +:ref:`Planes` **PLANE_BOTTOM** = ``5`` The index value of the projection bottom clipping plane. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Constants +--------- + .. _class_Projection_constant_IDENTITY: .. rst-class:: classref-constant diff --git a/classes/class_renderingserver.rst b/classes/class_renderingserver.rst index 866d45cf4ed..43a8b5dc63a 100644 --- a/classes/class_renderingserver.rst +++ b/classes/class_renderingserver.rst @@ -649,6 +649,8 @@ Methods +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedFloat32Array` | :ref:`multimesh_get_buffer`\ (\ multimesh\: :ref:`RID`\ ) |const| | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`multimesh_get_buffer_rd_rid`\ (\ multimesh\: :ref:`RID`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`AABB` | :ref:`multimesh_get_custom_aabb`\ (\ multimesh\: :ref:`RID`\ ) |const| | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`multimesh_get_instance_count`\ (\ multimesh\: :ref:`RID`\ ) |const| | @@ -3502,6 +3504,8 @@ Objects are displayed semi-transparent with additive blending so you can see whe Debug draw draws objects in wireframe. +\ **Note:** :ref:`set_debug_generate_wireframes` must be called before loading any meshes for wireframes to be visible when using the Compatibility renderer. + .. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_NORMAL_BUFFER: .. rst-class:: classref-enumeration-constant @@ -9728,6 +9732,18 @@ Returns the MultiMesh data (such as instance transforms, colors, etc.). See :ref ---- +.. _class_RenderingServer_method_multimesh_get_buffer_rd_rid: + +.. rst-class:: classref-method + +:ref:`RID` **multimesh_get_buffer_rd_rid**\ (\ multimesh\: :ref:`RID`\ ) |const| :ref:`🔗` + +Returns the :ref:`RenderingDevice` :ref:`RID` handle of the :ref:`MultiMesh`, which can be used as any other buffer on the Rendering Device. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_multimesh_get_custom_aabb: .. rst-class:: classref-method @@ -10919,7 +10935,9 @@ Sets a boot image. The color defines the background color. If ``scale`` is ``tru |void| **set_debug_generate_wireframes**\ (\ generate\: :ref:`bool`\ ) :ref:`🔗` -This method is currently unimplemented and does nothing if called with ``generate`` set to ``true``. +If ``generate`` is ``true``, generates debug wireframes for all meshes that are loaded when using the Compatibility renderer. By default, the engine does not generate debug wireframes at runtime, since they slow down loading of assets and take up VRAM. + +\ **Note:** You must call this method before loading any meshes when using the Compatibility renderer, otherwise wireframes will not be used. .. rst-class:: classref-item-separator diff --git a/classes/class_spritebase3d.rst b/classes/class_spritebase3d.rst index ff686ec8032..b3f7c82d322 100644 --- a/classes/class_spritebase3d.rst +++ b/classes/class_spritebase3d.rst @@ -42,7 +42,7 @@ Properties +-----------------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ | :ref:`float` | :ref:`alpha_scissor_threshold` | ``0.5`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | Vector3.Axis | :ref:`axis` | ``2`` | + | :ref:`Axis` | :ref:`axis` | ``2`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ | :ref:`BillboardMode` | :ref:`billboard` | ``0`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ @@ -294,12 +294,12 @@ Threshold at which the alpha scissor will discard values. .. rst-class:: classref-property -Vector3.Axis **axis** = ``2`` :ref:`🔗` +:ref:`Axis` **axis** = ``2`` :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_axis**\ (\ value\: Vector3.Axis\ ) -- Vector3.Axis **get_axis**\ (\ ) +- |void| **set_axis**\ (\ value\: :ref:`Axis`\ ) +- :ref:`Axis` **get_axis**\ (\ ) The direction in which the front of the texture faces. diff --git a/classes/class_streampeer.rst b/classes/class_streampeer.rst index 6b11ffd7ab3..28c05ed3fa7 100644 --- a/classes/class_streampeer.rst +++ b/classes/class_streampeer.rst @@ -62,6 +62,8 @@ Methods +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_float`\ (\ ) | +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_half`\ (\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`get_partial_data`\ (\ bytes\: :ref:`int`\ ) | +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_string`\ (\ bytes\: :ref:`int` = -1\ ) | @@ -92,6 +94,8 @@ Methods +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`put_float`\ (\ value\: :ref:`float`\ ) | +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`put_half`\ (\ value\: :ref:`float`\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`put_partial_data`\ (\ data\: :ref:`PackedByteArray`\ ) | +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`put_string`\ (\ value\: :ref:`String`\ ) | @@ -236,6 +240,18 @@ Gets a single-precision float from the stream. ---- +.. _class_StreamPeer_method_get_half: + +.. rst-class:: classref-method + +:ref:`float` **get_half**\ (\ ) :ref:`🔗` + +Gets a half-precision float from the stream. + +.. rst-class:: classref-item-separator + +---- + .. _class_StreamPeer_method_get_partial_data: .. rst-class:: classref-method @@ -420,6 +436,18 @@ Puts a single-precision float into the stream. ---- +.. _class_StreamPeer_method_put_half: + +.. rst-class:: classref-method + +|void| **put_half**\ (\ value\: :ref:`float`\ ) :ref:`🔗` + +Puts a half-precision float into the stream. + +.. rst-class:: classref-item-separator + +---- + .. _class_StreamPeer_method_put_partial_data: .. rst-class:: classref-method diff --git a/classes/class_subviewportcontainer.rst b/classes/class_subviewportcontainer.rst index 687ec71e664..d1927dcb424 100644 --- a/classes/class_subviewportcontainer.rst +++ b/classes/class_subviewportcontainer.rst @@ -33,13 +33,15 @@ Properties .. table:: :widths: auto - +------------------------------------------+---------------------------------------------------------------------------+---------------------------------------------------------------------+ - | :ref:`FocusMode` | focus_mode | ``1`` (overrides :ref:`Control`) | - +------------------------------------------+---------------------------------------------------------------------------+---------------------------------------------------------------------+ - | :ref:`bool` | :ref:`stretch` | ``false`` | - +------------------------------------------+---------------------------------------------------------------------------+---------------------------------------------------------------------+ - | :ref:`int` | :ref:`stretch_shrink` | ``1`` | - +------------------------------------------+---------------------------------------------------------------------------+---------------------------------------------------------------------+ + +------------------------------------------+-----------------------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`bool` | :ref:`consume_drag_and_drop` | ``false`` | + +------------------------------------------+-----------------------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`FocusMode` | focus_mode | ``1`` (overrides :ref:`Control`) | + +------------------------------------------+-----------------------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`bool` | :ref:`stretch` | ``false`` | + +------------------------------------------+-----------------------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`int` | :ref:`stretch_shrink` | ``1`` | + +------------------------------------------+-----------------------------------------------------------------------------------------+---------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -62,6 +64,25 @@ Methods Property Descriptions --------------------- +.. _class_SubViewportContainer_property_consume_drag_and_drop: + +.. rst-class:: classref-property + +:ref:`bool` **consume_drag_and_drop** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_consume_drag_and_drop**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_consume_drag_and_drop_enabled**\ (\ ) + +If ``false``, the **SubViewportContainer** is not available as a drop target in drag-and-drop operations, and instead the :ref:`Control` nodes inside its :ref:`Viewport` children are potential drop targets. + +If ``true``, the **SubViewportContainer** itself will be considered as a drop target in drag-and-drop operations, preventing the :ref:`Control` nodes inside its :ref:`Viewport` children from becoming drop targets. + +.. rst-class:: classref-item-separator + +---- + .. _class_SubViewportContainer_property_stretch: .. rst-class:: classref-property diff --git a/classes/class_textedit.rst b/classes/class_textedit.rst index f72ecb10e65..708e96dc426 100644 --- a/classes/class_textedit.rst +++ b/classes/class_textedit.rst @@ -1204,7 +1204,7 @@ If ``false``, the context menu ignores mouse location. - |void| **set_multiple_carets_enabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_multiple_carets_enabled**\ (\ ) -Sets if multiple carets are allowed. +If ``true``, multiple carets are allowed. Left-clicking with :kbd:`Alt` adds a new caret. See :ref:`add_caret` and :ref:`get_caret_count`. .. rst-class:: classref-item-separator @@ -2270,7 +2270,7 @@ Returns the wrap index the editing caret is on. :ref:`int` **get_first_non_whitespace_column**\ (\ line\: :ref:`int`\ ) |const| :ref:`🔗` -Returns the first column containing a non-whitespace character. +Returns the first column containing a non-whitespace character on the given line. If there is only whitespace, returns the number of characters. .. rst-class:: classref-item-separator @@ -2354,7 +2354,7 @@ Returns the :ref:`HScrollBar` used by **TextEdit**. :ref:`int` **get_indent_level**\ (\ line\: :ref:`int`\ ) |const| :ref:`🔗` -Returns the number of spaces and ``tab * tab_size`` before the first char. +Returns the indent level of the given line. This is the number of spaces and tabs at the beginning of the line, with the tabs taking the tab size into account (see :ref:`get_tab_size`). .. rst-class:: classref-item-separator @@ -2414,7 +2414,7 @@ Returns the text of a specific line. :ref:`Color` **get_line_background_color**\ (\ line\: :ref:`int`\ ) |const| :ref:`🔗` -Returns the current background color of the line. ``Color(0, 0, 0, 0)`` is returned if no color is set. +Returns the custom background color of the given line. If no color is set, returns ``Color(0, 0, 0, 0)``. .. rst-class:: classref-item-separator @@ -2550,7 +2550,7 @@ Returns the number of times the given line is wrapped. :ref:`int` **get_line_wrap_index_at_column**\ (\ line\: :ref:`int`, column\: :ref:`int`\ ) |const| :ref:`🔗` -Returns the wrap index of the given line column. +Returns the wrap index of the given column on the given line. This ranges from ``0`` to :ref:`get_line_wrap_count`. .. rst-class:: classref-item-separator @@ -2921,7 +2921,7 @@ Returns the total width of all gutters and internal padding. :ref:`int` **get_total_visible_line_count**\ (\ ) |const| :ref:`🔗` -Returns the number of lines that may be drawn. +Returns the total number of lines in the text. This includes wrapped lines and excludes folded lines. If :ref:`wrap_mode` is set to :ref:`LINE_WRAPPING_NONE` and no lines are folded (see :ref:`CodeEdit.is_line_folded`) then this is equivalent to :ref:`get_line_count`. See :ref:`get_visible_line_count_in_range` for a limited range of lines. .. rst-class:: classref-item-separator @@ -2957,7 +2957,7 @@ Returns the current version of the **TextEdit**. The version is a count of recor :ref:`int` **get_visible_line_count**\ (\ ) |const| :ref:`🔗` -Returns the number of visible lines, including wrapped text. +Returns the number of lines that can visually fit, rounded down, based on this control's height. .. rst-class:: classref-item-separator @@ -2969,7 +2969,7 @@ Returns the number of visible lines, including wrapped text. :ref:`int` **get_visible_line_count_in_range**\ (\ from_line\: :ref:`int`, to_line\: :ref:`int`\ ) |const| :ref:`🔗` -Returns the total number of visible + wrapped lines between the two lines. +Returns the total number of lines between ``from_line`` and ``to_line`` (inclusive) in the text. This includes wrapped lines and excludes folded lines. If the range covers all lines it is equivalent to :ref:`get_total_visible_line_count`. .. rst-class:: classref-item-separator @@ -3131,7 +3131,7 @@ Returns ``true`` if the user is dragging their mouse for scrolling, selecting, o :ref:`bool` **is_gutter_clickable**\ (\ gutter\: :ref:`int`\ ) |const| :ref:`🔗` -Returns whether the gutter is clickable. +Returns ``true`` if the gutter at the given index is clickable. See :ref:`set_gutter_clickable`. .. rst-class:: classref-item-separator @@ -3143,7 +3143,7 @@ Returns whether the gutter is clickable. :ref:`bool` **is_gutter_drawn**\ (\ gutter\: :ref:`int`\ ) |const| :ref:`🔗` -Returns whether the gutter is currently drawn. +Returns ``true`` if the gutter at the given index is currently drawn. See :ref:`set_gutter_draw`. .. rst-class:: classref-item-separator @@ -3155,7 +3155,7 @@ Returns whether the gutter is currently drawn. :ref:`bool` **is_gutter_overwritable**\ (\ gutter\: :ref:`int`\ ) |const| :ref:`🔗` -Returns whether the gutter is overwritable. +Returns ``true`` if the gutter at the given index is overwritable. See :ref:`set_gutter_overwritable`. .. rst-class:: classref-item-separator @@ -3179,7 +3179,7 @@ Returns ``true`` if a :ref:`begin_multicaret_edit` **is_line_gutter_clickable**\ (\ line\: :ref:`int`, gutter\: :ref:`int`\ ) |const| :ref:`🔗` -Returns whether the gutter on the given line is clickable. +Returns ``true`` if the gutter at the given index on the given line is clickable. See :ref:`set_line_gutter_clickable`. .. rst-class:: classref-item-separator @@ -3203,7 +3203,7 @@ Returns if the given line is wrapped. :ref:`bool` **is_menu_visible**\ (\ ) |const| :ref:`🔗` -Returns whether the menu is visible. Use this instead of ``get_menu().visible`` to improve performance (so the creation of the menu is avoided). +Returns ``true`` if the menu is visible. Use this instead of ``get_menu().visible`` to improve performance (so the creation of the menu is avoided). See :ref:`get_menu`. .. rst-class:: classref-item-separator @@ -3215,7 +3215,7 @@ Returns whether the menu is visible. Use this instead of ``get_menu().visible`` :ref:`bool` **is_mouse_over_selection**\ (\ edges\: :ref:`bool`, caret_index\: :ref:`int` = -1\ ) |const| :ref:`🔗` -Returns whether the mouse is over selection. If ``edges`` is ``true``, the edges are considered part of the selection. +Returns ``true`` if the mouse is over a selection. If ``edges`` is ``true``, the edges are considered part of the selection. .. rst-class:: classref-item-separator @@ -3227,7 +3227,7 @@ Returns whether the mouse is over selection. If ``edges`` is ``true``, the edges :ref:`bool` **is_overtype_mode_enabled**\ (\ ) |const| :ref:`🔗` -Returns whether the user is in overtype mode. +Returns ``true`` if overtype mode is enabled. See :ref:`set_overtype_mode_enabled`. .. rst-class:: classref-item-separator @@ -3251,7 +3251,7 @@ Executes a given action as defined in the :ref:`MenuItems`, to_line\: :ref:`int`\ ) :ref:`🔗` -Merge the gutters from ``from_line`` into ``to_line``. Only overwritable gutters will be copied. +Merge the gutters from ``from_line`` into ``to_line``. Only overwritable gutters will be copied. See :ref:`set_gutter_overwritable`. .. rst-class:: classref-item-separator @@ -3343,7 +3343,7 @@ Removes the given caret index. |void| **remove_gutter**\ (\ gutter\: :ref:`int`\ ) :ref:`🔗` -Removes the gutter from this **TextEdit**. +Removes the gutter at the given index. .. rst-class:: classref-item-separator @@ -3508,7 +3508,7 @@ If ``wrap_index`` is ``-1``, the caret column will be clamped to the ``line``'s |void| **set_gutter_clickable**\ (\ gutter\: :ref:`int`, clickable\: :ref:`bool`\ ) :ref:`🔗` -Sets the gutter as clickable. This will change the mouse cursor to a pointing hand when hovering over the gutter. +If ``true``, the mouse cursor will change to a pointing hand (:ref:`Control.CURSOR_POINTING_HAND`) when hovering over the gutter at the given index. See :ref:`is_gutter_clickable` and :ref:`set_line_gutter_clickable`. .. rst-class:: classref-item-separator @@ -3520,7 +3520,7 @@ Sets the gutter as clickable. This will change the mouse cursor to a pointing ha |void| **set_gutter_custom_draw**\ (\ column\: :ref:`int`, draw_callback\: :ref:`Callable`\ ) :ref:`🔗` -Set a custom draw method for the gutter. The callback method must take the following args: ``line: int, gutter: int, Area: Rect2``. This only works when the gutter type is :ref:`GUTTER_TYPE_CUSTOM` (see :ref:`set_gutter_type`). +Set a custom draw callback for the gutter at the given index. ``draw_callback`` must take the following arguments: A line index :ref:`int`, a gutter index :ref:`int`, and an area :ref:`Rect2`. This callback only works when the gutter type is :ref:`GUTTER_TYPE_CUSTOM` (see :ref:`set_gutter_type`). .. rst-class:: classref-item-separator @@ -3532,7 +3532,7 @@ Set a custom draw method for the gutter. The callback method must take the follo |void| **set_gutter_draw**\ (\ gutter\: :ref:`int`, draw\: :ref:`bool`\ ) :ref:`🔗` -Sets whether the gutter should be drawn. +If ``true``, the gutter at the given index is drawn. The gutter type (:ref:`set_gutter_type`) determines how it is drawn. See :ref:`is_gutter_drawn`. .. rst-class:: classref-item-separator @@ -3544,7 +3544,7 @@ Sets whether the gutter should be drawn. |void| **set_gutter_name**\ (\ gutter\: :ref:`int`, name\: :ref:`String`\ ) :ref:`🔗` -Sets the name of the gutter. +Sets the name of the gutter at the given index. .. rst-class:: classref-item-separator @@ -3556,7 +3556,7 @@ Sets the name of the gutter. |void| **set_gutter_overwritable**\ (\ gutter\: :ref:`int`, overwritable\: :ref:`bool`\ ) :ref:`🔗` -Sets the gutter to overwritable. See :ref:`merge_gutters`. +If ``true``, the line data of the gutter at the given index can be overridden when using :ref:`merge_gutters`. See :ref:`is_gutter_overwritable`. .. rst-class:: classref-item-separator @@ -3568,7 +3568,7 @@ Sets the gutter to overwritable. See :ref:`merge_gutters`, type\: :ref:`GutterType`\ ) :ref:`🔗` -Sets the type of gutter. Gutters can contain icons, text, or custom visuals. See :ref:`GutterType` for options. +Sets the type of gutter at the given index. Gutters can contain icons, text, or custom visuals. See :ref:`GutterType` for options. .. rst-class:: classref-item-separator @@ -3580,7 +3580,7 @@ Sets the type of gutter. Gutters can contain icons, text, or custom visuals. See |void| **set_gutter_width**\ (\ gutter\: :ref:`int`, width\: :ref:`int`\ ) :ref:`🔗` -Set the width of the gutter. +Set the width of the gutter at the given index. .. rst-class:: classref-item-separator @@ -3642,7 +3642,7 @@ Positions the ``wrap_index`` of ``line`` at the bottom of the viewport. |void| **set_line_background_color**\ (\ line\: :ref:`int`, color\: :ref:`Color`\ ) :ref:`🔗` -Sets the current background color of the line. Set to ``Color(0, 0, 0, 0)`` for no color. +Sets the custom background color of the given line. If transparent, this color is applied on top of the default background color (See :ref:`background_color`). If set to ``Color(0, 0, 0, 0)``, no additional color is applied. .. rst-class:: classref-item-separator @@ -3654,7 +3654,7 @@ Sets the current background color of the line. Set to ``Color(0, 0, 0, 0)`` for |void| **set_line_gutter_clickable**\ (\ line\: :ref:`int`, gutter\: :ref:`int`, clickable\: :ref:`bool`\ ) :ref:`🔗` -If ``clickable`` is ``true``, makes the ``gutter`` on ``line`` clickable. See :ref:`gutter_clicked`. +If ``clickable`` is ``true``, makes the ``gutter`` on the given ``line`` clickable. This is like :ref:`set_gutter_clickable`, but for a single line. If :ref:`is_gutter_clickable` is ``true``, this will not have any effect. See :ref:`is_line_gutter_clickable` and :ref:`gutter_clicked`. .. rst-class:: classref-item-separator @@ -3714,7 +3714,7 @@ Sets the text for ``gutter`` on ``line`` to ``text``. This only works when the g |void| **set_overtype_mode_enabled**\ (\ enabled\: :ref:`bool`\ ) :ref:`🔗` -If ``true``, sets the user into overtype mode. When the user types in this mode, it will override existing text. +If ``true``, enables overtype mode. In this mode, typing overrides existing text instead of inserting text. The :ref:`ProjectSettings.input/ui_text_toggle_insert_mode` action toggles overtype mode. See :ref:`is_overtype_mode_enabled`. .. rst-class:: classref-item-separator diff --git a/classes/class_textureprogressbar.rst b/classes/class_textureprogressbar.rst index 3313722734d..65564e952cc 100644 --- a/classes/class_textureprogressbar.rst +++ b/classes/class_textureprogressbar.rst @@ -262,6 +262,8 @@ See :ref:`Range.value`, :ref:`Range.max_value` if :ref:`fill_mode` is :ref:`FILL_CLOCKWISE`, :ref:`FILL_COUNTER_CLOCKWISE`, or :ref:`FILL_CLOCKWISE_AND_COUNTER_CLOCKWISE`. When the node's ``value`` is equal to its ``min_value``, the texture doesn't show up at all. When the ``value`` increases, the texture fills and tends towards :ref:`radial_fill_degrees`. +\ **Note:** :ref:`radial_initial_angle` is wrapped between ``0`` and ``360`` degrees (inclusive). + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_translationserver.rst b/classes/class_translationserver.rst index 2c2a3e67eba..2b00409dded 100644 --- a/classes/class_translationserver.rst +++ b/classes/class_translationserver.rst @@ -95,7 +95,7 @@ Methods +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_locale`\ (\ locale\: :ref:`String`\ ) | +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`standardize_locale`\ (\ locale\: :ref:`String`\ ) |const| | + | :ref:`String` | :ref:`standardize_locale`\ (\ locale\: :ref:`String`, add_defaults\: :ref:`bool` = false\ ) |const| | +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`StringName` | :ref:`translate`\ (\ message\: :ref:`StringName`, context\: :ref:`StringName` = &""\ ) |const| | +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -399,9 +399,9 @@ If translations have been loaded beforehand for the new locale, they will be app .. rst-class:: classref-method -:ref:`String` **standardize_locale**\ (\ locale\: :ref:`String`\ ) |const| :ref:`🔗` +:ref:`String` **standardize_locale**\ (\ locale\: :ref:`String`, add_defaults\: :ref:`bool` = false\ ) |const| :ref:`🔗` -Returns a ``locale`` string standardized to match known locales (e.g. ``en-US`` would be matched to ``en_US``). +Returns a ``locale`` string standardized to match known locales (e.g. ``en-US`` would be matched to ``en_US``). If ``add_defaults`` is ``true``, the locale may have a default script or country added. .. rst-class:: classref-item-separator diff --git a/classes/class_vector2.rst b/classes/class_vector2.rst index c2f41ef798a..bbf8444bf88 100644 --- a/classes/class_vector2.rst +++ b/classes/class_vector2.rst @@ -232,25 +232,40 @@ Operators .. rst-class:: classref-descriptions-group -Constants ---------- +Enumerations +------------ + +.. _enum_Vector2_Axis: + +.. rst-class:: classref-enumeration + +enum **Axis**: :ref:`🔗` .. _class_Vector2_constant_AXIS_X: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**AXIS_X** = ``0`` :ref:`🔗` +:ref:`Axis` **AXIS_X** = ``0`` Enumerated value for the X axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. .. _class_Vector2_constant_AXIS_Y: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**AXIS_Y** = ``1`` :ref:`🔗` +:ref:`Axis` **AXIS_Y** = ``1`` Enumerated value for the Y axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Constants +--------- + .. _class_Vector2_constant_ZERO: .. rst-class:: classref-constant diff --git a/classes/class_vector2i.rst b/classes/class_vector2i.rst index 0f8d9b61531..21a4d28018d 100644 --- a/classes/class_vector2i.rst +++ b/classes/class_vector2i.rst @@ -164,25 +164,40 @@ Operators .. rst-class:: classref-descriptions-group -Constants ---------- +Enumerations +------------ + +.. _enum_Vector2i_Axis: + +.. rst-class:: classref-enumeration + +enum **Axis**: :ref:`🔗` .. _class_Vector2i_constant_AXIS_X: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**AXIS_X** = ``0`` :ref:`🔗` +:ref:`Axis` **AXIS_X** = ``0`` Enumerated value for the X axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. .. _class_Vector2i_constant_AXIS_Y: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**AXIS_Y** = ``1`` :ref:`🔗` +:ref:`Axis` **AXIS_Y** = ``1`` Enumerated value for the Y axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Constants +--------- + .. _class_Vector2i_constant_ZERO: .. rst-class:: classref-constant diff --git a/classes/class_vector3.rst b/classes/class_vector3.rst index 55c07fdab80..1be3542c8a6 100644 --- a/classes/class_vector3.rst +++ b/classes/class_vector3.rst @@ -238,33 +238,48 @@ Operators .. rst-class:: classref-descriptions-group -Constants ---------- +Enumerations +------------ + +.. _enum_Vector3_Axis: + +.. rst-class:: classref-enumeration + +enum **Axis**: :ref:`🔗` .. _class_Vector3_constant_AXIS_X: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**AXIS_X** = ``0`` :ref:`🔗` +:ref:`Axis` **AXIS_X** = ``0`` Enumerated value for the X axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. .. _class_Vector3_constant_AXIS_Y: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**AXIS_Y** = ``1`` :ref:`🔗` +:ref:`Axis` **AXIS_Y** = ``1`` Enumerated value for the Y axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. .. _class_Vector3_constant_AXIS_Z: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**AXIS_Z** = ``2`` :ref:`🔗` +:ref:`Axis` **AXIS_Z** = ``2`` Enumerated value for the Z axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Constants +--------- + .. _class_Vector3_constant_ZERO: .. rst-class:: classref-constant diff --git a/classes/class_vector3i.rst b/classes/class_vector3i.rst index 51271258b43..6216fb322e9 100644 --- a/classes/class_vector3i.rst +++ b/classes/class_vector3i.rst @@ -164,33 +164,48 @@ Operators .. rst-class:: classref-descriptions-group -Constants ---------- +Enumerations +------------ + +.. _enum_Vector3i_Axis: + +.. rst-class:: classref-enumeration + +enum **Axis**: :ref:`🔗` .. _class_Vector3i_constant_AXIS_X: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**AXIS_X** = ``0`` :ref:`🔗` +:ref:`Axis` **AXIS_X** = ``0`` Enumerated value for the X axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. .. _class_Vector3i_constant_AXIS_Y: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**AXIS_Y** = ``1`` :ref:`🔗` +:ref:`Axis` **AXIS_Y** = ``1`` Enumerated value for the Y axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. .. _class_Vector3i_constant_AXIS_Z: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**AXIS_Z** = ``2`` :ref:`🔗` +:ref:`Axis` **AXIS_Z** = ``2`` Enumerated value for the Z axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Constants +--------- + .. _class_Vector3i_constant_ZERO: .. rst-class:: classref-constant diff --git a/classes/class_vector4.rst b/classes/class_vector4.rst index 4b9e7cc3418..a1695696b40 100644 --- a/classes/class_vector4.rst +++ b/classes/class_vector4.rst @@ -187,41 +187,56 @@ Operators .. rst-class:: classref-descriptions-group -Constants ---------- +Enumerations +------------ + +.. _enum_Vector4_Axis: + +.. rst-class:: classref-enumeration + +enum **Axis**: :ref:`🔗` .. _class_Vector4_constant_AXIS_X: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**AXIS_X** = ``0`` :ref:`🔗` +:ref:`Axis` **AXIS_X** = ``0`` Enumerated value for the X axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. .. _class_Vector4_constant_AXIS_Y: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**AXIS_Y** = ``1`` :ref:`🔗` +:ref:`Axis` **AXIS_Y** = ``1`` Enumerated value for the Y axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. .. _class_Vector4_constant_AXIS_Z: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**AXIS_Z** = ``2`` :ref:`🔗` +:ref:`Axis` **AXIS_Z** = ``2`` Enumerated value for the Z axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. .. _class_Vector4_constant_AXIS_W: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**AXIS_W** = ``3`` :ref:`🔗` +:ref:`Axis` **AXIS_W** = ``3`` Enumerated value for the W axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Constants +--------- + .. _class_Vector4_constant_ZERO: .. rst-class:: classref-constant diff --git a/classes/class_vector4i.rst b/classes/class_vector4i.rst index e84af60a362..9b1aa953612 100644 --- a/classes/class_vector4i.rst +++ b/classes/class_vector4i.rst @@ -155,41 +155,56 @@ Operators .. rst-class:: classref-descriptions-group -Constants ---------- +Enumerations +------------ + +.. _enum_Vector4i_Axis: + +.. rst-class:: classref-enumeration + +enum **Axis**: :ref:`🔗` .. _class_Vector4i_constant_AXIS_X: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**AXIS_X** = ``0`` :ref:`🔗` +:ref:`Axis` **AXIS_X** = ``0`` Enumerated value for the X axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. .. _class_Vector4i_constant_AXIS_Y: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**AXIS_Y** = ``1`` :ref:`🔗` +:ref:`Axis` **AXIS_Y** = ``1`` Enumerated value for the Y axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. .. _class_Vector4i_constant_AXIS_Z: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**AXIS_Z** = ``2`` :ref:`🔗` +:ref:`Axis` **AXIS_Z** = ``2`` Enumerated value for the Z axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. .. _class_Vector4i_constant_AXIS_W: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**AXIS_W** = ``3`` :ref:`🔗` +:ref:`Axis` **AXIS_W** = ``3`` Enumerated value for the W axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Constants +--------- + .. _class_Vector4i_constant_ZERO: .. rst-class:: classref-constant diff --git a/classes/class_viewport.rst b/classes/class_viewport.rst index a1a115ca31f..43c41ce7a25 100644 --- a/classes/class_viewport.rst +++ b/classes/class_viewport.rst @@ -600,6 +600,8 @@ Objects are displayed semi-transparent with additive blending so you can see whe Objects are displayed as wireframe models. +\ **Note:** :ref:`RenderingServer.set_debug_generate_wireframes` must be called before loading any meshes for wireframes to be visible when using the Compatibility renderer. + .. _class_Viewport_constant_DEBUG_DRAW_NORMAL_BUFFER: .. rst-class:: classref-enumeration-constant diff --git a/classes/class_visualshadernodecolorfunc.rst b/classes/class_visualshadernodecolorfunc.rst index 42967c9bb50..abd31f0dfa7 100644 --- a/classes/class_visualshadernodecolorfunc.rst +++ b/classes/class_visualshadernodecolorfunc.rst @@ -96,11 +96,52 @@ Applies sepia tone effect using the following formula: float b = (c.r * 0.272) + (c.g * 0.534) + (c.b * 0.131); return vec3(r, g, b); +.. _class_VisualShaderNodeColorFunc_constant_FUNC_LINEAR_TO_SRGB: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_LINEAR_TO_SRGB** = ``4`` + +Converts color from linear color space to sRGB color space using the following formula: + +:: + + vec3 c = clamp(c, vec3(0.0), vec3(1.0)); + const vec3 a = vec3(0.055f); + return mix((vec3(1.0f) + a) * pow(c.rgb, vec3(1.0f / 2.4f)) - a, 12.92f * c.rgb, lessThan(c.rgb, vec3(0.0031308f))); + +The Compatibility renderer uses a simpler formula: + +:: + + vec3 c = input; + return max(vec3(1.055) * pow(c, vec3(0.416666667)) - vec3(0.055), vec3(0.0)); + +.. _class_VisualShaderNodeColorFunc_constant_FUNC_SRGB_TO_LINEAR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_SRGB_TO_LINEAR** = ``5`` + +Converts color from sRGB color space to linear color space using the following formula: + +:: + + vec3 c = input; + return mix(pow((c.rgb + vec3(0.055)) * (1.0 / (1.0 + 0.055)), vec3(2.4)), c.rgb * (1.0 / 12.92), lessThan(c.rgb, vec3(0.04045))); + +The Compatibility renderer uses a simpler formula: + +:: + + vec3 c = input; + return c * (c * (c * 0.305306011 + 0.682171111) + 0.012522878); + .. _class_VisualShaderNodeColorFunc_constant_FUNC_MAX: .. rst-class:: classref-enumeration-constant -:ref:`Function` **FUNC_MAX** = ``4`` +:ref:`Function` **FUNC_MAX** = ``6`` Represents the size of the :ref:`Function` enum. diff --git a/classes/index.rst b/classes/index.rst index 74d350cab7e..5eb1dd97b95 100644 --- a/classes/index.rst +++ b/classes/index.rst @@ -1088,3 +1088,4 @@ Variant types class_vector3i class_vector4 class_vector4i +