From e66e1fb4a1e4ca3202a83718eb1329508572247f Mon Sep 17 00:00:00 2001 From: Godot Organization Date: Sat, 26 Apr 2025 03:23:58 +0000 Subject: [PATCH] classref: Sync with current master branch (e37c626) --- classes/class_@globalscope.rst | 10 +- classes/class_astar2d.rst | 2 +- classes/class_astar3d.rst | 2 +- classes/class_canvaslayer.rst | 2 +- classes/class_editorsettings.rst | 28 +-- classes/class_engine.rst | 126 ++++++----- classes/class_gltfdocument.rst | 109 ++++++++- classes/class_gltfnode.rst | 19 ++ classes/class_graphnode.rst | 12 + classes/class_image.rst | 4 +- classes/class_label.rst | 2 - classes/class_lineedit.rst | 283 ++++++++++++++---------- classes/class_logger.rst | 131 +++++++++++ classes/class_os.rst | 36 ++- classes/class_progressbar.rst | 2 +- classes/class_projectsettings.rst | 40 +++- classes/class_refcounted.rst | 2 +- classes/class_renderingserver.rst | 14 ++ classes/class_resourceimporter.rst | 2 +- classes/class_resourceimporterscene.rst | 16 +- classes/class_resourceimportersvg.rst | 102 +++++++++ classes/class_scriptbacktrace.rst | 272 +++++++++++++++++++++++ classes/class_svgtexture.rst | 176 +++++++++++++++ classes/class_textedit.rst | 245 ++++++++++++-------- classes/class_texture2d.rst | 2 +- classes/class_vector2.rst | 4 +- classes/class_viewport.rst | 2 +- classes/index.rst | 4 + 28 files changed, 1340 insertions(+), 309 deletions(-) create mode 100644 classes/class_logger.rst create mode 100644 classes/class_resourceimportersvg.rst create mode 100644 classes/class_scriptbacktrace.rst create mode 100644 classes/class_svgtexture.rst diff --git a/classes/class_@globalscope.rst b/classes/class_@globalscope.rst index 7c98b7c9853..6503f8f6d6d 100644 --- a/classes/class_@globalscope.rst +++ b/classes/class_@globalscope.rst @@ -3875,11 +3875,19 @@ Hints that a :ref:`Callable` property should be displayed as a c 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_GROUP_ENABLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_GROUP_ENABLE** = ``42`` + +Hints that a boolean property will enable the feature associated with the group that it occurs in. Only works within a group or subgroup. + .. _class_@GlobalScope_constant_PROPERTY_HINT_MAX: .. rst-class:: classref-enumeration-constant -:ref:`PropertyHint` **PROPERTY_HINT_MAX** = ``42`` +:ref:`PropertyHint` **PROPERTY_HINT_MAX** = ``43`` Represents the size of the :ref:`PropertyHint` enum. diff --git a/classes/class_astar2d.rst b/classes/class_astar2d.rst index 0163a19095c..15de0c0e4a2 100644 --- a/classes/class_astar2d.rst +++ b/classes/class_astar2d.rst @@ -494,7 +494,7 @@ Removes the point associated with the given ``id`` from the points pool. |void| **reserve_space**\ (\ num_nodes\: :ref:`int`\ ) :ref:`🔗` -Reserves space internally for ``num_nodes`` points. Useful if you're adding a known large number of points at once, such as points on a grid. The new capacity must be greater or equal to the old capacity. +Reserves space internally for ``num_nodes`` points. Useful if you're adding a known large number of points at once, such as points on a grid. .. rst-class:: classref-item-separator diff --git a/classes/class_astar3d.rst b/classes/class_astar3d.rst index 27cc83369aa..863dab275dd 100644 --- a/classes/class_astar3d.rst +++ b/classes/class_astar3d.rst @@ -543,7 +543,7 @@ Removes the point associated with the given ``id`` from the points pool. |void| **reserve_space**\ (\ num_nodes\: :ref:`int`\ ) :ref:`🔗` -Reserves space internally for ``num_nodes`` points. Useful if you're adding a known large number of points at once, such as points on a grid. New capacity must be greater or equals to old capacity. +Reserves space internally for ``num_nodes`` points. Useful if you're adding a known large number of points at once, such as points on a grid. .. rst-class:: classref-item-separator diff --git a/classes/class_canvaslayer.rst b/classes/class_canvaslayer.rst index 00a7ee70d7d..5e11feaf20d 100644 --- a/classes/class_canvaslayer.rst +++ b/classes/class_canvaslayer.rst @@ -140,7 +140,7 @@ The custom :ref:`Viewport` node assigned to the **CanvasLayer**. - |void| **set_follow_viewport**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_following_viewport**\ (\ ) -If enabled, the **CanvasLayer** stays in a fixed position on the screen. If disabled, the **CanvasLayer** maintains its position in world space. +If enabled, the **CanvasLayer** maintains its position in world space. If disabled, the **CanvasLayer** stays in a fixed position on the screen. Together with :ref:`follow_viewport_scale`, this can be used for a pseudo-3D effect. diff --git a/classes/class_editorsettings.rst b/classes/class_editorsettings.rst index a8c3daa50d9..bcd57e87f79 100644 --- a/classes/class_editorsettings.rst +++ b/classes/class_editorsettings.rst @@ -599,12 +599,12 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`interface/touchscreen/enable_pan_and_scale_gestures` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`interface/touchscreen/enable_touch_actions_panel` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`interface/touchscreen/increase_scrollbar_touch_area` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`interface/touchscreen/scale_gizmo_handles` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/touchscreen/touch_actions_panel` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`network/connection/check_for_updates` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`network/connection/network_mode` | @@ -4446,43 +4446,43 @@ If ``true``, enable two finger pan and scale gestures on touchscreen devices. ---- -.. _class_EditorSettings_property_interface/touchscreen/enable_touch_actions_panel: +.. _class_EditorSettings_property_interface/touchscreen/increase_scrollbar_touch_area: .. rst-class:: classref-property -:ref:`bool` **interface/touchscreen/enable_touch_actions_panel** :ref:`🔗` +:ref:`bool` **interface/touchscreen/increase_scrollbar_touch_area** :ref:`🔗` -If ``true``, enables the TouchActionsPanel to provide easy access to keyboard shortcuts on touchscreen devices. +If ``true``, increases the scrollbar touch area to improve usability on touchscreen devices. -\ **Note:** Only available in the Android editor. +\ **Note:** Defaults to ``true`` on touchscreen devices. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_interface/touchscreen/increase_scrollbar_touch_area: +.. _class_EditorSettings_property_interface/touchscreen/scale_gizmo_handles: .. rst-class:: classref-property -:ref:`bool` **interface/touchscreen/increase_scrollbar_touch_area** :ref:`🔗` +:ref:`float` **interface/touchscreen/scale_gizmo_handles** :ref:`🔗` -If ``true``, increases the scrollbar touch area to improve usability on touchscreen devices. +Specify the multiplier to apply to the scale for the editor gizmo handles to improve usability on touchscreen devices. -\ **Note:** Defaults to ``true`` on touchscreen devices. +\ **Note:** Defaults to ``1`` on non-touchscreen devices. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_interface/touchscreen/scale_gizmo_handles: +.. _class_EditorSettings_property_interface/touchscreen/touch_actions_panel: .. rst-class:: classref-property -:ref:`float` **interface/touchscreen/scale_gizmo_handles** :ref:`🔗` +:ref:`int` **interface/touchscreen/touch_actions_panel** :ref:`🔗` -Specify the multiplier to apply to the scale for the editor gizmo handles to improve usability on touchscreen devices. +A touch-friendly panel that provides easy access to common actions such as save, delete, undo, and redo without requiring a keyboard. -\ **Note:** Defaults to ``1`` on non-touchscreen devices. +\ **Note:** Only available in the Android and XR editor. .. rst-class:: classref-item-separator diff --git a/classes/class_engine.rst b/classes/class_engine.rst index 6c83a23ca5f..e7064075caf 100644 --- a/classes/class_engine.rst +++ b/classes/class_engine.rst @@ -53,59 +53,61 @@ Methods .. table:: :widths: auto - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_architecture_name`\ (\ ) |const| | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`get_author_info`\ (\ ) |const| | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`get_copyright_info`\ (\ ) |const| | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`get_donor_info`\ (\ ) |const| | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_frames_drawn`\ (\ ) | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_frames_per_second`\ (\ ) |const| | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`get_license_info`\ (\ ) |const| | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_license_text`\ (\ ) |const| | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`MainLoop` | :ref:`get_main_loop`\ (\ ) |const| | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_physics_frames`\ (\ ) |const| | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_physics_interpolation_fraction`\ (\ ) |const| | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_process_frames`\ (\ ) |const| | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ScriptLanguage` | :ref:`get_script_language`\ (\ index\: :ref:`int`\ ) |const| | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_script_language_count`\ (\ ) | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Object` | :ref:`get_singleton`\ (\ name\: :ref:`StringName`\ ) |const| | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`get_singleton_list`\ (\ ) |const| | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`get_version_info`\ (\ ) |const| | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_write_movie_path`\ (\ ) |const| | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_singleton`\ (\ name\: :ref:`StringName`\ ) |const| | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_editor_hint`\ (\ ) |const| | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_embedded_in_editor`\ (\ ) |const| | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_in_physics_frame`\ (\ ) |const| | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`register_script_language`\ (\ language\: :ref:`ScriptLanguage`\ ) | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`register_singleton`\ (\ name\: :ref:`StringName`, instance\: :ref:`Object`\ ) | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`unregister_script_language`\ (\ language\: :ref:`ScriptLanguage`\ ) | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`unregister_singleton`\ (\ name\: :ref:`StringName`\ ) | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`ScriptBacktrace`\] | :ref:`capture_script_backtraces`\ (\ include_variables\: :ref:`bool` = false\ ) |const| | + +----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_architecture_name`\ (\ ) |const| | + +----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_author_info`\ (\ ) |const| | + +----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`get_copyright_info`\ (\ ) |const| | + +----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_donor_info`\ (\ ) |const| | + +----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_frames_drawn`\ (\ ) | + +----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_frames_per_second`\ (\ ) |const| | + +----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_license_info`\ (\ ) |const| | + +----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_license_text`\ (\ ) |const| | + +----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`MainLoop` | :ref:`get_main_loop`\ (\ ) |const| | + +----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_physics_frames`\ (\ ) |const| | + +----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_physics_interpolation_fraction`\ (\ ) |const| | + +----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_process_frames`\ (\ ) |const| | + +----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ScriptLanguage` | :ref:`get_script_language`\ (\ index\: :ref:`int`\ ) |const| | + +----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_script_language_count`\ (\ ) | + +----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object` | :ref:`get_singleton`\ (\ name\: :ref:`StringName`\ ) |const| | + +----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_singleton_list`\ (\ ) |const| | + +----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_version_info`\ (\ ) |const| | + +----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_write_movie_path`\ (\ ) |const| | + +----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_singleton`\ (\ name\: :ref:`StringName`\ ) |const| | + +----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_editor_hint`\ (\ ) |const| | + +----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_embedded_in_editor`\ (\ ) |const| | + +----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_in_physics_frame`\ (\ ) |const| | + +----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`register_script_language`\ (\ language\: :ref:`ScriptLanguage`\ ) | + +----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`register_singleton`\ (\ name\: :ref:`StringName`, instance\: :ref:`Object`\ ) | + +----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`unregister_script_language`\ (\ language\: :ref:`ScriptLanguage`\ ) | + +----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`unregister_singleton`\ (\ name\: :ref:`StringName`\ ) | + +----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -274,6 +276,24 @@ This value affects :ref:`Timer`, :ref:`SceneTreeTimer`\[:ref:`ScriptBacktrace`\] **capture_script_backtraces**\ (\ include_variables\: :ref:`bool` = false\ ) |const| :ref:`🔗` + +Captures and returns backtraces from all registered script languages. + +By default, the returned :ref:`ScriptBacktrace` will only contain stack frames in editor builds and debug builds. To enable them for release builds as well, you need to enable :ref:`ProjectSettings.debug/settings/gdscript/always_track_call_stacks`. + +If ``include_variables`` is ``true``, the backtrace will also include the names and values of any global variables (e.g. autoload singletons) at the point of the capture, as well as local variables and class member variables at each stack frame. This will however will only be respected when running the game with a debugger attached, like when running the game from the editor. To enable it for export builds as well, you need to enable :ref:`ProjectSettings.debug/settings/gdscript/always_track_local_variables`. + +\ **Warning:** When ``include_variables`` is ``true``, any captured variables can potentially (e.g. with GDScript backtraces) be their actual values, including any object references. This means that storing such a :ref:`ScriptBacktrace` will prevent those objects from being deallocated, so it's generally recommended not to do so. + +.. rst-class:: classref-item-separator + +---- + .. _class_Engine_method_get_architecture_name: .. rst-class:: classref-method diff --git a/classes/class_gltfdocument.rst b/classes/class_gltfdocument.rst index c548222d576..6a84fdc7458 100644 --- a/classes/class_gltfdocument.rst +++ b/classes/class_gltfdocument.rst @@ -46,13 +46,19 @@ Properties .. table:: :widths: auto - +-----------------------------------------------------+-------------------------------------------------------------------+-----------+ - | :ref:`String` | :ref:`image_format` | ``"PNG"`` | - +-----------------------------------------------------+-------------------------------------------------------------------+-----------+ - | :ref:`float` | :ref:`lossy_quality` | ``0.75`` | - +-----------------------------------------------------+-------------------------------------------------------------------+-----------+ - | :ref:`RootNodeMode` | :ref:`root_node_mode` | ``0`` | - +-----------------------------------------------------+-------------------------------------------------------------------+-----------+ + +---------------------------------------------------------+-----------------------------------------------------------------------------------+------------+ + | :ref:`String` | :ref:`fallback_image_format` | ``"None"`` | + +---------------------------------------------------------+-----------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`fallback_image_quality` | ``0.25`` | + +---------------------------------------------------------+-----------------------------------------------------------------------------------+------------+ + | :ref:`String` | :ref:`image_format` | ``"PNG"`` | + +---------------------------------------------------------+-----------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`lossy_quality` | ``0.75`` | + +---------------------------------------------------------+-----------------------------------------------------------------------------------+------------+ + | :ref:`RootNodeMode` | :ref:`root_node_mode` | ``0`` | + +---------------------------------------------------------+-----------------------------------------------------------------------------------+------------+ + | :ref:`VisibilityMode` | :ref:`visibility_mode` | ``0`` | + +---------------------------------------------------------+-----------------------------------------------------------------------------------+------------+ .. rst-class:: classref-reftable-group @@ -125,6 +131,40 @@ Treat the Godot scene's root node as the root node of the glTF file, but do not Treat the Godot scene's root node as the name of the glTF scene, and add all of its children as root nodes of the glTF file. This uses only vanilla glTF features. This avoids an extra root node, but only the name of the Godot scene's root node will be preserved, as it will not be saved as a node. +.. rst-class:: classref-item-separator + +---- + +.. _enum_GLTFDocument_VisibilityMode: + +.. rst-class:: classref-enumeration + +enum **VisibilityMode**: :ref:`🔗` + +.. _class_GLTFDocument_constant_VISIBILITY_MODE_INCLUDE_REQUIRED: + +.. rst-class:: classref-enumeration-constant + +:ref:`VisibilityMode` **VISIBILITY_MODE_INCLUDE_REQUIRED** = ``0`` + +If the scene contains any non-visible nodes, include them, mark them as non-visible with ``KHR_node_visibility``, and require that importers respect their non-visibility. Downside: If the importer does not support ``KHR_node_visibility``, the file cannot be imported. + +.. _class_GLTFDocument_constant_VISIBILITY_MODE_INCLUDE_OPTIONAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`VisibilityMode` **VISIBILITY_MODE_INCLUDE_OPTIONAL** = ``1`` + +If the scene contains any non-visible nodes, include them, mark them as non-visible with ``KHR_node_visibility``, and do not impose any requirements on importers. Downside: If the importer does not support ``KHR_node_visibility``, invisible objects will be visible. + +.. _class_GLTFDocument_constant_VISIBILITY_MODE_EXCLUDE: + +.. rst-class:: classref-enumeration-constant + +:ref:`VisibilityMode` **VISIBILITY_MODE_EXCLUDE** = ``2`` + +If the scene contains any non-visible nodes, do not include them in the export. This is the same as the behavior in Godot 4.4 and earlier. Downside: Invisible nodes will not exist in the exported file. + .. rst-class:: classref-section-separator ---- @@ -134,6 +174,42 @@ Treat the Godot scene's root node as the name of the glTF scene, and add all of Property Descriptions --------------------- +.. _class_GLTFDocument_property_fallback_image_format: + +.. rst-class:: classref-property + +:ref:`String` **fallback_image_format** = ``"None"`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_fallback_image_format**\ (\ value\: :ref:`String`\ ) +- :ref:`String` **get_fallback_image_format**\ (\ ) + +The user-friendly name of the fallback image format. This is used when exporting the glTF file, including writing to a file and writing to a byte array. + +This property may only be one of "None", "PNG", or "JPEG", and is only used when the :ref:`image_format` is not one of "None", "PNG", or "JPEG". If having multiple extension image formats is desired, that can be done using a :ref:`GLTFDocumentExtension` class - this property only covers the use case of providing a base glTF fallback image when using a custom image format. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFDocument_property_fallback_image_quality: + +.. rst-class:: classref-property + +:ref:`float` **fallback_image_quality** = ``0.25`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_fallback_image_quality**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_fallback_image_quality**\ (\ ) + +The quality of the fallback image, if any. For PNG files, this downscales the image on both dimensions by this factor. For JPEG files, this is the lossy quality of the image. A low value is recommended, since including multiple high quality images in a glTF file defeats the file size gains of using a more efficient image format. + +.. rst-class:: classref-item-separator + +---- + .. _class_GLTFDocument_property_image_format: .. rst-class:: classref-property @@ -147,7 +223,7 @@ Property Descriptions The user-friendly name of the export image format. This is used when exporting the glTF file, including writing to a file and writing to a byte array. -By default, Godot allows the following options: "None", "PNG", "JPEG", "Lossless WebP", and "Lossy WebP". Support for more image formats can be added in :ref:`GLTFDocumentExtension` classes. +By default, Godot allows the following options: "None", "PNG", "JPEG", "Lossless WebP", and "Lossy WebP". Support for more image formats can be added in :ref:`GLTFDocumentExtension` classes. A single extension class can provide multiple options for the specific format to use, or even an option that uses multiple formats at once. .. rst-class:: classref-item-separator @@ -185,6 +261,23 @@ How to process the root node during export. See :ref:`RootNodeMode` **visibility_mode** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_visibility_mode**\ (\ value\: :ref:`VisibilityMode`\ ) +- :ref:`VisibilityMode` **get_visibility_mode**\ (\ ) + +How to deal with node visibility during export. This setting does nothing if all nodes are visible. See :ref:`VisibilityMode` for details. The default and recommended value is :ref:`VISIBILITY_MODE_INCLUDE_REQUIRED`, which uses the ``KHR_node_visibility`` extension. + .. rst-class:: classref-section-separator ---- diff --git a/classes/class_gltfnode.rst b/classes/class_gltfnode.rst index e9701d1078e..fec7b7afd46 100644 --- a/classes/class_gltfnode.rst +++ b/classes/class_gltfnode.rst @@ -65,6 +65,8 @@ Properties +-------------------------------------------------+-------------------------------------------------------------+-----------------------------------------------------+ | :ref:`int` | :ref:`skin` | ``-1`` | +-------------------------------------------------+-------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`bool` | :ref:`visible` | ``true`` | + +-------------------------------------------------+-------------------------------------------------------------+-----------------------------------------------------+ | :ref:`Transform3D` | :ref:`xform` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | +-------------------------------------------------+-------------------------------------------------------------+-----------------------------------------------------+ @@ -301,6 +303,23 @@ If this glTF node has a skin, the index of the :ref:`GLTFSkin` i ---- +.. _class_GLTFNode_property_visible: + +.. rst-class:: classref-property + +:ref:`bool` **visible** = ``true`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_visible**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_visible**\ (\ ) + +If ``true``, the GLTF node is visible. If ``false``, the GLTF node is not visible. This is translated to the :ref:`Node3D.visible` property in the Godot scene, and is exported to ``KHR_node_visibility`` when ``false``. + +.. rst-class:: classref-item-separator + +---- + .. _class_GLTFNode_property_xform: .. rst-class:: classref-property diff --git a/classes/class_graphnode.rst b/classes/class_graphnode.rst index 429a43463c5..4c2258e82e3 100644 --- a/classes/class_graphnode.rst +++ b/classes/class_graphnode.rst @@ -164,6 +164,18 @@ Theme Properties Signals ------- +.. _class_GraphNode_signal_slot_sizes_changed: + +.. rst-class:: classref-signal + +**slot_sizes_changed**\ (\ ) :ref:`🔗` + +Emitted when any slot's size might have changed. + +.. rst-class:: classref-item-separator + +---- + .. _class_GraphNode_signal_slot_updated: .. rst-class:: classref-signal diff --git a/classes/class_image.rst b/classes/class_image.rst index 0ab518ae0c2..dc687144943 100644 --- a/classes/class_image.rst +++ b/classes/class_image.rst @@ -1600,7 +1600,7 @@ Resizes the image to the given ``width`` and ``height``. New pixels are calculat |void| **resize_to_po2**\ (\ square\: :ref:`bool` = false, interpolation\: :ref:`Interpolation` = 1\ ) :ref:`🔗` -Resizes the image to the nearest power of 2 for the width and height. If ``square`` is ``true`` then set width and height to be the same. New pixels are calculated using the ``interpolation`` mode defined via :ref:`Interpolation` constants. +Resizes the image to the nearest power of 2 for the width and height. If ``square`` is ``true``, sets width and height to be the same. New pixels are calculated using the ``interpolation`` mode defined via :ref:`Interpolation` constants. .. rst-class:: classref-item-separator @@ -1692,7 +1692,7 @@ Saves the image as an EXR file to ``path``. If ``grayscale`` is ``true`` and the Saves the image as an EXR file to a byte array. If ``grayscale`` is ``true`` and the image has only one channel, it will be saved explicitly as monochrome rather than one red channel. This function will return an empty byte array if Godot was compiled without the TinyEXR module. -\ **Note:** The TinyEXR module is disabled in non-editor builds, which means :ref:`save_exr()` will return an empty byte array when it is called from an exported project. +\ **Note:** The TinyEXR module is disabled in non-editor builds, which means :ref:`save_exr_to_buffer()` will return an empty byte array when it is called from an exported project. .. rst-class:: classref-item-separator diff --git a/classes/class_label.rst b/classes/class_label.rst index 935a921f40b..64171946a11 100644 --- a/classes/class_label.rst +++ b/classes/class_label.rst @@ -48,8 +48,6 @@ Properties +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ | :ref:`String` | :ref:`ellipsis_char` | ``"…"`` | +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ - | :ref:`FocusMode` | focus_mode | ``3`` (overrides :ref:`Control`) | - +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ | :ref:`HorizontalAlignment` | :ref:`horizontal_alignment` | ``0`` | +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ | |bitfield|\[:ref:`JustificationFlag`\] | :ref:`justification_flags` | ``163`` | diff --git a/classes/class_lineedit.rst b/classes/class_lineedit.rst index 1e07dddac64..2a454355c96 100644 --- a/classes/class_lineedit.rst +++ b/classes/class_lineedit.rst @@ -98,75 +98,77 @@ Properties .. table:: :widths: auto - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`HorizontalAlignment` | :ref:`alignment` | ``0`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`caret_blink` | ``false`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`caret_blink_interval` | ``0.65`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`caret_column` | ``0`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`caret_force_displayed` | ``false`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`caret_mid_grapheme` | ``false`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`clear_button_enabled` | ``false`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`context_menu_enabled` | ``true`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`deselect_on_focus_loss_enabled` | ``true`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`drag_and_drop_selection_enabled` | ``true`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`draw_control_chars` | ``false`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`editable` | ``true`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`emoji_menu_enabled` | ``true`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`expand_to_text_length` | ``false`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`flat` | ``false`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`FocusMode` | focus_mode | ``2`` (overrides :ref:`Control`) | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`keep_editing_on_text_submit` | ``false`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`language` | ``""`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`max_length` | ``0`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`middle_mouse_paste_enabled` | ``true`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`CursorShape` | mouse_default_cursor_shape | ``1`` (overrides :ref:`Control`) | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`placeholder_text` | ``""`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`Texture2D` | :ref:`right_icon` | | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`secret` | ``false`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`secret_character` | ``"•"`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`select_all_on_focus` | ``false`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`selecting_enabled` | ``true`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`shortcut_keys_enabled` | ``true`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`StructuredTextParser` | :ref:`structured_text_bidi_override` | ``0`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`structured_text_bidi_override_options` | ``[]`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`text` | ``""`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`TextDirection` | :ref:`text_direction` | ``0`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`virtual_keyboard_enabled` | ``true`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`VirtualKeyboardType` | :ref:`virtual_keyboard_type` | ``0`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`HorizontalAlignment` | :ref:`alignment` | ``0`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`backspace_deletes_composite_character_enabled` | ``false`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`caret_blink` | ``false`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`caret_blink_interval` | ``0.65`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`caret_column` | ``0`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`caret_force_displayed` | ``false`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`caret_mid_grapheme` | ``false`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`clear_button_enabled` | ``false`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`context_menu_enabled` | ``true`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`deselect_on_focus_loss_enabled` | ``true`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`drag_and_drop_selection_enabled` | ``true`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`draw_control_chars` | ``false`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editable` | ``true`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`emoji_menu_enabled` | ``true`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`expand_to_text_length` | ``false`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`flat` | ``false`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`FocusMode` | focus_mode | ``2`` (overrides :ref:`Control`) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`keep_editing_on_text_submit` | ``false`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`language` | ``""`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`max_length` | ``0`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`middle_mouse_paste_enabled` | ``true`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`CursorShape` | mouse_default_cursor_shape | ``1`` (overrides :ref:`Control`) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`placeholder_text` | ``""`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`right_icon` | | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`secret` | ``false`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`secret_character` | ``"•"`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`select_all_on_focus` | ``false`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`selecting_enabled` | ``true`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`shortcut_keys_enabled` | ``true`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`StructuredTextParser` | :ref:`structured_text_bidi_override` | ``0`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`structured_text_bidi_override_options` | ``[]`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`text` | ``""`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`TextDirection` | :ref:`text_direction` | ``0`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`virtual_keyboard_enabled` | ``true`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`VirtualKeyboardType` | :ref:`virtual_keyboard_type` | ``0`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -176,53 +178,57 @@ Methods .. table:: :widths: auto - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`apply_ime`\ (\ ) | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`cancel_ime`\ (\ ) | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`clear`\ (\ ) | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`delete_char_at_caret`\ (\ ) | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`delete_text`\ (\ from_column\: :ref:`int`, to_column\: :ref:`int`\ ) | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`deselect`\ (\ ) | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`edit`\ (\ ) | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PopupMenu` | :ref:`get_menu`\ (\ ) |const| | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_scroll_offset`\ (\ ) |const| | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_selected_text`\ (\ ) | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_selection_from_column`\ (\ ) |const| | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_selection_to_column`\ (\ ) |const| | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_ime_text`\ (\ ) |const| | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_redo`\ (\ ) |const| | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_selection`\ (\ ) |const| | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_undo`\ (\ ) |const| | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`insert_text_at_caret`\ (\ text\: :ref:`String`\ ) | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_editing`\ (\ ) |const| | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_menu_visible`\ (\ ) |const| | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`menu_option`\ (\ option\: :ref:`int`\ ) | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`select`\ (\ from\: :ref:`int` = 0, to\: :ref:`int` = -1\ ) | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`select_all`\ (\ ) | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`unedit`\ (\ ) | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`apply_ime`\ (\ ) | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`cancel_ime`\ (\ ) | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear`\ (\ ) | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`delete_char_at_caret`\ (\ ) | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`delete_text`\ (\ from_column\: :ref:`int`, to_column\: :ref:`int`\ ) | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`deselect`\ (\ ) | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`edit`\ (\ ) | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PopupMenu` | :ref:`get_menu`\ (\ ) |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_next_composite_character_column`\ (\ column\: :ref:`int`\ ) |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_previous_composite_character_column`\ (\ column\: :ref:`int`\ ) |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_scroll_offset`\ (\ ) |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_selected_text`\ (\ ) | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_selection_from_column`\ (\ ) |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_selection_to_column`\ (\ ) |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_ime_text`\ (\ ) |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_redo`\ (\ ) |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_selection`\ (\ ) |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_undo`\ (\ ) |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`insert_text_at_caret`\ (\ text\: :ref:`String`\ ) | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_editing`\ (\ ) |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_menu_visible`\ (\ ) |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`menu_option`\ (\ option\: :ref:`int`\ ) | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`select`\ (\ from\: :ref:`int` = 0, to\: :ref:`int` = -1\ ) | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`select_all`\ (\ ) | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`unedit`\ (\ ) | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -698,6 +704,23 @@ Text alignment as defined in the :ref:`HorizontalAlignment` **backspace_deletes_composite_character_enabled** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_backspace_deletes_composite_character_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_backspace_deletes_composite_character_enabled**\ (\ ) + +If ``true`` and :ref:`caret_mid_grapheme` is ``false``, backspace deletes an entire composite character such as ❤️‍🩹, instead of deleting part of the composite character. + +.. rst-class:: classref-item-separator + +---- + .. _class_LineEdit_property_caret_blink: .. rst-class:: classref-property @@ -1410,6 +1433,34 @@ You can add custom menu items or remove standard ones. Make sure your IDs don't ---- +.. _class_LineEdit_method_get_next_composite_character_column: + +.. rst-class:: classref-method + +:ref:`int` **get_next_composite_character_column**\ (\ column\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the correct column at the end of a composite character like ❤️‍🩹 (mending heart; Unicode: ``U+2764 U+FE0F U+200D U+1FA79``) which is comprised of more than one Unicode code point, if the caret is at the start of the composite character. Also returns the correct column with the caret at mid grapheme and for non-composite characters. + +\ **Note:** To check at caret location use ``get_next_composite_character_column(get_caret_column())`` + +.. rst-class:: classref-item-separator + +---- + +.. _class_LineEdit_method_get_previous_composite_character_column: + +.. rst-class:: classref-method + +:ref:`int` **get_previous_composite_character_column**\ (\ column\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the correct column at the start of a composite character like ❤️‍🩹 (mending heart; Unicode: ``U+2764 U+FE0F U+200D U+1FA79``) which is comprised of more than one Unicode code point, if the caret is at the end of the composite character. Also returns the correct column with the caret at mid grapheme and for non-composite characters. + +\ **Note:** To check at caret location use ``get_previous_composite_character_column(get_caret_column())`` + +.. rst-class:: classref-item-separator + +---- + .. _class_LineEdit_method_get_scroll_offset: .. rst-class:: classref-method diff --git a/classes/class_logger.rst b/classes/class_logger.rst new file mode 100644 index 00000000000..9c7fd98f8a1 --- /dev/null +++ b/classes/class_logger.rst @@ -0,0 +1,131 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/Logger.xml. + +.. _class_Logger: + +Logger +====== + +**Inherits:** :ref:`RefCounted` **<** :ref:`Object` + +Custom logger to receive messages from the internal error/warning stream. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Custom logger to receive messages from the internal error/warning stream. Loggers are registered via :ref:`OS.add_logger()`. + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_log_error`\ (\ function\: :ref:`String`, file\: :ref:`String`, line\: :ref:`int`, code\: :ref:`String`, rationale\: :ref:`String`, editor_notify\: :ref:`bool`, error_type\: :ref:`int`, script_backtraces\: :ref:`Array`\[:ref:`ScriptBacktrace`\]\ ) |virtual| | + +--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_log_message`\ (\ message\: :ref:`String`, error\: :ref:`bool`\ ) |virtual| | + +--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_Logger_ErrorType: + +.. rst-class:: classref-enumeration + +enum **ErrorType**: :ref:`🔗` + +.. _class_Logger_constant_ERROR_TYPE_ERROR: + +.. rst-class:: classref-enumeration-constant + +:ref:`ErrorType` **ERROR_TYPE_ERROR** = ``0`` + +The message received is an error. + +.. _class_Logger_constant_ERROR_TYPE_WARNING: + +.. rst-class:: classref-enumeration-constant + +:ref:`ErrorType` **ERROR_TYPE_WARNING** = ``1`` + +The message received is a warning. + +.. _class_Logger_constant_ERROR_TYPE_SCRIPT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ErrorType` **ERROR_TYPE_SCRIPT** = ``2`` + +The message received is a script error. + +.. _class_Logger_constant_ERROR_TYPE_SHADER: + +.. rst-class:: classref-enumeration-constant + +:ref:`ErrorType` **ERROR_TYPE_SHADER** = ``3`` + +The message received is a shader error. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_Logger_private_method__log_error: + +.. rst-class:: classref-method + +|void| **_log_error**\ (\ function\: :ref:`String`, file\: :ref:`String`, line\: :ref:`int`, code\: :ref:`String`, rationale\: :ref:`String`, editor_notify\: :ref:`bool`, error_type\: :ref:`int`, script_backtraces\: :ref:`Array`\[:ref:`ScriptBacktrace`\]\ ) |virtual| :ref:`🔗` + +Called when an error is logged. The error provides the ``function``, ``file``, and ``line`` that it originated from, as well as either the ``code`` that generated the error or a ``rationale``. + +The type of error provided by ``error_type`` is described in the :ref:`ErrorType` enumeration. + +Additionally, ``script_backtraces`` provides backtraces for each of the script languages. These will only contain stack frames in editor builds and debug builds by default. To enable them for release builds as well, you need to enable :ref:`ProjectSettings.debug/settings/gdscript/always_track_call_stacks`. + +\ **Warning:** This function may be called from multiple different threads, so you may need to do your own locking. + +\ **Note:** ``script_backtraces`` will not contain any captured variables, due to its prohibitively high cost. To get those you will need to capture the backtraces yourself, from within the **Logger** virtual methods, using :ref:`Engine.capture_script_backtraces()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Logger_private_method__log_message: + +.. rst-class:: classref-method + +|void| **_log_message**\ (\ message\: :ref:`String`, error\: :ref:`bool`\ ) |virtual| :ref:`🔗` + +Called when a message is logged. If ``error`` is ``true``, then this message was meant to be sent to ``stderr``. + +\ **Warning:** This function may be called from multiple different threads, so you may need to do your own locking. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_os.rst b/classes/class_os.rst index a1c9ca2113b..8ec18834b45 100644 --- a/classes/class_os.rst +++ b/classes/class_os.rst @@ -54,6 +54,8 @@ Methods .. table:: :widths: auto + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_logger`\ (\ logger\: :ref:`Logger`\ ) | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`alert`\ (\ text\: :ref:`String`, title\: :ref:`String` = "Alert!"\ ) | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -183,6 +185,8 @@ Methods +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`read_string_from_stdin`\ (\ buffer_size\: :ref:`int` = 1024\ ) | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_logger`\ (\ logger\: :ref:`Logger`\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`request_permission`\ (\ name\: :ref:`String`\ ) | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`request_permissions`\ (\ ) | @@ -446,6 +450,18 @@ The amount of sleeping between frames when the low-processor usage mode is enabl Method Descriptions ------------------- +.. _class_OS_method_add_logger: + +.. rst-class:: classref-method + +|void| **add_logger**\ (\ logger\: :ref:`Logger`\ ) :ref:`🔗` + +Add a custom logger to intercept the internal message stream. + +.. rst-class:: classref-item-separator + +---- + .. _class_OS_method_alert: .. rst-class:: classref-method @@ -919,7 +935,7 @@ Returns the file path to the current engine executable. On Android devices: Returns the list of dangerous permissions that have been granted. -On macOS: Returns the list of user selected folders accessible to the application (sandboxed applications only). Use the native file dialog to request folder access permission. +On macOS: Returns the list of granted permissions and user selected folders accessible to the application (sandboxed applications only). Use the native file dialog to request folder access permission. .. rst-class:: classref-item-separator @@ -1719,6 +1735,18 @@ Reads a user input as a UTF-8 encoded string from the standard input. This opera ---- +.. _class_OS_method_remove_logger: + +.. rst-class:: classref-method + +|void| **remove_logger**\ (\ logger\: :ref:`Logger`\ ) :ref:`🔗` + +Remove a custom logger added by :ref:`add_logger()`. + +.. rst-class:: classref-item-separator + +---- + .. _class_OS_method_request_permission: .. rst-class:: classref-method @@ -1733,9 +1761,11 @@ The ``name`` must be the full permission name. For example: - ``OS.request_permission("android.permission.POST_NOTIFICATIONS")``\ -\ **Note:** Permission must be checked during export. +- ``OS.request_permission("macos.permission.RECORD_SCREEN")``\ + +\ **Note:** On Android, permission must be checked during export. -\ **Note:** This method is only implemented on Android. +\ **Note:** This method is implemented on Android and macOS. .. rst-class:: classref-item-separator diff --git a/classes/class_progressbar.rst b/classes/class_progressbar.rst index 29ec3ad27a3..3ab0bbc77b0 100644 --- a/classes/class_progressbar.rst +++ b/classes/class_progressbar.rst @@ -19,7 +19,7 @@ A control used for visual representation of a percentage. Description ----------- -A control used for visual representation of a percentage. Shows fill percentage from right to left. +A control used for visual representation of a percentage. Shows the fill percentage in the center. Can also be used to show indeterminate progress. For more fill modes, use :ref:`TextureProgressBar` instead. .. rst-class:: classref-reftable-group diff --git a/classes/class_projectsettings.rst b/classes/class_projectsettings.rst index 0460b191621..9327a151dc4 100644 --- a/classes/class_projectsettings.rst +++ b/classes/class_projectsettings.rst @@ -283,6 +283,10 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`debug/settings/crash_handler/message.editor` | ``"Please include this when reporting the bug on: https://github.com/godotengine/godot/issues"`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`debug/settings/gdscript/always_track_call_stacks` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`debug/settings/gdscript/always_track_local_variables` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`debug/settings/gdscript/max_call_stack` | ``1024`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`debug/settings/physics_interpolation/enable_warnings` | ``true`` | @@ -3422,6 +3426,38 @@ Editor-only override for :ref:`debug/settings/crash_handler/message` **debug/settings/gdscript/always_track_call_stacks** = ``false`` :ref:`🔗` + +Whether GDScript call stacks will be tracked in release builds, thus allowing :ref:`Engine.capture_script_backtraces()` to function. + +Enabling this comes at the cost of roughly 40 KiB for every thread that runs any GDScript code. + +\ **Note:** This setting has no effect on editor builds or debug builds, where GDScript call stacks are tracked regardless. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_debug/settings/gdscript/always_track_local_variables: + +.. rst-class:: classref-property + +:ref:`bool` **debug/settings/gdscript/always_track_local_variables** = ``false`` :ref:`🔗` + +Whether GDScript local variables will be tracked in all builds, including export builds, thus allowing :ref:`Engine.capture_script_backtraces()` to capture them when enabling its ``include_variables`` parameter. + +Enabling this comes at the cost of roughly 50 bytes of memory per local variable, for every compiled class in the entire project, so can be several MiB in larger projects. + +\ **Note:** This setting has no effect when running the game from the editor, where GDScript local variables are tracked regardless. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_debug/settings/gdscript/max_call_stack: .. rst-class:: classref-property @@ -5372,9 +5408,7 @@ Maximum undo/redo history size for :ref:`TextEdit` fields. :ref:`bool` **gui/fonts/dynamic_fonts/use_oversampling** = ``true`` :ref:`🔗` -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +If set to ``true`` and :ref:`display/window/stretch/mode` is set to **"canvas_items"**, font and :ref:`SVGTexture` oversampling is enabled in the main window. Use :ref:`Viewport.oversampling` to control oversampling in other viewports and windows. .. rst-class:: classref-item-separator diff --git a/classes/class_refcounted.rst b/classes/class_refcounted.rst index fdda0c7dfd5..bd120a2e496 100644 --- a/classes/class_refcounted.rst +++ b/classes/class_refcounted.rst @@ -12,7 +12,7 @@ RefCounted **Inherits:** :ref:`Object` -**Inherited By:** :ref:`AESContext`, :ref:`AStar2D`, :ref:`AStar3D`, :ref:`AStarGrid2D`, :ref:`AudioEffectInstance`, :ref:`AudioSample`, :ref:`AudioSamplePlayback`, :ref:`AudioStreamPlayback`, :ref:`CameraFeed`, :ref:`CharFXTransform`, :ref:`ConfigFile`, :ref:`Crypto`, :ref:`DirAccess`, :ref:`DTLSServer`, :ref:`EditorContextMenuPlugin`, :ref:`EditorDebuggerPlugin`, :ref:`EditorDebuggerSession`, :ref:`EditorExportPlatform`, :ref:`EditorExportPlugin`, :ref:`EditorExportPreset`, :ref:`EditorFeatureProfile`, :ref:`EditorFileSystemImportFormatSupportQuery`, :ref:`EditorInspectorPlugin`, :ref:`EditorResourceConversionPlugin`, :ref:`EditorResourcePreviewGenerator`, :ref:`EditorResourceTooltipPlugin`, :ref:`EditorSceneFormatImporter`, :ref:`EditorScenePostImport`, :ref:`EditorScenePostImportPlugin`, :ref:`EditorScript`, :ref:`EditorTranslationParserPlugin`, :ref:`EncodedObjectAsID`, :ref:`ENetConnection`, :ref:`EngineProfiler`, :ref:`Expression`, :ref:`FileAccess`, :ref:`GLTFObjectModelProperty`, :ref:`HashingContext`, :ref:`HMACContext`, :ref:`HTTPClient`, :ref:`ImageFormatLoader`, :ref:`JavaClass`, :ref:`JavaObject`, :ref:`JavaScriptObject`, :ref:`KinematicCollision2D`, :ref:`KinematicCollision3D`, :ref:`Lightmapper`, :ref:`MeshConvexDecompositionSettings`, :ref:`MeshDataTool`, :ref:`MultiplayerAPI`, :ref:`Mutex`, :ref:`NavigationPathQueryParameters2D`, :ref:`NavigationPathQueryParameters3D`, :ref:`NavigationPathQueryResult2D`, :ref:`NavigationPathQueryResult3D`, :ref:`Node3DGizmo`, :ref:`OggPacketSequencePlayback`, :ref:`OpenXRAPIExtension`, :ref:`OpenXRFutureResult`, :ref:`PackedDataContainerRef`, :ref:`PacketPeer`, :ref:`PCKPacker`, :ref:`PhysicsPointQueryParameters2D`, :ref:`PhysicsPointQueryParameters3D`, :ref:`PhysicsRayQueryParameters2D`, :ref:`PhysicsRayQueryParameters3D`, :ref:`PhysicsShapeQueryParameters2D`, :ref:`PhysicsShapeQueryParameters3D`, :ref:`PhysicsTestMotionParameters2D`, :ref:`PhysicsTestMotionParameters3D`, :ref:`PhysicsTestMotionResult2D`, :ref:`PhysicsTestMotionResult3D`, :ref:`RandomNumberGenerator`, :ref:`RDAttachmentFormat`, :ref:`RDFramebufferPass`, :ref:`RDPipelineColorBlendState`, :ref:`RDPipelineColorBlendStateAttachment`, :ref:`RDPipelineDepthStencilState`, :ref:`RDPipelineMultisampleState`, :ref:`RDPipelineRasterizationState`, :ref:`RDPipelineSpecializationConstant`, :ref:`RDSamplerState`, :ref:`RDShaderSource`, :ref:`RDTextureFormat`, :ref:`RDTextureView`, :ref:`RDUniform`, :ref:`RDVertexAttribute`, :ref:`RegEx`, :ref:`RegExMatch`, :ref:`RenderSceneBuffers`, :ref:`RenderSceneBuffersConfiguration`, :ref:`Resource`, :ref:`ResourceFormatLoader`, :ref:`ResourceFormatSaver`, :ref:`ResourceImporter`, :ref:`SceneState`, :ref:`SceneTreeTimer`, :ref:`Semaphore`, :ref:`SkinReference`, :ref:`StreamPeer`, :ref:`SurfaceTool`, :ref:`TCPServer`, :ref:`TextLine`, :ref:`TextParagraph`, :ref:`TextServer`, :ref:`Thread`, :ref:`TLSOptions`, :ref:`TranslationDomain`, :ref:`TriangleMesh`, :ref:`Tween`, :ref:`Tweener`, :ref:`UDPServer`, :ref:`UPNP`, :ref:`UPNPDevice`, :ref:`WeakRef`, :ref:`WebRTCPeerConnection`, :ref:`XMLParser`, :ref:`XRInterface`, :ref:`XRPose`, :ref:`XRTracker`, :ref:`ZIPPacker`, :ref:`ZIPReader` +**Inherited By:** :ref:`AESContext`, :ref:`AStar2D`, :ref:`AStar3D`, :ref:`AStarGrid2D`, :ref:`AudioEffectInstance`, :ref:`AudioSample`, :ref:`AudioSamplePlayback`, :ref:`AudioStreamPlayback`, :ref:`CameraFeed`, :ref:`CharFXTransform`, :ref:`ConfigFile`, :ref:`Crypto`, :ref:`DirAccess`, :ref:`DTLSServer`, :ref:`EditorContextMenuPlugin`, :ref:`EditorDebuggerPlugin`, :ref:`EditorDebuggerSession`, :ref:`EditorExportPlatform`, :ref:`EditorExportPlugin`, :ref:`EditorExportPreset`, :ref:`EditorFeatureProfile`, :ref:`EditorFileSystemImportFormatSupportQuery`, :ref:`EditorInspectorPlugin`, :ref:`EditorResourceConversionPlugin`, :ref:`EditorResourcePreviewGenerator`, :ref:`EditorResourceTooltipPlugin`, :ref:`EditorSceneFormatImporter`, :ref:`EditorScenePostImport`, :ref:`EditorScenePostImportPlugin`, :ref:`EditorScript`, :ref:`EditorTranslationParserPlugin`, :ref:`EncodedObjectAsID`, :ref:`ENetConnection`, :ref:`EngineProfiler`, :ref:`Expression`, :ref:`FileAccess`, :ref:`GLTFObjectModelProperty`, :ref:`HashingContext`, :ref:`HMACContext`, :ref:`HTTPClient`, :ref:`ImageFormatLoader`, :ref:`JavaClass`, :ref:`JavaObject`, :ref:`JavaScriptObject`, :ref:`KinematicCollision2D`, :ref:`KinematicCollision3D`, :ref:`Lightmapper`, :ref:`Logger`, :ref:`MeshConvexDecompositionSettings`, :ref:`MeshDataTool`, :ref:`MultiplayerAPI`, :ref:`Mutex`, :ref:`NavigationPathQueryParameters2D`, :ref:`NavigationPathQueryParameters3D`, :ref:`NavigationPathQueryResult2D`, :ref:`NavigationPathQueryResult3D`, :ref:`Node3DGizmo`, :ref:`OggPacketSequencePlayback`, :ref:`OpenXRAPIExtension`, :ref:`OpenXRFutureResult`, :ref:`PackedDataContainerRef`, :ref:`PacketPeer`, :ref:`PCKPacker`, :ref:`PhysicsPointQueryParameters2D`, :ref:`PhysicsPointQueryParameters3D`, :ref:`PhysicsRayQueryParameters2D`, :ref:`PhysicsRayQueryParameters3D`, :ref:`PhysicsShapeQueryParameters2D`, :ref:`PhysicsShapeQueryParameters3D`, :ref:`PhysicsTestMotionParameters2D`, :ref:`PhysicsTestMotionParameters3D`, :ref:`PhysicsTestMotionResult2D`, :ref:`PhysicsTestMotionResult3D`, :ref:`RandomNumberGenerator`, :ref:`RDAttachmentFormat`, :ref:`RDFramebufferPass`, :ref:`RDPipelineColorBlendState`, :ref:`RDPipelineColorBlendStateAttachment`, :ref:`RDPipelineDepthStencilState`, :ref:`RDPipelineMultisampleState`, :ref:`RDPipelineRasterizationState`, :ref:`RDPipelineSpecializationConstant`, :ref:`RDSamplerState`, :ref:`RDShaderSource`, :ref:`RDTextureFormat`, :ref:`RDTextureView`, :ref:`RDUniform`, :ref:`RDVertexAttribute`, :ref:`RegEx`, :ref:`RegExMatch`, :ref:`RenderSceneBuffers`, :ref:`RenderSceneBuffersConfiguration`, :ref:`Resource`, :ref:`ResourceFormatLoader`, :ref:`ResourceFormatSaver`, :ref:`ResourceImporter`, :ref:`SceneState`, :ref:`SceneTreeTimer`, :ref:`ScriptBacktrace`, :ref:`Semaphore`, :ref:`SkinReference`, :ref:`StreamPeer`, :ref:`SurfaceTool`, :ref:`TCPServer`, :ref:`TextLine`, :ref:`TextParagraph`, :ref:`TextServer`, :ref:`Thread`, :ref:`TLSOptions`, :ref:`TranslationDomain`, :ref:`TriangleMesh`, :ref:`Tween`, :ref:`Tweener`, :ref:`UDPServer`, :ref:`UPNP`, :ref:`UPNPDevice`, :ref:`WeakRef`, :ref:`WebRTCPeerConnection`, :ref:`XMLParser`, :ref:`XRInterface`, :ref:`XRPose`, :ref:`XRTracker`, :ref:`ZIPPacker`, :ref:`ZIPReader` Base class for reference-counted objects. diff --git a/classes/class_renderingserver.rst b/classes/class_renderingserver.rst index f185ff893ca..596e1148832 100644 --- a/classes/class_renderingserver.rst +++ b/classes/class_renderingserver.rst @@ -523,6 +523,8 @@ Methods +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`instance_set_visible`\ (\ instance\: :ref:`RID`, visible\: :ref:`bool`\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`instance_teleport`\ (\ instance\: :ref:`RID`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedInt64Array` | :ref:`instances_cull_aabb`\ (\ aabb\: :ref:`AABB`, scenario\: :ref:`RID` = RID()\ ) |const| | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedInt64Array` | :ref:`instances_cull_convex`\ (\ convex\: :ref:`Array`\[:ref:`Plane`\], scenario\: :ref:`RID` = RID()\ ) |const| | @@ -9030,6 +9032,18 @@ Sets whether an instance is drawn or not. Equivalent to :ref:`Node3D.visible`\ ) :ref:`🔗` + +Resets motion vectors and other interpolated values. Use this *after* teleporting a mesh from one position to another to avoid ghosting artifacts. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_instances_cull_aabb: .. rst-class:: classref-method diff --git a/classes/class_resourceimporter.rst b/classes/class_resourceimporter.rst index 0e46655f0b9..ce91508b152 100644 --- a/classes/class_resourceimporter.rst +++ b/classes/class_resourceimporter.rst @@ -12,7 +12,7 @@ ResourceImporter **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`EditorImportPlugin`, :ref:`ResourceImporterBitMap`, :ref:`ResourceImporterBMFont`, :ref:`ResourceImporterCSVTranslation`, :ref:`ResourceImporterDynamicFont`, :ref:`ResourceImporterImage`, :ref:`ResourceImporterImageFont`, :ref:`ResourceImporterLayeredTexture`, :ref:`ResourceImporterMP3`, :ref:`ResourceImporterOBJ`, :ref:`ResourceImporterOggVorbis`, :ref:`ResourceImporterScene`, :ref:`ResourceImporterShaderFile`, :ref:`ResourceImporterTexture`, :ref:`ResourceImporterTextureAtlas`, :ref:`ResourceImporterWAV` +**Inherited By:** :ref:`EditorImportPlugin`, :ref:`ResourceImporterBitMap`, :ref:`ResourceImporterBMFont`, :ref:`ResourceImporterCSVTranslation`, :ref:`ResourceImporterDynamicFont`, :ref:`ResourceImporterImage`, :ref:`ResourceImporterImageFont`, :ref:`ResourceImporterLayeredTexture`, :ref:`ResourceImporterMP3`, :ref:`ResourceImporterOBJ`, :ref:`ResourceImporterOggVorbis`, :ref:`ResourceImporterScene`, :ref:`ResourceImporterShaderFile`, :ref:`ResourceImporterSVG`, :ref:`ResourceImporterTexture`, :ref:`ResourceImporterTextureAtlas`, :ref:`ResourceImporterWAV` Base class for resource importers. diff --git a/classes/class_resourceimporterscene.rst b/classes/class_resourceimporterscene.rst index ed8394e8576..ca356d38279 100644 --- a/classes/class_resourceimporterscene.rst +++ b/classes/class_resourceimporterscene.rst @@ -77,6 +77,8 @@ Properties +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ | :ref:`String` | :ref:`nodes/root_type` | ``""`` | +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`nodes/use_name_suffixes` | ``true`` | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`nodes/use_node_type_suffixes` | ``true`` | +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`skins/use_named_skins` | ``true`` | @@ -311,13 +313,25 @@ Override for the root node type. If empty, the root node will use what the scene ---- +.. _class_ResourceImporterScene_property_nodes/use_name_suffixes: + +.. rst-class:: classref-property + +:ref:`bool` **nodes/use_name_suffixes** = ``true`` :ref:`🔗` + +If ``true``, will use suffixes in the names of imported objects such as nodes and resources to determine types and properties, such as ``-noimp`` to skip import of a node or animation, ``-alpha`` to enable alpha transparency on a material, and ``-vcol`` to enable vertex colors on a material. Disabling this makes editor-imported files more similar to the original files, and more similar to files imported at runtime. See :doc:`Node type customization using name suffixes <../tutorials/assets_pipeline/importing_3d_scenes/node_type_customization>` for more information. + +.. rst-class:: classref-item-separator + +---- + .. _class_ResourceImporterScene_property_nodes/use_node_type_suffixes: .. rst-class:: classref-property :ref:`bool` **nodes/use_node_type_suffixes** = ``true`` :ref:`🔗` -If ``true``, use suffixes in the node names to determine the node type, such as ``-col`` for collision shapes. Disabling this makes editor-imported files more similar to the original files, and more similar to importing files at runtime. See :doc:`Node type customization using name suffixes <../tutorials/assets_pipeline/importing_3d_scenes/node_type_customization>` for more information. +If ``true``, will use suffixes in the node names to determine the node type, such as ``-col`` for collision shapes. This is only used when :ref:`nodes/use_name_suffixes` is ``true``. Disabling this makes editor-imported files more similar to the original files, and more similar to files imported at runtime. See :doc:`Node type customization using name suffixes <../tutorials/assets_pipeline/importing_3d_scenes/node_type_customization>` for more information. .. rst-class:: classref-item-separator diff --git a/classes/class_resourceimportersvg.rst b/classes/class_resourceimportersvg.rst new file mode 100644 index 00000000000..a6e6a1a6678 --- /dev/null +++ b/classes/class_resourceimportersvg.rst @@ -0,0 +1,102 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/ResourceImporterSVG.xml. + +.. _class_ResourceImporterSVG: + +ResourceImporterSVG +=================== + +**Inherits:** :ref:`ResourceImporter` **<** :ref:`RefCounted` **<** :ref:`Object` + +Imports a SVG file as a scalable texture for use in 2D or 3D rendering. + +.. rst-class:: classref-introduction-group + +Description +----------- + +This importer imports :ref:`SVGTexture` resources. See also :ref:`ResourceImporterTexture` and :ref:`ResourceImporterImage`. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-------------------------------------+------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`base_scale` | ``1.0`` | + +-------------------------------------+------------------------------------------------------------------+----------+ + | :ref:`Dictionary` | :ref:`color_map` | ``{}`` | + +-------------------------------------+------------------------------------------------------------------+----------+ + | :ref:`bool` | :ref:`compress` | ``true`` | + +-------------------------------------+------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`saturation` | ``1.0`` | + +-------------------------------------+------------------------------------------------------------------+----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_ResourceImporterSVG_property_base_scale: + +.. rst-class:: classref-property + +:ref:`float` **base_scale** = ``1.0`` :ref:`🔗` + +SVG texture scale. ``1.0`` is the original SVG size. Higher values result in a larger image. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ResourceImporterSVG_property_color_map: + +.. rst-class:: classref-property + +:ref:`Dictionary` **color_map** = ``{}`` :ref:`🔗` + +If set, remaps SVG texture colors according to :ref:`Color`-:ref:`Color` map. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ResourceImporterSVG_property_compress: + +.. rst-class:: classref-property + +:ref:`bool` **compress** = ``true`` :ref:`🔗` + +If ``true``, uses lossless compression for the SVG source. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ResourceImporterSVG_property_saturation: + +.. rst-class:: classref-property + +:ref:`float` **saturation** = ``1.0`` :ref:`🔗` + +Overrides texture saturation. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_scriptbacktrace.rst b/classes/class_scriptbacktrace.rst new file mode 100644 index 00000000000..7a9bba50214 --- /dev/null +++ b/classes/class_scriptbacktrace.rst @@ -0,0 +1,272 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/ScriptBacktrace.xml. + +.. _class_ScriptBacktrace: + +ScriptBacktrace +=============== + +**Inherits:** :ref:`RefCounted` **<** :ref:`Object` + +A captured backtrace of a specific script language. + +.. rst-class:: classref-introduction-group + +Description +----------- + +**ScriptBacktrace** holds an already captured backtrace of a specific script language, such as GDScript or C#, which are captured using :ref:`Engine.capture_script_backtraces()`. + +See :ref:`ProjectSettings.debug/settings/gdscript/always_track_call_stacks` and :ref:`ProjectSettings.debug/settings/gdscript/always_track_local_variables` for ways of controlling the contents of this class. + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`format`\ (\ indent_all\: :ref:`int` = 0, indent_frames\: :ref:`int` = 4\ ) |const| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_frame_count`\ (\ ) |const| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_frame_file`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_frame_function`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_frame_line`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_global_variable_count`\ (\ ) |const| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_global_variable_name`\ (\ variable_index\: :ref:`int`\ ) |const| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_global_variable_value`\ (\ variable_index\: :ref:`int`\ ) |const| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_language_name`\ (\ ) |const| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_local_variable_count`\ (\ frame_index\: :ref:`int`\ ) |const| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_local_variable_name`\ (\ frame_index\: :ref:`int`, variable_index\: :ref:`int`\ ) |const| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_local_variable_value`\ (\ frame_index\: :ref:`int`, variable_index\: :ref:`int`\ ) |const| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_member_variable_count`\ (\ frame_index\: :ref:`int`\ ) |const| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_member_variable_name`\ (\ frame_index\: :ref:`int`, variable_index\: :ref:`int`\ ) |const| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_member_variable_value`\ (\ frame_index\: :ref:`int`, variable_index\: :ref:`int`\ ) |const| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_ScriptBacktrace_method_format: + +.. rst-class:: classref-method + +:ref:`String` **format**\ (\ indent_all\: :ref:`int` = 0, indent_frames\: :ref:`int` = 4\ ) |const| :ref:`🔗` + +Converts the backtrace to a :ref:`String`, where the entire string will be indented by ``indent_all`` number of spaces, and the individual stack frames will be additionally indented by ``indent_frames`` number of spaces. + +\ **Note:** Calling :ref:`Object.to_string()` on a **ScriptBacktrace** will produce the same output as calling :ref:`format()` with all parameters left at their default values. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScriptBacktrace_method_get_frame_count: + +.. rst-class:: classref-method + +:ref:`int` **get_frame_count**\ (\ ) |const| :ref:`🔗` + +Returns the number of stack frames in the backtrace. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScriptBacktrace_method_get_frame_file: + +.. rst-class:: classref-method + +:ref:`String` **get_frame_file**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the file name of the call site represented by the stack frame at the specified index. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScriptBacktrace_method_get_frame_function: + +.. rst-class:: classref-method + +:ref:`String` **get_frame_function**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the name of the function called at the stack frame at the specified index. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScriptBacktrace_method_get_frame_line: + +.. rst-class:: classref-method + +:ref:`int` **get_frame_line**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the line number of the call site represented by the stack frame at the specified index. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScriptBacktrace_method_get_global_variable_count: + +.. rst-class:: classref-method + +:ref:`int` **get_global_variable_count**\ (\ ) |const| :ref:`🔗` + +Returns the number of global variables (e.g. autoload singletons) in the backtrace. + +\ **Note:** This will be non-zero only if the ``include_variables`` parameter was ``true`` when capturing the backtrace with :ref:`Engine.capture_script_backtraces()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScriptBacktrace_method_get_global_variable_name: + +.. rst-class:: classref-method + +:ref:`String` **get_global_variable_name**\ (\ variable_index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the name of the global variable at the specified index. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScriptBacktrace_method_get_global_variable_value: + +.. rst-class:: classref-method + +:ref:`Variant` **get_global_variable_value**\ (\ variable_index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the value of the global variable at the specified index. + +\ **Warning:** With GDScript backtraces, the returned :ref:`Variant` will be the variable's actual value, including any object references. This means that storing the returned :ref:`Variant` will prevent any such object from being deallocated, so it's generally recommended not to do so. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScriptBacktrace_method_get_language_name: + +.. rst-class:: classref-method + +:ref:`String` **get_language_name**\ (\ ) |const| :ref:`🔗` + +Returns the name of the script language that this backtrace was captured from. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScriptBacktrace_method_get_local_variable_count: + +.. rst-class:: classref-method + +:ref:`int` **get_local_variable_count**\ (\ frame_index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the number of local variables in the stack frame at the specified index. + +\ **Note:** This will be non-zero only if the ``include_variables`` parameter was ``true`` when capturing the backtrace with :ref:`Engine.capture_script_backtraces()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScriptBacktrace_method_get_local_variable_name: + +.. rst-class:: classref-method + +:ref:`String` **get_local_variable_name**\ (\ frame_index\: :ref:`int`, variable_index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the name of the local variable at the specified ``variable_index`` in the stack frame at the specified ``frame_index``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScriptBacktrace_method_get_local_variable_value: + +.. rst-class:: classref-method + +:ref:`Variant` **get_local_variable_value**\ (\ frame_index\: :ref:`int`, variable_index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the value of the local variable at the specified ``variable_index`` in the stack frame at the specified ``frame_index``. + +\ **Warning:** With GDScript backtraces, the returned :ref:`Variant` will be the variable's actual value, including any object references. This means that storing the returned :ref:`Variant` will prevent any such object from being deallocated, so it's generally recommended not to do so. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScriptBacktrace_method_get_member_variable_count: + +.. rst-class:: classref-method + +:ref:`int` **get_member_variable_count**\ (\ frame_index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the number of member variables in the stack frame at the specified index. + +\ **Note:** This will be non-zero only if the ``include_variables`` parameter was ``true`` when capturing the backtrace with :ref:`Engine.capture_script_backtraces()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScriptBacktrace_method_get_member_variable_name: + +.. rst-class:: classref-method + +:ref:`String` **get_member_variable_name**\ (\ frame_index\: :ref:`int`, variable_index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the name of the member variable at the specified ``variable_index`` in the stack frame at the specified ``frame_index``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScriptBacktrace_method_get_member_variable_value: + +.. rst-class:: classref-method + +:ref:`Variant` **get_member_variable_value**\ (\ frame_index\: :ref:`int`, variable_index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the value of the member variable at the specified ``variable_index`` in the stack frame at the specified ``frame_index``. + +\ **Warning:** With GDScript backtraces, the returned :ref:`Variant` will be the variable's actual value, including any object references. This means that storing the returned :ref:`Variant` will prevent any such object from being deallocated, so it's generally recommended not to do so. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_svgtexture.rst b/classes/class_svgtexture.rst new file mode 100644 index 00000000000..004cb1aa978 --- /dev/null +++ b/classes/class_svgtexture.rst @@ -0,0 +1,176 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/SVGTexture.xml. + +.. _class_SVGTexture: + +SVGTexture +========== + +**Inherits:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +A scalable :ref:`Texture2D` based on an SVG image. + +.. rst-class:: classref-introduction-group + +Description +----------- + +A scalable :ref:`Texture2D` based on an SVG image. **SVGTexture**\ s are automatically re-rasterized to match font oversampling. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-------------------------------------+---------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`base_scale` | ``1.0`` | + +-------------------------------------+---------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`color_map` | ``{}`` | + +-------------------------------------+---------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`bool` | resource_local_to_scene | ``false`` (overrides :ref:`Resource`) | + +-------------------------------------+---------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`saturation` | ``1.0`` | + +-------------------------------------+---------------------------------------------------------+----------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SVGTexture` | :ref:`create_from_string`\ (\ source\: :ref:`String`, scale\: :ref:`float` = 1.0, saturation\: :ref:`float` = 1.0, color_map\: :ref:`Dictionary` = {}\ ) |static| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_source`\ (\ ) |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_size_override`\ (\ size\: :ref:`Vector2i`\ ) | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_source`\ (\ source\: :ref:`String`\ ) | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_SVGTexture_property_base_scale: + +.. rst-class:: classref-property + +:ref:`float` **base_scale** = ``1.0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_base_scale**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_base_scale**\ (\ ) + +SVG texture scale. ``1.0`` is the original SVG size. Higher values result in a larger image. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SVGTexture_property_color_map: + +.. rst-class:: classref-property + +:ref:`Dictionary` **color_map** = ``{}`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_color_map**\ (\ value\: :ref:`Dictionary`\ ) +- :ref:`Dictionary` **get_color_map**\ (\ ) + +If set, remaps SVG texture colors according to :ref:`Color`-:ref:`Color` map. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SVGTexture_property_saturation: + +.. rst-class:: classref-property + +:ref:`float` **saturation** = ``1.0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_saturation**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_saturation**\ (\ ) + +Overrides texture saturation. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_SVGTexture_method_create_from_string: + +.. rst-class:: classref-method + +:ref:`SVGTexture` **create_from_string**\ (\ source\: :ref:`String`, scale\: :ref:`float` = 1.0, saturation\: :ref:`float` = 1.0, color_map\: :ref:`Dictionary` = {}\ ) |static| :ref:`🔗` + +Creates a new **SVGTexture** and initializes it by allocating and setting the SVG data from string. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SVGTexture_method_get_source: + +.. rst-class:: classref-method + +:ref:`String` **get_source**\ (\ ) |const| :ref:`🔗` + +Returns SVG source code. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SVGTexture_method_set_size_override: + +.. rst-class:: classref-method + +|void| **set_size_override**\ (\ size\: :ref:`Vector2i`\ ) :ref:`🔗` + +Resizes the texture to the specified dimensions. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SVGTexture_method_set_source: + +.. rst-class:: classref-method + +|void| **set_source**\ (\ source\: :ref:`String`\ ) :ref:`🔗` + +Sets SVG source code. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_textedit.rst b/classes/class_textedit.rst index 42bf41688ea..540963ed57c 100644 --- a/classes/class_textedit.rst +++ b/classes/class_textedit.rst @@ -46,103 +46,105 @@ Properties .. table:: :widths: auto - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`AutowrapMode` | :ref:`autowrap_mode` | ``3`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`caret_blink` | ``false`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`caret_blink_interval` | ``0.65`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`caret_draw_when_editable_disabled` | ``false`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`caret_mid_grapheme` | ``false`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`caret_move_on_right_click` | ``true`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`caret_multiple` | ``true`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`CaretType` | :ref:`caret_type` | ``0`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | clip_contents | ``true`` (overrides :ref:`Control`) | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`context_menu_enabled` | ``true`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`custom_word_separators` | ``""`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`deselect_on_focus_loss_enabled` | ``true`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`drag_and_drop_selection_enabled` | ``true`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`draw_control_chars` | ``false`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`draw_spaces` | ``false`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`draw_tabs` | ``false`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`editable` | ``true`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`emoji_menu_enabled` | ``true`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`empty_selection_clipboard_enabled` | ``true`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`FocusMode` | focus_mode | ``2`` (overrides :ref:`Control`) | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`highlight_all_occurrences` | ``false`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`highlight_current_line` | ``false`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`indent_wrapped_lines` | ``false`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`language` | ``""`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`middle_mouse_paste_enabled` | ``true`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`minimap_draw` | ``false`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`minimap_width` | ``80`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`CursorShape` | mouse_default_cursor_shape | ``1`` (overrides :ref:`Control`) | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`placeholder_text` | ``""`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`scroll_fit_content_height` | ``false`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`scroll_fit_content_width` | ``false`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`scroll_horizontal` | ``0`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`scroll_past_end_of_file` | ``false`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`scroll_smooth` | ``false`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`scroll_v_scroll_speed` | ``80.0`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`scroll_vertical` | ``0.0`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`selecting_enabled` | ``true`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`shortcut_keys_enabled` | ``true`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`StructuredTextParser` | :ref:`structured_text_bidi_override` | ``0`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`structured_text_bidi_override_options` | ``[]`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`SyntaxHighlighter` | :ref:`syntax_highlighter` | | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`tab_input_mode` | ``true`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`text` | ``""`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`TextDirection` | :ref:`text_direction` | ``0`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`use_custom_word_separators` | ``false`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`use_default_word_separators` | ``true`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`virtual_keyboard_enabled` | ``true`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`LineWrappingMode` | :ref:`wrap_mode` | ``0`` | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`AutowrapMode` | :ref:`autowrap_mode` | ``3`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`backspace_deletes_composite_character_enabled` | ``false`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`caret_blink` | ``false`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`caret_blink_interval` | ``0.65`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`caret_draw_when_editable_disabled` | ``false`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`caret_mid_grapheme` | ``false`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`caret_move_on_right_click` | ``true`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`caret_multiple` | ``true`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`CaretType` | :ref:`caret_type` | ``0`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | clip_contents | ``true`` (overrides :ref:`Control`) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`context_menu_enabled` | ``true`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`custom_word_separators` | ``""`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`deselect_on_focus_loss_enabled` | ``true`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`drag_and_drop_selection_enabled` | ``true`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`draw_control_chars` | ``false`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`draw_spaces` | ``false`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`draw_tabs` | ``false`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editable` | ``true`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`emoji_menu_enabled` | ``true`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`empty_selection_clipboard_enabled` | ``true`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`FocusMode` | focus_mode | ``2`` (overrides :ref:`Control`) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`highlight_all_occurrences` | ``false`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`highlight_current_line` | ``false`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`indent_wrapped_lines` | ``false`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`language` | ``""`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`middle_mouse_paste_enabled` | ``true`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`minimap_draw` | ``false`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`minimap_width` | ``80`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`CursorShape` | mouse_default_cursor_shape | ``1`` (overrides :ref:`Control`) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`placeholder_text` | ``""`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`scroll_fit_content_height` | ``false`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`scroll_fit_content_width` | ``false`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`scroll_horizontal` | ``0`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`scroll_past_end_of_file` | ``false`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`scroll_smooth` | ``false`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`scroll_v_scroll_speed` | ``80.0`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`scroll_vertical` | ``0.0`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`selecting_enabled` | ``true`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`shortcut_keys_enabled` | ``true`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`StructuredTextParser` | :ref:`structured_text_bidi_override` | ``0`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`structured_text_bidi_override_options` | ``[]`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`SyntaxHighlighter` | :ref:`syntax_highlighter` | | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`tab_input_mode` | ``true`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`text` | ``""`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`TextDirection` | :ref:`text_direction` | ``0`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`use_custom_word_separators` | ``false`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`use_default_word_separators` | ``true`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`virtual_keyboard_enabled` | ``true`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`LineWrappingMode` | :ref:`wrap_mode` | ``0`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -281,12 +283,16 @@ Methods +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_minimap_visible_lines`\ (\ ) |const| | +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_next_composite_character_column`\ (\ line\: :ref:`int`, column\: :ref:`int`\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2i` | :ref:`get_next_visible_line_index_offset_from`\ (\ line\: :ref:`int`, wrap_index\: :ref:`int`, visible_amount\: :ref:`int`\ ) |const| | +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_next_visible_line_offset_from`\ (\ line\: :ref:`int`, visible_amount\: :ref:`int`\ ) |const| | +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2i` | :ref:`get_pos_at_line_column`\ (\ line\: :ref:`int`, column\: :ref:`int`\ ) |const| | +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_previous_composite_character_column`\ (\ line\: :ref:`int`, column\: :ref:`int`\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Rect2i` | :ref:`get_rect_at_line_column`\ (\ line\: :ref:`int`, column\: :ref:`int`\ ) |const| | +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_saved_version`\ (\ ) |const| | @@ -1126,6 +1132,23 @@ If :ref:`wrap_mode` is set to :ref:`LINE_WRAP ---- +.. _class_TextEdit_property_backspace_deletes_composite_character_enabled: + +.. rst-class:: classref-property + +:ref:`bool` **backspace_deletes_composite_character_enabled** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_backspace_deletes_composite_character_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_backspace_deletes_composite_character_enabled**\ (\ ) + +If ``true`` and :ref:`caret_mid_grapheme` is ``false``, backspace deletes an entire composite character such as ❤️‍🩹, instead of deleting part of the composite character. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextEdit_property_caret_blink: .. rst-class:: classref-property @@ -2735,6 +2758,20 @@ Returns the number of lines that may be drawn on the minimap. ---- +.. _class_TextEdit_method_get_next_composite_character_column: + +.. rst-class:: classref-method + +:ref:`int` **get_next_composite_character_column**\ (\ line\: :ref:`int`, column\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the correct column at the end of a composite character like ❤️‍🩹 (mending heart; Unicode: ``U+2764 U+FE0F U+200D U+1FA79``) which is comprised of more than one Unicode code point, if the caret is at the start of the composite character. Also returns the correct column with the caret at mid grapheme and for non-composite characters. + +\ **Note:** To check at caret location use ``get_next_composite_character_column(get_caret_line(), get_caret_column())`` + +.. rst-class:: classref-item-separator + +---- + .. _class_TextEdit_method_get_next_visible_line_index_offset_from: .. rst-class:: classref-method @@ -2773,6 +2810,20 @@ Returns the local position for the given ``line`` and ``column``. If ``x`` or `` ---- +.. _class_TextEdit_method_get_previous_composite_character_column: + +.. rst-class:: classref-method + +:ref:`int` **get_previous_composite_character_column**\ (\ line\: :ref:`int`, column\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the correct column at the start of a composite character like ❤️‍🩹 (mending heart; Unicode: ``U+2764 U+FE0F U+200D U+1FA79``) which is comprised of more than one Unicode code point, if the caret is at the end of the composite character. Also returns the correct column with the caret at mid grapheme and for non-composite characters. + +\ **Note:** To check at caret location use ``get_previous_composite_character_column(get_caret_line(), get_caret_column())`` + +.. rst-class:: classref-item-separator + +---- + .. _class_TextEdit_method_get_rect_at_line_column: .. rst-class:: classref-method diff --git a/classes/class_texture2d.rst b/classes/class_texture2d.rst index b8934785424..27692c2927d 100644 --- a/classes/class_texture2d.rst +++ b/classes/class_texture2d.rst @@ -12,7 +12,7 @@ Texture2D **Inherits:** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`AnimatedTexture`, :ref:`AtlasTexture`, :ref:`CameraTexture`, :ref:`CanvasTexture`, :ref:`CompressedTexture2D`, :ref:`CurveTexture`, :ref:`CurveXYZTexture`, :ref:`ExternalTexture`, :ref:`GradientTexture1D`, :ref:`GradientTexture2D`, :ref:`ImageTexture`, :ref:`MeshTexture`, :ref:`NoiseTexture2D`, :ref:`PlaceholderTexture2D`, :ref:`PortableCompressedTexture2D`, :ref:`Texture2DRD`, :ref:`ViewportTexture` +**Inherited By:** :ref:`AnimatedTexture`, :ref:`AtlasTexture`, :ref:`CameraTexture`, :ref:`CanvasTexture`, :ref:`CompressedTexture2D`, :ref:`CurveTexture`, :ref:`CurveXYZTexture`, :ref:`ExternalTexture`, :ref:`GradientTexture1D`, :ref:`GradientTexture2D`, :ref:`ImageTexture`, :ref:`MeshTexture`, :ref:`NoiseTexture2D`, :ref:`PlaceholderTexture2D`, :ref:`PortableCompressedTexture2D`, :ref:`SVGTexture`, :ref:`Texture2DRD`, :ref:`ViewportTexture` Texture for 2D and 3D. diff --git a/classes/class_vector2.rst b/classes/class_vector2.rst index d6e6aa447cc..1ed167fcc3f 100644 --- a/classes/class_vector2.rst +++ b/classes/class_vector2.rst @@ -669,7 +669,7 @@ Returns a new vector with all components rounded down (towards negative infinity :ref:`Vector2` **from_angle**\ (\ angle\: :ref:`float`\ ) |static| :ref:`🔗` -Creates a unit **Vector2** rotated to the given ``angle`` in radians. This is equivalent to doing ``Vector2(cos(angle), sin(angle))`` or ``Vector2.RIGHT.rotated(angle)``. +Creates a **Vector2** rotated to the given ``angle`` in radians. This is equivalent to doing ``Vector2(cos(angle), sin(angle))`` or ``Vector2.RIGHT.rotated(angle)``. :: @@ -677,6 +677,8 @@ Creates a unit **Vector2** rotated to the given ``angle`` in radians. This is eq print(Vector2(1, 0).angle()) # Prints 0.0, which is the angle used above. print(Vector2.from_angle(PI / 2)) # Prints (0.0, 1.0) +\ **Note:** The length of the returned **Vector2** is *approximately* ``1.0``, but is is not guaranteed to be exactly ``1.0`` due to floating-point precision issues. Call :ref:`normalized()` on the returned **Vector2** if you require a unit vector. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_viewport.rst b/classes/class_viewport.rst index b50fe759e10..910709fc7f4 100644 --- a/classes/class_viewport.rst +++ b/classes/class_viewport.rst @@ -1552,7 +1552,7 @@ See also :ref:`ProjectSettings.rendering/anti_aliasing/quality/msaa_3d`\ ) - :ref:`bool` **is_using_oversampling**\ (\ ) -If ``true`` and one of the following conditions is true: :ref:`SubViewport.size_2d_override_stretch` and :ref:`SubViewport.size_2d_override` are set, :ref:`Window.content_scale_factor` is set and scaling is enabled, :ref:`oversampling_override` is set, font oversampling is enabled. +If ``true`` and one of the following conditions is true: :ref:`SubViewport.size_2d_override_stretch` and :ref:`SubViewport.size_2d_override` are set, :ref:`Window.content_scale_factor` is set and scaling is enabled, :ref:`oversampling_override` is set, font and :ref:`SVGTexture` oversampling is enabled. .. rst-class:: classref-item-separator diff --git a/classes/index.rst b/classes/index.rst index 76dae223123..f039439d6bb 100644 --- a/classes/index.rst +++ b/classes/index.rst @@ -567,6 +567,7 @@ Resources class_styleboxflat class_styleboxline class_styleboxtexture + class_svgtexture class_syntaxhighlighter class_systemfont class_textmesh @@ -819,6 +820,7 @@ Other objects class_kinematiccollision3d class_lightmapper class_lightmapperrd + class_logger class_mainloop class_marshalls class_meshconvexdecompositionsettings @@ -932,6 +934,7 @@ Other objects class_resourceimporteroggvorbis class_resourceimporterscene class_resourceimportershaderfile + class_resourceimportersvg class_resourceimportertexture class_resourceimportertextureatlas class_resourceimporterwav @@ -942,6 +945,7 @@ Other objects class_scenestate class_scenetree class_scenetreetimer + class_scriptbacktrace class_scriptlanguage class_scriptlanguageextension class_semaphore