diff --git a/classes/class_@gdscript.rst b/classes/class_@gdscript.rst index 4d2e7c13b..485fd466c 100644 --- a/classes/class_@gdscript.rst +++ b/classes/class_@gdscript.rst @@ -19,6 +19,11 @@ A list of GDScript-specific utility functions accessed in any script. For the list of the global functions and constants see :ref:`@GlobalScope`. +Tutorials +--------- + +- :doc:`GDScript exports <../tutorials/scripting/gdscript/gdscript_exports>` + Methods ------- @@ -31,11 +36,11 @@ Methods +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`convert` **(** :ref:`Variant` what, :ref:`int` type **)** | +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`dict2inst` **(** :ref:`Dictionary` dictionary **)** | +| :ref:`Object` | :ref:`dict_to_inst` **(** :ref:`Dictionary` dictionary **)** | +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`get_stack` **(** **)** | +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`inst2dict` **(** :ref:`Object` instance **)** | +| :ref:`Dictionary` | :ref:`inst_to_dict` **(** :ref:`Object` instance **)** | +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`len` **(** :ref:`Variant` var **)** | +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -80,165 +85,425 @@ Constants Annotations ----------- -.. _class_@GDScript_annotation_export: +.. _class_@GDScript_annotation_@export: -- :ref:`bool` **@export** **(** **)** +- **@export** **(** **)** + +Mark the following property as exported (editable in the Inspector dock and saved to disk). To control the type of the exported property use the type hint notation. + +:: + + @export var int_number = 5 + @export var float_number: float = 5 ---- -.. _class_@GDScript_annotation_export_category: +.. _class_@GDScript_annotation_@export_category: -- :ref:`bool` **@export_category** **(** :ref:`String` name **)** +- **@export_category** **(** :ref:`String` name **)** + +Define a new category for the following exported properties. This helps to organize properties in the Inspector dock. + +See also :ref:`@GlobalScope.PROPERTY_USAGE_CATEGORY`. + +:: + + @export_category("My Properties") + @export var number = 3 + @export var string = "" + +\ **Note:** Categories in the property list are supposed to indicate different base types, so the use of this annotation is not encouraged. See :ref:`@export_group` and :ref:`@export_subgroup` instead. ---- -.. _class_@GDScript_annotation_export_color_no_alpha: +.. _class_@GDScript_annotation_@export_color_no_alpha: -- :ref:`bool` **@export_color_no_alpha** **(** **)** +- **@export_color_no_alpha** **(** **)** + +Export a :ref:`Color` property without an alpha (fixed as ``1.0``). + +See also :ref:`@GlobalScope.PROPERTY_HINT_COLOR_NO_ALPHA`. + +:: + + @export_color_no_alpha var modulate_color: Color ---- -.. _class_@GDScript_annotation_export_dir: +.. _class_@GDScript_annotation_@export_dir: -- :ref:`bool` **@export_dir** **(** **)** +- **@export_dir** **(** **)** + +Export a :ref:`String` property as a path to a directory. The path will be limited to the project folder and its subfolders. See :ref:`@export_global_dir` to allow picking from the entire filesystem. + +See also :ref:`@GlobalScope.PROPERTY_HINT_DIR`. + +:: + + @export_dir var sprite_folder: String ---- -.. _class_@GDScript_annotation_export_enum: +.. _class_@GDScript_annotation_@export_enum: -- :ref:`bool` **@export_enum** **(** :ref:`String` names, ... **)** |vararg| +- **@export_enum** **(** :ref:`String` names, ... **)** |vararg| + +Export a :ref:`String` or integer property as an enumerated list of options. If the property is an integer field, then the index of the value is stored, in the same order the values are provided. You can add specific identifiers for allowed values using a colon. + +See also :ref:`@GlobalScope.PROPERTY_HINT_ENUM`. + +:: + + @export_enum("Rebecca", "Mary", "Leah") var character_name: String + @export_enum("Warrior", "Magician", "Thief") var character_class: int + @export_enum("Walking:30", "Running:60", "Riding:200") var character_speed: int ---- -.. _class_@GDScript_annotation_export_exp_easing: +.. _class_@GDScript_annotation_@export_exp_easing: -- :ref:`bool` **@export_exp_easing** **(** :ref:`String` hints="", ... **)** |vararg| +- **@export_exp_easing** **(** :ref:`String` hints="", ... **)** |vararg| + +Export a floating-point property with an easing editor widget. Additional hints can be provided to adjust the behavior of the widget. ``"attenuation"`` flips the curve, which makes it more intuitive for editing attenuation properties. ``"positive_only"`` limits values to only be greater than or equal to zero. + +See also :ref:`@GlobalScope.PROPERTY_HINT_EXP_EASING`. + +:: + + @export_exp_easing var transition_speed + @export_exp_easing("attenuation") var fading_attenuation + @export_exp_easing("positive_only") var effect_power ---- -.. _class_@GDScript_annotation_export_file: +.. _class_@GDScript_annotation_@export_file: -- :ref:`bool` **@export_file** **(** :ref:`String` filter="", ... **)** |vararg| +- **@export_file** **(** :ref:`String` filter="", ... **)** |vararg| + +Export a :ref:`String` property as a path to a file. The path will be limited to the project folder and its subfolders. See :ref:`@export_global_file` to allow picking from the entire filesystem. + +If ``filter`` is provided, only matching files will be available for picking. + +See also :ref:`@GlobalScope.PROPERTY_HINT_FILE`. + +:: + + @export_file var sound_effect_file: String + @export_file("*.txt") var notes_file: String ---- -.. _class_@GDScript_annotation_export_flags: +.. _class_@GDScript_annotation_@export_flags: -- :ref:`bool` **@export_flags** **(** :ref:`String` names, ... **)** |vararg| +- **@export_flags** **(** :ref:`String` names, ... **)** |vararg| + +Export an integer property as a bit flag field. This allows to store several "checked" or ``true`` values with one property, and comfortably select them from the Inspector dock. + +See also :ref:`@GlobalScope.PROPERTY_HINT_FLAGS`. + +:: + + @export_flags("Fire", "Water", "Earth", "Wind") var spell_elements = 0 ---- -.. _class_@GDScript_annotation_export_flags_2d_navigation: +.. _class_@GDScript_annotation_@export_flags_2d_navigation: -- :ref:`bool` **@export_flags_2d_navigation** **(** **)** +- **@export_flags_2d_navigation** **(** **)** + +Export an integer property as a bit flag field for 2D navigation layers. The widget in the Inspector dock will use the layer names defined in :ref:`ProjectSettings.layer_names/2d_navigation/layer_1`. + +See also :ref:`@GlobalScope.PROPERTY_HINT_LAYERS_2D_NAVIGATION`. + +:: + + @export_flags_2d_navigation var navigation_layers: int ---- -.. _class_@GDScript_annotation_export_flags_2d_physics: +.. _class_@GDScript_annotation_@export_flags_2d_physics: -- :ref:`bool` **@export_flags_2d_physics** **(** **)** +- **@export_flags_2d_physics** **(** **)** + +Export an integer property as a bit flag field for 2D physics layers. The widget in the Inspector dock will use the layer names defined in :ref:`ProjectSettings.layer_names/2d_physics/layer_1`. + +See also :ref:`@GlobalScope.PROPERTY_HINT_LAYERS_2D_PHYSICS`. + +:: + + @export_flags_2d_physics var physics_layers: int ---- -.. _class_@GDScript_annotation_export_flags_2d_render: +.. _class_@GDScript_annotation_@export_flags_2d_render: -- :ref:`bool` **@export_flags_2d_render** **(** **)** +- **@export_flags_2d_render** **(** **)** + +Export an integer property as a bit flag field for 2D render layers. The widget in the Inspector dock will use the layer names defined in :ref:`ProjectSettings.layer_names/2d_render/layer_1`. + +See also :ref:`@GlobalScope.PROPERTY_HINT_LAYERS_2D_RENDER`. + +:: + + @export_flags_2d_render var render_layers: int ---- -.. _class_@GDScript_annotation_export_flags_3d_navigation: +.. _class_@GDScript_annotation_@export_flags_3d_navigation: -- :ref:`bool` **@export_flags_3d_navigation** **(** **)** +- **@export_flags_3d_navigation** **(** **)** + +Export an integer property as a bit flag field for 3D navigation layers. The widget in the Inspector dock will use the layer names defined in :ref:`ProjectSettings.layer_names/3d_navigation/layer_1`. + +See also :ref:`@GlobalScope.PROPERTY_HINT_LAYERS_3D_NAVIGATION`. + +:: + + @export_flags_3d_navigation var navigation_layers: int ---- -.. _class_@GDScript_annotation_export_flags_3d_physics: +.. _class_@GDScript_annotation_@export_flags_3d_physics: -- :ref:`bool` **@export_flags_3d_physics** **(** **)** +- **@export_flags_3d_physics** **(** **)** + +Export an integer property as a bit flag field for 3D physics layers. The widget in the Inspector dock will use the layer names defined in :ref:`ProjectSettings.layer_names/3d_physics/layer_1`. + +See also :ref:`@GlobalScope.PROPERTY_HINT_LAYERS_3D_PHYSICS`. + +:: + + @export_flags_3d_physics var physics_layers: int ---- -.. _class_@GDScript_annotation_export_flags_3d_render: +.. _class_@GDScript_annotation_@export_flags_3d_render: -- :ref:`bool` **@export_flags_3d_render** **(** **)** +- **@export_flags_3d_render** **(** **)** + +Export an integer property as a bit flag field for 3D render layers. The widget in the Inspector dock will use the layer names defined in :ref:`ProjectSettings.layer_names/3d_render/layer_1`. + +See also :ref:`@GlobalScope.PROPERTY_HINT_LAYERS_3D_RENDER`. + +:: + + @export_flags_3d_render var render_layers: int ---- -.. _class_@GDScript_annotation_export_global_dir: +.. _class_@GDScript_annotation_@export_global_dir: -- :ref:`bool` **@export_global_dir** **(** **)** +- **@export_global_dir** **(** **)** + +Export a :ref:`String` property as a path to a directory. The path can be picked from the entire filesystem. See :ref:`@export_dir` to limit it to the project folder and its subfolders. + +See also :ref:`@GlobalScope.PROPERTY_HINT_GLOBAL_DIR`. + +:: + + @export_global_dir var sprite_folder: String ---- -.. _class_@GDScript_annotation_export_global_file: +.. _class_@GDScript_annotation_@export_global_file: -- :ref:`bool` **@export_global_file** **(** :ref:`String` filter="", ... **)** |vararg| +- **@export_global_file** **(** :ref:`String` filter="", ... **)** |vararg| + +Export a :ref:`String` property as a path to a file. The path can be picked from the entire filesystem. See :ref:`@export_file` to limit it to the project folder and its subfolders. + +If ``filter`` is provided, only matching files will be available for picking. + +See also :ref:`@GlobalScope.PROPERTY_HINT_GLOBAL_FILE`. + +:: + + @export_global_file var sound_effect_file: String + @export_global_file("*.txt") var notes_file: String ---- -.. _class_@GDScript_annotation_export_group: +.. _class_@GDScript_annotation_@export_group: -- :ref:`bool` **@export_group** **(** :ref:`String` name, :ref:`String` prefix="" **)** +- **@export_group** **(** :ref:`String` name, :ref:`String` prefix="" **)** + +Define a new group for the following exported properties. This helps to organize properties in the Inspector dock. Groups can be added with an optional ``prefix``, which would make group to only consider properties that have this prefix. The grouping will break on the first property that doesn't have a prefix. The prefix is also removed from the property's name in the Inspector dock. + +If no ``prefix`` is provided, the every following property is added to the group. The group ends when then next group or category is defined. You can also force end a group by using this annotation with empty strings for paramters, ``@export_group("", "")``. + +Groups cannot be nested, use :ref:`@export_subgroup` to add subgroups to your groups. + +See also :ref:`@GlobalScope.PROPERTY_USAGE_GROUP`. + +:: + + @export_group("My Properties") + @export var number = 3 + @export var string = "" + + @export_group("Prefixed Properties", "prefix_") + @export var prefix_number = 3 + @export var prefix_string = "" + + @export_group("", "") + @export var ungrouped_number = 3 ---- -.. _class_@GDScript_annotation_export_multiline: +.. _class_@GDScript_annotation_@export_multiline: -- :ref:`bool` **@export_multiline** **(** **)** +- **@export_multiline** **(** **)** + +Export a :ref:`String` property with a large :ref:`TextEdit` widget instead of a :ref:`LineEdit`. This adds support for multiline content and makes it easier to edit large amount of text stored in the property. + +See also :ref:`@GlobalScope.PROPERTY_HINT_MULTILINE_TEXT`. + +:: + + @export_multiline var character_bio ---- -.. _class_@GDScript_annotation_export_node_path: +.. _class_@GDScript_annotation_@export_node_path: -- :ref:`bool` **@export_node_path** **(** :ref:`String` type="", ... **)** |vararg| +- **@export_node_path** **(** :ref:`String` type="", ... **)** |vararg| + +Export a :ref:`NodePath` property with a filter for allowed node types. + +See also :ref:`@GlobalScope.PROPERTY_HINT_NODE_PATH_VALID_TYPES`. + +:: + + @export_node_path(Button, TouchScreenButton) var some_button ---- -.. _class_@GDScript_annotation_export_placeholder: +.. _class_@GDScript_annotation_@export_placeholder: -- :ref:`bool` **@export_placeholder** **(** **)** +- **@export_placeholder** **(** :ref:`String` placeholder **)** + +Export a :ref:`String` property with a placeholder text displayed in the editor widget when no value is present. + +See also :ref:`@GlobalScope.PROPERTY_HINT_PLACEHOLDER_TEXT`. + +:: + + @export_placeholder("Name in lowercase") var character_id: String ---- -.. _class_@GDScript_annotation_export_range: +.. _class_@GDScript_annotation_@export_range: -- :ref:`bool` **@export_range** **(** :ref:`float` min, :ref:`float` max, :ref:`float` step=1.0, :ref:`String` extra_hints="", ... **)** |vararg| +- **@export_range** **(** :ref:`float` min, :ref:`float` max, :ref:`float` step=1.0, :ref:`String` extra_hints="", ... **)** |vararg| + +Export a numeric property as a range value. The range must be defined by ``min`` and ``max``, as well as an optional ``step`` and a variety of extra hints. The ``step`` defaults to ``1`` for integer properties. For floating-point numbers this value depends on your ``EditorSettings.interface/inspector/default_float_step`` setting. + +If hints ``"or_greater"`` and ``"or_lesser"`` are provided, the editor widget will not cap the value at range boundaries. The ``"exp"`` hint will make the edited values on range to change exponentially. The ``"no_slider"`` hint will hide the slider element of the editor widget. + +Hints also allow to indicate the units for the edited value. Using ``"radians"`` you can specify that the actual value is in radians, but should be displayed in degrees in the Inspector dock. ``"degrees"`` allows to add a degree sign as a unit suffix. Finally, a custom suffix can be provided using ``"suffix:unit"``, where "unit" can be any string. + +See also :ref:`@GlobalScope.PROPERTY_HINT_RANGE`. + +:: + + @export_range(0, 20) var number + @export_range(-10, 20) var number + @export_range(-10, 20, 0.2) var number: float + + @export_range(0, 100, 1, "or_greater") var power_percent + @export_range(0, 100, 1, "or_greater", "or_lesser") var health_delta + + @export_range(-3.14, 3.14, 0.001, "radians") var angle_radians + @export_range(0, 360, 1, "degrees") var angle_degrees + @export_range(-8, 8, 2, "suffix:px") var target_offset ---- -.. _class_@GDScript_annotation_export_subgroup: +.. _class_@GDScript_annotation_@export_subgroup: -- :ref:`bool` **@export_subgroup** **(** :ref:`String` name, :ref:`String` prefix="" **)** +- **@export_subgroup** **(** :ref:`String` name, :ref:`String` prefix="" **)** + +Define a new subgroup for the following exported properties. This helps to organize properties in the Inspector dock. Subgroups work exactly like groups, except they need a parent group to exist. See :ref:`@export_group`. + +See also :ref:`@GlobalScope.PROPERTY_USAGE_SUBGROUP`. + +:: + + @export_group("My Properties") + @export var number = 3 + @export var string = "" + + @export_subgroup("My Prefixed Properties", "prefix_") + @export var prefix_number = 3 + @export var prefix_string = "" + +\ **Note:** Subgroups cannot be nested, they only provide one extra level of depth. Just like the next group ends the previous group, so do the subsequent subgroups. ---- -.. _class_@GDScript_annotation_icon: +.. _class_@GDScript_annotation_@icon: -- :ref:`bool` **@icon** **(** :ref:`String` icon_path **)** +- **@icon** **(** :ref:`String` icon_path **)** + +Add a custom icon to the current script. The icon is displayed in the Scene dock for every node that the script is attached to. For named classes the icon is also displayed in various editor dialogs. + +:: + + @icon("res://path/to/class/icon.svg") + +\ **Note:** Only the script can have a custom icon. Inner classes are not supported yet. ---- -.. _class_@GDScript_annotation_onready: +.. _class_@GDScript_annotation_@onready: -- :ref:`bool` **@onready** **(** **)** +- **@onready** **(** **)** + +Mark the following property as assigned on :ref:`Node`'s ready state change. Values for these properties are no assigned immediately upon the node's creation, and instead are computed and stored right before :ref:`Node._ready`. + +:: + + @onready var character_name: Label = $Label ---- -.. _class_@GDScript_annotation_rpc: +.. _class_@GDScript_annotation_@rpc: -- :ref:`bool` **@rpc** **(** :ref:`String` mode="", :ref:`String` sync="", :ref:`String` transfer_mode="", :ref:`int` transfer_channel=0, ... **)** |vararg| +- **@rpc** **(** :ref:`String` mode="", :ref:`String` sync="", :ref:`String` transfer_mode="", :ref:`int` transfer_channel=0, ... **)** |vararg| + +Mark the following method for remote procedure calls. See :doc:`High-level multiplayer <../tutorials/networking/high_level_multiplayer>`. + +:: + + @rpc() ---- -.. _class_@GDScript_annotation_tool: +.. _class_@GDScript_annotation_@tool: -- :ref:`bool` **@tool** **(** **)** +- **@tool** **(** **)** + +Mark the current script as a tool script, allowing it to be loaded and executed by the editor. See :doc:`Running code in the editor <../tutorials/plugins/running_code_in_the_editor>`. + +:: + + @tool + extends Node ---- -.. _class_@GDScript_annotation_warning_ignore: +.. _class_@GDScript_annotation_@warning_ignore: -- :ref:`bool` **@warning_ignore** **(** :ref:`String` warning, ... **)** |vararg| +- **@warning_ignore** **(** :ref:`String` warning, ... **)** |vararg| + +Mark the following statement to ignore the specified warning. See :doc:`GDScript warning system <../tutorials/scripting/gdscript/warning_system>`. + +:: + + func test(): + print("hello") + return + @warning_ignore("unreachable_code") + print("unreachable") Method Descriptions ------------------- @@ -315,11 +580,11 @@ Converts from a type to another in the best way possible. The ``type`` parameter ---- -.. _class_@GDScript_method_dict2inst: +.. _class_@GDScript_method_dict_to_inst: -- :ref:`Object` **dict2inst** **(** :ref:`Dictionary` dictionary **)** +- :ref:`Object` **dict_to_inst** **(** :ref:`Dictionary` dictionary **)** -Converts a dictionary (previously created with :ref:`inst2dict`) back to an instance. Useful for deserializing. +Converts a ``dictionary`` (previously created with :ref:`inst_to_dict`) back to an Object instance. Useful for deserializing. ---- @@ -350,17 +615,17 @@ would print ---- -.. _class_@GDScript_method_inst2dict: +.. _class_@GDScript_method_inst_to_dict: -- :ref:`Dictionary` **inst2dict** **(** :ref:`Object` instance **)** +- :ref:`Dictionary` **inst_to_dict** **(** :ref:`Object` instance **)** -Returns the passed instance converted to a dictionary (useful for serializing). +Returns the passed ``instance`` converted to a Dictionary (useful for serializing). :: var foo = "bar" func _ready(): - var d = inst2dict(self) + var d = inst_to_dict(self) print(d.keys()) print(d.values()) @@ -534,6 +799,13 @@ Converts one or more arguments to string in the best way possible. - :ref:`bool` **type_exists** **(** :ref:`StringName` type **)** +Returns whether the given :ref:`Object`-derived class exists in :ref:`ClassDB`. Note that :ref:`Variant` data types are not registered in :ref:`ClassDB`. + +:: + + type_exists("Sprite2D") # Returns true + type_exists("NonExistentClass") # Returns false + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_@globalscope.rst b/classes/class_@globalscope.rst index 147eb3862..7359964c3 100644 --- a/classes/class_@globalscope.rst +++ b/classes/class_@globalscope.rst @@ -88,12 +88,12 @@ Properties +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`TextServerManager` | :ref:`TextServerManager` | +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ +| :ref:`ThemeDB` | :ref:`ThemeDB` | ++---------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`Time` | :ref:`Time` | +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`TranslationServer` | :ref:`TranslationServer` | +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`VisualScriptCustomNodes` | :ref:`VisualScriptCustomNodes` | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`WorkerThreadPool` | :ref:`WorkerThreadPool` | +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`XRServer` | :ref:`XRServer` | @@ -102,191 +102,211 @@ Properties Methods ------- -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`abs` **(** :ref:`Variant` x **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`absf` **(** :ref:`float` x **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`absi` **(** :ref:`int` x **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`acos` **(** :ref:`float` x **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`asin` **(** :ref:`float` x **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`atan` **(** :ref:`float` x **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`atan2` **(** :ref:`float` y, :ref:`float` x **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`bezier_interpolate` **(** :ref:`float` start, :ref:`float` control_1, :ref:`float` control_2, :ref:`float` end, :ref:`float` t **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`bytes2var` **(** :ref:`PackedByteArray` bytes **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`bytes2var_with_objects` **(** :ref:`PackedByteArray` bytes **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`ceil` **(** :ref:`float` x **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`clamp` **(** :ref:`Variant` value, :ref:`Variant` min, :ref:`Variant` max **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`clampf` **(** :ref:`float` value, :ref:`float` min, :ref:`float` max **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`clampi` **(** :ref:`int` value, :ref:`int` min, :ref:`int` max **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`cos` **(** :ref:`float` angle_rad **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`cosh` **(** :ref:`float` x **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`cubic_interpolate` **(** :ref:`float` from, :ref:`float` to, :ref:`float` pre, :ref:`float` post, :ref:`float` weight **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`db2linear` **(** :ref:`float` db **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`deg2rad` **(** :ref:`float` deg **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`ease` **(** :ref:`float` x, :ref:`float` curve **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`error_string` **(** :ref:`int` error **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`exp` **(** :ref:`float` x **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`floor` **(** :ref:`float` x **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`fmod` **(** :ref:`float` x, :ref:`float` y **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`fposmod` **(** :ref:`float` x, :ref:`float` y **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`hash` **(** :ref:`Variant` variable **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`instance_from_id` **(** :ref:`int` instance_id **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`inverse_lerp` **(** :ref:`float` from, :ref:`float` to, :ref:`float` weight **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`float` a, :ref:`float` b **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_inf` **(** :ref:`float` x **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_instance_id_valid` **(** :ref:`int` id **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_instance_valid` **(** :ref:`Variant` instance **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_nan` **(** :ref:`float` x **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_zero_approx` **(** :ref:`float` x **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`lerp` **(** :ref:`float` from, :ref:`float` to, :ref:`float` weight **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`lerp_angle` **(** :ref:`float` from, :ref:`float` to, :ref:`float` weight **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`linear2db` **(** :ref:`float` lin **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`log` **(** :ref:`float` x **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`max` **(** ... **)** |vararg| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`maxf` **(** :ref:`float` a, :ref:`float` b **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`maxi` **(** :ref:`int` a, :ref:`int` b **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`min` **(** ... **)** |vararg| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`minf` **(** :ref:`float` a, :ref:`float` b **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`mini` **(** :ref:`int` a, :ref:`int` b **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`move_toward` **(** :ref:`float` from, :ref:`float` to, :ref:`float` delta **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`nearest_po2` **(** :ref:`int` value **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`pingpong` **(** :ref:`float` value, :ref:`float` length **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`posmod` **(** :ref:`int` x, :ref:`int` y **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`pow` **(** :ref:`float` base, :ref:`float` exp **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`print` **(** ... **)** |vararg| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`print_rich` **(** ... **)** |vararg| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`print_verbose` **(** ... **)** |vararg| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`printerr` **(** ... **)** |vararg| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`printraw` **(** ... **)** |vararg| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`prints` **(** ... **)** |vararg| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`printt` **(** ... **)** |vararg| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`push_error` **(** ... **)** |vararg| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`push_warning` **(** ... **)** |vararg| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`rad2deg` **(** :ref:`float` rad **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt64Array` | :ref:`rand_from_seed` **(** :ref:`int` seed **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`randf` **(** **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`randf_range` **(** :ref:`float` from, :ref:`float` to **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`randfn` **(** :ref:`float` mean, :ref:`float` deviation **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`randi` **(** **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`randi_range` **(** :ref:`int` from, :ref:`int` to **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`randomize` **(** **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`range_lerp` **(** :ref:`float` value, :ref:`float` istart, :ref:`float` istop, :ref:`float` ostart, :ref:`float` ostop **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rid_allocate_id` **(** **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`rid_from_int64` **(** :ref:`int` base **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`round` **(** :ref:`float` x **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`seed` **(** :ref:`int` base **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`sign` **(** :ref:`Variant` x **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`signf` **(** :ref:`float` x **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`signi` **(** :ref:`int` x **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`sin` **(** :ref:`float` angle_rad **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`sinh` **(** :ref:`float` x **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`smoothstep` **(** :ref:`float` from, :ref:`float` to, :ref:`float` x **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`snapped` **(** :ref:`float` x, :ref:`float` step **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`sqrt` **(** :ref:`float` x **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`step_decimals` **(** :ref:`float` x **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`str` **(** ... **)** |vararg| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`str2var` **(** :ref:`String` string **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`tan` **(** :ref:`float` angle_rad **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`tanh` **(** :ref:`float` x **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`typeof` **(** :ref:`Variant` variable **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`var2bytes` **(** :ref:`Variant` variable **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`var2bytes_with_objects` **(** :ref:`Variant` variable **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`var2str` **(** :ref:`Variant` variable **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`weakref` **(** :ref:`Variant` obj **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`wrap` **(** :ref:`Variant` value, :ref:`Variant` min, :ref:`Variant` max **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`wrapf` **(** :ref:`float` value, :ref:`float` min, :ref:`float` max **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`wrapi` **(** :ref:`int` value, :ref:`int` min, :ref:`int` max **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`abs` **(** :ref:`Variant` x **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`absf` **(** :ref:`float` x **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`absi` **(** :ref:`int` x **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`acos` **(** :ref:`float` x **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`asin` **(** :ref:`float` x **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`atan` **(** :ref:`float` x **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`atan2` **(** :ref:`float` y, :ref:`float` x **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`bezier_interpolate` **(** :ref:`float` start, :ref:`float` control_1, :ref:`float` control_2, :ref:`float` end, :ref:`float` t **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`bytes_to_var` **(** :ref:`PackedByteArray` bytes **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`bytes_to_var_with_objects` **(** :ref:`PackedByteArray` bytes **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`ceil` **(** :ref:`Variant` x **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`ceilf` **(** :ref:`float` x **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`ceili` **(** :ref:`float` x **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`clamp` **(** :ref:`Variant` value, :ref:`Variant` min, :ref:`Variant` max **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`clampf` **(** :ref:`float` value, :ref:`float` min, :ref:`float` max **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`clampi` **(** :ref:`int` value, :ref:`int` min, :ref:`int` max **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`cos` **(** :ref:`float` angle_rad **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`cosh` **(** :ref:`float` x **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`cubic_interpolate` **(** :ref:`float` from, :ref:`float` to, :ref:`float` pre, :ref:`float` post, :ref:`float` weight **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`cubic_interpolate_angle` **(** :ref:`float` from, :ref:`float` to, :ref:`float` pre, :ref:`float` post, :ref:`float` weight **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`cubic_interpolate_angle_in_time` **(** :ref:`float` from, :ref:`float` to, :ref:`float` pre, :ref:`float` post, :ref:`float` weight, :ref:`float` to_t, :ref:`float` pre_t, :ref:`float` post_t **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`cubic_interpolate_in_time` **(** :ref:`float` from, :ref:`float` to, :ref:`float` pre, :ref:`float` post, :ref:`float` weight, :ref:`float` to_t, :ref:`float` pre_t, :ref:`float` post_t **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`db_to_linear` **(** :ref:`float` db **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`deg_to_rad` **(** :ref:`float` deg **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`ease` **(** :ref:`float` x, :ref:`float` curve **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`error_string` **(** :ref:`int` error **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`exp` **(** :ref:`float` x **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`floor` **(** :ref:`Variant` x **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`floorf` **(** :ref:`float` x **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`floori` **(** :ref:`float` x **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`fmod` **(** :ref:`float` x, :ref:`float` y **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`fposmod` **(** :ref:`float` x, :ref:`float` y **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`hash` **(** :ref:`Variant` variable **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`instance_from_id` **(** :ref:`int` instance_id **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`inverse_lerp` **(** :ref:`float` from, :ref:`float` to, :ref:`float` weight **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`float` a, :ref:`float` b **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_inf` **(** :ref:`float` x **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_instance_id_valid` **(** :ref:`int` id **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_instance_valid` **(** :ref:`Variant` instance **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_nan` **(** :ref:`float` x **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_zero_approx` **(** :ref:`float` x **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`lerp` **(** :ref:`Variant` from, :ref:`Variant` to, :ref:`Variant` weight **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`lerp_angle` **(** :ref:`float` from, :ref:`float` to, :ref:`float` weight **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`lerpf` **(** :ref:`float` from, :ref:`float` to, :ref:`float` weight **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`linear_to_db` **(** :ref:`float` lin **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`log` **(** :ref:`float` x **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`max` **(** ... **)** |vararg| | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`maxf` **(** :ref:`float` a, :ref:`float` b **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`maxi` **(** :ref:`int` a, :ref:`int` b **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`min` **(** ... **)** |vararg| | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`minf` **(** :ref:`float` a, :ref:`float` b **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`mini` **(** :ref:`int` a, :ref:`int` b **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`move_toward` **(** :ref:`float` from, :ref:`float` to, :ref:`float` delta **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`nearest_po2` **(** :ref:`int` value **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`pingpong` **(** :ref:`float` value, :ref:`float` length **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`posmod` **(** :ref:`int` x, :ref:`int` y **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`pow` **(** :ref:`float` base, :ref:`float` exp **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`print` **(** ... **)** |vararg| | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`print_rich` **(** ... **)** |vararg| | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`print_verbose` **(** ... **)** |vararg| | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`printerr` **(** ... **)** |vararg| | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`printraw` **(** ... **)** |vararg| | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`prints` **(** ... **)** |vararg| | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`printt` **(** ... **)** |vararg| | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`push_error` **(** ... **)** |vararg| | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`push_warning` **(** ... **)** |vararg| | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`rad_to_deg` **(** :ref:`float` rad **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedInt64Array` | :ref:`rand_from_seed` **(** :ref:`int` seed **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`randf` **(** **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`randf_range` **(** :ref:`float` from, :ref:`float` to **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`randfn` **(** :ref:`float` mean, :ref:`float` deviation **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`randi` **(** **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`randi_range` **(** :ref:`int` from, :ref:`int` to **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`randomize` **(** **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`range_lerp` **(** :ref:`float` value, :ref:`float` istart, :ref:`float` istop, :ref:`float` ostart, :ref:`float` ostop **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`rid_allocate_id` **(** **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`rid_from_int64` **(** :ref:`int` base **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`round` **(** :ref:`Variant` x **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`roundf` **(** :ref:`float` x **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`roundi` **(** :ref:`float` x **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`seed` **(** :ref:`int` base **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`sign` **(** :ref:`Variant` x **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`signf` **(** :ref:`float` x **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`signi` **(** :ref:`int` x **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`sin` **(** :ref:`float` angle_rad **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`sinh` **(** :ref:`float` x **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`smoothstep` **(** :ref:`float` from, :ref:`float` to, :ref:`float` x **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`snapped` **(** :ref:`float` x, :ref:`float` step **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`sqrt` **(** :ref:`float` x **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`step_decimals` **(** :ref:`float` x **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`str` **(** ... **)** |vararg| | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`str_to_var` **(** :ref:`String` string **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`tan` **(** :ref:`float` angle_rad **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`tanh` **(** :ref:`float` x **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`typeof` **(** :ref:`Variant` variable **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedByteArray` | :ref:`var_to_bytes` **(** :ref:`Variant` variable **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedByteArray` | :ref:`var_to_bytes_with_objects` **(** :ref:`Variant` variable **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`var_to_str` **(** :ref:`Variant` variable **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`weakref` **(** :ref:`Variant` obj **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`wrap` **(** :ref:`Variant` value, :ref:`Variant` min, :ref:`Variant` max **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`wrapf` **(** :ref:`float` value, :ref:`float` min, :ref:`float` max **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`wrapi` **(** :ref:`int` value, :ref:`int` min, :ref:`int` max **)** | ++-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Enumerations ------------ @@ -2164,6 +2184,10 @@ Since :ref:`OK` has value 0, and all other failu .. _class_@GlobalScope_constant_PROPERTY_HINT_NODE_TYPE: +.. _class_@GlobalScope_constant_PROPERTY_HINT_HIDE_QUATERNION_EDIT: + +.. _class_@GlobalScope_constant_PROPERTY_HINT_PASSWORD: + .. _class_@GlobalScope_constant_PROPERTY_HINT_MAX: enum **PropertyHint**: @@ -2172,7 +2196,7 @@ enum **PropertyHint**: - **PROPERTY_HINT_RANGE** = **1** --- Hints that an integer or float property should be within a range specified via the hint string ``"min,max"`` or ``"min,max,step"``. The hint string can optionally include ``"or_greater"`` and/or ``"or_lesser"`` to allow manual input going respectively above the max or below the min values. Example: ``"-360,360,1,or_greater,or_lesser"``. -Additionally, other keywords can be included: "exp" for exponential range editing, "radians" for editing radian angles in degrees, "degrees" to hint at an angle and "no_slider" to hide the slider. +Additionally, other keywords can be included: ``"exp"`` for exponential range editing, ``"radians"`` for editing radian angles in degrees, ``"degrees"`` to hint at an angle and ``"no_slider"`` to hide the slider. - **PROPERTY_HINT_ENUM** = **2** --- Hints that an integer, float or string property is an enumerated value to pick in a list specified via a hint string. @@ -2182,7 +2206,7 @@ The hint string is a comma separated list of names such as ``"Hello,Something,El Unlike :ref:`PROPERTY_HINT_ENUM` a property with this hint still accepts arbitrary values and can be empty. The list of values serves to suggest possible values. -- **PROPERTY_HINT_EXP_EASING** = **4** --- Hints that a float property should be edited via an exponential easing function. The hint string can include ``"attenuation"`` to flip the curve horizontally and/or ``"inout"`` to also include in/out easing. +- **PROPERTY_HINT_EXP_EASING** = **4** --- Hints that a float property should be edited via an exponential easing function. The hint string can include ``"attenuation"`` to flip the curve horizontally and/or ``"positive_only"`` to exclude in/out easing and limit values to be greater than or equal to zero. - **PROPERTY_HINT_LINK** = **5** --- Hints that a vector property should allow linking values (e.g. to edit both ``x`` and ``y`` together). @@ -2273,7 +2297,11 @@ Unlike :ref:`PROPERTY_HINT_ENUM` - **PROPERTY_HINT_NODE_TYPE** = **44** -- **PROPERTY_HINT_MAX** = **45** +- **PROPERTY_HINT_HIDE_QUATERNION_EDIT** = **45** --- Hints that a quaternion property should disable the temporary euler editor. + +- **PROPERTY_HINT_PASSWORD** = **46** --- Hints that a string property is a password, and every character is replaced with the secret character. + +- **PROPERTY_HINT_MAX** = **47** ---- @@ -2449,42 +2477,6 @@ enum **MethodFlags**: ---- -.. _enum_@GlobalScope_RPCMode: - -.. _class_@GlobalScope_constant_RPC_MODE_DISABLED: - -.. _class_@GlobalScope_constant_RPC_MODE_ANY_PEER: - -.. _class_@GlobalScope_constant_RPC_MODE_AUTHORITY: - -enum **RPCMode**: - -- **RPC_MODE_DISABLED** = **0** --- Used with :ref:`Node.rpc_config` to disable a method or property for all RPC calls, making it unavailable. Default for all methods. - -- **RPC_MODE_ANY_PEER** = **1** --- Used with :ref:`Node.rpc_config` to set a method to be callable remotely by any peer. Analogous to the ``@rpc(any)`` annotation. Calls are accepted from all remote peers, no matter if they are node's authority or not. - -- **RPC_MODE_AUTHORITY** = **2** --- Used with :ref:`Node.rpc_config` to set a method to be callable remotely only by the current multiplayer authority (which is the server by default). Analogous to the ``@rpc(authority)`` annotation. See :ref:`Node.set_multiplayer_authority`. - ----- - -.. _enum_@GlobalScope_TransferMode: - -.. _class_@GlobalScope_constant_TRANSFER_MODE_UNRELIABLE: - -.. _class_@GlobalScope_constant_TRANSFER_MODE_UNRELIABLE_ORDERED: - -.. _class_@GlobalScope_constant_TRANSFER_MODE_RELIABLE: - -enum **TransferMode**: - -- **TRANSFER_MODE_UNRELIABLE** = **0** --- Packets are not acknowledged, no resend attempts are made for lost packets. Packets may arrive in any order. Potentially faster than :ref:`TRANSFER_MODE_UNRELIABLE_ORDERED`. Use for non-critical data, and always consider whether the order matters. - -- **TRANSFER_MODE_UNRELIABLE_ORDERED** = **1** --- Packets are not acknowledged, no resend attempts are made for lost packets. Packets are received in the order they were sent in. Potentially faster than :ref:`TRANSFER_MODE_RELIABLE`. Use for non-critical data or data that would be outdated if received late due to resend attempt(s) anyway, for example movement and positional data. - -- **TRANSFER_MODE_RELIABLE** = **2** --- Packets must be received and resend attempts should be made until the packets are acknowledged. Packets must be received in the order they were sent in. Most reliable transfer mode, but potentially the slowest due to the overhead. Use for critical data that must be transmitted and arrive in order, for example an ability being triggered or a chat message. Consider carefully if the information really is critical, and use sparingly. - ----- - .. _enum_@GlobalScope_Variant.Type: .. _class_@GlobalScope_constant_TYPE_NIL: @@ -2870,7 +2862,7 @@ The :ref:`JavaClassWrapper` singleton. The :ref:`JavaScript` singleton. -\ **Note:** Only implemented on HTML5. +\ **Note:** Only implemented on the Web platform. ---- @@ -2980,6 +2972,8 @@ The :ref:`ResourceSaver` singleton. - :ref:`ResourceUID` **ResourceUID** +The :ref:`ResourceUID` singleton. + ---- .. _class_@GlobalScope_property_TextServerManager: @@ -2990,6 +2984,14 @@ The :ref:`TextServerManager` singleton. ---- +.. _class_@GlobalScope_property_ThemeDB: + +- :ref:`ThemeDB` **ThemeDB** + +The :ref:`ThemeDB` singleton. + +---- + .. _class_@GlobalScope_property_Time: - :ref:`Time` **Time** @@ -3006,18 +3008,12 @@ The :ref:`TranslationServer` singleton. ---- -.. _class_@GlobalScope_property_VisualScriptCustomNodes: - -- :ref:`VisualScriptCustomNodes` **VisualScriptCustomNodes** - -The :ref:`VisualScriptCustomNodes` singleton. - ----- - .. _class_@GlobalScope_property_WorkerThreadPool: - :ref:`WorkerThreadPool` **WorkerThreadPool** +The :ref:`WorkerThreadPool` singleton. + ---- .. _class_@GlobalScope_property_XRServer: @@ -3091,7 +3087,7 @@ Returns the arc cosine of ``x`` in radians. Use to get the angle of cosine ``x`` :: - # c is 0.523599 or 30 degrees if converted with rad2deg(c) + # c is 0.523599 or 30 degrees if converted with rad_to_deg(c) var c = acos(0.866025) ---- @@ -3104,7 +3100,7 @@ Returns the arc sine of ``x`` in radians. Use to get the angle of sine ``x``. `` :: - # s is 0.523599 or 30 degrees if converted with rad2deg(s) + # s is 0.523599 or 30 degrees if converted with rad_to_deg(s) var s = asin(0.5) ---- @@ -3147,19 +3143,19 @@ Returns the point at the given ``t`` on a one-dimnesional `Bezier curve ` **bytes2var** **(** :ref:`PackedByteArray` bytes **)** +- :ref:`Variant` **bytes_to_var** **(** :ref:`PackedByteArray` bytes **)** Decodes a byte array back to a :ref:`Variant` value, without decoding objects. -\ **Note:** If you need object deserialization, see :ref:`bytes2var_with_objects`. +\ **Note:** If you need object deserialization, see :ref:`bytes_to_var_with_objects`. ---- -.. _class_@GlobalScope_method_bytes2var_with_objects: +.. _class_@GlobalScope_method_bytes_to_var_with_objects: -- :ref:`Variant` **bytes2var_with_objects** **(** :ref:`PackedByteArray` bytes **)** +- :ref:`Variant` **bytes_to_var_with_objects** **(** :ref:`PackedByteArray` bytes **)** Decodes a byte array back to a :ref:`Variant` value. Decoding objects is allowed. @@ -3169,9 +3165,9 @@ Decodes a byte array back to a :ref:`Variant` value. Decoding obj .. _class_@GlobalScope_method_ceil: -- :ref:`float` **ceil** **(** :ref:`float` x **)** +- :ref:`Variant` **ceil** **(** :ref:`Variant` x **)** -Rounds ``x`` upward (towards positive infinity), returning the smallest whole number that is not less than ``x``. +Rounds ``x`` upward (towards positive infinity), returning the smallest whole number that is not less than ``x``. Supported types: :ref:`int`, :ref:`float`, :ref:`Vector2`, :ref:`Vector3`, :ref:`Vector4`. :: @@ -3180,6 +3176,28 @@ Rounds ``x`` upward (towards positive infinity), returning the smallest whole nu See also :ref:`floor`, :ref:`round`, and :ref:`snapped`. +\ **Note:** For better type safety, you can use :ref:`ceilf`, :ref:`ceili`, :ref:`Vector2.ceil`, :ref:`Vector3.ceil` or :ref:`Vector4.ceil` instead. + +---- + +.. _class_@GlobalScope_method_ceilf: + +- :ref:`float` **ceilf** **(** :ref:`float` x **)** + +Rounds ``x`` upward (towards positive infinity), returning the smallest whole number that is not less than ``x``. + +A type-safe version of :ref:`ceil`, specialzied in floats. + +---- + +.. _class_@GlobalScope_method_ceili: + +- :ref:`int` **ceili** **(** :ref:`float` x **)** + +Rounds ``x`` upward (towards positive infinity), returning the smallest whole number that is not less than ``x``. + +A type-safe version of :ref:`ceil` that returns integer. + ---- .. _class_@GlobalScope_method_clamp: @@ -3254,9 +3272,9 @@ Returns the cosine of angle ``angle_rad`` in radians. :: - cos(PI * 2) # Returns 1.0 - cos(PI) # Returns -1.0 - cos(deg2rad(90)) # Returns 0.0 + cos(PI * 2) # Returns 1.0 + cos(PI) # Returns -1.0 + cos(deg_to_rad(90)) # Returns 0.0 ---- @@ -3281,24 +3299,52 @@ Cubic interpolates between two values by the factor defined in ``weight`` with p ---- -.. _class_@GlobalScope_method_db2linear: +.. _class_@GlobalScope_method_cubic_interpolate_angle: -- :ref:`float` **db2linear** **(** :ref:`float` db **)** +- :ref:`float` **cubic_interpolate_angle** **(** :ref:`float` from, :ref:`float` to, :ref:`float` pre, :ref:`float` post, :ref:`float` weight **)** + +Cubic interpolates between two rotation values with shortest path by the factor defined in ``weight`` with pre and post values. See also :ref:`lerp_angle`. + +---- + +.. _class_@GlobalScope_method_cubic_interpolate_angle_in_time: + +- :ref:`float` **cubic_interpolate_angle_in_time** **(** :ref:`float` from, :ref:`float` to, :ref:`float` pre, :ref:`float` post, :ref:`float` weight, :ref:`float` to_t, :ref:`float` pre_t, :ref:`float` post_t **)** + +Cubic interpolates between two rotation values with shortest path by the factor defined in ``weight`` with pre and post values. See also :ref:`lerp_angle`. + +It can perform smoother interpolation than ``cubic_interpolate()`` by the time values. + +---- + +.. _class_@GlobalScope_method_cubic_interpolate_in_time: + +- :ref:`float` **cubic_interpolate_in_time** **(** :ref:`float` from, :ref:`float` to, :ref:`float` pre, :ref:`float` post, :ref:`float` weight, :ref:`float` to_t, :ref:`float` pre_t, :ref:`float` post_t **)** + +Cubic interpolates between two values by the factor defined in ``weight`` with pre and post values. + +It can perform smoother interpolation than ``cubic_interpolate()`` by the time values. + +---- + +.. _class_@GlobalScope_method_db_to_linear: + +- :ref:`float` **db_to_linear** **(** :ref:`float` db **)** Converts from decibels to linear energy (audio). ---- -.. _class_@GlobalScope_method_deg2rad: +.. _class_@GlobalScope_method_deg_to_rad: -- :ref:`float` **deg2rad** **(** :ref:`float` deg **)** +- :ref:`float` **deg_to_rad** **(** :ref:`float` deg **)** Converts an angle expressed in degrees to radians. :: # r is 3.141593 - var r = deg2rad(180) + var r = deg_to_rad(180) ---- @@ -3350,9 +3396,9 @@ For exponents to other bases use the method :ref:`pow` **floor** **(** :ref:`float` x **)** +- :ref:`Variant` **floor** **(** :ref:`Variant` x **)** -Rounds ``x`` downward (towards negative infinity), returning the largest whole number that is not more than ``x``. +Rounds ``x`` downward (towards negative infinity), returning the largest whole number that is not more than ``x``. Supported types: :ref:`int`, :ref:`float`, :ref:`Vector2`, :ref:`Vector3`, :ref:`Vector4`. :: @@ -3363,7 +3409,27 @@ Rounds ``x`` downward (towards negative infinity), returning the largest whole n See also :ref:`ceil`, :ref:`round`, and :ref:`snapped`. -\ **Note:** This method returns a float. If you need an integer, you can use ``int(x)`` directly. +\ **Note:** For better type safety, you can use :ref:`floorf`, :ref:`floori`, :ref:`Vector2.floor`, :ref:`Vector3.floor` or :ref:`Vector4.floor` instead. + +---- + +.. _class_@GlobalScope_method_floorf: + +- :ref:`float` **floorf** **(** :ref:`float` x **)** + +Rounds ``x`` downward (towards negative infinity), returning the largest whole number that is not more than ``x``. + +A type-safe version of :ref:`floor`, specialzied in floats. + +---- + +.. _class_@GlobalScope_method_floori: + +- :ref:`int` **floori** **(** :ref:`float` x **)** + +Rounds ``x`` downward (towards negative infinity), returning the largest whole number that is not more than ``x``. + +Equivalent of doing ``int(x)``. ---- @@ -3440,7 +3506,7 @@ Returns the Object that corresponds to ``instance_id``. All Objects have a uniqu - :ref:`float` **inverse_lerp** **(** :ref:`float` from, :ref:`float` to, :ref:`float` weight **)** -Returns an interpolation or extrapolation factor considering the range specified in ``from`` and ``to``, and the interpolated value specified in ``weight``. The returned value will be between ``0.0`` and ``1.0`` if ``weight`` is between ``from`` and ``to`` (inclusive). If ``weight`` is located outside this range, then an extrapolation factor will be returned (return value lower than ``0.0`` or greater than ``1.0``). +Returns an interpolation or extrapolation factor considering the range specified in ``from`` and ``to``, and the interpolated value specified in ``weight``. The returned value will be between ``0.0`` and ``1.0`` if ``weight`` is between ``from`` and ``to`` (inclusive). If ``weight`` is located outside this range, then an extrapolation factor will be returned (return value lower than ``0.0`` or greater than ``1.0``). Use :ref:`clamp` on the result of :ref:`inverse_lerp` if this is not desired. :: @@ -3451,7 +3517,7 @@ Returns an interpolation or extrapolation factor considering the range specified var ratio = inverse_lerp(20, 30, 27.5) # `ratio` is now 0.75. -See also :ref:`lerp` which performs the reverse of this operation. +See also :ref:`lerp` which performs the reverse of this operation, and :ref:`range_lerp` to map a continuous series of values to another. ---- @@ -3479,7 +3545,7 @@ Returns whether ``x`` is an infinity value (either positive infinity or negative - :ref:`bool` **is_instance_id_valid** **(** :ref:`int` id **)** -Returns ``true`` if the Object that corresponds to ``instance_id`` is a valid object (e.g. has not been deleted from memory). All Objects have a unique instance ID. +Returns ``true`` if the Object that corresponds to ``id`` is a valid object (e.g. has not been deleted from memory). All Objects have a unique instance ID. ---- @@ -3511,15 +3577,19 @@ This method is faster than using :ref:`is_equal_approx` **lerp** **(** :ref:`float` from, :ref:`float` to, :ref:`float` weight **)** +- :ref:`Variant` **lerp** **(** :ref:`Variant` from, :ref:`Variant` to, :ref:`Variant` weight **)** -Linearly interpolates between two values by the factor defined in ``weight``. To perform interpolation, ``weight`` should be between ``0.0`` and ``1.0`` (inclusive). However, values outside this range are allowed and can be used to perform *extrapolation*. +Linearly interpolates between two values by the factor defined in ``weight``. To perform interpolation, ``weight`` should be between ``0.0`` and ``1.0`` (inclusive). However, values outside this range are allowed and can be used to perform *extrapolation*. Use :ref:`clamp` on the result of :ref:`lerp` if this is not desired. + +Both ``from`` and ``to`` must have matching types. Supported types: :ref:`float`, :ref:`Vector2`, :ref:`Vector3`, :ref:`Vector4`, :ref:`Color`, :ref:`Quaternion`, :ref:`Basis`. :: lerp(0, 4, 0.75) # Returns 3.0 -See also :ref:`inverse_lerp` which performs the reverse of this operation. To perform eased interpolation with :ref:`lerp`, combine it with :ref:`ease` or :ref:`smoothstep`. +See also :ref:`inverse_lerp` which performs the reverse of this operation. To perform eased interpolation with :ref:`lerp`, combine it with :ref:`ease` or :ref:`smoothstep`. See also :ref:`range_lerp` to map a continuous series of values to another. + +\ **Note:** For better type safety, you can use :ref:`lerpf`, :ref:`Vector2.lerp`, :ref:`Vector3.lerp`, :ref:`Vector4.lerp`, :ref:`Color.lerp`, :ref:`Quaternion.slerp` or :ref:`Basis.slerp` instead. ---- @@ -3536,8 +3606,8 @@ Similar to :ref:`lerp`, but interpolates correct extends Sprite var elapsed = 0.0 func _process(delta): - var min_angle = deg2rad(0.0) - var max_angle = deg2rad(90.0) + var min_angle = deg_to_rad(0.0) + var max_angle = deg_to_rad(90.0) rotation = lerp_angle(min_angle, max_angle, elapsed) elapsed += delta @@ -3545,9 +3615,23 @@ Similar to :ref:`lerp`, but interpolates correct ---- -.. _class_@GlobalScope_method_linear2db: +.. _class_@GlobalScope_method_lerpf: -- :ref:`float` **linear2db** **(** :ref:`float` lin **)** +- :ref:`float` **lerpf** **(** :ref:`float` from, :ref:`float` to, :ref:`float` weight **)** + +Linearly interpolates between two values by the factor defined in ``weight``. To perform interpolation, ``weight`` should be between ``0.0`` and ``1.0`` (inclusive). However, values outside this range are allowed and can be used to perform *extrapolation*. + +:: + + lerp(0, 4, 0.75) # Returns 3.0 + +See also :ref:`inverse_lerp` which performs the reverse of this operation. To perform eased interpolation with :ref:`lerp`, combine it with :ref:`ease` or :ref:`smoothstep`. + +---- + +.. _class_@GlobalScope_method_linear_to_db: + +- :ref:`float` **linear_to_db** **(** :ref:`float` lin **)** Converts from linear energy to decibels (audio). This can be used to implement volume sliders that behave as expected (since volume isn't linear). Example: @@ -3556,7 +3640,7 @@ Converts from linear energy to decibels (audio). This can be used to implement v # "Slider" refers to a node that inherits Range such as HSlider or VSlider. # Its range must be configured to go from 0 to 1. # Change the bus name if you'd like to change the volume of a specific bus only. - AudioServer.set_bus_volume_db(AudioServer.get_bus_index("Master"), linear2db($Slider.value)) + AudioServer.set_bus_volume_db(AudioServer.get_bus_index("Master"), linear_to_db($Slider.value)) ---- @@ -3772,7 +3856,7 @@ When printing to standard output, the supported subset of BBCode is converted to :: - print_rich("[code][b]Hello world![/b]``") # Prints out: **Hello world!**\ + print_rich("[code][b]Hello world![/b][/code]") # Prints out: [b]Hello world![/b] \ **Note:** Consider using :ref:`push_error` and :ref:`push_warning` to print error and warning messages instead of :ref:`print` or :ref:`print_rich`. This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed. @@ -3864,15 +3948,15 @@ Pushes a warning message to Godot's built-in debugger and to the OS terminal. ---- -.. _class_@GlobalScope_method_rad2deg: +.. _class_@GlobalScope_method_rad_to_deg: -- :ref:`float` **rad2deg** **(** :ref:`float` rad **)** +- :ref:`float` **rad_to_deg** **(** :ref:`float` rad **)** Converts an angle expressed in radians to degrees. :: - rad2deg(0.523599) # Returns 30 + rad_to_deg(0.523599) # Returns 30 ---- @@ -3958,12 +4042,14 @@ Randomizes the seed (or the internal state) of the random number generator. Curr - :ref:`float` **range_lerp** **(** :ref:`float` value, :ref:`float` istart, :ref:`float` istop, :ref:`float` ostart, :ref:`float` ostop **)** -Maps a ``value`` from range ``[istart, istop]`` to ``[ostart, ostop]``. +Maps a ``value`` from range ``[istart, istop]`` to ``[ostart, ostop]``. See also :ref:`lerp` and :ref:`inverse_lerp`. If ``value`` is outside ``[istart, istop]``, then the resulting value will also be outside ``[ostart, ostop]``. Use :ref:`clamp` on the result of :ref:`range_lerp` if this is not desired. :: range_lerp(75, 0, 100, -1, 1) # Returns 0.5 +For complex use cases where you need multiple ranges, consider using :ref:`Curve` or :ref:`Gradient` instead. + ---- .. _class_@GlobalScope_method_rid_allocate_id: @@ -3984,16 +4070,40 @@ Create a RID from an int64. This is used mainly from native extensions to build .. _class_@GlobalScope_method_round: -- :ref:`float` **round** **(** :ref:`float` x **)** +- :ref:`Variant` **round** **(** :ref:`Variant` x **)** -Rounds ``x`` to the nearest whole number, with halfway cases rounded away from zero. +Rounds ``x`` to the nearest whole number, with halfway cases rounded away from zero. Supported types: :ref:`int`, :ref:`float`, :ref:`Vector2`, :ref:`Vector3`, :ref:`Vector4`. :: + round(2.4) # Returns 2 + round(2.5) # Returns 3 round(2.6) # Returns 3 See also :ref:`floor`, :ref:`ceil`, and :ref:`snapped`. +\ **Note:** For better type safety, you can use :ref:`roundf`, :ref:`roundi`, :ref:`Vector2.round`, :ref:`Vector3.round` or :ref:`Vector4.round` instead. + +---- + +.. _class_@GlobalScope_method_roundf: + +- :ref:`float` **roundf** **(** :ref:`float` x **)** + +Rounds ``x`` to the nearest whole number, with halfway cases rounded away from zero. + +A type-safe version of :ref:`round`, specialzied in floats. + +---- + +.. _class_@GlobalScope_method_roundi: + +- :ref:`int` **roundi** **(** :ref:`float` x **)** + +Rounds ``x`` to the nearest whole number, with halfway cases rounded away from zero. + +A type-safe version of :ref:`round` that returns integer. + ---- .. _class_@GlobalScope_method_seed: @@ -4061,8 +4171,8 @@ Returns the sine of angle ``angle_rad`` in radians. :: - sin(0.523599) # Returns 0.5 - sin(deg2rad(90)) # Returns 1.0 + sin(0.523599) # Returns 0.5 + sin(deg_to_rad(90)) # Returns 1.0 ---- @@ -4156,16 +4266,16 @@ Converts one or more arguments of any type to string in the best way possible. ---- -.. _class_@GlobalScope_method_str2var: +.. _class_@GlobalScope_method_str_to_var: -- :ref:`Variant` **str2var** **(** :ref:`String` string **)** +- :ref:`Variant` **str_to_var** **(** :ref:`String` string **)** -Converts a formatted string that was returned by :ref:`var2str` to the original value. +Converts a formatted ``string`` that was returned by :ref:`var_to_str` to the original value. :: var a = '{ "a": 1, "b": 2 }' - var b = str2var(a) + var b = str_to_var(a) print(b["a"]) # Prints 1 ---- @@ -4178,7 +4288,7 @@ Returns the tangent of angle ``angle_rad`` in radians. :: - tan(deg2rad(45)) # Returns 1 + tan(deg_to_rad(45)) # Returns 1 ---- @@ -4213,34 +4323,34 @@ Returns the internal type of the given Variant object, using the :ref:`Variant.T ---- -.. _class_@GlobalScope_method_var2bytes: +.. _class_@GlobalScope_method_var_to_bytes: -- :ref:`PackedByteArray` **var2bytes** **(** :ref:`Variant` variable **)** +- :ref:`PackedByteArray` **var_to_bytes** **(** :ref:`Variant` variable **)** -Encodes a :ref:`Variant` value to a byte array, without encoding objects. Deserialization can be done with :ref:`bytes2var`. +Encodes a :ref:`Variant` value to a byte array, without encoding objects. Deserialization can be done with :ref:`bytes_to_var`. -\ **Note:** If you need object serialization, see :ref:`var2bytes_with_objects`. +\ **Note:** If you need object serialization, see :ref:`var_to_bytes_with_objects`. ---- -.. _class_@GlobalScope_method_var2bytes_with_objects: +.. _class_@GlobalScope_method_var_to_bytes_with_objects: -- :ref:`PackedByteArray` **var2bytes_with_objects** **(** :ref:`Variant` variable **)** +- :ref:`PackedByteArray` **var_to_bytes_with_objects** **(** :ref:`Variant` variable **)** -Encodes a :ref:`Variant` value to a byte array. Encoding objects is allowed (and can potentially include code). Deserialization can be done with :ref:`bytes2var_with_objects`. +Encodes a :ref:`Variant` value to a byte array. Encoding objects is allowed (and can potentially include code). Deserialization can be done with :ref:`bytes_to_var_with_objects`. ---- -.. _class_@GlobalScope_method_var2str: +.. _class_@GlobalScope_method_var_to_str: -- :ref:`String` **var2str** **(** :ref:`Variant` variable **)** +- :ref:`String` **var_to_str** **(** :ref:`Variant` variable **)** -Converts a Variant ``variable`` to a formatted string that can later be parsed using :ref:`str2var`. +Converts a Variant ``variable`` to a formatted string that can later be parsed using :ref:`str_to_var`. :: a = { "a": 1, "b": 2 } - print(var2str(a)) + print(var_to_str(a)) prints @@ -4257,7 +4367,7 @@ prints - :ref:`Variant` **weakref** **(** :ref:`Variant` obj **)** -Returns a weak reference to an object, or ``null`` is the argument is invalid. +Returns a weak reference to an object, or ``null`` if the argument is invalid. A weak reference to an object is not enough to keep the object alive: when the only remaining references to a referent are weak references, garbage collection is free to destroy the referent and reuse its memory for something else. However, until the object is actually destroyed the weak reference may return the object even if there are no strong references to it. diff --git a/classes/class_aabb.rst b/classes/class_aabb.rst index d93a85279..0bdfb795c 100644 --- a/classes/class_aabb.rst +++ b/classes/class_aabb.rst @@ -310,7 +310,7 @@ Returns the volume of the ``AABB``. - :ref:`AABB` **grow** **(** :ref:`float` by **)** |const| -Returns a copy of the ``AABB`` grown a given amount of units towards all the sides. +Returns a copy of the ``AABB`` grown a given number of units towards all the sides. ---- diff --git a/classes/class_animation.rst b/classes/class_animation.rst index bae7d104f..0043a601c 100644 --- a/classes/class_animation.rst +++ b/classes/class_animation.rst @@ -65,137 +65,133 @@ Properties Methods ------- -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`add_track` **(** :ref:`TrackType` type, :ref:`int` at_position=-1 **)** | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StringName` | :ref:`animation_track_get_key_animation` **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`animation_track_insert_key` **(** :ref:`int` track_idx, :ref:`float` time, :ref:`StringName` animation **)** | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`animation_track_set_key_animation` **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`StringName` animation **)** | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`audio_track_get_key_end_offset` **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`audio_track_get_key_start_offset` **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Resource` | :ref:`audio_track_get_key_stream` **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`audio_track_insert_key` **(** :ref:`int` track_idx, :ref:`float` time, :ref:`Resource` stream, :ref:`float` start_offset=0, :ref:`float` end_offset=0 **)** | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`audio_track_set_key_end_offset` **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`float` offset **)** | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`audio_track_set_key_start_offset` **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`float` offset **)** | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`audio_track_set_key_stream` **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`Resource` stream **)** | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`bezier_track_get_key_handle_mode` **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`bezier_track_get_key_in_handle` **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`bezier_track_get_key_out_handle` **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`bezier_track_get_key_value` **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`bezier_track_insert_key` **(** :ref:`int` track_idx, :ref:`float` time, :ref:`float` value, :ref:`Vector2` in_handle=Vector2(0, 0), :ref:`Vector2` out_handle=Vector2(0, 0), :ref:`HandleMode` handle_mode=1 **)** | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`bezier_track_interpolate` **(** :ref:`int` track_idx, :ref:`float` time **)** |const| | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`bezier_track_set_key_handle_mode` **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`HandleMode` key_handle_mode, :ref:`float` balanced_value_time_ratio=1.0 **)** | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`bezier_track_set_key_in_handle` **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`Vector2` in_handle, :ref:`float` balanced_value_time_ratio=1.0 **)** | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`bezier_track_set_key_out_handle` **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`Vector2` out_handle, :ref:`float` balanced_value_time_ratio=1.0 **)** | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`bezier_track_set_key_value` **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`float` value **)** | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`blend_shape_track_insert_key` **(** :ref:`int` track_idx, :ref:`float` time, :ref:`float` amount **)** | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`compress` **(** :ref:`int` page_size=8192, :ref:`int` fps=120, :ref:`float` split_tolerance=4.0 **)** | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`copy_track` **(** :ref:`int` track_idx, :ref:`Animation` to_animation **)** | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`find_track` **(** :ref:`NodePath` path, :ref:`TrackType` type **)** |const| | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_track_count` **(** **)** |const| | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`method_track_get_key_indices` **(** :ref:`int` track_idx, :ref:`float` time_sec, :ref:`float` delta **)** |const| | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StringName` | :ref:`method_track_get_name` **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`method_track_get_params` **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`position_track_insert_key` **(** :ref:`int` track_idx, :ref:`float` time, :ref:`Vector3` position **)** | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_track` **(** :ref:`int` track_idx **)** | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rotation_track_insert_key` **(** :ref:`int` track_idx, :ref:`float` time, :ref:`Quaternion` rotation **)** | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`scale_track_insert_key` **(** :ref:`int` track_idx, :ref:`float` time, :ref:`Vector3` scale **)** | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`track_find_key` **(** :ref:`int` track_idx, :ref:`float` time, :ref:`bool` exact=false **)** |const| | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`track_get_interpolation_loop_wrap` **(** :ref:`int` track_idx **)** |const| | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`InterpolationType` | :ref:`track_get_interpolation_type` **(** :ref:`int` track_idx **)** |const| | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`track_get_key_count` **(** :ref:`int` track_idx **)** |const| | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`track_get_key_time` **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`track_get_key_transition` **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`track_get_key_value` **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`NodePath` | :ref:`track_get_path` **(** :ref:`int` track_idx **)** |const| | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TrackType` | :ref:`track_get_type` **(** :ref:`int` track_idx **)** |const| | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`track_insert_key` **(** :ref:`int` track_idx, :ref:`float` time, :ref:`Variant` key, :ref:`float` transition=1 **)** | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`track_is_compressed` **(** :ref:`int` track_idx **)** |const| | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`track_is_enabled` **(** :ref:`int` track_idx **)** |const| | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`track_is_imported` **(** :ref:`int` track_idx **)** |const| | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`track_move_down` **(** :ref:`int` track_idx **)** | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`track_move_to` **(** :ref:`int` track_idx, :ref:`int` to_idx **)** | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`track_move_up` **(** :ref:`int` track_idx **)** | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`track_remove_key` **(** :ref:`int` track_idx, :ref:`int` key_idx **)** | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`track_remove_key_at_time` **(** :ref:`int` track_idx, :ref:`float` time **)** | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`track_set_enabled` **(** :ref:`int` track_idx, :ref:`bool` enabled **)** | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`track_set_imported` **(** :ref:`int` track_idx, :ref:`bool` imported **)** | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`track_set_interpolation_loop_wrap` **(** :ref:`int` track_idx, :ref:`bool` interpolation **)** | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`track_set_interpolation_type` **(** :ref:`int` track_idx, :ref:`InterpolationType` interpolation **)** | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`track_set_key_time` **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`float` time **)** | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`track_set_key_transition` **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`float` transition **)** | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`track_set_key_value` **(** :ref:`int` track_idx, :ref:`int` key, :ref:`Variant` value **)** | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`track_set_path` **(** :ref:`int` track_idx, :ref:`NodePath` path **)** | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`track_swap` **(** :ref:`int` track_idx, :ref:`int` with_idx **)** | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`value_track_get_key_indices` **(** :ref:`int` track_idx, :ref:`float` time_sec, :ref:`float` delta **)** |const| | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`UpdateMode` | :ref:`value_track_get_update_mode` **(** :ref:`int` track_idx **)** |const| | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`value_track_interpolate` **(** :ref:`int` track_idx, :ref:`float` time_sec **)** |const| | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`value_track_set_update_mode` **(** :ref:`int` track_idx, :ref:`UpdateMode` mode **)** | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`add_track` **(** :ref:`TrackType` type, :ref:`int` at_position=-1 **)** | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringName` | :ref:`animation_track_get_key_animation` **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`animation_track_insert_key` **(** :ref:`int` track_idx, :ref:`float` time, :ref:`StringName` animation **)** | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`animation_track_set_key_animation` **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`StringName` animation **)** | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`audio_track_get_key_end_offset` **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`audio_track_get_key_start_offset` **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Resource` | :ref:`audio_track_get_key_stream` **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`audio_track_insert_key` **(** :ref:`int` track_idx, :ref:`float` time, :ref:`Resource` stream, :ref:`float` start_offset=0, :ref:`float` end_offset=0 **)** | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`audio_track_set_key_end_offset` **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`float` offset **)** | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`audio_track_set_key_start_offset` **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`float` offset **)** | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`audio_track_set_key_stream` **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`Resource` stream **)** | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`bezier_track_get_key_in_handle` **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`bezier_track_get_key_out_handle` **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`bezier_track_get_key_value` **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`bezier_track_insert_key` **(** :ref:`int` track_idx, :ref:`float` time, :ref:`float` value, :ref:`Vector2` in_handle=Vector2(0, 0), :ref:`Vector2` out_handle=Vector2(0, 0) **)** | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`bezier_track_interpolate` **(** :ref:`int` track_idx, :ref:`float` time **)** |const| | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`bezier_track_set_key_in_handle` **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`Vector2` in_handle, :ref:`float` balanced_value_time_ratio=1.0 **)** | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`bezier_track_set_key_out_handle` **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`Vector2` out_handle, :ref:`float` balanced_value_time_ratio=1.0 **)** | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`bezier_track_set_key_value` **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`float` value **)** | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`blend_shape_track_insert_key` **(** :ref:`int` track_idx, :ref:`float` time, :ref:`float` amount **)** | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`compress` **(** :ref:`int` page_size=8192, :ref:`int` fps=120, :ref:`float` split_tolerance=4.0 **)** | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`copy_track` **(** :ref:`int` track_idx, :ref:`Animation` to_animation **)** | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`find_track` **(** :ref:`NodePath` path, :ref:`TrackType` type **)** |const| | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_track_count` **(** **)** |const| | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedInt32Array` | :ref:`method_track_get_key_indices` **(** :ref:`int` track_idx, :ref:`float` time_sec, :ref:`float` delta **)** |const| | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringName` | :ref:`method_track_get_name` **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`method_track_get_params` **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`position_track_insert_key` **(** :ref:`int` track_idx, :ref:`float` time, :ref:`Vector3` position **)** | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_track` **(** :ref:`int` track_idx **)** | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`rotation_track_insert_key` **(** :ref:`int` track_idx, :ref:`float` time, :ref:`Quaternion` rotation **)** | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`scale_track_insert_key` **(** :ref:`int` track_idx, :ref:`float` time, :ref:`Vector3` scale **)** | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`track_find_key` **(** :ref:`int` track_idx, :ref:`float` time, :ref:`bool` exact=false **)** |const| | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`track_get_interpolation_loop_wrap` **(** :ref:`int` track_idx **)** |const| | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`InterpolationType` | :ref:`track_get_interpolation_type` **(** :ref:`int` track_idx **)** |const| | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`track_get_key_count` **(** :ref:`int` track_idx **)** |const| | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`track_get_key_time` **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`track_get_key_transition` **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`track_get_key_value` **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`NodePath` | :ref:`track_get_path` **(** :ref:`int` track_idx **)** |const| | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`TrackType` | :ref:`track_get_type` **(** :ref:`int` track_idx **)** |const| | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`track_insert_key` **(** :ref:`int` track_idx, :ref:`float` time, :ref:`Variant` key, :ref:`float` transition=1 **)** | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`track_is_compressed` **(** :ref:`int` track_idx **)** |const| | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`track_is_enabled` **(** :ref:`int` track_idx **)** |const| | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`track_is_imported` **(** :ref:`int` track_idx **)** |const| | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`track_move_down` **(** :ref:`int` track_idx **)** | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`track_move_to` **(** :ref:`int` track_idx, :ref:`int` to_idx **)** | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`track_move_up` **(** :ref:`int` track_idx **)** | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`track_remove_key` **(** :ref:`int` track_idx, :ref:`int` key_idx **)** | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`track_remove_key_at_time` **(** :ref:`int` track_idx, :ref:`float` time **)** | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`track_set_enabled` **(** :ref:`int` track_idx, :ref:`bool` enabled **)** | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`track_set_imported` **(** :ref:`int` track_idx, :ref:`bool` imported **)** | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`track_set_interpolation_loop_wrap` **(** :ref:`int` track_idx, :ref:`bool` interpolation **)** | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`track_set_interpolation_type` **(** :ref:`int` track_idx, :ref:`InterpolationType` interpolation **)** | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`track_set_key_time` **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`float` time **)** | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`track_set_key_transition` **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`float` transition **)** | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`track_set_key_value` **(** :ref:`int` track_idx, :ref:`int` key, :ref:`Variant` value **)** | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`track_set_path` **(** :ref:`int` track_idx, :ref:`NodePath` path **)** | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`track_swap` **(** :ref:`int` track_idx, :ref:`int` with_idx **)** | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedInt32Array` | :ref:`value_track_get_key_indices` **(** :ref:`int` track_idx, :ref:`float` time_sec, :ref:`float` delta **)** |const| | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`UpdateMode` | :ref:`value_track_get_update_mode` **(** :ref:`int` track_idx **)** |const| | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`value_track_interpolate` **(** :ref:`int` track_idx, :ref:`float` time_sec **)** |const| | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`value_track_set_update_mode` **(** :ref:`int` track_idx, :ref:`UpdateMode` mode **)** | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- @@ -259,6 +255,10 @@ enum **TrackType**: .. _class_Animation_constant_INTERPOLATION_CUBIC: +.. _class_Animation_constant_INTERPOLATION_LINEAR_ANGLE: + +.. _class_Animation_constant_INTERPOLATION_CUBIC_ANGLE: + enum **InterpolationType**: - **INTERPOLATION_NEAREST** = **0** --- No interpolation (nearest value). @@ -267,6 +267,14 @@ enum **InterpolationType**: - **INTERPOLATION_CUBIC** = **2** --- Cubic interpolation. +- **INTERPOLATION_LINEAR_ANGLE** = **3** --- Linear interpolation with shortest path rotation. + +\ **Note:** The result value is always normalized and may not match the key value. + +- **INTERPOLATION_CUBIC_ANGLE** = **4** --- Cubic interpolation with shortest path rotation. + +\ **Note:** The result value is always normalized and may not match the key value. + ---- .. _enum_Animation_UpdateMode: @@ -307,20 +315,6 @@ enum **LoopMode**: - **LOOP_PINGPONG** = **2** --- Repeats playback and reverse playback at both ends of the animation. ----- - -.. _enum_Animation_HandleMode: - -.. _class_Animation_constant_HANDLE_MODE_FREE: - -.. _class_Animation_constant_HANDLE_MODE_BALANCED: - -enum **HandleMode**: - -- **HANDLE_MODE_FREE** = **0** --- Assigning the free handle mode to a Bezier Track's keyframe allows you to edit the keyframe's left and right handles independently from one another. - -- **HANDLE_MODE_BALANCED** = **1** --- Assigning the balanced handle mode to a Bezier Track's keyframe makes it so the two handles of the keyframe always stay aligned when changing either the keyframe's left or right handle. - Property Descriptions --------------------- @@ -441,7 +435,7 @@ Returns the audio stream of the key identified by ``key_idx``. The ``track_idx`` Inserts an Audio Track key at the given ``time`` in seconds. The ``track_idx`` must be the index of an Audio Track. -\ ``stream`` is the :ref:`AudioStream` resource to play. ``start_offset`` is the number of seconds cut off at the beginning of the audio stream, while ``end_offset`` is at the ending. +``stream`` is the :ref:`AudioStream` resource to play. ``start_offset`` is the number of seconds cut off at the beginning of the audio stream, while ``end_offset`` is at the ending. ---- @@ -469,14 +463,6 @@ Sets the stream of the key identified by ``key_idx`` to value ``stream``. The `` ---- -.. _class_Animation_method_bezier_track_get_key_handle_mode: - -- :ref:`int` **bezier_track_get_key_handle_mode** **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| - -Returns the handle mode of the key identified by ``index``. See :ref:`HandleMode` for possible values. The ``track_idx`` must be the index of a Bezier Track. - ----- - .. _class_Animation_method_bezier_track_get_key_in_handle: - :ref:`Vector2` **bezier_track_get_key_in_handle** **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| @@ -503,11 +489,11 @@ Returns the value of the key identified by ``key_idx``. The ``track_idx`` must b .. _class_Animation_method_bezier_track_insert_key: -- :ref:`int` **bezier_track_insert_key** **(** :ref:`int` track_idx, :ref:`float` time, :ref:`float` value, :ref:`Vector2` in_handle=Vector2(0, 0), :ref:`Vector2` out_handle=Vector2(0, 0), :ref:`HandleMode` handle_mode=1 **)** +- :ref:`int` **bezier_track_insert_key** **(** :ref:`int` track_idx, :ref:`float` time, :ref:`float` value, :ref:`Vector2` in_handle=Vector2(0, 0), :ref:`Vector2` out_handle=Vector2(0, 0) **)** Inserts a Bezier Track key at the given ``time`` in seconds. The ``track_idx`` must be the index of a Bezier Track. -\ ``in_handle`` is the left-side weight of the added Bezier curve point, ``out_handle`` is the right-side one, while ``value`` is the actual value at this point. +``in_handle`` is the left-side weight of the added Bezier curve point, ``out_handle`` is the right-side one, while ``value`` is the actual value at this point. ---- @@ -519,14 +505,6 @@ Returns the interpolated value at the given ``time`` (in seconds). The ``track_i ---- -.. _class_Animation_method_bezier_track_set_key_handle_mode: - -- void **bezier_track_set_key_handle_mode** **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`HandleMode` key_handle_mode, :ref:`float` balanced_value_time_ratio=1.0 **)** - -Changes the handle mode of the keyframe at the given ``index``. See :ref:`HandleMode` for possible values. The ``track_idx`` must be the index of a Bezier Track. - ----- - .. _class_Animation_method_bezier_track_set_key_in_handle: - void **bezier_track_set_key_in_handle** **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`Vector2` in_handle, :ref:`float` balanced_value_time_ratio=1.0 **)** @@ -657,7 +635,7 @@ Finds the key index by time in a given track. Optionally, only find it if the ex - :ref:`bool` **track_get_interpolation_loop_wrap** **(** :ref:`int` track_idx **)** |const| -Returns ``true`` if the track at ``idx`` wraps the interpolation loop. New tracks wrap the interpolation loop by default. +Returns ``true`` if the track at ``track_idx`` wraps the interpolation loop. New tracks wrap the interpolation loop by default. ---- @@ -673,7 +651,7 @@ Returns the interpolation type of a given track. - :ref:`int` **track_get_key_count** **(** :ref:`int` track_idx **)** |const| -Returns the amount of keys in a given track. +Returns the number of keys in a given track. ---- @@ -719,9 +697,9 @@ Gets the type of a track. .. _class_Animation_method_track_insert_key: -- void **track_insert_key** **(** :ref:`int` track_idx, :ref:`float` time, :ref:`Variant` key, :ref:`float` transition=1 **)** +- :ref:`int` **track_insert_key** **(** :ref:`int` track_idx, :ref:`float` time, :ref:`Variant` key, :ref:`float` transition=1 **)** -Insert a generic key in a given track. +Inserts a generic key in a given track. Returns the key index. ---- @@ -735,7 +713,7 @@ Insert a generic key in a given track. - :ref:`bool` **track_is_enabled** **(** :ref:`int` track_idx **)** |const| -Returns ``true`` if the track at index ``idx`` is enabled. +Returns ``true`` if the track at index ``track_idx`` is enabled. ---- @@ -759,7 +737,7 @@ Moves a track down. - void **track_move_to** **(** :ref:`int` track_idx, :ref:`int` to_idx **)** -Changes the index position of track ``idx`` to the one defined in ``to_idx``. +Changes the index position of track ``track_idx`` to the one defined in ``to_idx``. ---- @@ -807,7 +785,7 @@ Sets the given track as imported or not. - void **track_set_interpolation_loop_wrap** **(** :ref:`int` track_idx, :ref:`bool` interpolation **)** -If ``true``, the track at ``idx`` wraps the interpolation loop. +If ``true``, the track at ``track_idx`` wraps the interpolation loop. ---- @@ -857,7 +835,7 @@ For example, ``"character/skeleton:ankle"`` or ``"character/mesh:transform/local - void **track_swap** **(** :ref:`int` track_idx, :ref:`int` with_idx **)** -Swaps the track ``idx``'s index position with the track ``with_idx``. +Swaps the track ``track_idx``'s index position with the track ``with_idx``. ---- diff --git a/classes/class_animationlibrary.rst b/classes/class_animationlibrary.rst index 77ed6281f..0a02e741d 100644 --- a/classes/class_animationlibrary.rst +++ b/classes/class_animationlibrary.rst @@ -12,7 +12,17 @@ AnimationLibrary **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +Container for :ref:`Animation` resources. +Description +----------- + +An animation library stores a set of animations accessible through :ref:`StringName` keys, for use with :ref:`AnimationPlayer` nodes. + +Tutorials +--------- + +- :doc:`Animation tutorial index <../tutorials/animation/index>` Properties ---------- @@ -45,18 +55,24 @@ Signals - **animation_added** **(** :ref:`StringName` name **)** +Emitted when an :ref:`Animation` is added, under the key ``name``. + ---- .. _class_AnimationLibrary_signal_animation_removed: - **animation_removed** **(** :ref:`StringName` name **)** +Emitted when an :ref:`Animation` stored with the key ``name`` is removed. + ---- .. _class_AnimationLibrary_signal_animation_renamed: - **animation_renamed** **(** :ref:`StringName` name, :ref:`StringName` to_name **)** +Emitted when the key for an :ref:`Animation` is changed, from ``name`` to ``to_name``. + Property Descriptions --------------------- @@ -75,36 +91,48 @@ Method Descriptions - :ref:`Error` **add_animation** **(** :ref:`StringName` name, :ref:`Animation` animation **)** +Adds the ``animation`` to the library, accesible by the key ``name``. + ---- .. _class_AnimationLibrary_method_get_animation: - :ref:`Animation` **get_animation** **(** :ref:`StringName` name **)** |const| +Returns the :ref:`Animation` with the key ``name``. If the animation does not exist, ``null`` is returned and an error is logged. + ---- .. _class_AnimationLibrary_method_get_animation_list: - :ref:`StringName[]` **get_animation_list** **(** **)** |const| +Returns the keys for the :ref:`Animation`\ s stored in the library. + ---- .. _class_AnimationLibrary_method_has_animation: - :ref:`bool` **has_animation** **(** :ref:`StringName` name **)** |const| +Returns ``true`` if the library stores an :ref:`Animation` with ``name`` as the key. + ---- .. _class_AnimationLibrary_method_remove_animation: - void **remove_animation** **(** :ref:`StringName` name **)** +Removes the :ref:`Animation` with the key ``name``. + ---- .. _class_AnimationLibrary_method_rename_animation: - void **rename_animation** **(** :ref:`StringName` name, :ref:`StringName` newname **)** +Changes the key of the :ref:`Animation` associated with the key ``name`` to ``newname``. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_animationnode.rst b/classes/class_animationnode.rst index 48c5bc9a3..30014dc94 100644 --- a/classes/class_animationnode.rst +++ b/classes/class_animationnode.rst @@ -138,7 +138,7 @@ Method Descriptions - :ref:`String` **_get_caption** **(** **)** |virtual| |const| -Gets the text caption for this node (used by some editors). +When inheriting from :ref:`AnimationRootNode`, implement this virtual method to override the text caption for this node. ---- @@ -146,7 +146,7 @@ Gets the text caption for this node (used by some editors). - :ref:`AnimationNode` **_get_child_by_name** **(** :ref:`StringName` name **)** |virtual| |const| -Gets a child node by index (used by editors inheriting from :ref:`AnimationRootNode`). +When inheriting from :ref:`AnimationRootNode`, implement this virtual method to return a child node by its ``name``. ---- @@ -154,7 +154,7 @@ Gets a child node by index (used by editors inheriting from :ref:`AnimationRootN - :ref:`Dictionary` **_get_child_nodes** **(** **)** |virtual| |const| -Gets all children nodes in order as a ``name: node`` dictionary. Only useful when inheriting :ref:`AnimationRootNode`. +When inheriting from :ref:`AnimationRootNode`, implement this virtual method to return all children nodes in order as a ``name: node`` dictionary. ---- @@ -162,7 +162,7 @@ Gets all children nodes in order as a ``name: node`` dictionary. Only useful whe - :ref:`Variant` **_get_parameter_default_value** **(** :ref:`StringName` parameter **)** |virtual| |const| -Gets the default value of a parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. +When inheriting from :ref:`AnimationRootNode`, implement this virtual method to return the default value of a ``parameter``. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. ---- @@ -170,7 +170,7 @@ Gets the default value of a parameter. Parameters are custom local memory used f - :ref:`Array` **_get_parameter_list** **(** **)** |virtual| |const| -Gets the property information for parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. Format is similar to :ref:`Object.get_property_list`. +When inheriting from :ref:`AnimationRootNode`, implement this virtual method to return a list of the properties on this node. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. Format is similar to :ref:`Object.get_property_list`. ---- @@ -178,7 +178,7 @@ Gets the property information for parameter. Parameters are custom local memory - :ref:`bool` **_has_filter** **(** **)** |virtual| |const| -Returns whether you want the blend tree editor to display filter editing on this node. +When inheriting from :ref:`AnimationRootNode`, implement this virtual method to return whether the blend tree editor should display filter editing on this node. ---- @@ -186,7 +186,7 @@ Returns whether you want the blend tree editor to display filter editing on this - :ref:`float` **_process** **(** :ref:`float` time, :ref:`bool` seek, :ref:`bool` seek_root **)** |virtual| |const| -User-defined callback called when a custom node is processed. The ``time`` parameter is a relative delta, unless ``seek`` is ``true``, in which case it is absolute. +When inheriting from :ref:`AnimationRootNode`, implement this virtual method to run some code when this node is processed. The ``time`` parameter is a relative delta, unless ``seek`` is ``true``, in which case it is absolute. Here, call the :ref:`blend_input`, :ref:`blend_node` or :ref:`blend_animation` functions. You can also use :ref:`get_parameter` and :ref:`set_parameter` to modify local memory. @@ -206,7 +206,7 @@ Adds an input to the node. This is only useful for nodes created for use in an : - void **blend_animation** **(** :ref:`StringName` animation, :ref:`float` time, :ref:`float` delta, :ref:`bool` seeked, :ref:`bool` seek_root, :ref:`float` blend, :ref:`int` pingponged=0 **)** -Blend an animation by ``blend`` amount (name must be valid in the linked :ref:`AnimationPlayer`). A ``time`` and ``delta`` may be passed, as well as whether ``seek`` happened. +Blend an animation by ``blend`` amount (name must be valid in the linked :ref:`AnimationPlayer`). A ``time`` and ``delta`` may be passed, as well as whether ``seeked`` happened. ---- diff --git a/classes/class_animationnodestatemachinetransition.rst b/classes/class_animationnodestatemachinetransition.rst index cfff0a4b7..94f3fb8fb 100644 --- a/classes/class_animationnodestatemachinetransition.rst +++ b/classes/class_animationnodestatemachinetransition.rst @@ -37,6 +37,8 @@ Properties +------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+------------------+ | :ref:`SwitchMode` | :ref:`switch_mode` | ``0`` | +------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+------------------+ +| :ref:`Curve` | :ref:`xfade_curve` | | ++------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+------------------+ | :ref:`float` | :ref:`xfade_time` | ``0.0`` | +------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+------------------+ @@ -83,7 +85,7 @@ Property Descriptions | *Getter* | get_advance_condition() | +-----------+------------------------------+ -Turn on auto advance when this condition is set. The provided name will become a boolean parameter on the :ref:`AnimationTree` that can be controlled from code (see `#controlling-from-code <../tutorials/animation/animation_tree.html#controlling-from-code>`__ in :doc:`../tutorials/animation/animation_tree`). For example, if :ref:`AnimationTree.tree_root` is an :ref:`AnimationNodeStateMachine` and :ref:`advance_condition` is set to ``"idle"``: +Turn on auto advance when this condition is set. The provided name will become a boolean parameter on the :ref:`AnimationTree` that can be controlled from code (see `Using AnimationTree <../tutorials/animation/animation_tree.html#controlling-from-code>`__). For example, if :ref:`AnimationTree.tree_root` is an :ref:`AnimationNodeStateMachine` and :ref:`advance_condition` is set to ``"idle"``: .. tabs:: @@ -196,6 +198,20 @@ The transition type. ---- +.. _class_AnimationNodeStateMachineTransition_property_xfade_curve: + +- :ref:`Curve` **xfade_curve** + ++----------+------------------------+ +| *Setter* | set_xfade_curve(value) | ++----------+------------------------+ +| *Getter* | get_xfade_curve() | ++----------+------------------------+ + +Ease curve for better control over cross-fade between this state and the next. + +---- + .. _class_AnimationNodeStateMachineTransition_property_xfade_time: - :ref:`float` **xfade_time** diff --git a/classes/class_animationnodetransition.rst b/classes/class_animationnodetransition.rst index 322c20b4b..c0700bbef 100644 --- a/classes/class_animationnodetransition.rst +++ b/classes/class_animationnodetransition.rst @@ -31,13 +31,15 @@ Tutorials Properties ---------- -+---------------------------+------------------------------------------------------------------------+----------+ -| :ref:`bool` | :ref:`from_start` | ``true`` | -+---------------------------+------------------------------------------------------------------------+----------+ -| :ref:`int` | :ref:`input_count` | ``0`` | -+---------------------------+------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`xfade_time` | ``0.0`` | -+---------------------------+------------------------------------------------------------------------+----------+ ++---------------------------+------------------------------------------------------------------------------+----------+ +| :ref:`int` | :ref:`enabled_inputs` | ``0`` | ++---------------------------+------------------------------------------------------------------------------+----------+ +| :ref:`bool` | :ref:`from_start` | ``true`` | ++---------------------------+------------------------------------------------------------------------------+----------+ +| :ref:`Curve` | :ref:`xfade_curve` | | ++---------------------------+------------------------------------------------------------------------------+----------+ +| :ref:`float` | :ref:`xfade_time` | ``0.0`` | ++---------------------------+------------------------------------------------------------------------------+----------+ Methods ------- @@ -55,6 +57,22 @@ Methods Property Descriptions --------------------- +.. _class_AnimationNodeTransition_property_enabled_inputs: + +- :ref:`int` **enabled_inputs** + ++-----------+---------------------------+ +| *Default* | ``0`` | ++-----------+---------------------------+ +| *Setter* | set_enabled_inputs(value) | ++-----------+---------------------------+ +| *Getter* | get_enabled_inputs() | ++-----------+---------------------------+ + +The number of enabled input ports for this node. + +---- + .. _class_AnimationNodeTransition_property_from_start: - :ref:`bool` **from_start** @@ -71,19 +89,15 @@ If ``true``, the destination animation is played back from the beginning when sw ---- -.. _class_AnimationNodeTransition_property_input_count: +.. _class_AnimationNodeTransition_property_xfade_curve: -- :ref:`int` **input_count** +- :ref:`Curve` **xfade_curve** -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_enabled_inputs(value) | -+-----------+---------------------------+ -| *Getter* | get_enabled_inputs() | -+-----------+---------------------------+ - -The number of available input ports for this node. ++----------+------------------------+ +| *Setter* | set_xfade_curve(value) | ++----------+------------------------+ +| *Getter* | get_xfade_curve() | ++----------+------------------------+ ---- @@ -91,13 +105,13 @@ The number of available input ports for this node. - :ref:`float` **xfade_time** -+-----------+----------------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------------+ -| *Setter* | set_cross_fade_time(value) | -+-----------+----------------------------+ -| *Getter* | get_cross_fade_time() | -+-----------+----------------------------+ ++-----------+-----------------------+ +| *Default* | ``0.0`` | ++-----------+-----------------------+ +| *Setter* | set_xfade_time(value) | ++-----------+-----------------------+ +| *Getter* | get_xfade_time() | ++-----------+-----------------------+ Cross-fading time (in seconds) between each animation connected to the inputs. diff --git a/classes/class_animationplayer.rst b/classes/class_animationplayer.rst index d6d6281f1..02501804f 100644 --- a/classes/class_animationplayer.rst +++ b/classes/class_animationplayer.rst @@ -12,14 +12,16 @@ AnimationPlayer **Inherits:** :ref:`Node` **<** :ref:`Object` -Container and player of :ref:`Animation` resources. +Player of :ref:`Animation` resources. Description ----------- -An animation player is used for general-purpose playback of :ref:`Animation` resources. It contains a dictionary of animations (referenced by name) and custom blend times between their transitions. Additionally, animations can be played and blended in different channels. +An animation player is used for general-purpose playback of :ref:`Animation` resources. It contains a dictionary of :ref:`AnimationLibrary` resources and custom blend times between animation transitions. -\ ``AnimationPlayer`` is more suited than :ref:`Tween` for animations where you know the final values in advance. For example, fading a screen in and out is more easily done with an ``AnimationPlayer`` node thanks to the animation tools provided by the editor. That particular example can also be implemented with a :ref:`Tween` node, but it requires doing everything by code. +Some methods and properties use a single key to refence an animation directly. These keys are formatted as the key for the library, followed by a forward slash, then the key for the animation whithin the library, for example ``"movement/run"``. If the library's key is an empty string (known as the default library), the forward slash is omitted, being the same key used by the library. + +\ ``AnimationPlayer`` is more suited than :ref:`Tween` for animations where you know the final values in advance. For example, fading a screen in and out is more easily done with an ``AnimationPlayer`` node thanks to the animation tools provided by the editor. That particular example can also be implemented with a :ref:`Tween`, but it requires doing everything by code. Updating the target properties of animations occurs at process time. @@ -48,6 +50,8 @@ Properties +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ | :ref:`AnimationMethodCallMode` | :ref:`method_call_mode` | ``0`` | +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ +| :ref:`bool` | :ref:`movie_quit_on_finish` | ``false`` | ++--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ | :ref:`bool` | :ref:`playback_active` | | +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ | :ref:`float` | :ref:`playback_default_blend_time` | ``0.0`` | @@ -125,9 +129,9 @@ Signals - **animation_changed** **(** :ref:`StringName` old_name, :ref:`StringName` new_name **)** -Emitted when a queued animation plays after the previous animation was finished. See :ref:`queue`. +Emitted when a queued animation plays after the previous animation finished. See :ref:`queue`. -\ **Note:** The signal is not emitted when the animation is changed via :ref:`play` or from :ref:`AnimationTree`. +\ **Note:** The signal is not emitted when the animation is changed via :ref:`play` or by an :ref:`AnimationTree`. ---- @@ -137,6 +141,8 @@ Emitted when a queued animation plays after the previous animation was finished. Notifies when an animation finished playing. +\ **Note:** This signal is not emitted if an animation is looping. + ---- .. _class_AnimationPlayer_signal_animation_started: @@ -199,7 +205,7 @@ Property Descriptions | *Getter* | get_assigned_animation() | +----------+-------------------------------+ -If playing, the current animation; otherwise, the animation last played. When set, would change the animation, but would not play it unless currently playing. See also :ref:`current_animation`. +If playing, the the current animation's key, otherwise, the animation last played. When set, this changes the animation, but will not play it unless already playing. See also :ref:`current_animation`. ---- @@ -215,7 +221,7 @@ If playing, the current animation; otherwise, the animation last played. When se | *Getter* | get_autoplay() | +-----------+---------------------+ -The name of the animation to play when the scene loads. +The key of the animation to play when the scene loads. ---- @@ -231,7 +237,7 @@ The name of the animation to play when the scene loads. | *Getter* | get_current_animation() | +-----------+------------------------------+ -The name of the currently playing animation. If no animation is playing, the property's value is an empty string. Changing this value does not restart the animation. See :ref:`play` for more information on playing animations. +The key of the currently playing animation. If no animation is playing, the property's value is an empty string. Changing this value does not restart the animation. See :ref:`play` for more information on playing animations. \ **Note:** while this property appears in the inspector, it's not meant to be edited, and it's not saved in the scene. This property is mainly used to get the currently playing animation, and internally for animation playback tracks. For more information, see :ref:`Animation`. @@ -245,7 +251,7 @@ The name of the currently playing animation. If no animation is playing, the pro | *Getter* | get_current_animation_length() | +----------+--------------------------------+ -The length (in seconds) of the currently being played animation. +The length (in seconds) of the currently playing animation. ---- @@ -277,6 +283,24 @@ The call mode to use for Call Method tracks. ---- +.. _class_AnimationPlayer_property_movie_quit_on_finish: + +- :ref:`bool` **movie_quit_on_finish** + ++-----------+-----------------------------------------+ +| *Default* | ``false`` | ++-----------+-----------------------------------------+ +| *Setter* | set_movie_quit_on_finish_enabled(value) | ++-----------+-----------------------------------------+ +| *Getter* | is_movie_quit_on_finish_enabled() | ++-----------+-----------------------------------------+ + +If ``true`` and the engine is running in Movie Maker mode (see :ref:`MovieWriter`), exits the engine with :ref:`SceneTree.quit` as soon as an animation is done playing in this ``AnimationPlayer``. A message is printed when the engine quits for this reason. + +\ **Note:** This obeys the same logic as the :ref:`animation_finished` signal, so it will not quit the engine if the animation is set to be looping. + +---- + .. _class_AnimationPlayer_property_playback_active: - :ref:`bool` **playback_active** @@ -351,9 +375,9 @@ The speed scaling ratio. For instance, if this value is 1, then the animation pl | *Getter* | is_reset_on_save_enabled() | +-----------+----------------------------------+ -This is used by the editor. If set to ``true``, the scene will be saved with the effects of the reset animation applied (as if it had been seeked to time 0), then reverted after saving. +This is used by the editor. If set to ``true``, the scene will be saved with the effects of the reset animation (the animation with the key ``"RESET"``) applied as if it had been seeked to time 0, with the editor keeping the values that the scene had before saving. -In other words, the saved scene file will contain the "default pose", as defined by the reset animation, if any, with the editor keeping the values that the nodes had before saving. +This makes it more convenient to preview and edit animations in the editor, as changes to the scene will not be saved as long as they are set in the reset animation. ---- @@ -378,6 +402,8 @@ Method Descriptions - :ref:`Error` **add_animation_library** **(** :ref:`StringName` name, :ref:`AnimationLibrary` library **)** +Adds ``library`` to the animation player, under the key ``name``. + ---- .. _class_AnimationPlayer_method_advance: @@ -392,7 +418,7 @@ Shifts position in the animation timeline and immediately updates the animation. - :ref:`StringName` **animation_get_next** **(** :ref:`StringName` anim_from **)** |const| -Returns the name of the next animation in the queue. +Returns the key of the animation which is queued to play after the ``anim_from`` animation. ---- @@ -424,7 +450,7 @@ Clears all queued, unplayed animations. - :ref:`StringName` **find_animation** **(** :ref:`Animation` animation **)** |const| -Returns the name of ``animation`` or an empty string if not found. +Returns the key of ``animation`` or an empty :ref:`StringName` if not found. ---- @@ -432,13 +458,15 @@ Returns the name of ``animation`` or an empty string if not found. - :ref:`StringName` **find_animation_library** **(** :ref:`Animation` animation **)** |const| +Returns the key for the :ref:`AnimationLibrary` that contains ``animation`` or an empty :ref:`StringName` if not found. + ---- .. _class_AnimationPlayer_method_get_animation: - :ref:`Animation` **get_animation** **(** :ref:`StringName` name **)** |const| -Returns the :ref:`Animation` with key ``name`` or ``null`` if not found. +Returns the :ref:`Animation` with the key ``name``. If the animation does not exist, ``null`` is returned and an error is logged. ---- @@ -446,19 +474,23 @@ Returns the :ref:`Animation` with key ``name`` or ``null`` if n - :ref:`AnimationLibrary` **get_animation_library** **(** :ref:`StringName` name **)** |const| +Returns the first :ref:`AnimationLibrary` with key ``name`` or ``null`` if not found. + ---- .. _class_AnimationPlayer_method_get_animation_library_list: - :ref:`StringName[]` **get_animation_library_list** **(** **)** |const| +Returns the list of stored library keys. + ---- .. _class_AnimationPlayer_method_get_animation_list: - :ref:`PackedStringArray` **get_animation_list** **(** **)** |const| -Returns the list of stored animation names. +Returns the list of stored animation keys. ---- @@ -466,7 +498,7 @@ Returns the list of stored animation names. - :ref:`float` **get_blend_time** **(** :ref:`StringName` anim_from, :ref:`StringName` anim_to **)** |const| -Gets the blend time (in seconds) between two animations, referenced by their names. +Gets the blend time (in seconds) between two animations, referenced by their keys. ---- @@ -482,7 +514,7 @@ Gets the actual playing speed of current animation or 0 if not playing. This spe - :ref:`PackedStringArray` **get_queue** **(** **)** -Returns a list of the animation names that are currently queued to play. +Returns a list of the animation keys that are currently queued to play. ---- @@ -498,6 +530,8 @@ Returns ``true`` if the ``AnimationPlayer`` stores an :ref:`Animation` **has_animation_library** **(** :ref:`StringName` name **)** |const| +Returns ``true`` if the ``AnimationPlayer`` stores an :ref:`AnimationLibrary` with key ``name``. + ---- .. _class_AnimationPlayer_method_is_playing: @@ -544,12 +578,16 @@ Queues an animation for playback once the current one is done. - void **remove_animation_library** **(** :ref:`StringName` name **)** +Removes the :ref:`AnimationLibrary` assosiated with the key ``name``. + ---- .. _class_AnimationPlayer_method_rename_animation_library: - void **rename_animation_library** **(** :ref:`StringName` name, :ref:`StringName` newname **)** +Moves the :ref:`AnimationLibrary` associated with the key ``name`` to the key ``newname``. + ---- .. _class_AnimationPlayer_method_seek: @@ -566,7 +604,7 @@ Seeks the animation to the ``seconds`` point in time (in seconds). If ``update`` - void **set_blend_time** **(** :ref:`StringName` anim_from, :ref:`StringName` anim_to, :ref:`float` sec **)** -Specifies a blend time (in seconds) between two animations, referenced by their names. +Specifies a blend time (in seconds) between two animations, referenced by their keys. ---- diff --git a/classes/class_area2d.rst b/classes/class_area2d.rst index 2038c236d..bbf31cfa2 100644 --- a/classes/class_area2d.rst +++ b/classes/class_area2d.rst @@ -17,7 +17,11 @@ Area2D Description ----------- -2D area that detects :ref:`CollisionObject2D` nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping) and route audio to a custom audio bus. +2D area that detects :ref:`CollisionObject2D` nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping) and route audio to custom audio buses. + +To give the area its shape, add a :ref:`CollisionShape2D` or a :ref:`CollisionPolygon2D` node as a *direct* child (or add multiple such nodes as direct children) of the area. + +\ **Warning:** See :ref:`ConcavePolygonShape2D` for a warning about possibly unexpected behavior when using that shape for an area. Tutorials --------- @@ -87,7 +91,7 @@ Signals Emitted when another Area2D enters this Area2D. Requires :ref:`monitoring` to be set to ``true``. -\ ``area`` the other Area2D. +``area`` the other Area2D. ---- @@ -97,7 +101,7 @@ Emitted when another Area2D enters this Area2D. Requires :ref:`monitoring` to be set to ``true``. -\ ``area`` the other Area2D. +``area`` the other Area2D. ---- @@ -107,13 +111,13 @@ Emitted when another Area2D exits this Area2D. Requires :ref:`monitoring`\ s enters one of this Area2D's :ref:`Shape2D`\ s. Requires :ref:`monitoring` to be set to ``true``. -\ ``area_rid`` the :ref:`RID` of the other Area2D's :ref:`CollisionObject2D` used by the :ref:`PhysicsServer2D`. +``area_rid`` the :ref:`RID` of the other Area2D's :ref:`CollisionObject2D` used by the :ref:`PhysicsServer2D`. -\ ``area`` the other Area2D. +``area`` the other Area2D. -\ ``area_shape_index`` the index of the :ref:`Shape2D` of the other Area2D used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``area.shape_owner_get_owner(area.shape_find_owner(area_shape_index))``. +``area_shape_index`` the index of the :ref:`Shape2D` of the other Area2D used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``area.shape_owner_get_owner(area.shape_find_owner(area_shape_index))``. -\ ``local_shape_index`` the index of the :ref:`Shape2D` of this Area2D used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. +``local_shape_index`` the index of the :ref:`Shape2D` of this Area2D used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. ---- @@ -123,13 +127,13 @@ Emitted when one of another Area2D's :ref:`Shape2D`\ s enters one Emitted when one of another Area2D's :ref:`Shape2D`\ s exits one of this Area2D's :ref:`Shape2D`\ s. Requires :ref:`monitoring` to be set to ``true``. -\ ``area_rid`` the :ref:`RID` of the other Area2D's :ref:`CollisionObject2D` used by the :ref:`PhysicsServer2D`. +``area_rid`` the :ref:`RID` of the other Area2D's :ref:`CollisionObject2D` used by the :ref:`PhysicsServer2D`. -\ ``area`` the other Area2D. +``area`` the other Area2D. -\ ``area_shape_index`` the index of the :ref:`Shape2D` of the other Area2D used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``area.shape_owner_get_owner(area.shape_find_owner(area_shape_index))``. +``area_shape_index`` the index of the :ref:`Shape2D` of the other Area2D used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``area.shape_owner_get_owner(area.shape_find_owner(area_shape_index))``. -\ ``local_shape_index`` the index of the :ref:`Shape2D` of this Area2D used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. +``local_shape_index`` the index of the :ref:`Shape2D` of this Area2D used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. ---- @@ -139,7 +143,7 @@ Emitted when one of another Area2D's :ref:`Shape2D`\ s exits one Emitted when a :ref:`PhysicsBody2D` or :ref:`TileMap` enters this Area2D. Requires :ref:`monitoring` to be set to ``true``. :ref:`TileMap`\ s are detected if the :ref:`TileSet` has Collision :ref:`Shape2D`\ s. -\ ``body`` the :ref:`Node`, if it exists in the tree, of the other :ref:`PhysicsBody2D` or :ref:`TileMap`. +``body`` the :ref:`Node`, if it exists in the tree, of the other :ref:`PhysicsBody2D` or :ref:`TileMap`. ---- @@ -149,7 +153,7 @@ Emitted when a :ref:`PhysicsBody2D` or :ref:`TileMap` or :ref:`TileMap` exits this Area2D. Requires :ref:`monitoring` to be set to ``true``. :ref:`TileMap`\ s are detected if the :ref:`TileSet` has Collision :ref:`Shape2D`\ s. -\ ``body`` the :ref:`Node`, if it exists in the tree, of the other :ref:`PhysicsBody2D` or :ref:`TileMap`. +``body`` the :ref:`Node`, if it exists in the tree, of the other :ref:`PhysicsBody2D` or :ref:`TileMap`. ---- @@ -159,13 +163,13 @@ Emitted when a :ref:`PhysicsBody2D` or :ref:`TileMap` or :ref:`TileMap`'s :ref:`Shape2D`\ s enters one of this Area2D's :ref:`Shape2D`\ s. Requires :ref:`monitoring` to be set to ``true``. :ref:`TileMap`\ s are detected if the :ref:`TileSet` has Collision :ref:`Shape2D`\ s. -\ ``body_rid`` the :ref:`RID` of the :ref:`PhysicsBody2D` or :ref:`TileSet`'s :ref:`CollisionObject2D` used by the :ref:`PhysicsServer2D`. +``body_rid`` the :ref:`RID` of the :ref:`PhysicsBody2D` or :ref:`TileSet`'s :ref:`CollisionObject2D` used by the :ref:`PhysicsServer2D`. -\ ``body`` the :ref:`Node`, if it exists in the tree, of the :ref:`PhysicsBody2D` or :ref:`TileMap`. +``body`` the :ref:`Node`, if it exists in the tree, of the :ref:`PhysicsBody2D` or :ref:`TileMap`. -\ ``body_shape_index`` the index of the :ref:`Shape2D` of the :ref:`PhysicsBody2D` or :ref:`TileMap` used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))``. +``body_shape_index`` the index of the :ref:`Shape2D` of the :ref:`PhysicsBody2D` or :ref:`TileMap` used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))``. -\ ``local_shape_index`` the index of the :ref:`Shape2D` of this Area2D used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. +``local_shape_index`` the index of the :ref:`Shape2D` of this Area2D used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. ---- @@ -175,13 +179,13 @@ Emitted when one of a :ref:`PhysicsBody2D` or :ref:`TileMap Emitted when one of a :ref:`PhysicsBody2D` or :ref:`TileMap`'s :ref:`Shape2D`\ s exits one of this Area2D's :ref:`Shape2D`\ s. Requires :ref:`monitoring` to be set to ``true``. :ref:`TileMap`\ s are detected if the :ref:`TileSet` has Collision :ref:`Shape2D`\ s. -\ ``body_rid`` the :ref:`RID` of the :ref:`PhysicsBody2D` or :ref:`TileSet`'s :ref:`CollisionObject2D` used by the :ref:`PhysicsServer2D`. +``body_rid`` the :ref:`RID` of the :ref:`PhysicsBody2D` or :ref:`TileSet`'s :ref:`CollisionObject2D` used by the :ref:`PhysicsServer2D`. -\ ``body`` the :ref:`Node`, if it exists in the tree, of the :ref:`PhysicsBody2D` or :ref:`TileMap`. +``body`` the :ref:`Node`, if it exists in the tree, of the :ref:`PhysicsBody2D` or :ref:`TileMap`. -\ ``body_shape_index`` the index of the :ref:`Shape2D` of the :ref:`PhysicsBody2D` or :ref:`TileMap` used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))``. +``body_shape_index`` the index of the :ref:`Shape2D` of the :ref:`PhysicsBody2D` or :ref:`TileMap` used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))``. -\ ``local_shape_index`` the index of the :ref:`Shape2D` of this Area2D used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. +``local_shape_index`` the index of the :ref:`Shape2D` of this Area2D used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. Enumerations ------------ diff --git a/classes/class_area3d.rst b/classes/class_area3d.rst index c72422876..a819c9f53 100644 --- a/classes/class_area3d.rst +++ b/classes/class_area3d.rst @@ -19,6 +19,10 @@ Description 3D area that detects :ref:`CollisionObject3D` nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping) and route audio to custom audio buses. +To give the area its shape, add a :ref:`CollisionShape3D` or a :ref:`CollisionPolygon3D` node as a *direct* child (or add multiple such nodes as direct children) of the area. + +\ **Warning:** See :ref:`ConcavePolygonShape3D` (also called "trimesh") for a warning about possibly unexpected behavior when using that shape for an area. + Tutorials --------- @@ -97,7 +101,7 @@ Signals Emitted when another Area3D enters this Area3D. Requires :ref:`monitoring` to be set to ``true``. -\ ``area`` the other Area3D. +``area`` the other Area3D. ---- @@ -107,7 +111,7 @@ Emitted when another Area3D enters this Area3D. Requires :ref:`monitoring` to be set to ``true``. -\ ``area`` the other Area3D. +``area`` the other Area3D. ---- @@ -117,13 +121,13 @@ Emitted when another Area3D exits this Area3D. Requires :ref:`monitoring`\ s enters one of this Area3D's :ref:`Shape3D`\ s. Requires :ref:`monitoring` to be set to ``true``. -\ ``area_rid`` the :ref:`RID` of the other Area3D's :ref:`CollisionObject3D` used by the :ref:`PhysicsServer3D`. +``area_rid`` the :ref:`RID` of the other Area3D's :ref:`CollisionObject3D` used by the :ref:`PhysicsServer3D`. -\ ``area`` the other Area3D. +``area`` the other Area3D. -\ ``area_shape_index`` the index of the :ref:`Shape3D` of the other Area3D used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``area.shape_owner_get_owner(area.shape_find_owner(area_shape_index))``. +``area_shape_index`` the index of the :ref:`Shape3D` of the other Area3D used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``area.shape_owner_get_owner(area.shape_find_owner(area_shape_index))``. -\ ``local_shape_index`` the index of the :ref:`Shape3D` of this Area3D used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. +``local_shape_index`` the index of the :ref:`Shape3D` of this Area3D used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. ---- @@ -133,13 +137,13 @@ Emitted when one of another Area3D's :ref:`Shape3D`\ s enters one Emitted when one of another Area3D's :ref:`Shape3D`\ s exits one of this Area3D's :ref:`Shape3D`\ s. Requires :ref:`monitoring` to be set to ``true``. -\ ``area_rid`` the :ref:`RID` of the other Area3D's :ref:`CollisionObject3D` used by the :ref:`PhysicsServer3D`. +``area_rid`` the :ref:`RID` of the other Area3D's :ref:`CollisionObject3D` used by the :ref:`PhysicsServer3D`. -\ ``area`` the other Area3D. +``area`` the other Area3D. -\ ``area_shape_index`` the index of the :ref:`Shape3D` of the other Area3D used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``area.shape_owner_get_owner(area.shape_find_owner(area_shape_index))``. +``area_shape_index`` the index of the :ref:`Shape3D` of the other Area3D used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``area.shape_owner_get_owner(area.shape_find_owner(area_shape_index))``. -\ ``local_shape_index`` the index of the :ref:`Shape3D` of this Area3D used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. +``local_shape_index`` the index of the :ref:`Shape3D` of this Area3D used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. ---- @@ -149,7 +153,7 @@ Emitted when one of another Area3D's :ref:`Shape3D`\ s exits one Emitted when a :ref:`PhysicsBody3D` or :ref:`GridMap` enters this Area3D. Requires :ref:`monitoring` to be set to ``true``. :ref:`GridMap`\ s are detected if the :ref:`MeshLibrary` has Collision :ref:`Shape3D`\ s. -\ ``body`` the :ref:`Node`, if it exists in the tree, of the other :ref:`PhysicsBody3D` or :ref:`GridMap`. +``body`` the :ref:`Node`, if it exists in the tree, of the other :ref:`PhysicsBody3D` or :ref:`GridMap`. ---- @@ -159,7 +163,7 @@ Emitted when a :ref:`PhysicsBody3D` or :ref:`GridMap` or :ref:`GridMap` exits this Area3D. Requires :ref:`monitoring` to be set to ``true``. :ref:`GridMap`\ s are detected if the :ref:`MeshLibrary` has Collision :ref:`Shape3D`\ s. -\ ``body`` the :ref:`Node`, if it exists in the tree, of the other :ref:`PhysicsBody3D` or :ref:`GridMap`. +``body`` the :ref:`Node`, if it exists in the tree, of the other :ref:`PhysicsBody3D` or :ref:`GridMap`. ---- @@ -169,13 +173,13 @@ Emitted when a :ref:`PhysicsBody3D` or :ref:`GridMap` or :ref:`GridMap`'s :ref:`Shape3D`\ s enters one of this Area3D's :ref:`Shape3D`\ s. Requires :ref:`monitoring` to be set to ``true``. :ref:`GridMap`\ s are detected if the :ref:`MeshLibrary` has Collision :ref:`Shape3D`\ s. -\ ``body_rid`` the :ref:`RID` of the :ref:`PhysicsBody3D` or :ref:`MeshLibrary`'s :ref:`CollisionObject3D` used by the :ref:`PhysicsServer3D`. +``body_rid`` the :ref:`RID` of the :ref:`PhysicsBody3D` or :ref:`MeshLibrary`'s :ref:`CollisionObject3D` used by the :ref:`PhysicsServer3D`. -\ ``body`` the :ref:`Node`, if it exists in the tree, of the :ref:`PhysicsBody3D` or :ref:`GridMap`. +``body`` the :ref:`Node`, if it exists in the tree, of the :ref:`PhysicsBody3D` or :ref:`GridMap`. -\ ``body_shape_index`` the index of the :ref:`Shape3D` of the :ref:`PhysicsBody3D` or :ref:`GridMap` used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))``. +``body_shape_index`` the index of the :ref:`Shape3D` of the :ref:`PhysicsBody3D` or :ref:`GridMap` used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))``. -\ ``local_shape_index`` the index of the :ref:`Shape3D` of this Area3D used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. +``local_shape_index`` the index of the :ref:`Shape3D` of this Area3D used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. ---- @@ -185,13 +189,13 @@ Emitted when one of a :ref:`PhysicsBody3D` or :ref:`GridMap Emitted when one of a :ref:`PhysicsBody3D` or :ref:`GridMap`'s :ref:`Shape3D`\ s enters one of this Area3D's :ref:`Shape3D`\ s. Requires :ref:`monitoring` to be set to ``true``. :ref:`GridMap`\ s are detected if the :ref:`MeshLibrary` has Collision :ref:`Shape3D`\ s. -\ ``body_rid`` the :ref:`RID` of the :ref:`PhysicsBody3D` or :ref:`MeshLibrary`'s :ref:`CollisionObject3D` used by the :ref:`PhysicsServer3D`. +``body_rid`` the :ref:`RID` of the :ref:`PhysicsBody3D` or :ref:`MeshLibrary`'s :ref:`CollisionObject3D` used by the :ref:`PhysicsServer3D`. -\ ``body`` the :ref:`Node`, if it exists in the tree, of the :ref:`PhysicsBody3D` or :ref:`GridMap`. +``body`` the :ref:`Node`, if it exists in the tree, of the :ref:`PhysicsBody3D` or :ref:`GridMap`. -\ ``body_shape_index`` the index of the :ref:`Shape3D` of the :ref:`PhysicsBody3D` or :ref:`GridMap` used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))``. +``body_shape_index`` the index of the :ref:`Shape3D` of the :ref:`PhysicsBody3D` or :ref:`GridMap` used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))``. -\ ``local_shape_index`` the index of the :ref:`Shape3D` of this Area3D used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. +``local_shape_index`` the index of the :ref:`Shape3D` of this Area3D used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. Enumerations ------------ diff --git a/classes/class_array.rst b/classes/class_array.rst index 17c2ef4ed..0e4823c38 100644 --- a/classes/class_array.rst +++ b/classes/class_array.rst @@ -179,23 +179,23 @@ Methods Operators --------- -+---------------------------+-----------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** :ref:`Array` right **)** | -+---------------------------+-----------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`operator +` **(** :ref:`Array` right **)** | -+---------------------------+-----------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator <` **(** :ref:`Array` right **)** | -+---------------------------+-----------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator <=` **(** :ref:`Array` right **)** | -+---------------------------+-----------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** :ref:`Array` right **)** | -+---------------------------+-----------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator >` **(** :ref:`Array` right **)** | -+---------------------------+-----------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator >=` **(** :ref:`Array` right **)** | -+---------------------------+-----------------------------------------------------------------------------------------------+ -| void | :ref:`operator []` **(** :ref:`int` index **)** | -+---------------------------+-----------------------------------------------------------------------------------------------+ ++---------------------------+------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`operator !=` **(** :ref:`Array` right **)** | ++---------------------------+------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`operator +` **(** :ref:`Array` right **)** | ++---------------------------+------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`operator \<` **(** :ref:`Array` right **)** | ++---------------------------+------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`operator \<=` **(** :ref:`Array` right **)** | ++---------------------------+------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`operator ==` **(** :ref:`Array` right **)** | ++---------------------------+------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`operator >` **(** :ref:`Array` right **)** | ++---------------------------+------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`operator >=` **(** :ref:`Array` right **)** | ++---------------------------+------------------------------------------------------------------------------------------------+ +| void | :ref:`operator []` **(** :ref:`int` index **)** | ++---------------------------+------------------------------------------------------------------------------------------------+ Constructor Descriptions ------------------------ @@ -834,7 +834,7 @@ Concatenates two ``Array``\ s together, with the ``right`` ``Array`` being added - :ref:`bool` **operator <** **(** :ref:`Array` right **)** -Performs a comparison for each index between the left operand ``Array`` and the ``right`` ``Array``, considering the highest common index of both arrays for this comparison: Returns ``true`` on the first occurrence of an element that is less, or ``false`` if the element is greater. Note that depending on the type of data stored, this function may be recursive. If all elements are equal, it compares the length of both arrays and returns ``false`` if the left operand ``Array`` has less elements, otherwise it returns ``true``. +Performs a comparison for each index between the left operand ``Array`` and the ``right`` ``Array``, considering the highest common index of both arrays for this comparison: Returns ``true`` on the first occurrence of an element that is less, or ``false`` if the element is greater. Note that depending on the type of data stored, this function may be recursive. If all elements are equal, it compares the length of both arrays and returns ``false`` if the left operand ``Array`` has fewer elements, otherwise it returns ``true``. ---- @@ -842,7 +842,7 @@ Performs a comparison for each index between the left operand ``Array`` and the - :ref:`bool` **operator <=** **(** :ref:`Array` right **)** -Performs a comparison for each index between the left operand ``Array`` and the ``right`` ``Array``, considering the highest common index of both arrays for this comparison: Returns ``true`` on the first occurrence of an element that is less, or ``false`` if the element is greater. Note that depending on the type of data stored, this function may be recursive. If all elements are equal, it compares the length of both arrays and returns ``true`` if the left operand ``Array`` has less or the same number of elements, otherwise it returns ``false``. +Performs a comparison for each index between the left operand ``Array`` and the ``right`` ``Array``, considering the highest common index of both arrays for this comparison: Returns ``true`` on the first occurrence of an element that is less, or ``false`` if the element is greater. Note that depending on the type of data stored, this function may be recursive. If all elements are equal, it compares the length of both arrays and returns ``true`` if the left operand ``Array`` has the same number of elements or fewer, otherwise it returns ``false``. ---- diff --git a/classes/class_arraymesh.rst b/classes/class_arraymesh.rst index 93f912438..ddadfc02b 100644 --- a/classes/class_arraymesh.rst +++ b/classes/class_arraymesh.rst @@ -191,7 +191,7 @@ Creates a new surface. Surfaces are created to be rendered using a ``primitive``, which may be any of the types defined in :ref:`PrimitiveType`. (As a note, when using indices, it is recommended to only use points, lines, or triangles.) :ref:`Mesh.get_surface_count` will become the ``surf_idx`` for this new surface. -The ``arrays`` argument is an array of arrays. See :ref:`ArrayType` for the values used in this array. For example, ``arrays[0]`` is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array or be empty, except for :ref:`Mesh.ARRAY_INDEX` if it is used. +The ``arrays`` argument is an array of arrays. See :ref:`ArrayType` for the values used in this array. For example, ``arrays[0]`` is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array (or be an exact multiple of the vertex array's length, when multiple elements of a sub-array correspond to a single vertex) or be empty, except for :ref:`Mesh.ARRAY_INDEX` if it is used. ---- diff --git a/classes/class_astar2d.rst b/classes/class_astar2d.rst index d8f324a0a..1a385f30e 100644 --- a/classes/class_astar2d.rst +++ b/classes/class_astar2d.rst @@ -51,7 +51,7 @@ Methods +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_point_count` **(** **)** |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_point_ids` **(** **)** | +| :ref:`PackedInt64Array` | :ref:`get_point_ids` **(** **)** | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedVector2Array` | :ref:`get_point_path` **(** :ref:`int` from_id, :ref:`int` to_id **)** | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -103,7 +103,7 @@ Note that this function is hidden in the default ``AStar2D`` class. Adds a new point at the given position with the given identifier. The ``id`` must be 0 or larger, and the ``weight_scale`` must be 0.0 or greater. -The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost` when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower ``weight_scale``\ s to form a path. +The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost` when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower ``weight_scale``s to form a path. .. tabs:: @@ -325,7 +325,7 @@ Returns the number of points currently in the points pool. .. _class_AStar2D_method_get_point_ids: -- :ref:`Array` **get_point_ids** **(** **)** +- :ref:`PackedInt64Array` **get_point_ids** **(** **)** Returns an array of all point IDs. diff --git a/classes/class_astar3d.rst b/classes/class_astar3d.rst index bbfe1eaed..f9c0c7130 100644 --- a/classes/class_astar3d.rst +++ b/classes/class_astar3d.rst @@ -89,7 +89,7 @@ Methods +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_point_count` **(** **)** |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_point_ids` **(** **)** | +| :ref:`PackedInt64Array` | :ref:`get_point_ids` **(** **)** | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedVector3Array` | :ref:`get_point_path` **(** :ref:`int` from_id, :ref:`int` to_id **)** | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -141,7 +141,7 @@ Note that this function is hidden in the default ``AStar3D`` class. Adds a new point at the given position with the given identifier. The ``id`` must be 0 or larger, and the ``weight_scale`` must be 0.0 or greater. -The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost` when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower ``weight_scale``\ s to form a path. +The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost` when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower ``weight_scale``s to form a path. .. tabs:: @@ -361,7 +361,7 @@ Returns the number of points currently in the points pool. .. _class_AStar3D_method_get_point_ids: -- :ref:`Array` **get_point_ids** **(** **)** +- :ref:`PackedInt64Array` **get_point_ids** **(** **)** Returns an array of all point IDs. diff --git a/classes/class_astargrid2d.rst b/classes/class_astargrid2d.rst new file mode 100644 index 000000000..0a2a4020e --- /dev/null +++ b/classes/class_astargrid2d.rst @@ -0,0 +1,271 @@ +: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/AStarGrid2D.xml. + +.. _class_AStarGrid2D: + +AStarGrid2D +=========== + +**Inherits:** :ref:`RefCounted` **<** :ref:`Object` + + + +Properties +---------- + ++----------------------------------------------------+------------------------------------------------------------------------+--------------------+ +| :ref:`Vector2` | :ref:`cell_size` | ``Vector2(1, 1)`` | ++----------------------------------------------------+------------------------------------------------------------------------+--------------------+ +| :ref:`Heuristic` | :ref:`default_heuristic` | ``0`` | ++----------------------------------------------------+------------------------------------------------------------------------+--------------------+ +| :ref:`DiagonalMode` | :ref:`diagonal_mode` | ``0`` | ++----------------------------------------------------+------------------------------------------------------------------------+--------------------+ +| :ref:`bool` | :ref:`jumping_enabled` | ``false`` | ++----------------------------------------------------+------------------------------------------------------------------------+--------------------+ +| :ref:`Vector2` | :ref:`offset` | ``Vector2(0, 0)`` | ++----------------------------------------------------+------------------------------------------------------------------------+--------------------+ +| :ref:`Vector2i` | :ref:`size` | ``Vector2i(0, 0)`` | ++----------------------------------------------------+------------------------------------------------------------------------+--------------------+ + +Methods +------- + ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`_compute_cost` **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** |virtual| |const| | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`_estimate_cost` **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** |virtual| |const| | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedVector2Array` | :ref:`get_id_path` **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedVector2Array` | :ref:`get_point_path` **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_dirty` **(** **)** |const| | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_in_bounds` **(** :ref:`int` x, :ref:`int` y **)** |const| | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_in_boundsv` **(** :ref:`Vector2i` id **)** |const| | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_point_solid` **(** :ref:`Vector2i` id **)** |const| | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_point_solid` **(** :ref:`Vector2i` id, :ref:`bool` solid=true **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`update` **(** **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Enumerations +------------ + +.. _enum_AStarGrid2D_Heuristic: + +.. _class_AStarGrid2D_constant_HEURISTIC_EUCLIDEAN: + +.. _class_AStarGrid2D_constant_HEURISTIC_MANHATTAN: + +.. _class_AStarGrid2D_constant_HEURISTIC_OCTILE: + +.. _class_AStarGrid2D_constant_HEURISTIC_CHEBYSHEV: + +.. _class_AStarGrid2D_constant_HEURISTIC_MAX: + +enum **Heuristic**: + +- **HEURISTIC_EUCLIDEAN** = **0** + +- **HEURISTIC_MANHATTAN** = **1** + +- **HEURISTIC_OCTILE** = **2** + +- **HEURISTIC_CHEBYSHEV** = **3** + +- **HEURISTIC_MAX** = **4** + +---- + +.. _enum_AStarGrid2D_DiagonalMode: + +.. _class_AStarGrid2D_constant_DIAGONAL_MODE_ALWAYS: + +.. _class_AStarGrid2D_constant_DIAGONAL_MODE_NEVER: + +.. _class_AStarGrid2D_constant_DIAGONAL_MODE_AT_LEAST_ONE_WALKABLE: + +.. _class_AStarGrid2D_constant_DIAGONAL_MODE_ONLY_IF_NO_OBSTACLES: + +.. _class_AStarGrid2D_constant_DIAGONAL_MODE_MAX: + +enum **DiagonalMode**: + +- **DIAGONAL_MODE_ALWAYS** = **0** + +- **DIAGONAL_MODE_NEVER** = **1** + +- **DIAGONAL_MODE_AT_LEAST_ONE_WALKABLE** = **2** + +- **DIAGONAL_MODE_ONLY_IF_NO_OBSTACLES** = **3** + +- **DIAGONAL_MODE_MAX** = **4** + +Property Descriptions +--------------------- + +.. _class_AStarGrid2D_property_cell_size: + +- :ref:`Vector2` **cell_size** + ++-----------+----------------------+ +| *Default* | ``Vector2(1, 1)`` | ++-----------+----------------------+ +| *Setter* | set_cell_size(value) | ++-----------+----------------------+ +| *Getter* | get_cell_size() | ++-----------+----------------------+ + +---- + +.. _class_AStarGrid2D_property_default_heuristic: + +- :ref:`Heuristic` **default_heuristic** + ++-----------+------------------------------+ +| *Default* | ``0`` | ++-----------+------------------------------+ +| *Setter* | set_default_heuristic(value) | ++-----------+------------------------------+ +| *Getter* | get_default_heuristic() | ++-----------+------------------------------+ + +---- + +.. _class_AStarGrid2D_property_diagonal_mode: + +- :ref:`DiagonalMode` **diagonal_mode** + ++-----------+--------------------------+ +| *Default* | ``0`` | ++-----------+--------------------------+ +| *Setter* | set_diagonal_mode(value) | ++-----------+--------------------------+ +| *Getter* | get_diagonal_mode() | ++-----------+--------------------------+ + +---- + +.. _class_AStarGrid2D_property_jumping_enabled: + +- :ref:`bool` **jumping_enabled** + ++-----------+----------------------------+ +| *Default* | ``false`` | ++-----------+----------------------------+ +| *Setter* | set_jumping_enabled(value) | ++-----------+----------------------------+ +| *Getter* | is_jumping_enabled() | ++-----------+----------------------------+ + +---- + +.. _class_AStarGrid2D_property_offset: + +- :ref:`Vector2` **offset** + ++-----------+-------------------+ +| *Default* | ``Vector2(0, 0)`` | ++-----------+-------------------+ +| *Setter* | set_offset(value) | ++-----------+-------------------+ +| *Getter* | get_offset() | ++-----------+-------------------+ + +---- + +.. _class_AStarGrid2D_property_size: + +- :ref:`Vector2i` **size** + ++-----------+--------------------+ +| *Default* | ``Vector2i(0, 0)`` | ++-----------+--------------------+ +| *Setter* | set_size(value) | ++-----------+--------------------+ +| *Getter* | get_size() | ++-----------+--------------------+ + +Method Descriptions +------------------- + +.. _class_AStarGrid2D_method__compute_cost: + +- :ref:`float` **_compute_cost** **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** |virtual| |const| + +---- + +.. _class_AStarGrid2D_method__estimate_cost: + +- :ref:`float` **_estimate_cost** **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** |virtual| |const| + +---- + +.. _class_AStarGrid2D_method_clear: + +- void **clear** **(** **)** + +---- + +.. _class_AStarGrid2D_method_get_id_path: + +- :ref:`PackedVector2Array` **get_id_path** **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** + +---- + +.. _class_AStarGrid2D_method_get_point_path: + +- :ref:`PackedVector2Array` **get_point_path** **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** + +---- + +.. _class_AStarGrid2D_method_is_dirty: + +- :ref:`bool` **is_dirty** **(** **)** |const| + +---- + +.. _class_AStarGrid2D_method_is_in_bounds: + +- :ref:`bool` **is_in_bounds** **(** :ref:`int` x, :ref:`int` y **)** |const| + +---- + +.. _class_AStarGrid2D_method_is_in_boundsv: + +- :ref:`bool` **is_in_boundsv** **(** :ref:`Vector2i` id **)** |const| + +---- + +.. _class_AStarGrid2D_method_is_point_solid: + +- :ref:`bool` **is_point_solid** **(** :ref:`Vector2i` id **)** |const| + +---- + +.. _class_AStarGrid2D_method_set_point_solid: + +- void **set_point_solid** **(** :ref:`Vector2i` id, :ref:`bool` solid=true **)** + +---- + +.. _class_AStarGrid2D_method_update: + +- void **update** **(** **)** + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_audioeffectchorus.rst b/classes/class_audioeffectchorus.rst index 928846149..638ee8b42 100644 --- a/classes/class_audioeffectchorus.rst +++ b/classes/class_audioeffectchorus.rst @@ -503,7 +503,7 @@ The voice's filter rate. | *Getter* | get_voice_count() | +-----------+------------------------+ -The amount of voices in the effect. +The number of voices in the effect. ---- diff --git a/classes/class_audioeffectdelay.rst b/classes/class_audioeffectdelay.rst index 3490763d0..da2b4c4ea 100644 --- a/classes/class_audioeffectdelay.rst +++ b/classes/class_audioeffectdelay.rst @@ -32,29 +32,29 @@ Properties +---------------------------+-----------------------------------------------------------------------------+-------------+ | :ref:`float` | :ref:`dry` | ``1.0`` | +---------------------------+-----------------------------------------------------------------------------+-------------+ -| :ref:`bool` | :ref:`feedback/active` | ``false`` | +| :ref:`bool` | :ref:`feedback_active` | ``false`` | +---------------------------+-----------------------------------------------------------------------------+-------------+ -| :ref:`float` | :ref:`feedback/delay_ms` | ``340.0`` | +| :ref:`float` | :ref:`feedback_delay_ms` | ``340.0`` | +---------------------------+-----------------------------------------------------------------------------+-------------+ -| :ref:`float` | :ref:`feedback/level_db` | ``-6.0`` | +| :ref:`float` | :ref:`feedback_level_db` | ``-6.0`` | +---------------------------+-----------------------------------------------------------------------------+-------------+ -| :ref:`float` | :ref:`feedback/lowpass` | ``16000.0`` | +| :ref:`float` | :ref:`feedback_lowpass` | ``16000.0`` | +---------------------------+-----------------------------------------------------------------------------+-------------+ -| :ref:`bool` | :ref:`tap1/active` | ``true`` | +| :ref:`bool` | :ref:`tap1_active` | ``true`` | +---------------------------+-----------------------------------------------------------------------------+-------------+ -| :ref:`float` | :ref:`tap1/delay_ms` | ``250.0`` | +| :ref:`float` | :ref:`tap1_delay_ms` | ``250.0`` | +---------------------------+-----------------------------------------------------------------------------+-------------+ -| :ref:`float` | :ref:`tap1/level_db` | ``-6.0`` | +| :ref:`float` | :ref:`tap1_level_db` | ``-6.0`` | +---------------------------+-----------------------------------------------------------------------------+-------------+ -| :ref:`float` | :ref:`tap1/pan` | ``0.2`` | +| :ref:`float` | :ref:`tap1_pan` | ``0.2`` | +---------------------------+-----------------------------------------------------------------------------+-------------+ -| :ref:`bool` | :ref:`tap2/active` | ``true`` | +| :ref:`bool` | :ref:`tap2_active` | ``true`` | +---------------------------+-----------------------------------------------------------------------------+-------------+ -| :ref:`float` | :ref:`tap2/delay_ms` | ``500.0`` | +| :ref:`float` | :ref:`tap2_delay_ms` | ``500.0`` | +---------------------------+-----------------------------------------------------------------------------+-------------+ -| :ref:`float` | :ref:`tap2/level_db` | ``-12.0`` | +| :ref:`float` | :ref:`tap2_level_db` | ``-12.0`` | +---------------------------+-----------------------------------------------------------------------------+-------------+ -| :ref:`float` | :ref:`tap2/pan` | ``-0.4`` | +| :ref:`float` | :ref:`tap2_pan` | ``-0.4`` | +---------------------------+-----------------------------------------------------------------------------+-------------+ Property Descriptions @@ -76,9 +76,9 @@ Output percent of original sound. At 0, only delayed sounds are output. Value ca ---- -.. _class_AudioEffectDelay_property_feedback/active: +.. _class_AudioEffectDelay_property_feedback_active: -- :ref:`bool` **feedback/active** +- :ref:`bool` **feedback_active** +-----------+----------------------------+ | *Default* | ``false`` | @@ -92,9 +92,9 @@ If ``true``, feedback is enabled. ---- -.. _class_AudioEffectDelay_property_feedback/delay_ms: +.. _class_AudioEffectDelay_property_feedback_delay_ms: -- :ref:`float` **feedback/delay_ms** +- :ref:`float` **feedback_delay_ms** +-----------+------------------------------+ | *Default* | ``340.0`` | @@ -108,9 +108,9 @@ Feedback delay time in milliseconds. ---- -.. _class_AudioEffectDelay_property_feedback/level_db: +.. _class_AudioEffectDelay_property_feedback_level_db: -- :ref:`float` **feedback/level_db** +- :ref:`float` **feedback_level_db** +-----------+------------------------------+ | *Default* | ``-6.0`` | @@ -124,9 +124,9 @@ Sound level for ``tap1``. ---- -.. _class_AudioEffectDelay_property_feedback/lowpass: +.. _class_AudioEffectDelay_property_feedback_lowpass: -- :ref:`float` **feedback/lowpass** +- :ref:`float` **feedback_lowpass** +-----------+-----------------------------+ | *Default* | ``16000.0`` | @@ -140,9 +140,9 @@ Low-pass filter for feedback, in Hz. Frequencies below this value are filtered o ---- -.. _class_AudioEffectDelay_property_tap1/active: +.. _class_AudioEffectDelay_property_tap1_active: -- :ref:`bool` **tap1/active** +- :ref:`bool` **tap1_active** +-----------+------------------------+ | *Default* | ``true`` | @@ -156,9 +156,9 @@ If ``true``, ``tap1`` will be enabled. ---- -.. _class_AudioEffectDelay_property_tap1/delay_ms: +.. _class_AudioEffectDelay_property_tap1_delay_ms: -- :ref:`float` **tap1/delay_ms** +- :ref:`float` **tap1_delay_ms** +-----------+--------------------------+ | *Default* | ``250.0`` | @@ -172,9 +172,9 @@ If ``true``, ``tap1`` will be enabled. ---- -.. _class_AudioEffectDelay_property_tap1/level_db: +.. _class_AudioEffectDelay_property_tap1_level_db: -- :ref:`float` **tap1/level_db** +- :ref:`float` **tap1_level_db** +-----------+--------------------------+ | *Default* | ``-6.0`` | @@ -188,9 +188,9 @@ Sound level for ``tap1``. ---- -.. _class_AudioEffectDelay_property_tap1/pan: +.. _class_AudioEffectDelay_property_tap1_pan: -- :ref:`float` **tap1/pan** +- :ref:`float` **tap1_pan** +-----------+---------------------+ | *Default* | ``0.2`` | @@ -204,9 +204,9 @@ Pan position for ``tap1``. Value can range from -1 (fully left) to 1 (fully righ ---- -.. _class_AudioEffectDelay_property_tap2/active: +.. _class_AudioEffectDelay_property_tap2_active: -- :ref:`bool` **tap2/active** +- :ref:`bool` **tap2_active** +-----------+------------------------+ | *Default* | ``true`` | @@ -220,9 +220,9 @@ If ``true``, ``tap2`` will be enabled. ---- -.. _class_AudioEffectDelay_property_tap2/delay_ms: +.. _class_AudioEffectDelay_property_tap2_delay_ms: -- :ref:`float` **tap2/delay_ms** +- :ref:`float` **tap2_delay_ms** +-----------+--------------------------+ | *Default* | ``500.0`` | @@ -236,9 +236,9 @@ If ``true``, ``tap2`` will be enabled. ---- -.. _class_AudioEffectDelay_property_tap2/level_db: +.. _class_AudioEffectDelay_property_tap2_level_db: -- :ref:`float` **tap2/level_db** +- :ref:`float` **tap2_level_db** +-----------+--------------------------+ | *Default* | ``-12.0`` | @@ -252,9 +252,9 @@ Sound level for ``tap2``. ---- -.. _class_AudioEffectDelay_property_tap2/pan: +.. _class_AudioEffectDelay_property_tap2_pan: -- :ref:`float` **tap2/pan** +- :ref:`float` **tap2_pan** +-----------+---------------------+ | *Default* | ``-0.4`` | diff --git a/classes/class_audioeffectrecord.rst b/classes/class_audioeffectrecord.rst index a00ae3bee..7708a1cf5 100644 --- a/classes/class_audioeffectrecord.rst +++ b/classes/class_audioeffectrecord.rst @@ -33,27 +33,27 @@ Tutorials Properties ---------- -+----------------------------------------------+--------------------------------------------------------+-------+ -| :ref:`Format` | :ref:`format` | ``1`` | -+----------------------------------------------+--------------------------------------------------------+-------+ ++-------------------------------------------+--------------------------------------------------------+-------+ +| :ref:`Format` | :ref:`format` | ``1`` | ++-------------------------------------------+--------------------------------------------------------+-------+ Methods ------- -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ -| :ref:`AudioStreamSample` | :ref:`get_recording` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_recording_active` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_recording_active` **(** :ref:`bool` record **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ ++---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`AudioStreamWAV` | :ref:`get_recording` **(** **)** |const| | ++---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_recording_active` **(** **)** |const| | ++---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_recording_active` **(** :ref:`bool` record **)** | ++---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ Property Descriptions --------------------- .. _class_AudioEffectRecord_property_format: -- :ref:`Format` **format** +- :ref:`Format` **format** +-----------+-------------------+ | *Default* | ``1`` | @@ -63,14 +63,14 @@ Property Descriptions | *Getter* | get_format() | +-----------+-------------------+ -Specifies the format in which the sample will be recorded. See :ref:`Format` for available formats. +Specifies the format in which the sample will be recorded. See :ref:`Format` for available formats. Method Descriptions ------------------- .. _class_AudioEffectRecord_method_get_recording: -- :ref:`AudioStreamSample` **get_recording** **(** **)** |const| +- :ref:`AudioStreamWAV` **get_recording** **(** **)** |const| Returns the recorded sample. diff --git a/classes/class_audioserver.rst b/classes/class_audioserver.rst index 82b67ca01..721837f33 100644 --- a/classes/class_audioserver.rst +++ b/classes/class_audioserver.rst @@ -51,7 +51,7 @@ Methods +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_bus_effect` **(** :ref:`int` bus_idx, :ref:`AudioEffect` effect, :ref:`int` at_position=-1 **)** | +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`capture_get_device_list` **(** **)** | +| :ref:`PackedStringArray` | :ref:`capture_get_device_list` **(** **)** | +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`AudioBusLayout` | :ref:`generate_bus_layout` **(** **)** |const| | +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -75,7 +75,7 @@ Methods +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_bus_volume_db` **(** :ref:`int` bus_idx **)** |const| | +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_device_list` **(** **)** | +| :ref:`PackedStringArray` | :ref:`get_device_list` **(** **)** | +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_mix_rate` **(** **)** |const| | +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -244,7 +244,7 @@ Adds an :ref:`AudioEffect` effect to the bus ``bus_idx`` at ` .. _class_AudioServer_method_capture_get_device_list: -- :ref:`Array` **capture_get_device_list** **(** **)** +- :ref:`PackedStringArray` **capture_get_device_list** **(** **)** Returns the names of all audio input devices detected on the system. @@ -262,7 +262,7 @@ Generates an :ref:`AudioBusLayout` using the available bus - :ref:`int` **get_bus_channels** **(** :ref:`int` bus_idx **)** |const| -Returns the amount of channels of the bus at index ``bus_idx``. +Returns the number of channels of the bus at index ``bus_idx``. ---- @@ -340,7 +340,7 @@ Returns the volume of the bus at index ``bus_idx`` in dB. .. _class_AudioServer_method_get_device_list: -- :ref:`Array` **get_device_list** **(** **)** +- :ref:`PackedStringArray` **get_device_list** **(** **)** Returns the names of all audio devices detected on the system. diff --git a/classes/class_audiostream.rst b/classes/class_audiostream.rst index bd7b39d28..123429600 100644 --- a/classes/class_audiostream.rst +++ b/classes/class_audiostream.rst @@ -12,14 +12,14 @@ AudioStream **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`AudioStreamGenerator`, :ref:`AudioStreamMP3`, :ref:`AudioStreamMicrophone`, :ref:`AudioStreamOGGVorbis`, :ref:`AudioStreamRandomizer`, :ref:`AudioStreamSample` +**Inherited By:** :ref:`AudioStreamGenerator`, :ref:`AudioStreamMP3`, :ref:`AudioStreamMicrophone`, :ref:`AudioStreamOggVorbis`, :ref:`AudioStreamRandomizer`, :ref:`AudioStreamWAV` Base class for audio streams. Description ----------- -Base class for audio streams. Audio streams are used for sound effects and music playback, and support WAV (via :ref:`AudioStreamSample`) and OGG (via :ref:`AudioStreamOGGVorbis`) file formats. +Base class for audio streams. Audio streams are used for sound effects and music playback, and support WAV (via :ref:`AudioStreamWAV`) and Ogg (via :ref:`AudioStreamOggVorbis`) file formats. Tutorials --------- diff --git a/classes/class_audiostreamoggvorbis.rst b/classes/class_audiostreamoggvorbis.rst index 04f2a08a2..c4664b6fd 100644 --- a/classes/class_audiostreamoggvorbis.rst +++ b/classes/class_audiostreamoggvorbis.rst @@ -3,11 +3,11 @@ .. 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/modules/vorbis/doc_classes/AudioStreamOGGVorbis.xml. +.. XML source: https://github.com/godotengine/godot/tree/master/modules/vorbis/doc_classes/AudioStreamOggVorbis.xml. -.. _class_AudioStreamOGGVorbis: +.. _class_AudioStreamOggVorbis: -AudioStreamOGGVorbis +AudioStreamOggVorbis ==================== **Inherits:** :ref:`AudioStream` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` @@ -18,23 +18,23 @@ Properties ---------- +---------------------------------------------------+-----------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`bar_beats` | ``4`` | +| :ref:`int` | :ref:`bar_beats` | ``4`` | +---------------------------------------------------+-----------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`beat_count` | ``0`` | +| :ref:`int` | :ref:`beat_count` | ``0`` | +---------------------------------------------------+-----------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`bpm` | ``0.0`` | +| :ref:`float` | :ref:`bpm` | ``0.0`` | +---------------------------------------------------+-----------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`loop` | ``false`` | +| :ref:`bool` | :ref:`loop` | ``false`` | +---------------------------------------------------+-----------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`loop_offset` | ``0.0`` | +| :ref:`float` | :ref:`loop_offset` | ``0.0`` | +---------------------------------------------------+-----------------------------------------------------------------------------+-----------+ -| :ref:`OGGPacketSequence` | :ref:`packet_sequence` | | +| :ref:`OggPacketSequence` | :ref:`packet_sequence` | | +---------------------------------------------------+-----------------------------------------------------------------------------+-----------+ Property Descriptions --------------------- -.. _class_AudioStreamOGGVorbis_property_bar_beats: +.. _class_AudioStreamOggVorbis_property_bar_beats: - :ref:`int` **bar_beats** @@ -48,7 +48,7 @@ Property Descriptions ---- -.. _class_AudioStreamOGGVorbis_property_beat_count: +.. _class_AudioStreamOggVorbis_property_beat_count: - :ref:`int` **beat_count** @@ -62,7 +62,7 @@ Property Descriptions ---- -.. _class_AudioStreamOGGVorbis_property_bpm: +.. _class_AudioStreamOggVorbis_property_bpm: - :ref:`float` **bpm** @@ -76,7 +76,7 @@ Property Descriptions ---- -.. _class_AudioStreamOGGVorbis_property_loop: +.. _class_AudioStreamOggVorbis_property_loop: - :ref:`bool` **loop** @@ -92,7 +92,7 @@ If ``true``, the stream will automatically loop when it reaches the end. ---- -.. _class_AudioStreamOGGVorbis_property_loop_offset: +.. _class_AudioStreamOggVorbis_property_loop_offset: - :ref:`float` **loop_offset** @@ -108,9 +108,9 @@ Time in seconds at which the stream starts after being looped. ---- -.. _class_AudioStreamOGGVorbis_property_packet_sequence: +.. _class_AudioStreamOggVorbis_property_packet_sequence: -- :ref:`OGGPacketSequence` **packet_sequence** +- :ref:`OggPacketSequence` **packet_sequence** +----------+----------------------------+ | *Setter* | set_packet_sequence(value) | @@ -118,7 +118,7 @@ Time in seconds at which the stream starts after being looped. | *Getter* | get_packet_sequence() | +----------+----------------------------+ -Contains the raw OGG data for this stream. +Contains the raw Ogg data for this stream. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_audiostreamplayback.rst b/classes/class_audiostreamplayback.rst index 7f3521774..fd2be8cac 100644 --- a/classes/class_audiostreamplayback.rst +++ b/classes/class_audiostreamplayback.rst @@ -19,7 +19,7 @@ Meta class for playing back audio. Description ----------- -Can play, loop, pause a scroll through audio. See :ref:`AudioStream` and :ref:`AudioStreamOGGVorbis` for usage. +Can play, loop, pause a scroll through audio. See :ref:`AudioStream` and :ref:`AudioStreamOggVorbis` for usage. Tutorials --------- diff --git a/classes/class_audiostreamplaybackoggvorbis.rst b/classes/class_audiostreamplaybackoggvorbis.rst index 71cb8ad10..181eff4ff 100644 --- a/classes/class_audiostreamplaybackoggvorbis.rst +++ b/classes/class_audiostreamplaybackoggvorbis.rst @@ -3,11 +3,11 @@ .. 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/modules/vorbis/doc_classes/AudioStreamPlaybackOGGVorbis.xml. +.. XML source: https://github.com/godotengine/godot/tree/master/modules/vorbis/doc_classes/AudioStreamPlaybackOggVorbis.xml. -.. _class_AudioStreamPlaybackOGGVorbis: +.. _class_AudioStreamPlaybackOggVorbis: -AudioStreamPlaybackOGGVorbis +AudioStreamPlaybackOggVorbis ============================ **Inherits:** :ref:`AudioStreamPlaybackResampled` **<** :ref:`AudioStreamPlayback` **<** :ref:`RefCounted` **<** :ref:`Object` diff --git a/classes/class_audiostreamplaybackresampled.rst b/classes/class_audiostreamplaybackresampled.rst index 76aa5d8df..2f974d75f 100644 --- a/classes/class_audiostreamplaybackresampled.rst +++ b/classes/class_audiostreamplaybackresampled.rst @@ -12,7 +12,7 @@ AudioStreamPlaybackResampled **Inherits:** :ref:`AudioStreamPlayback` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`AudioStreamGeneratorPlayback`, :ref:`AudioStreamPlaybackOGGVorbis` +**Inherited By:** :ref:`AudioStreamGeneratorPlayback`, :ref:`AudioStreamPlaybackOggVorbis` diff --git a/classes/class_audiostreamplayer2d.rst b/classes/class_audiostreamplayer2d.rst index cde3e8e11..1c05727c7 100644 --- a/classes/class_audiostreamplayer2d.rst +++ b/classes/class_audiostreamplayer2d.rst @@ -17,7 +17,9 @@ Plays positional sound in 2D space. Description ----------- -Plays audio that dampens with distance from screen center. +Plays audio that dampens with distance from a given position. + +By default, audio is heard from the screen center. This can be changed by adding an :ref:`AudioListener2D` node to the scene and enabling it by calling :ref:`AudioListener2D.make_current` on it. See also :ref:`AudioStreamPlayer` to play a sound non-positionally. diff --git a/classes/class_audiostreamplayer3d.rst b/classes/class_audiostreamplayer3d.rst index 8466fc582..5c82cd83a 100644 --- a/classes/class_audiostreamplayer3d.rst +++ b/classes/class_audiostreamplayer3d.rst @@ -19,7 +19,7 @@ Description Plays a sound effect with directed sound effects, dampens with distance if needed, generates effect of hearable position in space. For greater realism, a low-pass filter is automatically applied to distant sounds. This can be disabled by setting :ref:`attenuation_filter_cutoff_hz` to ``20500``. -By default, audio is heard from the camera position. This can be changed by adding a :ref:`AudioListener3D` node to the scene and enabling it by calling :ref:`AudioListener3D.make_current` on it. +By default, audio is heard from the camera position. This can be changed by adding an :ref:`AudioListener3D` node to the scene and enabling it by calling :ref:`AudioListener3D.make_current` on it. See also :ref:`AudioStreamPlayer` to play a sound non-positionally. diff --git a/classes/class_audiostreamsample.rst b/classes/class_audiostreamwav.rst similarity index 57% rename from classes/class_audiostreamsample.rst rename to classes/class_audiostreamwav.rst index 1c407a0f7..1d58a7cc5 100644 --- a/classes/class_audiostreamsample.rst +++ b/classes/class_audiostreamwav.rst @@ -3,12 +3,12 @@ .. 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/AudioStreamSample.xml. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/AudioStreamWAV.xml. -.. _class_AudioStreamSample: +.. _class_AudioStreamWAV: -AudioStreamSample -================= +AudioStreamWAV +============== **Inherits:** :ref:`AudioStream` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` @@ -17,46 +17,46 @@ Stores audio data loaded from WAV files. Description ----------- -AudioStreamSample stores sound samples loaded from WAV files. To play the stored sound, use an :ref:`AudioStreamPlayer` (for non-positional audio) or :ref:`AudioStreamPlayer2D`/:ref:`AudioStreamPlayer3D` (for positional audio). The sound can be looped. +AudioStreamWAV stores sound samples loaded from WAV files. To play the stored sound, use an :ref:`AudioStreamPlayer` (for non-positional audio) or :ref:`AudioStreamPlayer2D`/:ref:`AudioStreamPlayer3D` (for positional audio). The sound can be looped. This class can also be used to store dynamically-generated PCM audio data. See also :ref:`AudioStreamGenerator` for procedural audio generation. Properties ---------- -+--------------------------------------------------+----------------------------------------------------------------+-----------------------+ -| :ref:`PackedByteArray` | :ref:`data` | ``PackedByteArray()`` | -+--------------------------------------------------+----------------------------------------------------------------+-----------------------+ -| :ref:`Format` | :ref:`format` | ``0`` | -+--------------------------------------------------+----------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`loop_begin` | ``0`` | -+--------------------------------------------------+----------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`loop_end` | ``0`` | -+--------------------------------------------------+----------------------------------------------------------------+-----------------------+ -| :ref:`LoopMode` | :ref:`loop_mode` | ``0`` | -+--------------------------------------------------+----------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`mix_rate` | ``44100`` | -+--------------------------------------------------+----------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`stereo` | ``false`` | -+--------------------------------------------------+----------------------------------------------------------------+-----------------------+ ++-----------------------------------------------+-------------------------------------------------------------+-----------------------+ +| :ref:`PackedByteArray` | :ref:`data` | ``PackedByteArray()`` | ++-----------------------------------------------+-------------------------------------------------------------+-----------------------+ +| :ref:`Format` | :ref:`format` | ``0`` | ++-----------------------------------------------+-------------------------------------------------------------+-----------------------+ +| :ref:`int` | :ref:`loop_begin` | ``0`` | ++-----------------------------------------------+-------------------------------------------------------------+-----------------------+ +| :ref:`int` | :ref:`loop_end` | ``0`` | ++-----------------------------------------------+-------------------------------------------------------------+-----------------------+ +| :ref:`LoopMode` | :ref:`loop_mode` | ``0`` | ++-----------------------------------------------+-------------------------------------------------------------+-----------------------+ +| :ref:`int` | :ref:`mix_rate` | ``44100`` | ++-----------------------------------------------+-------------------------------------------------------------+-----------------------+ +| :ref:`bool` | :ref:`stereo` | ``false`` | ++-----------------------------------------------+-------------------------------------------------------------+-----------------------+ Methods ------- -+---------------------------------------+-------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`save_to_wav` **(** :ref:`String` path **)** | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------+ ++---------------------------------------+----------------------------------------------------------------------------------------------------------+ +| :ref:`Error` | :ref:`save_to_wav` **(** :ref:`String` path **)** | ++---------------------------------------+----------------------------------------------------------------------------------------------------------+ Enumerations ------------ -.. _enum_AudioStreamSample_Format: +.. _enum_AudioStreamWAV_Format: -.. _class_AudioStreamSample_constant_FORMAT_8_BITS: +.. _class_AudioStreamWAV_constant_FORMAT_8_BITS: -.. _class_AudioStreamSample_constant_FORMAT_16_BITS: +.. _class_AudioStreamWAV_constant_FORMAT_16_BITS: -.. _class_AudioStreamSample_constant_FORMAT_IMA_ADPCM: +.. _class_AudioStreamWAV_constant_FORMAT_IMA_ADPCM: enum **Format**: @@ -68,30 +68,30 @@ enum **Format**: ---- -.. _enum_AudioStreamSample_LoopMode: +.. _enum_AudioStreamWAV_LoopMode: -.. _class_AudioStreamSample_constant_LOOP_DISABLED: +.. _class_AudioStreamWAV_constant_LOOP_DISABLED: -.. _class_AudioStreamSample_constant_LOOP_FORWARD: +.. _class_AudioStreamWAV_constant_LOOP_FORWARD: -.. _class_AudioStreamSample_constant_LOOP_PINGPONG: +.. _class_AudioStreamWAV_constant_LOOP_PINGPONG: -.. _class_AudioStreamSample_constant_LOOP_BACKWARD: +.. _class_AudioStreamWAV_constant_LOOP_BACKWARD: enum **LoopMode**: - **LOOP_DISABLED** = **0** --- Audio does not loop. -- **LOOP_FORWARD** = **1** --- Audio loops the data between :ref:`loop_begin` and :ref:`loop_end`, playing forward only. +- **LOOP_FORWARD** = **1** --- Audio loops the data between :ref:`loop_begin` and :ref:`loop_end`, playing forward only. -- **LOOP_PINGPONG** = **2** --- Audio loops the data between :ref:`loop_begin` and :ref:`loop_end`, playing back and forth. +- **LOOP_PINGPONG** = **2** --- Audio loops the data between :ref:`loop_begin` and :ref:`loop_end`, playing back and forth. -- **LOOP_BACKWARD** = **3** --- Audio loops the data between :ref:`loop_begin` and :ref:`loop_end`, playing backward only. +- **LOOP_BACKWARD** = **3** --- Audio loops the data between :ref:`loop_begin` and :ref:`loop_end`, playing backward only. Property Descriptions --------------------- -.. _class_AudioStreamSample_property_data: +.. _class_AudioStreamWAV_property_data: - :ref:`PackedByteArray` **data** @@ -109,9 +109,9 @@ Contains the audio data in bytes. ---- -.. _class_AudioStreamSample_property_format: +.. _class_AudioStreamWAV_property_format: -- :ref:`Format` **format** +- :ref:`Format` **format** +-----------+-------------------+ | *Default* | ``0`` | @@ -121,11 +121,11 @@ Contains the audio data in bytes. | *Getter* | get_format() | +-----------+-------------------+ -Audio format. See :ref:`Format` constants for values. +Audio format. See :ref:`Format` constants for values. ---- -.. _class_AudioStreamSample_property_loop_begin: +.. _class_AudioStreamWAV_property_loop_begin: - :ref:`int` **loop_begin** @@ -141,7 +141,7 @@ The loop start point (in number of samples, relative to the beginning of the sam ---- -.. _class_AudioStreamSample_property_loop_end: +.. _class_AudioStreamWAV_property_loop_end: - :ref:`int` **loop_end** @@ -157,9 +157,9 @@ The loop end point (in number of samples, relative to the beginning of the sampl ---- -.. _class_AudioStreamSample_property_loop_mode: +.. _class_AudioStreamWAV_property_loop_mode: -- :ref:`LoopMode` **loop_mode** +- :ref:`LoopMode` **loop_mode** +-----------+----------------------+ | *Default* | ``0`` | @@ -169,11 +169,11 @@ The loop end point (in number of samples, relative to the beginning of the sampl | *Getter* | get_loop_mode() | +-----------+----------------------+ -The loop mode. This information will be imported automatically from the WAV file if present. See :ref:`LoopMode` constants for values. +The loop mode. This information will be imported automatically from the WAV file if present. See :ref:`LoopMode` constants for values. ---- -.. _class_AudioStreamSample_property_mix_rate: +.. _class_AudioStreamWAV_property_mix_rate: - :ref:`int` **mix_rate** @@ -193,7 +193,7 @@ According to the `Nyquist-Shannon sampling theorem ` **stereo** @@ -210,11 +210,11 @@ If ``true``, audio is stereo. Method Descriptions ------------------- -.. _class_AudioStreamSample_method_save_to_wav: +.. _class_AudioStreamWAV_method_save_to_wav: - :ref:`Error` **save_to_wav** **(** :ref:`String` path **)** -Saves the AudioStreamSample as a WAV file to ``path``. Samples with IMA ADPCM format can't be saved. +Saves the AudioStreamWAV as a WAV file to ``path``. Samples with IMA ADPCM format can't be saved. \ **Note:** A ``.wav`` extension is automatically appended to ``path`` if it is missing. diff --git a/classes/class_basematerial3d.rst b/classes/class_basematerial3d.rst index 98ceb309d..24d49bc4e 100644 --- a/classes/class_basematerial3d.rst +++ b/classes/class_basematerial3d.rst @@ -142,7 +142,7 @@ Properties +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`int` | :ref:`heightmap_min_layers` | | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`heightmap_scale` | ``0.05`` | +| :ref:`float` | :ref:`heightmap_scale` | ``5.0`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`Texture2D` | :ref:`heightmap_texture` | | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ @@ -389,9 +389,9 @@ enum **TextureFilter**: - **TEXTURE_FILTER_LINEAR_WITH_MIPMAPS** = **3** --- The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps. Use this for most cases as mipmaps are important to smooth out pixels that are far from the camera. -- **TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC** = **4** --- The texture filter reads from the nearest pixel, but selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. +- **TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC** = **4** --- The texture filter reads from the nearest pixel, but selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. -- **TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC** = **5** --- The texture filter blends between the nearest 4 pixels and selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. This is the slowest of the filtering options, but results in the highest quality texturing. +- **TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC** = **5** --- The texture filter blends between the nearest 4 pixels and selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. This is the slowest of the filtering options, but results in the highest quality texturing. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. - **TEXTURE_FILTER_MAX** = **6** --- Represents the size of the :ref:`TextureFilter` enum. @@ -753,7 +753,7 @@ enum **BillboardMode**: - **BILLBOARD_PARTICLES** = **3** --- Used for particle systems when assigned to :ref:`GPUParticles3D` and :ref:`CPUParticles3D` nodes. Enables ``particles_anim_*`` properties. -The :ref:`ParticlesMaterial.anim_speed_min` or :ref:`CPUParticles3D.anim_speed_min` should also be set to a value bigger than zero for the animation to play. +The :ref:`ParticleProcessMaterial.anim_speed_min` or :ref:`CPUParticles3D.anim_speed_min` should also be set to a value bigger than zero for the animation to play. ---- @@ -940,7 +940,7 @@ The hashing scale for Alpha Hash. Recommended values between ``0`` and ``2``. | *Getter* | get_alpha_scissor_threshold() | +----------+------------------------------------+ -Threshold at which the alpha scissor will discard values. +Threshold at which the alpha scissor will discard values. Higher values will result in more pixels being discarded. If the material becomes too opaque at a distance, try increasing :ref:`alpha_scissor_threshold`. If the material disappears at a distance, try decreasing :ref:`alpha_scissor_threshold`. ---- @@ -1616,6 +1616,8 @@ Grows object vertices in the direction of their normals. | *Getter* | is_heightmap_deep_parallax_enabled() | +-----------+--------------------------------------+ +If ``true``, uses parallax occlusion mapping to represent depth in the material instead of simple offset mapping (see :ref:`heightmap_enabled`). This results in a more convincing depth effect, but is much more expensive on the GPU. Only enable this on materials where it makes a significant visual difference. + ---- .. _class_BaseMaterial3D_property_heightmap_enabled: @@ -1630,7 +1632,7 @@ Grows object vertices in the direction of their normals. | *Getter* | get_feature() | +-----------+--------------------+ -If ``true``, height mapping is enabled (also called "parallax mapping" or "depth mapping"). See also :ref:`normal_enabled`. +If ``true``, height mapping is enabled (also called "parallax mapping" or "depth mapping"). See also :ref:`normal_enabled`. Height mapping is a demanding feature on the GPU, so it should only be used on materials where it makes a significant visual difference. \ **Note:** Height mapping is not supported if triplanar mapping is used on the same material. The value of :ref:`heightmap_enabled` will be ignored if :ref:`uv1_triplanar` is enabled. @@ -1648,6 +1650,8 @@ If ``true``, height mapping is enabled (also called "parallax mapping" or "depth | *Getter* | get_heightmap_deep_parallax_flip_binormal() | +-----------+--------------------------------------------------+ +If ``true``, flips the mesh's binormal vectors when interpreting the height map. If the heightmap effect looks strange when the camera moves (even with a reasonable :ref:`heightmap_scale`), try setting this to ``true``. + ---- .. _class_BaseMaterial3D_property_heightmap_flip_tangent: @@ -1662,6 +1666,8 @@ If ``true``, height mapping is enabled (also called "parallax mapping" or "depth | *Getter* | get_heightmap_deep_parallax_flip_tangent() | +-----------+-------------------------------------------------+ +If ``true``, flips the mesh's tangent vectors when interpreting the height map. If the heightmap effect looks strange when the camera moves (even with a reasonable :ref:`heightmap_scale`), try setting this to ``true``. + ---- .. _class_BaseMaterial3D_property_heightmap_flip_texture: @@ -1676,6 +1682,10 @@ If ``true``, height mapping is enabled (also called "parallax mapping" or "depth | *Getter* | get_flag() | +-----------+-----------------+ +If ``true``, interprets the height map texture as a depth map, with brighter values appearing to be "lower" in altitude compared to darker values. + +This can be enabled for compatibility with some materials authored for Godot 3.x. This is not necessary if the Invert import option was used to invert the depth map in Godot 3.x, in which case :ref:`heightmap_flip_texture` should remain ``false``. + ---- .. _class_BaseMaterial3D_property_heightmap_max_layers: @@ -1688,6 +1698,10 @@ If ``true``, height mapping is enabled (also called "parallax mapping" or "depth | *Getter* | get_heightmap_deep_parallax_max_layers() | +----------+-----------------------------------------------+ +The number of layers to use for parallax occlusion mapping when the camera is up close to the material. Higher values result in a more convincing depth effect, especially in materials that have steep height changes. Higher values have a significant cost on the GPU, so it should only be increased on materials where it makes a significant visual difference. + +\ **Note:** Only effective if :ref:`heightmap_deep_parallax` is ``true``. + ---- .. _class_BaseMaterial3D_property_heightmap_min_layers: @@ -1700,6 +1714,10 @@ If ``true``, height mapping is enabled (also called "parallax mapping" or "depth | *Getter* | get_heightmap_deep_parallax_min_layers() | +----------+-----------------------------------------------+ +The number of layers to use for parallax occlusion mapping when the camera is far away from the material. Higher values result in a more convincing depth effect, especially in materials that have steep height changes. Higher values have a significant cost on the GPU, so it should only be increased on materials where it makes a significant visual difference. + +\ **Note:** Only effective if :ref:`heightmap_deep_parallax` is ``true``. + ---- .. _class_BaseMaterial3D_property_heightmap_scale: @@ -1707,13 +1725,17 @@ If ``true``, height mapping is enabled (also called "parallax mapping" or "depth - :ref:`float` **heightmap_scale** +-----------+----------------------------+ -| *Default* | ``0.05`` | +| *Default* | ``5.0`` | +-----------+----------------------------+ | *Setter* | set_heightmap_scale(value) | +-----------+----------------------------+ | *Getter* | get_heightmap_scale() | +-----------+----------------------------+ +The heightmap scale to use for the parallax effect (see :ref:`heightmap_enabled`). The default value is tuned so that the highest point (value = 255) appears to be 5 cm higher than the lowest point (value = 0). Higher values result in a deeper appearance, but may result in artifacts appearing when looking at the material from oblique angles, especially when the camera moves. Negative values can be used to invert the parallax effect, but this is different from inverting the texture using :ref:`heightmap_flip_texture` as the material will also appear to be "closer" to the camera. In most cases, :ref:`heightmap_scale` should be kept to a positive value. + +\ **Note:** If the height map effect looks strange regardless of this value, try adjusting :ref:`heightmap_flip_binormal` and :ref:`heightmap_flip_tangent`. See also :ref:`heightmap_texture` for recommendations on authoring heightmap textures, as the way the heightmap texture is authored affects how :ref:`heightmap_scale` behaves. + ---- .. _class_BaseMaterial3D_property_heightmap_texture: @@ -1726,6 +1748,12 @@ If ``true``, height mapping is enabled (also called "parallax mapping" or "depth | *Getter* | get_texture() | +----------+--------------------+ +The texture to use as a height map. See also :ref:`heightmap_enabled`. + +For best results, the texture should be normalized (with :ref:`heightmap_scale` reduced to compensate). In `GIMP `__, this can be done using **Colors > Auto > Equalize**. If the texture only uses a small part of its available range, the parallax effect may look strange, especially when the camera moves. + +\ **Note:** To reduce memory usage and improve loading times, you may be able to use a lower-resolution heightmap texture as most heightmaps are only comprised of low-frequency data. + ---- .. _class_BaseMaterial3D_property_metallic: @@ -1756,7 +1784,7 @@ A high value makes the material appear more like a metal. Non-metals use their a | *Getter* | get_specular() | +-----------+---------------------+ -Sets the size of the specular lobe. The specular lobe is the bright spot that is reflected from light sources. +Adjusts the strength of specular reflections. Specular reflections are composed of scene reflections and the specular lobe which is the bright spot that is reflected from light sources. When set to ``0.0``, no specular reflections will be visible. This differs from the :ref:`SPECULAR_DISABLED` :ref:`SpecularMode` as :ref:`SPECULAR_DISABLED` only applies to the specular lobe from the light source. \ **Note:** Unlike :ref:`metallic`, this is not energy-conserving, so it should be left at ``0.5`` in most cases. See also :ref:`roughness`. @@ -2490,6 +2518,8 @@ If ``true``, instead of using ``UV`` textures will use a triplanar texture looku A lower number blends the texture more softly while a higher number blends the texture more sharply. +\ **Note:** :ref:`uv1_triplanar_sharpness` is clamped between ``0.0`` and ``150.0`` (inclusive) as values outside that range can look broken depending on the mesh. + ---- .. _class_BaseMaterial3D_property_uv1_world_triplanar: @@ -2570,6 +2600,8 @@ If ``true``, instead of using ``UV2`` textures will use a triplanar texture look A lower number blends the texture more softly while a higher number blends the texture more sharply. +\ **Note:** :ref:`uv2_triplanar_sharpness` is clamped between ``0.0`` and ``150.0`` (inclusive) as values outside that range can look broken depending on the mesh. + ---- .. _class_BaseMaterial3D_property_uv2_world_triplanar: diff --git a/classes/class_basis.rst b/classes/class_basis.rst index d4d4f62d0..877f453ab 100644 --- a/classes/class_basis.rst +++ b/classes/class_basis.rst @@ -78,8 +78,6 @@ Methods +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`get_euler` **(** :ref:`int` order=2 **)** |const| | +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_orthogonal_index` **(** **)** |const| | -+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Quaternion` | :ref:`get_rotation_quaternion` **(** **)** |const| | +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`get_scale` **(** **)** |const| | @@ -278,14 +276,6 @@ Consider using the :ref:`get_rotation_quaternion` **get_orthogonal_index** **(** **)** |const| - -This function considers a discretization of rotations into 24 points on unit sphere, lying along the vectors (x,y,z) with each component being either -1, 0, or 1, and returns the index of the point best representing the orientation of the object. It is mainly used by the :ref:`GridMap` editor. For further details, refer to the Godot source code. - ----- - .. _class_Basis_method_get_rotation_quaternion: - :ref:`Quaternion` **get_rotation_quaternion** **(** **)** |const| diff --git a/classes/class_bitmap.rst b/classes/class_bitmap.rst index d6ae70b6b..39bfb60a5 100644 --- a/classes/class_bitmap.rst +++ b/classes/class_bitmap.rst @@ -22,29 +22,29 @@ A two-dimensional array of boolean values, can be used to efficiently store a bi Methods ------- -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Image` | :ref:`convert_to_image` **(** **)** |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`create` **(** :ref:`Vector2` size **)** | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`create_from_image_alpha` **(** :ref:`Image` image, :ref:`float` threshold=0.1 **)** | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_bit` **(** :ref:`Vector2` position **)** |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_size` **(** **)** |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_true_bit_count` **(** **)** |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`grow_mask` **(** :ref:`int` pixels, :ref:`Rect2` rect **)** | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`opaque_to_polygons` **(** :ref:`Rect2` rect, :ref:`float` epsilon=2.0 **)** |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`resize` **(** :ref:`Vector2` new_size **)** | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_bit` **(** :ref:`Vector2` position, :ref:`bool` bit **)** | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_bit_rect` **(** :ref:`Rect2` rect, :ref:`bool` bit **)** | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Image` | :ref:`convert_to_image` **(** **)** |const| | ++-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`create` **(** :ref:`Vector2` size **)** | ++-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`create_from_image_alpha` **(** :ref:`Image` image, :ref:`float` threshold=0.1 **)** | ++-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_bit` **(** :ref:`Vector2` position **)** |const| | ++-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_size` **(** **)** |const| | ++-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_true_bit_count` **(** **)** |const| | ++-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`grow_mask` **(** :ref:`int` pixels, :ref:`Rect2` rect **)** | ++-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedVector2Array[]` | :ref:`opaque_to_polygons` **(** :ref:`Rect2` rect, :ref:`float` epsilon=2.0 **)** |const| | ++-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`resize` **(** :ref:`Vector2` new_size **)** | ++-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_bit` **(** :ref:`Vector2` position, :ref:`bool` bit **)** | ++-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_bit_rect` **(** :ref:`Rect2` rect, :ref:`bool` bit **)** | ++-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Method Descriptions ------------------- @@ -93,7 +93,7 @@ Returns bitmap's dimensions. - :ref:`int` **get_true_bit_count** **(** **)** |const| -Returns the amount of bitmap elements that are set to ``true``. +Returns the number of bitmap elements that are set to ``true``. ---- @@ -107,7 +107,7 @@ Applies morphological dilation or erosion to the bitmap. If ``pixels`` is positi .. _class_BitMap_method_opaque_to_polygons: -- :ref:`Array` **opaque_to_polygons** **(** :ref:`Rect2` rect, :ref:`float` epsilon=2.0 **)** |const| +- :ref:`PackedVector2Array[]` **opaque_to_polygons** **(** :ref:`Rect2` rect, :ref:`float` epsilon=2.0 **)** |const| Creates an :ref:`Array` of polygons covering a rectangular portion of the bitmap. It uses a marching squares algorithm, followed by Ramer-Douglas-Peucker (RDP) reduction of the number of vertices. Each polygon is described as a :ref:`PackedVector2Array` of its vertices. @@ -117,7 +117,7 @@ To get polygons covering the whole bitmap, pass: Rect2(Vector2(), get_size()) -\ ``epsilon`` is passed to RDP to control how accurately the polygons cover the bitmap: a lower ``epsilon`` corresponds to more points in the polygons. +``epsilon`` is passed to RDP to control how accurately the polygons cover the bitmap: a lower ``epsilon`` corresponds to more points in the polygons. ---- diff --git a/classes/class_bool.rst b/classes/class_bool.rst index ac2a86f3b..5e07d7d79 100644 --- a/classes/class_bool.rst +++ b/classes/class_bool.rst @@ -138,7 +138,7 @@ Operators +-------------------------+--------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator !=` **(** :ref:`bool` right **)** | +-------------------------+--------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator <` **(** :ref:`bool` right **)** | +| :ref:`bool` | :ref:`operator \<` **(** :ref:`bool` right **)** | +-------------------------+--------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`bool` right **)** | +-------------------------+--------------------------------------------------------------------------------------------+ diff --git a/classes/class_button.rst b/classes/class_button.rst index d744be595..25d3f65d0 100644 --- a/classes/class_button.rst +++ b/classes/class_button.rst @@ -469,7 +469,7 @@ Icon modulate :ref:`Color` used when the ``Button`` is being presse | *Default* | ``2`` | +-----------+-------+ -The horizontal space between ``Button``'s icon and text. +The horizontal space between ``Button``'s icon and text. Negative values will be treated as ``0`` when used. ---- diff --git a/classes/class_buttongroup.rst b/classes/class_buttongroup.rst index 608e3b767..4234eda9e 100644 --- a/classes/class_buttongroup.rst +++ b/classes/class_buttongroup.rst @@ -31,11 +31,11 @@ Properties Methods ------- -+-------------------------------------+------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_buttons` **(** **)** | -+-------------------------------------+------------------------------------------------------------------------------------+ -| :ref:`BaseButton` | :ref:`get_pressed_button` **(** **)** | -+-------------------------------------+------------------------------------------------------------------------------------+ ++---------------------------------------+------------------------------------------------------------------------------------+ +| :ref:`BaseButton[]` | :ref:`get_buttons` **(** **)** | ++---------------------------------------+------------------------------------------------------------------------------------+ +| :ref:`BaseButton` | :ref:`get_pressed_button` **(** **)** | ++---------------------------------------+------------------------------------------------------------------------------------+ Signals ------- @@ -51,7 +51,7 @@ Method Descriptions .. _class_ButtonGroup_method_get_buttons: -- :ref:`Array` **get_buttons** **(** **)** +- :ref:`BaseButton[]` **get_buttons** **(** **)** Returns an :ref:`Array` of :ref:`Button`\ s who have this as their ``ButtonGroup`` (see :ref:`BaseButton.button_group`). diff --git a/classes/class_callable.rst b/classes/class_callable.rst index 41e1de8cf..1978a9d47 100644 --- a/classes/class_callable.rst +++ b/classes/class_callable.rst @@ -149,6 +149,11 @@ Calls the method represented by this ``Callable``. Arguments can be passed and s Calls the method represented by this ``Callable`` in deferred mode, i.e. during the idle frame. Arguments can be passed and should match the method's signature. +:: + + func _ready(): + grab_focus.call_deferred() + ---- .. _class_Callable_method_get_method: diff --git a/classes/class_camera3d.rst b/classes/class_camera3d.rst index 3c6fe639b..01a3be770 100644 --- a/classes/class_camera3d.rst +++ b/classes/class_camera3d.rst @@ -71,7 +71,7 @@ Methods +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`get_cull_mask_value` **(** :ref:`int` layer_number **)** |const| | +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_frustum` **(** **)** |const| | +| :ref:`Plane[]` | :ref:`get_frustum` **(** **)** |const| | +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`get_pyramid_shape_rid` **(** **)** | +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -288,6 +288,8 @@ For reference, the default vertical field of view value (``75.0``) is equivalent The camera's frustum offset. This can be changed from the default to create "tilted frustum" effects such as `Y-shearing `__. +\ **Note:** Only effective if :ref:`projection` is :ref:`PROJECTION_FRUSTUM`. + ---- .. _class_Camera3D_property_h_offset: @@ -366,7 +368,7 @@ The camera's projection mode. In :ref:`PROJECTION_PERSPECTIVE` locks on axis, ``size`` sets the other axis' size length. +The camera's size in meters measured as the diameter of the width or height, depending on :ref:`keep_aspect`. Only applicable in orthogonal and frustum modes. ---- @@ -421,7 +423,7 @@ Returns whether or not the specified layer of the :ref:`cull_mask` **get_frustum** **(** **)** |const| +- :ref:`Plane[]` **get_frustum** **(** **)** |const| Returns the camera's frustum planes in world space units as an array of :ref:`Plane`\ s in the following order: near, far, left, top, right, bottom. Not to be confused with :ref:`frustum_offset`. @@ -505,7 +507,7 @@ Based on ``value``, enables or disables the specified layer in the :ref:`cull_ma - void **set_frustum** **(** :ref:`float` size, :ref:`Vector2` offset, :ref:`float` z_near, :ref:`float` z_far **)** -Sets the camera projection to frustum mode (see :ref:`PROJECTION_FRUSTUM`), by specifying a ``size``, an ``offset``, and the ``z_near`` and ``z_far`` clip planes in world space units. +Sets the camera projection to frustum mode (see :ref:`PROJECTION_FRUSTUM`), by specifying a ``size``, an ``offset``, and the ``z_near`` and ``z_far`` clip planes in world space units. See also :ref:`frustum_offset`. ---- @@ -538,7 +540,7 @@ Returns the 2D coordinate in the :ref:`Viewport` rectangle that # This code block is part of a script that inherits from Node3D. # `control` is a reference to a node inheriting from Control. control.visible = not get_viewport().get_camera_3d().is_position_behind(global_transform.origin) - control.rect_position = get_viewport().get_camera_3d().unproject_position(global_transform.origin) + control.position = get_viewport().get_camera_3d().unproject_position(global_transform.origin) .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_cameraserver.rst b/classes/class_cameraserver.rst index 1ffebddc1..d7aca229c 100644 --- a/classes/class_cameraserver.rst +++ b/classes/class_cameraserver.rst @@ -26,17 +26,17 @@ It is notably used to provide AR modules with a video feed from the camera. Methods ------- -+-------------------------------------+----------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_feed` **(** :ref:`CameraFeed` feed **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`feeds` **(** **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------+ -| :ref:`CameraFeed` | :ref:`get_feed` **(** :ref:`int` index **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_feed_count` **(** **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_feed` **(** :ref:`CameraFeed` feed **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------+ ++---------------------------------------+----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_feed` **(** :ref:`CameraFeed` feed **)** | ++---------------------------------------+----------------------------------------------------------------------------------------------------------------+ +| :ref:`CameraFeed[]` | :ref:`feeds` **(** **)** | ++---------------------------------------+----------------------------------------------------------------------------------------------------------------+ +| :ref:`CameraFeed` | :ref:`get_feed` **(** :ref:`int` index **)** | ++---------------------------------------+----------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_feed_count` **(** **)** | ++---------------------------------------+----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_feed` **(** :ref:`CameraFeed` feed **)** | ++---------------------------------------+----------------------------------------------------------------------------------------------------------------+ Signals ------- @@ -91,7 +91,7 @@ Adds the camera ``feed`` to the camera server. .. _class_CameraServer_method_feeds: -- :ref:`Array` **feeds** **(** **)** +- :ref:`CameraFeed[]` **feeds** **(** **)** Returns an array of :ref:`CameraFeed`\ s. diff --git a/classes/class_canvasitem.rst b/classes/class_canvasitem.rst index efdc5d9a9..58fc44632 100644 --- a/classes/class_canvasitem.rst +++ b/classes/class_canvasitem.rst @@ -21,7 +21,7 @@ Description Base class of anything 2D. Canvas items are laid out in a tree; children inherit and extend their parent's transform. ``CanvasItem`` is extended by :ref:`Control` for anything GUI-related, and by :ref:`Node2D` for anything related to the 2D engine. -Any ``CanvasItem`` can draw. For this, :ref:`update` must be called, then :ref:`NOTIFICATION_DRAW` will be received on idle time to request redraw. Because of this, canvas items don't need to be redrawn on every frame, improving the performance significantly. Several functions for drawing on the ``CanvasItem`` are provided (see ``draw_*`` functions). However, they can only be used inside the :ref:`Object._notification`, signal or :ref:`_draw` virtual functions. +Any ``CanvasItem`` can draw. For this, :ref:`queue_redraw` is called by the engine, then :ref:`NOTIFICATION_DRAW` will be received on idle time to request redraw. Because of this, canvas items don't need to be redrawn on every frame, improving the performance significantly. Several functions for drawing on the ``CanvasItem`` are provided (see ``draw_*`` functions). However, they can only be used inside :ref:`_draw`, its corresponding :ref:`Object._notification` or methods connected to the :ref:`draw` signal. Canvas items are drawn in tree order. By default, children are on top of their parents so a root ``CanvasItem`` will be drawn behind everything. This behavior can be changed on a per-item basis. @@ -29,7 +29,7 @@ A ``CanvasItem`` can also be hidden, which will also hide its children. It provi Ultimately, a transform notification can be requested, which will notify the node that its global position changed in case the parent tree changed. -\ **Note:** Unless otherwise specified, all methods that have angle parameters must have angles specified as *radians*. To convert degrees to radians, use :ref:`@GlobalScope.deg2rad`. +\ **Note:** Unless otherwise specified, all methods that have angle parameters must have angles specified as *radians*. To convert degrees to radians, use :ref:`@GlobalScope.deg_to_rad`. Tutorials --------- @@ -89,6 +89,8 @@ Methods +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`draw_end_animation` **(** **)** | +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`draw_lcd_texture_rect_region` **(** :ref:`Texture2D` texture, :ref:`Rect2` rect, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** | ++---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`draw_line` **(** :ref:`Vector2` from, :ref:`Vector2` to, :ref:`Color` color, :ref:`float` width=1.0, :ref:`bool` antialiased=false **)** | +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`draw_mesh` **(** :ref:`Mesh` mesh, :ref:`Texture2D` texture, :ref:`Transform2D` transform=Transform2D(1, 0, 0, 1, 0, 0), :ref:`Color` modulate=Color(1, 1, 1, 1) **)** | @@ -169,14 +171,14 @@ Methods +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`InputEvent` | :ref:`make_input_local` **(** :ref:`InputEvent` event **)** |const| | +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`queue_redraw` **(** **)** | ++---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_notify_local_transform` **(** :ref:`bool` enable **)** | +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_notify_transform` **(** :ref:`bool` enable **)** | +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`show` **(** **)** | +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`update` **(** **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- @@ -185,7 +187,9 @@ Signals - **draw** **(** **)** -Emitted when the ``CanvasItem`` must redraw. This can only be connected realtime, as deferred will not allow drawing. +Emitted when the ``CanvasItem`` must redraw, *after* the related :ref:`NOTIFICATION_DRAW` notification, and *before* :ref:`_draw` is called. + +\ **Note:** Deferred connections do not allow drawing through the ``draw_*`` methods. ---- @@ -244,11 +248,11 @@ enum **TextureFilter**: - **TEXTURE_FILTER_LINEAR_WITH_MIPMAPS** = **4** --- The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps. Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to :ref:`Camera2D` zoom), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. -- **TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC** = **5** --- The texture filter reads from the nearest pixel, but selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. +- **TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC** = **5** --- The texture filter reads from the nearest pixel, but selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. \ **Note:** This texture filter is rarely useful in 2D projects. :ref:`TEXTURE_FILTER_NEAREST_WITH_MIPMAPS` is usually more appropriate. -- **TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC** = **6** --- The texture filter blends between the nearest 4 pixels and selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. This is the slowest of the filtering options, but results in the highest quality texturing. +- **TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC** = **6** --- The texture filter blends between the nearest 4 pixels and selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. This is the slowest of the filtering options, but results in the highest quality texturing. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. \ **Note:** This texture filter is rarely useful in 2D projects. :ref:`TEXTURE_FILTER_LINEAR_WITH_MIPMAPS` is usually more appropriate. @@ -299,7 +303,7 @@ Constants - **NOTIFICATION_LOCAL_TRANSFORM_CHANGED** = **35** --- The ``CanvasItem``'s local transform has changed. This notification is only received if enabled by :ref:`set_notify_local_transform`. -- **NOTIFICATION_DRAW** = **30** --- The ``CanvasItem`` is requested to draw. +- **NOTIFICATION_DRAW** = **30** --- The ``CanvasItem`` is requested to draw (see :ref:`_draw`). - **NOTIFICATION_VISIBILITY_CHANGED** = **31** --- The ``CanvasItem``'s visibility has changed. @@ -489,7 +493,9 @@ Method Descriptions - void **_draw** **(** **)** |virtual| -Overridable function called by the engine (if defined) to draw the canvas item. +Called when ``CanvasItem`` has been requested to redraw (after :ref:`queue_redraw` is called, either manually or by the engine). + +Corresponds to the :ref:`NOTIFICATION_DRAW` notification in :ref:`Object._notification`. ---- @@ -537,7 +543,7 @@ Draws a colored, filled circle. See also :ref:`draw_arc` points, :ref:`Color` color, :ref:`PackedVector2Array` uvs=PackedVector2Array(), :ref:`Texture2D` texture=null **)** -Draws a colored polygon of any amount of points, convex or concave. Unlike :ref:`draw_polygon`, a single color must be specified for the whole polygon. +Draws a colored polygon of any number of points, convex or concave. Unlike :ref:`draw_polygon`, a single color must be specified for the whole polygon. ---- @@ -557,6 +563,23 @@ After submitting all animations slices via :ref:`draw_animation_slice` texture, :ref:`Rect2` rect, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** + +Draws a textured rectangle region of the font texture with LCD sub-pixel anti-aliasing at a given position, optionally modulated by a color. + +Texture is drawn using the following blend operation, blend mode of the :ref:`CanvasItemMaterial` is ignored: + +:: + + dst.r = texture.r * modulate.r * modulate.a + dst.r * (1.0 - texture.r * modulate.a); + dst.g = texture.g * modulate.g * modulate.a + dst.g * (1.0 - texture.g * modulate.a); + dst.b = texture.b * modulate.b * modulate.a + dst.b * (1.0 - texture.b * modulate.a); + dst.a = modulate.a + dst.a * (1.0 - modulate.a); + +---- + .. _class_CanvasItem_method_draw_line: - void **draw_line** **(** :ref:`Vector2` from, :ref:`Vector2` to, :ref:`Color` color, :ref:`float` width=1.0, :ref:`bool` antialiased=false **)** @@ -605,7 +628,7 @@ Draws multiple disconnected lines with a uniform ``width`` and segment-by-segmen - void **draw_multiline_string** **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| -Breaks ``text`` to the lines and draws it using the specified ``font`` at the ``position`` (top-left corner). The text will have its color multiplied by ``modulate``. If ``clip_w`` is greater than or equal to 0, the text will be clipped if it exceeds the specified width. +Breaks ``text`` into lines and draws it using the specified ``font`` at the ``pos`` (top-left corner). The text will have its color multiplied by ``modulate``. If ``width`` is greater than or equal to 0, the text will be clipped if it exceeds the specified width. ---- @@ -613,7 +636,7 @@ Breaks ``text`` to the lines and draws it using the specified ``font`` at the `` - void **draw_multiline_string_outline** **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`int` size=1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| -Breaks ``text`` to the lines and draws text outline using the specified ``font`` at the ``position`` (top-left corner). The text will have its color multiplied by ``modulate``. If ``clip_w`` is greater than or equal to 0, the text will be clipped if it exceeds the specified width. +Breaks ``text`` to the lines and draws text outline using the specified ``font`` at the ``pos`` (top-left corner). The text will have its color multiplied by ``modulate``. If ``width`` is greater than or equal to 0, the text will be clipped if it exceeds the specified width. ---- @@ -629,7 +652,7 @@ Draws a :ref:`MultiMesh` in 2D with the provided texture. See : - void **draw_polygon** **(** :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`PackedVector2Array` uvs=PackedVector2Array(), :ref:`Texture2D` texture=null **)** -Draws a solid polygon of any amount of points, convex or concave. Unlike :ref:`draw_colored_polygon`, each point's color can be changed individually. See also :ref:`draw_polyline` and :ref:`draw_polyline_colors`. +Draws a solid polygon of any number of points, convex or concave. Unlike :ref:`draw_colored_polygon`, each point's color can be changed individually. See also :ref:`draw_polyline` and :ref:`draw_polyline_colors`. ---- @@ -687,7 +710,7 @@ Sets a custom transform for drawing via matrix. Anything drawn afterwards will b - void **draw_string** **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| -Draws ``text`` using the specified ``font`` at the ``position`` (bottom-left corner using the baseline of the font). The text will have its color multiplied by ``modulate``. If ``clip_w`` is greater than or equal to 0, the text will be clipped if it exceeds the specified width. +Draws ``text`` using the specified ``font`` at the ``pos`` (bottom-left corner using the baseline of the font). The text will have its color multiplied by ``modulate``. If ``width`` is greater than or equal to 0, the text will be clipped if it exceeds the specified width. \ **Example using the default project font:**\ @@ -722,7 +745,7 @@ See also :ref:`Font.draw_string`. - void **draw_string_outline** **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` size=1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| -Draws ``text`` outline using the specified ``font`` at the ``position`` (bottom-left corner using the baseline of the font). The text will have its color multiplied by ``modulate``. If ``clip_w`` is greater than or equal to 0, the text will be clipped if it exceeds the specified width. +Draws ``text`` outline using the specified ``font`` at the ``pos`` (bottom-left corner using the baseline of the font). The text will have its color multiplied by ``modulate``. If ``width`` is greater than or equal to 0, the text will be clipped if it exceeds the specified width. ---- @@ -892,7 +915,7 @@ Returns ``true`` if global transform notifications are communicated to children. - :ref:`bool` **is_visible_in_tree** **(** **)** |const| -Returns ``true`` if the node is present in the :ref:`SceneTree`, its :ref:`visible` property is ``true`` and all its antecedents are also visible. If any antecedent is hidden, this node will not be visible in the scene tree. +Returns ``true`` if the node is present in the :ref:`SceneTree`, its :ref:`visible` property is ``true`` and all its antecedents are also visible. If any antecedent is hidden, this node will not be visible in the scene tree, and is consequently not drawn (see :ref:`_draw`). ---- @@ -912,6 +935,14 @@ Transformations issued by ``event``'s inputs are applied in local space instead ---- +.. _class_CanvasItem_method_queue_redraw: + +- void **queue_redraw** **(** **)** + +Queues the ``CanvasItem`` to redraw. During idle time, if ``CanvasItem`` is visible, :ref:`NOTIFICATION_DRAW` is sent and :ref:`_draw` is called. This only occurs **once** per frame, even if this method has been called multiple times. + +---- + .. _class_CanvasItem_method_set_notify_local_transform: - void **set_notify_local_transform** **(** :ref:`bool` enable **)** @@ -934,14 +965,6 @@ If ``enable`` is ``true``, this node will receive :ref:`NOTIFICATION_TRANSFORM_C Show the ``CanvasItem`` if it's currently hidden. This is equivalent to setting :ref:`visible` to ``true``. For controls that inherit :ref:`Popup`, the correct way to make them visible is to call one of the multiple ``popup*()`` functions instead. ----- - -.. _class_CanvasItem_method_update: - -- void **update** **(** **)** - -Queue the ``CanvasItem`` for update. :ref:`NOTIFICATION_DRAW` will be called on idle time to request redraw. - .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_canvasitemmaterial.rst b/classes/class_canvasitemmaterial.rst index 4bdec2169..e8ffcc3e9 100644 --- a/classes/class_canvasitemmaterial.rst +++ b/classes/class_canvasitemmaterial.rst @@ -176,7 +176,7 @@ The number of rows in the spritesheet assigned as :ref:`Texture2D` and :ref:`CPUParticles2D` nodes. The :ref:`ParticlesMaterial.anim_speed_max` or :ref:`CPUParticles2D.anim_speed_max` should also be set to a positive value for the animation to play. +If ``true``, enable spritesheet-based animation features when assigned to :ref:`GPUParticles2D` and :ref:`CPUParticles2D` nodes. The :ref:`ParticleProcessMaterial.anim_speed_max` or :ref:`CPUParticles2D.anim_speed_max` should also be set to a positive value for the animation to play. This property (and other ``particles_anim_*`` properties that depend on it) has no effect on other types of nodes. diff --git a/classes/class_canvaslayer.rst b/classes/class_canvaslayer.rst index 5fc0704e3..74879c9b1 100644 --- a/classes/class_canvaslayer.rst +++ b/classes/class_canvaslayer.rst @@ -33,25 +33,25 @@ Tutorials Properties ---------- -+---------------------------------------+----------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Node` | :ref:`custom_viewport` | | -+---------------------------------------+----------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`bool` | :ref:`follow_viewport_enable` | ``false`` | -+---------------------------------------+----------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`follow_viewport_scale` | ``1.0`` | -+---------------------------------------+----------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`layer` | ``1`` | -+---------------------------------------+----------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Vector2` | :ref:`offset` | ``Vector2(0, 0)`` | -+---------------------------------------+----------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`rotation` | ``0.0`` | -+---------------------------------------+----------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Vector2` | :ref:`scale` | ``Vector2(1, 1)`` | -+---------------------------------------+----------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Transform2D` | :ref:`transform` | ``Transform2D(1, 0, 0, 1, 0, 0)`` | -+---------------------------------------+----------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`bool` | :ref:`visible` | ``true`` | -+---------------------------------------+----------------------------------------------------------------------------------+-----------------------------------+ ++---------------------------------------+------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`Node` | :ref:`custom_viewport` | | ++---------------------------------------+------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`bool` | :ref:`follow_viewport_enabled` | ``false`` | ++---------------------------------------+------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`follow_viewport_scale` | ``1.0`` | ++---------------------------------------+------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`int` | :ref:`layer` | ``1`` | ++---------------------------------------+------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`Vector2` | :ref:`offset` | ``Vector2(0, 0)`` | ++---------------------------------------+------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`rotation` | ``0.0`` | ++---------------------------------------+------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`Vector2` | :ref:`scale` | ``Vector2(1, 1)`` | ++---------------------------------------+------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`Transform2D` | :ref:`transform` | ``Transform2D(1, 0, 0, 1, 0, 0)`` | ++---------------------------------------+------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`bool` | :ref:`visible` | ``true`` | ++---------------------------------------+------------------------------------------------------------------------------------+-----------------------------------+ Methods ------- @@ -90,9 +90,9 @@ The custom :ref:`Viewport` node assigned to the ``CanvasLayer``. ---- -.. _class_CanvasLayer_property_follow_viewport_enable: +.. _class_CanvasLayer_property_follow_viewport_enabled: -- :ref:`bool` **follow_viewport_enable** +- :ref:`bool` **follow_viewport_enabled** +-----------+----------------------------+ | *Default* | ``false`` | @@ -118,7 +118,7 @@ Sets the layer to follow the viewport in order to simulate a pseudo 3D effect. | *Getter* | get_follow_viewport_scale() | +-----------+----------------------------------+ -Scales the layer when using :ref:`follow_viewport_enable`. Layers moving into the foreground should have increasing scales, while layers moving into the background should have decreasing scales. +Scales the layer when using :ref:`follow_viewport_enabled`. Layers moving into the foreground should have increasing scales, while layers moving into the background should have decreasing scales. ---- diff --git a/classes/class_characterbody2d.rst b/classes/class_characterbody2d.rst index d67fc0c0a..44be1c3f3 100644 --- a/classes/class_characterbody2d.rst +++ b/classes/class_characterbody2d.rst @@ -37,37 +37,37 @@ Tutorials Properties ---------- -+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+--------------------+ -| :ref:`float` | :ref:`collision/safe_margin` | ``0.08`` | -+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+--------------------+ -| :ref:`bool` | :ref:`floor_block_on_wall` | ``true`` | -+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+--------------------+ -| :ref:`bool` | :ref:`floor_constant_speed` | ``false`` | -+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+--------------------+ -| :ref:`float` | :ref:`floor_max_angle` | ``0.785398`` | -+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+--------------------+ -| :ref:`float` | :ref:`floor_snap_length` | ``1.0`` | -+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+--------------------+ -| :ref:`bool` | :ref:`floor_stop_on_slope` | ``true`` | -+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+--------------------+ -| :ref:`int` | :ref:`max_slides` | ``4`` | -+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+--------------------+ -| :ref:`MotionMode` | :ref:`motion_mode` | ``0`` | -+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+--------------------+ -| :ref:`MovingPlatformApplyVelocityOnLeave` | :ref:`moving_platform_apply_velocity_on_leave` | ``0`` | -+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+--------------------+ -| :ref:`int` | :ref:`moving_platform_floor_layers` | ``4294967295`` | -+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+--------------------+ -| :ref:`int` | :ref:`moving_platform_wall_layers` | ``0`` | -+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+--------------------+ -| :ref:`bool` | :ref:`slide_on_ceiling` | ``true`` | -+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+--------------------+ -| :ref:`Vector2` | :ref:`up_direction` | ``Vector2(0, -1)`` | -+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+--------------------+ -| :ref:`Vector2` | :ref:`velocity` | ``Vector2(0, 0)`` | -+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+--------------------+ -| :ref:`float` | :ref:`wall_min_slide_angle` | ``0.261799`` | -+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+--------------------+ ++--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ +| :ref:`bool` | :ref:`floor_block_on_wall` | ``true`` | ++--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ +| :ref:`bool` | :ref:`floor_constant_speed` | ``false`` | ++--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ +| :ref:`float` | :ref:`floor_max_angle` | ``0.785398`` | ++--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ +| :ref:`float` | :ref:`floor_snap_length` | ``1.0`` | ++--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ +| :ref:`bool` | :ref:`floor_stop_on_slope` | ``true`` | ++--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ +| :ref:`int` | :ref:`max_slides` | ``4`` | ++--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ +| :ref:`MotionMode` | :ref:`motion_mode` | ``0`` | ++--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ +| :ref:`int` | :ref:`platform_floor_layers` | ``4294967295`` | ++--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ +| :ref:`PlatformOnLeave` | :ref:`platform_on_leave` | ``0`` | ++--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ +| :ref:`int` | :ref:`platform_wall_layers` | ``0`` | ++--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ +| :ref:`float` | :ref:`safe_margin` | ``0.08`` | ++--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ +| :ref:`bool` | :ref:`slide_on_ceiling` | ``true`` | ++--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ +| :ref:`Vector2` | :ref:`up_direction` | ``Vector2(0, -1)`` | ++--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ +| :ref:`Vector2` | :ref:`velocity` | ``Vector2(0, 0)`` | ++--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ +| :ref:`float` | :ref:`wall_min_slide_angle` | ``0.261799`` | ++--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ Methods ------- @@ -125,47 +125,25 @@ enum **MotionMode**: ---- -.. _enum_CharacterBody2D_MovingPlatformApplyVelocityOnLeave: +.. _enum_CharacterBody2D_PlatformOnLeave: -.. _class_CharacterBody2D_constant_PLATFORM_VEL_ON_LEAVE_ALWAYS: +.. _class_CharacterBody2D_constant_PLATFORM_ON_LEAVE_ADD_VELOCITY: -.. _class_CharacterBody2D_constant_PLATFORM_VEL_ON_LEAVE_UPWARD_ONLY: +.. _class_CharacterBody2D_constant_PLATFORM_ON_LEAVE_ADD_UPWARD_VELOCITY: -.. _class_CharacterBody2D_constant_PLATFORM_VEL_ON_LEAVE_NEVER: +.. _class_CharacterBody2D_constant_PLATFORM_ON_LEAVE_DO_NOTHING: -enum **MovingPlatformApplyVelocityOnLeave**: +enum **PlatformOnLeave**: -- **PLATFORM_VEL_ON_LEAVE_ALWAYS** = **0** --- Add the last platform velocity to the :ref:`velocity` when you leave a moving platform. +- **PLATFORM_ON_LEAVE_ADD_VELOCITY** = **0** --- Add the last platform velocity to the :ref:`velocity` when you leave a moving platform. -- **PLATFORM_VEL_ON_LEAVE_UPWARD_ONLY** = **1** --- Add the last platform velocity to the :ref:`velocity` when you leave a moving platform, but any downward motion is ignored. It's useful to keep full jump height even when the platform is moving down. +- **PLATFORM_ON_LEAVE_ADD_UPWARD_VELOCITY** = **1** --- Add the last platform velocity to the :ref:`velocity` when you leave a moving platform, but any downward motion is ignored. It's useful to keep full jump height even when the platform is moving down. -- **PLATFORM_VEL_ON_LEAVE_NEVER** = **2** --- Do nothing when leaving a platform. +- **PLATFORM_ON_LEAVE_DO_NOTHING** = **2** --- Do nothing when leaving a platform. Property Descriptions --------------------- -.. _class_CharacterBody2D_property_collision/safe_margin: - -- :ref:`float` **collision/safe_margin** - -+-----------+------------------------+ -| *Default* | ``0.08`` | -+-----------+------------------------+ -| *Setter* | set_safe_margin(value) | -+-----------+------------------------+ -| *Getter* | get_safe_margin() | -+-----------+------------------------+ - -Extra margin used for collision recovery when calling :ref:`move_and_slide`. - -If the body is at least this close to another body, it will consider them to be colliding and will be pushed away before performing the actual motion. - -A higher value means it's more flexible for detecting collision, which helps with consistently detecting walls and floors. - -A lower value forces the collision algorithm to use more exact detection, so it can be used in cases that specifically require precision, e.g at very low scale to avoid visible jittering, or for stability with a stack of character bodies. - ----- - .. _class_CharacterBody2D_property_floor_block_on_wall: - :ref:`bool` **floor_block_on_wall** @@ -284,54 +262,76 @@ Sets the motion mode which defines the behavior of :ref:`move_and_slide` **moving_platform_apply_velocity_on_leave** +- :ref:`int` **platform_floor_layers** -+-----------+----------------------------------------------------+ -| *Default* | ``0`` | -+-----------+----------------------------------------------------+ -| *Setter* | set_moving_platform_apply_velocity_on_leave(value) | -+-----------+----------------------------------------------------+ -| *Getter* | get_moving_platform_apply_velocity_on_leave() | -+-----------+----------------------------------------------------+ - -Sets the behavior to apply when you leave a moving platform. By default, to be physically accurate, when you leave the last platform velocity is applied. See :ref:`MovingPlatformApplyVelocityOnLeave` constants for available behavior. - ----- - -.. _class_CharacterBody2D_property_moving_platform_floor_layers: - -- :ref:`int` **moving_platform_floor_layers** - -+-----------+-----------------------------------------+ -| *Default* | ``4294967295`` | -+-----------+-----------------------------------------+ -| *Setter* | set_moving_platform_floor_layers(value) | -+-----------+-----------------------------------------+ -| *Getter* | get_moving_platform_floor_layers() | -+-----------+-----------------------------------------+ ++-----------+----------------------------------+ +| *Default* | ``4294967295`` | ++-----------+----------------------------------+ +| *Setter* | set_platform_floor_layers(value) | ++-----------+----------------------------------+ +| *Getter* | get_platform_floor_layers() | ++-----------+----------------------------------+ Collision layers that will be included for detecting floor bodies that will act as moving platforms to be followed by the ``CharacterBody2D``. By default, all floor bodies are detected and propagate their velocity. ---- -.. _class_CharacterBody2D_property_moving_platform_wall_layers: +.. _class_CharacterBody2D_property_platform_on_leave: -- :ref:`int` **moving_platform_wall_layers** +- :ref:`PlatformOnLeave` **platform_on_leave** -+-----------+----------------------------------------+ -| *Default* | ``0`` | -+-----------+----------------------------------------+ -| *Setter* | set_moving_platform_wall_layers(value) | -+-----------+----------------------------------------+ -| *Getter* | get_moving_platform_wall_layers() | -+-----------+----------------------------------------+ ++-----------+------------------------------+ +| *Default* | ``0`` | ++-----------+------------------------------+ +| *Setter* | set_platform_on_leave(value) | ++-----------+------------------------------+ +| *Getter* | get_platform_on_leave() | ++-----------+------------------------------+ + +Sets the behavior to apply when you leave a moving platform. By default, to be physically accurate, when you leave the last platform velocity is applied. See :ref:`PlatformOnLeave` constants for available behavior. + +---- + +.. _class_CharacterBody2D_property_platform_wall_layers: + +- :ref:`int` **platform_wall_layers** + ++-----------+---------------------------------+ +| *Default* | ``0`` | ++-----------+---------------------------------+ +| *Setter* | set_platform_wall_layers(value) | ++-----------+---------------------------------+ +| *Getter* | get_platform_wall_layers() | ++-----------+---------------------------------+ Collision layers that will be included for detecting wall bodies that will act as moving platforms to be followed by the ``CharacterBody2D``. By default, all wall bodies are ignored. ---- +.. _class_CharacterBody2D_property_safe_margin: + +- :ref:`float` **safe_margin** + ++-----------+------------------------+ +| *Default* | ``0.08`` | ++-----------+------------------------+ +| *Setter* | set_safe_margin(value) | ++-----------+------------------------+ +| *Getter* | get_safe_margin() | ++-----------+------------------------+ + +Extra margin used for collision recovery when calling :ref:`move_and_slide`. + +If the body is at least this close to another body, it will consider them to be colliding and will be pushed away before performing the actual motion. + +A higher value means it's more flexible for detecting collision, which helps with consistently detecting walls and floors. + +A lower value forces the collision algorithm to use more exact detection, so it can be used in cases that specifically require precision, e.g at very low scale to avoid visible jittering, or for stability with a stack of character bodies. + +---- + .. _class_CharacterBody2D_property_slide_on_ceiling: - :ref:`bool` **slide_on_ceiling** @@ -550,7 +550,7 @@ Returns ``true`` if the body collided only with a wall on the last call of :ref: - :ref:`bool` **move_and_slide** **(** **)** -Moves the body based on :ref:`velocity`. If the body collides with another, it will slide along the other body (by default only on floor) rather than stop immediately. If the other body is a ``CharacterBody2D`` or :ref:`RigidDynamicBody2D`, it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes. +Moves the body based on :ref:`velocity`. If the body collides with another, it will slide along the other body (by default only on floor) rather than stop immediately. If the other body is a ``CharacterBody2D`` or :ref:`RigidBody2D`, it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes. Modifies :ref:`velocity` if a slide collision occurred. To get the latest collision call :ref:`get_last_slide_collision`, for detailed information about collisions that occurred, use :ref:`get_slide_collision`. diff --git a/classes/class_characterbody3d.rst b/classes/class_characterbody3d.rst index 7d9f1c201..220137653 100644 --- a/classes/class_characterbody3d.rst +++ b/classes/class_characterbody3d.rst @@ -39,37 +39,37 @@ Tutorials Properties ---------- -+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`float` | :ref:`collision/safe_margin` | ``0.001`` | -+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`bool` | :ref:`floor_block_on_wall` | ``true`` | -+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`bool` | :ref:`floor_constant_speed` | ``false`` | -+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`float` | :ref:`floor_max_angle` | ``0.785398`` | -+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`float` | :ref:`floor_snap_length` | ``0.1`` | -+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`bool` | :ref:`floor_stop_on_slope` | ``true`` | -+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`int` | :ref:`max_slides` | ``6`` | -+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`MotionMode` | :ref:`motion_mode` | ``0`` | -+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`MovingPlatformApplyVelocityOnLeave` | :ref:`moving_platform_apply_velocity_on_leave` | ``0`` | -+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`int` | :ref:`moving_platform_floor_layers` | ``4294967295`` | -+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`int` | :ref:`moving_platform_wall_layers` | ``0`` | -+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`bool` | :ref:`slide_on_ceiling` | ``true`` | -+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`up_direction` | ``Vector3(0, 1, 0)`` | -+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`velocity` | ``Vector3(0, 0, 0)`` | -+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`float` | :ref:`wall_min_slide_angle` | ``0.261799`` | -+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------+ ++--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ +| :ref:`bool` | :ref:`floor_block_on_wall` | ``true`` | ++--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ +| :ref:`bool` | :ref:`floor_constant_speed` | ``false`` | ++--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ +| :ref:`float` | :ref:`floor_max_angle` | ``0.785398`` | ++--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ +| :ref:`float` | :ref:`floor_snap_length` | ``0.1`` | ++--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ +| :ref:`bool` | :ref:`floor_stop_on_slope` | ``true`` | ++--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ +| :ref:`int` | :ref:`max_slides` | ``6`` | ++--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ +| :ref:`MotionMode` | :ref:`motion_mode` | ``0`` | ++--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ +| :ref:`int` | :ref:`platform_floor_layers` | ``4294967295`` | ++--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ +| :ref:`PlatformOnLeave` | :ref:`platform_on_leave` | ``0`` | ++--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ +| :ref:`int` | :ref:`platform_wall_layers` | ``0`` | ++--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ +| :ref:`float` | :ref:`safe_margin` | ``0.001`` | ++--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ +| :ref:`bool` | :ref:`slide_on_ceiling` | ``true`` | ++--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ +| :ref:`Vector3` | :ref:`up_direction` | ``Vector3(0, 1, 0)`` | ++--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ +| :ref:`Vector3` | :ref:`velocity` | ``Vector3(0, 0, 0)`` | ++--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ +| :ref:`float` | :ref:`wall_min_slide_angle` | ``0.261799`` | ++--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ Methods ------- @@ -127,47 +127,25 @@ enum **MotionMode**: ---- -.. _enum_CharacterBody3D_MovingPlatformApplyVelocityOnLeave: +.. _enum_CharacterBody3D_PlatformOnLeave: -.. _class_CharacterBody3D_constant_PLATFORM_VEL_ON_LEAVE_ALWAYS: +.. _class_CharacterBody3D_constant_PLATFORM_ON_LEAVE_ADD_VELOCITY: -.. _class_CharacterBody3D_constant_PLATFORM_VEL_ON_LEAVE_UPWARD_ONLY: +.. _class_CharacterBody3D_constant_PLATFORM_ON_LEAVE_ADD_UPWARD_VELOCITY: -.. _class_CharacterBody3D_constant_PLATFORM_VEL_ON_LEAVE_NEVER: +.. _class_CharacterBody3D_constant_PLATFORM_ON_LEAVE_DO_NOTHING: -enum **MovingPlatformApplyVelocityOnLeave**: +enum **PlatformOnLeave**: -- **PLATFORM_VEL_ON_LEAVE_ALWAYS** = **0** --- Add the last platform velocity to the :ref:`velocity` when you leave a moving platform. +- **PLATFORM_ON_LEAVE_ADD_VELOCITY** = **0** --- Add the last platform velocity to the :ref:`velocity` when you leave a moving platform. -- **PLATFORM_VEL_ON_LEAVE_UPWARD_ONLY** = **1** --- Add the last platform velocity to the :ref:`velocity` when you leave a moving platform, but any downward motion is ignored. It's useful to keep full jump height even when the platform is moving down. +- **PLATFORM_ON_LEAVE_ADD_UPWARD_VELOCITY** = **1** --- Add the last platform velocity to the :ref:`velocity` when you leave a moving platform, but any downward motion is ignored. It's useful to keep full jump height even when the platform is moving down. -- **PLATFORM_VEL_ON_LEAVE_NEVER** = **2** --- Do nothing when leaving a platform. +- **PLATFORM_ON_LEAVE_DO_NOTHING** = **2** --- Do nothing when leaving a platform. Property Descriptions --------------------- -.. _class_CharacterBody3D_property_collision/safe_margin: - -- :ref:`float` **collision/safe_margin** - -+-----------+------------------------+ -| *Default* | ``0.001`` | -+-----------+------------------------+ -| *Setter* | set_safe_margin(value) | -+-----------+------------------------+ -| *Getter* | get_safe_margin() | -+-----------+------------------------+ - -Extra margin used for collision recovery when calling :ref:`move_and_slide`. - -If the body is at least this close to another body, it will consider them to be colliding and will be pushed away before performing the actual motion. - -A higher value means it's more flexible for detecting collision, which helps with consistently detecting walls and floors. - -A lower value forces the collision algorithm to use more exact detection, so it can be used in cases that specifically require precision, e.g at very low scale to avoid visible jittering, or for stability with a stack of character bodies. - ----- - .. _class_CharacterBody3D_property_floor_block_on_wall: - :ref:`bool` **floor_block_on_wall** @@ -286,51 +264,73 @@ Sets the motion mode which defines the behavior of :ref:`move_and_slide` **moving_platform_apply_velocity_on_leave** +- :ref:`int` **platform_floor_layers** -+-----------+----------------------------------------------------+ -| *Default* | ``0`` | -+-----------+----------------------------------------------------+ -| *Setter* | set_moving_platform_apply_velocity_on_leave(value) | -+-----------+----------------------------------------------------+ -| *Getter* | get_moving_platform_apply_velocity_on_leave() | -+-----------+----------------------------------------------------+ ++-----------+----------------------------------+ +| *Default* | ``4294967295`` | ++-----------+----------------------------------+ +| *Setter* | set_platform_floor_layers(value) | ++-----------+----------------------------------+ +| *Getter* | get_platform_floor_layers() | ++-----------+----------------------------------+ -Sets the behavior to apply when you leave a moving platform. By default, to be physically accurate, when you leave the last platform velocity is applied. See :ref:`MovingPlatformApplyVelocityOnLeave` constants for available behavior. +Collision layers that will be included for detecting floor bodies that will act as moving platforms to be followed by the ``CharacterBody3D``. By default, all floor bodies are detected and propagate their velocity. ---- -.. _class_CharacterBody3D_property_moving_platform_floor_layers: +.. _class_CharacterBody3D_property_platform_on_leave: -- :ref:`int` **moving_platform_floor_layers** +- :ref:`PlatformOnLeave` **platform_on_leave** -+-----------+-----------------------------------------+ -| *Default* | ``4294967295`` | -+-----------+-----------------------------------------+ -| *Setter* | set_moving_platform_floor_layers(value) | -+-----------+-----------------------------------------+ -| *Getter* | get_moving_platform_floor_layers() | -+-----------+-----------------------------------------+ ++-----------+------------------------------+ +| *Default* | ``0`` | ++-----------+------------------------------+ +| *Setter* | set_platform_on_leave(value) | ++-----------+------------------------------+ +| *Getter* | get_platform_on_leave() | ++-----------+------------------------------+ -Collision layers that will be included for detecting floor bodies that will act as moving platforms to be followed by the :ref:`CharacterBody2D`. By default, all floor bodies are detected and propagate their velocity. +Sets the behavior to apply when you leave a moving platform. By default, to be physically accurate, when you leave the last platform velocity is applied. See :ref:`PlatformOnLeave` constants for available behavior. ---- -.. _class_CharacterBody3D_property_moving_platform_wall_layers: +.. _class_CharacterBody3D_property_platform_wall_layers: -- :ref:`int` **moving_platform_wall_layers** +- :ref:`int` **platform_wall_layers** -+-----------+----------------------------------------+ -| *Default* | ``0`` | -+-----------+----------------------------------------+ -| *Setter* | set_moving_platform_wall_layers(value) | -+-----------+----------------------------------------+ -| *Getter* | get_moving_platform_wall_layers() | -+-----------+----------------------------------------+ ++-----------+---------------------------------+ +| *Default* | ``0`` | ++-----------+---------------------------------+ +| *Setter* | set_platform_wall_layers(value) | ++-----------+---------------------------------+ +| *Getter* | get_platform_wall_layers() | ++-----------+---------------------------------+ -Collision layers that will be included for detecting wall bodies that will act as moving platforms to be followed by the :ref:`CharacterBody2D`. By default, all wall bodies are ignored. +Collision layers that will be included for detecting wall bodies that will act as moving platforms to be followed by the ``CharacterBody3D``. By default, all wall bodies are ignored. + +---- + +.. _class_CharacterBody3D_property_safe_margin: + +- :ref:`float` **safe_margin** + ++-----------+------------------------+ +| *Default* | ``0.001`` | ++-----------+------------------------+ +| *Setter* | set_safe_margin(value) | ++-----------+------------------------+ +| *Getter* | get_safe_margin() | ++-----------+------------------------+ + +Extra margin used for collision recovery when calling :ref:`move_and_slide`. + +If the body is at least this close to another body, it will consider them to be colliding and will be pushed away before performing the actual motion. + +A higher value means it's more flexible for detecting collision, which helps with consistently detecting walls and floors. + +A lower value forces the collision algorithm to use more exact detection, so it can be used in cases that specifically require precision, e.g at very low scale to avoid visible jittering, or for stability with a stack of character bodies. ---- @@ -531,7 +531,7 @@ Returns ``true`` if the body collided only with a wall on the last call of :ref: - :ref:`bool` **move_and_slide** **(** **)** -Moves the body based on :ref:`velocity`. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a ``CharacterBody3D`` or :ref:`RigidDynamicBody3D`, it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes. +Moves the body based on :ref:`velocity`. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a ``CharacterBody3D`` or :ref:`RigidBody3D`, it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes. Modifies :ref:`velocity` if a slide collision occurred. To get the latest collision call :ref:`get_last_slide_collision`, for more detailed information about collisions that occurred, use :ref:`get_slide_collision`. diff --git a/classes/class_checkbox.rst b/classes/class_checkbox.rst index 599a4aadb..367b5a824 100644 --- a/classes/class_checkbox.rst +++ b/classes/class_checkbox.rst @@ -194,7 +194,7 @@ The vertical offset used when rendering the check icons (in pixels). | *Default* | ``4`` | +-----------+-------+ -The separation between the check icon and the text (in pixels). +The separation between the check icon and the text (in pixels). Negative values will be treated as ``0`` when used. ---- diff --git a/classes/class_checkbutton.rst b/classes/class_checkbutton.rst index b24d8bc0f..2073ffdd8 100644 --- a/classes/class_checkbutton.rst +++ b/classes/class_checkbutton.rst @@ -194,7 +194,7 @@ The vertical offset used when rendering the toggle icons (in pixels). | *Default* | ``4`` | +-----------+-------+ -The separation between the toggle icon and the text (in pixels). +The separation between the toggle icon and the text (in pixels). Negative values will be treated as ``0`` when used. ---- diff --git a/classes/class_classdb.rst b/classes/class_classdb.rst index 459a4b399..a736b8fef 100644 --- a/classes/class_classdb.rst +++ b/classes/class_classdb.rst @@ -37,15 +37,15 @@ Methods +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`class_get_integer_constant_list` **(** :ref:`StringName` class, :ref:`bool` no_inheritance=false **)** |const| | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`class_get_method_list` **(** :ref:`StringName` class, :ref:`bool` no_inheritance=false **)** |const| | +| :ref:`Dictionary[]` | :ref:`class_get_method_list` **(** :ref:`StringName` class, :ref:`bool` no_inheritance=false **)** |const| | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`class_get_property` **(** :ref:`Object` object, :ref:`StringName` property **)** |const| | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`class_get_property_list` **(** :ref:`StringName` class, :ref:`bool` no_inheritance=false **)** |const| | +| :ref:`Dictionary[]` | :ref:`class_get_property_list` **(** :ref:`StringName` class, :ref:`bool` no_inheritance=false **)** |const| | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Dictionary` | :ref:`class_get_signal` **(** :ref:`StringName` class, :ref:`StringName` signal **)** |const| | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`class_get_signal_list` **(** :ref:`StringName` class, :ref:`bool` no_inheritance=false **)** |const| | +| :ref:`Dictionary[]` | :ref:`class_get_signal_list` **(** :ref:`StringName` class, :ref:`bool` no_inheritance=false **)** |const| | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`class_has_enum` **(** :ref:`StringName` class, :ref:`StringName` name, :ref:`bool` no_inheritance=false **)** |const| | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -131,7 +131,7 @@ Returns an array with the names all the integer constants of ``class`` or its an .. _class_ClassDB_method_class_get_method_list: -- :ref:`Array` **class_get_method_list** **(** :ref:`StringName` class, :ref:`bool` no_inheritance=false **)** |const| +- :ref:`Dictionary[]` **class_get_method_list** **(** :ref:`StringName` class, :ref:`bool` no_inheritance=false **)** |const| Returns an array with all the methods of ``class`` or its ancestry if ``no_inheritance`` is ``false``. Every element of the array is a :ref:`Dictionary` with the following keys: ``args``, ``default_args``, ``flags``, ``id``, ``name``, ``return: (class_name, hint, hint_string, name, type, usage)``. @@ -143,13 +143,13 @@ Returns an array with all the methods of ``class`` or its ancestry if ``no_inher - :ref:`Variant` **class_get_property** **(** :ref:`Object` object, :ref:`StringName` property **)** |const| -Returns the value of ``property`` of ``class`` or its ancestry. +Returns the value of ``property`` of ``object`` or its ancestry. ---- .. _class_ClassDB_method_class_get_property_list: -- :ref:`Array` **class_get_property_list** **(** :ref:`StringName` class, :ref:`bool` no_inheritance=false **)** |const| +- :ref:`Dictionary[]` **class_get_property_list** **(** :ref:`StringName` class, :ref:`bool` no_inheritance=false **)** |const| Returns an array with all the properties of ``class`` or its ancestry if ``no_inheritance`` is ``false``. @@ -165,7 +165,7 @@ Returns the ``signal`` data of ``class`` or its ancestry. The returned value is .. _class_ClassDB_method_class_get_signal_list: -- :ref:`Array` **class_get_signal_list** **(** :ref:`StringName` class, :ref:`bool` no_inheritance=false **)** |const| +- :ref:`Dictionary[]` **class_get_signal_list** **(** :ref:`StringName` class, :ref:`bool` no_inheritance=false **)** |const| Returns an array with all the signals of ``class`` or its ancestry if ``no_inheritance`` is ``false``. Every element of the array is a :ref:`Dictionary` as described in :ref:`class_get_signal`. @@ -207,7 +207,7 @@ Returns whether ``class`` or its ancestry has a signal called ``signal`` or not. - :ref:`Error` **class_set_property** **(** :ref:`Object` object, :ref:`StringName` property, :ref:`Variant` value **)** |const| -Sets ``property`` value of ``class`` to ``value``. +Sets ``property`` value of ``object`` to ``value``. ---- diff --git a/classes/class_codeedit.rst b/classes/class_codeedit.rst index 56af03d37..d93933035 100644 --- a/classes/class_codeedit.rst +++ b/classes/class_codeedit.rst @@ -73,125 +73,125 @@ Properties Methods ------- -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_confirm_code_completion` **(** :ref:`bool` replace **)** |virtual| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`_filter_code_completion_candidates` **(** :ref:`Dictionary[]` candidates **)** |virtual| |const| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_request_code_completion` **(** :ref:`bool` force **)** |virtual| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_auto_brace_completion_pair` **(** :ref:`String` start_key, :ref:`String` end_key **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_code_completion_option` **(** :ref:`CodeCompletionKind` type, :ref:`String` display_text, :ref:`String` insert_text, :ref:`Color` text_color=Color(1, 1, 1, 1), :ref:`Resource` icon=null, :ref:`Variant` value=0 **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_comment_delimiter` **(** :ref:`String` start_key, :ref:`String` end_key, :ref:`bool` line_only=false **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_string_delimiter` **(** :ref:`String` start_key, :ref:`String` end_key, :ref:`bool` line_only=false **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`can_fold_line` **(** :ref:`int` line **)** |const| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`cancel_code_completion` **(** **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_bookmarked_lines` **(** **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_breakpointed_lines` **(** **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_comment_delimiters` **(** **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_executing_lines` **(** **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_string_delimiters` **(** **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`confirm_code_completion` **(** :ref:`bool` replace=false **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`do_indent` **(** **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`do_unindent` **(** **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`fold_all_lines` **(** **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`fold_line` **(** :ref:`int` line **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_auto_brace_completion_close_key` **(** :ref:`String` open_key **)** |const| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_bookmarked_lines` **(** **)** |const| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_breakpointed_lines` **(** **)** |const| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_code_completion_option` **(** :ref:`int` index **)** |const| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary[]` | :ref:`get_code_completion_options` **(** **)** |const| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_code_completion_selected_index` **(** **)** |const| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_delimiter_end_key` **(** :ref:`int` delimiter_index **)** |const| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_delimiter_end_position` **(** :ref:`int` line, :ref:`int` column **)** |const| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_delimiter_start_key` **(** :ref:`int` delimiter_index **)** |const| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_delimiter_start_position` **(** :ref:`int` line, :ref:`int` column **)** |const| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_executing_lines` **(** **)** |const| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int[]` | :ref:`get_folded_lines` **(** **)** |const| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_text_for_code_completion` **(** **)** |const| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_text_for_symbol_lookup` **(** **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_auto_brace_completion_close_key` **(** :ref:`String` close_key **)** |const| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_auto_brace_completion_open_key` **(** :ref:`String` open_key **)** |const| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_comment_delimiter` **(** :ref:`String` start_key **)** |const| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_string_delimiter` **(** :ref:`String` start_key **)** |const| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`indent_lines` **(** **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`is_in_comment` **(** :ref:`int` line, :ref:`int` column=-1 **)** |const| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`is_in_string` **(** :ref:`int` line, :ref:`int` column=-1 **)** |const| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_line_bookmarked` **(** :ref:`int` line **)** |const| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_line_breakpointed` **(** :ref:`int` line **)** |const| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_line_executing` **(** :ref:`int` line **)** |const| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_line_folded` **(** :ref:`int` line **)** |const| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_comment_delimiter` **(** :ref:`String` start_key **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_string_delimiter` **(** :ref:`String` start_key **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`request_code_completion` **(** :ref:`bool` force=false **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_code_completion_selected_index` **(** :ref:`int` index **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_code_hint` **(** :ref:`String` code_hint **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_code_hint_draw_below` **(** :ref:`bool` draw_below **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_line_as_bookmarked` **(** :ref:`int` line, :ref:`bool` bookmarked **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_line_as_breakpoint` **(** :ref:`int` line, :ref:`bool` breakpointed **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_line_as_executing` **(** :ref:`int` line, :ref:`bool` executing **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_symbol_lookup_word_as_valid` **(** :ref:`bool` valid **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`toggle_foldable_line` **(** :ref:`int` line **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`unfold_all_lines` **(** **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`unfold_line` **(** :ref:`int` line **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`unindent_lines` **(** **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`update_code_completion_options` **(** :ref:`bool` force **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_confirm_code_completion` **(** :ref:`bool` replace **)** |virtual| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary[]` | :ref:`_filter_code_completion_candidates` **(** :ref:`Dictionary[]` candidates **)** |virtual| |const| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_request_code_completion` **(** :ref:`bool` force **)** |virtual| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_auto_brace_completion_pair` **(** :ref:`String` start_key, :ref:`String` end_key **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_code_completion_option` **(** :ref:`CodeCompletionKind` type, :ref:`String` display_text, :ref:`String` insert_text, :ref:`Color` text_color=Color(1, 1, 1, 1), :ref:`Resource` icon=null, :ref:`Variant` value=0 **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_comment_delimiter` **(** :ref:`String` start_key, :ref:`String` end_key, :ref:`bool` line_only=false **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_string_delimiter` **(** :ref:`String` start_key, :ref:`String` end_key, :ref:`bool` line_only=false **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`can_fold_line` **(** :ref:`int` line **)** |const| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`cancel_code_completion` **(** **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_bookmarked_lines` **(** **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_breakpointed_lines` **(** **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_comment_delimiters` **(** **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_executing_lines` **(** **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_string_delimiters` **(** **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`confirm_code_completion` **(** :ref:`bool` replace=false **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`do_indent` **(** **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`do_unindent` **(** **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`fold_all_lines` **(** **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`fold_line` **(** :ref:`int` line **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_auto_brace_completion_close_key` **(** :ref:`String` open_key **)** |const| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedInt32Array` | :ref:`get_bookmarked_lines` **(** **)** |const| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedInt32Array` | :ref:`get_breakpointed_lines` **(** **)** |const| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`get_code_completion_option` **(** :ref:`int` index **)** |const| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary[]` | :ref:`get_code_completion_options` **(** **)** |const| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_code_completion_selected_index` **(** **)** |const| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_delimiter_end_key` **(** :ref:`int` delimiter_index **)** |const| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_delimiter_end_position` **(** :ref:`int` line, :ref:`int` column **)** |const| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_delimiter_start_key` **(** :ref:`int` delimiter_index **)** |const| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_delimiter_start_position` **(** :ref:`int` line, :ref:`int` column **)** |const| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedInt32Array` | :ref:`get_executing_lines` **(** **)** |const| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int[]` | :ref:`get_folded_lines` **(** **)** |const| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_text_for_code_completion` **(** **)** |const| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_text_for_symbol_lookup` **(** **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_auto_brace_completion_close_key` **(** :ref:`String` close_key **)** |const| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_auto_brace_completion_open_key` **(** :ref:`String` open_key **)** |const| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_comment_delimiter` **(** :ref:`String` start_key **)** |const| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_string_delimiter` **(** :ref:`String` start_key **)** |const| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`indent_lines` **(** **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`is_in_comment` **(** :ref:`int` line, :ref:`int` column=-1 **)** |const| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`is_in_string` **(** :ref:`int` line, :ref:`int` column=-1 **)** |const| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_line_bookmarked` **(** :ref:`int` line **)** |const| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_line_breakpointed` **(** :ref:`int` line **)** |const| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_line_executing` **(** :ref:`int` line **)** |const| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_line_folded` **(** :ref:`int` line **)** |const| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_comment_delimiter` **(** :ref:`String` start_key **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_string_delimiter` **(** :ref:`String` start_key **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`request_code_completion` **(** :ref:`bool` force=false **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_code_completion_selected_index` **(** :ref:`int` index **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_code_hint` **(** :ref:`String` code_hint **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_code_hint_draw_below` **(** :ref:`bool` draw_below **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_line_as_bookmarked` **(** :ref:`int` line, :ref:`bool` bookmarked **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_line_as_breakpoint` **(** :ref:`int` line, :ref:`bool` breakpointed **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_line_as_executing` **(** :ref:`int` line, :ref:`bool` executing **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_symbol_lookup_word_as_valid` **(** :ref:`bool` valid **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`toggle_foldable_line` **(** :ref:`int` line **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`unfold_all_lines` **(** **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`unfold_line` **(** :ref:`int` line **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`unindent_lines` **(** **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`update_code_completion_options` **(** :ref:`bool` force **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Theme Properties ---------------- @@ -623,7 +623,7 @@ Prefixes to trigger an automatic indent. | *Getter* | get_indent_size() | +-----------+------------------------+ -Size of tabs, if ``indent_use_spaces`` is enabled the amount of spaces to use. +Size of tabs, if ``indent_use_spaces`` is enabled the number of spaces to use. ---- @@ -702,7 +702,7 @@ Override this method to define how the selected entry should be inserted. If ``r .. _class_CodeEdit_method__filter_code_completion_candidates: -- :ref:`Array` **_filter_code_completion_candidates** **(** :ref:`Dictionary[]` candidates **)** |virtual| |const| +- :ref:`Dictionary[]` **_filter_code_completion_candidates** **(** :ref:`Dictionary[]` candidates **)** |virtual| |const| Override this method to define what items in ``candidates`` should be displayed. @@ -868,7 +868,7 @@ Gets the matching auto brace close key for ``open_key``. .. _class_CodeEdit_method_get_bookmarked_lines: -- :ref:`Array` **get_bookmarked_lines** **(** **)** |const| +- :ref:`PackedInt32Array` **get_bookmarked_lines** **(** **)** |const| Gets all bookmarked lines. @@ -876,7 +876,7 @@ Gets all bookmarked lines. .. _class_CodeEdit_method_get_breakpointed_lines: -- :ref:`Array` **get_breakpointed_lines** **(** **)** |const| +- :ref:`PackedInt32Array` **get_breakpointed_lines** **(** **)** |const| Gets all breakpointed lines. @@ -952,7 +952,7 @@ If ``line`` ``column`` is in a string or comment, returns the start position of .. _class_CodeEdit_method_get_executing_lines: -- :ref:`Array` **get_executing_lines** **(** **)** |const| +- :ref:`PackedInt32Array` **get_executing_lines** **(** **)** |const| Gets all executing lines. diff --git a/classes/class_collisionobject2d.rst b/classes/class_collisionobject2d.rst index 6415c7a21..f0969d73e 100644 --- a/classes/class_collisionobject2d.rst +++ b/classes/class_collisionobject2d.rst @@ -26,70 +26,80 @@ CollisionObject2D is the base class for 2D physics objects. It can hold any numb Properties ---------- -+--------------------------------------------------------+--------------------------------------------------------------------------+----------+ -| :ref:`int` | :ref:`collision_layer` | ``1`` | -+--------------------------------------------------------+--------------------------------------------------------------------------+----------+ -| :ref:`int` | :ref:`collision_mask` | ``1`` | -+--------------------------------------------------------+--------------------------------------------------------------------------+----------+ -| :ref:`DisableMode` | :ref:`disable_mode` | ``0`` | -+--------------------------------------------------------+--------------------------------------------------------------------------+----------+ -| :ref:`bool` | :ref:`input_pickable` | ``true`` | -+--------------------------------------------------------+--------------------------------------------------------------------------+----------+ ++--------------------------------------------------------+--------------------------------------------------------------------------------+----------+ +| :ref:`int` | :ref:`collision_layer` | ``1`` | ++--------------------------------------------------------+--------------------------------------------------------------------------------+----------+ +| :ref:`int` | :ref:`collision_mask` | ``1`` | ++--------------------------------------------------------+--------------------------------------------------------------------------------+----------+ +| :ref:`float` | :ref:`collision_priority` | ``1.0`` | ++--------------------------------------------------------+--------------------------------------------------------------------------------+----------+ +| :ref:`DisableMode` | :ref:`disable_mode` | ``0`` | ++--------------------------------------------------------+--------------------------------------------------------------------------------+----------+ +| :ref:`bool` | :ref:`input_pickable` | ``true`` | ++--------------------------------------------------------+--------------------------------------------------------------------------------+----------+ Methods ------- -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_input_event` **(** :ref:`Viewport` viewport, :ref:`InputEvent` event, :ref:`int` shape_idx **)** |virtual| | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`create_shape_owner` **(** :ref:`Object` owner **)** | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_collision_layer_value` **(** :ref:`int` layer_number **)** |const| | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_collision_mask_value` **(** :ref:`int` layer_number **)** |const| | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_rid` **(** **)** |const| | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_shape_owner_one_way_collision_margin` **(** :ref:`int` owner_id **)** |const| | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_shape_owners` **(** **)** | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_shape_owner_disabled` **(** :ref:`int` owner_id **)** |const| | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_shape_owner_one_way_collision_enabled` **(** :ref:`int` owner_id **)** |const| | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_shape_owner` **(** :ref:`int` owner_id **)** | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_collision_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_collision_mask_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`shape_find_owner` **(** :ref:`int` shape_index **)** |const| | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`shape_owner_add_shape` **(** :ref:`int` owner_id, :ref:`Shape2D` shape **)** | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`shape_owner_clear_shapes` **(** :ref:`int` owner_id **)** | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`shape_owner_get_owner` **(** :ref:`int` owner_id **)** |const| | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Shape2D` | :ref:`shape_owner_get_shape` **(** :ref:`int` owner_id, :ref:`int` shape_id **)** |const| | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`shape_owner_get_shape_count` **(** :ref:`int` owner_id **)** |const| | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`shape_owner_get_shape_index` **(** :ref:`int` owner_id, :ref:`int` shape_id **)** |const| | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform2D` | :ref:`shape_owner_get_transform` **(** :ref:`int` owner_id **)** |const| | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`shape_owner_remove_shape` **(** :ref:`int` owner_id, :ref:`int` shape_id **)** | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`shape_owner_set_disabled` **(** :ref:`int` owner_id, :ref:`bool` disabled **)** | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`shape_owner_set_one_way_collision` **(** :ref:`int` owner_id, :ref:`bool` enable **)** | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`shape_owner_set_one_way_collision_margin` **(** :ref:`int` owner_id, :ref:`float` margin **)** | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`shape_owner_set_transform` **(** :ref:`int` owner_id, :ref:`Transform2D` transform **)** | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_input_event` **(** :ref:`Viewport` viewport, :ref:`InputEvent` event, :ref:`int` shape_idx **)** |virtual| | ++-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_mouse_enter` **(** **)** |virtual| | ++-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_mouse_exit` **(** **)** |virtual| | ++-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_mouse_shape_enter` **(** :ref:`int` shape_idx **)** |virtual| | ++-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_mouse_shape_exit` **(** :ref:`int` shape_idx **)** |virtual| | ++-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`create_shape_owner` **(** :ref:`Object` owner **)** | ++-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_collision_layer_value` **(** :ref:`int` layer_number **)** |const| | ++-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_collision_mask_value` **(** :ref:`int` layer_number **)** |const| | ++-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`get_rid` **(** **)** |const| | ++-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_shape_owner_one_way_collision_margin` **(** :ref:`int` owner_id **)** |const| | ++-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedInt32Array` | :ref:`get_shape_owners` **(** **)** | ++-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_shape_owner_disabled` **(** :ref:`int` owner_id **)** |const| | ++-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_shape_owner_one_way_collision_enabled` **(** :ref:`int` owner_id **)** |const| | ++-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_shape_owner` **(** :ref:`int` owner_id **)** | ++-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_collision_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | ++-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_collision_mask_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | ++-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`shape_find_owner` **(** :ref:`int` shape_index **)** |const| | ++-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`shape_owner_add_shape` **(** :ref:`int` owner_id, :ref:`Shape2D` shape **)** | ++-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`shape_owner_clear_shapes` **(** :ref:`int` owner_id **)** | ++-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`shape_owner_get_owner` **(** :ref:`int` owner_id **)** |const| | ++-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Shape2D` | :ref:`shape_owner_get_shape` **(** :ref:`int` owner_id, :ref:`int` shape_id **)** |const| | ++-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`shape_owner_get_shape_count` **(** :ref:`int` owner_id **)** |const| | ++-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`shape_owner_get_shape_index` **(** :ref:`int` owner_id, :ref:`int` shape_id **)** |const| | ++-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform2D` | :ref:`shape_owner_get_transform` **(** :ref:`int` owner_id **)** |const| | ++-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`shape_owner_remove_shape` **(** :ref:`int` owner_id, :ref:`int` shape_id **)** | ++-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`shape_owner_set_disabled` **(** :ref:`int` owner_id, :ref:`bool` disabled **)** | ++-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`shape_owner_set_one_way_collision` **(** :ref:`int` owner_id, :ref:`bool` enable **)** | ++-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`shape_owner_set_one_way_collision_margin` **(** :ref:`int` owner_id, :ref:`float` margin **)** | ++-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`shape_owner_set_transform` **(** :ref:`int` owner_id, :ref:`Transform2D` transform **)** | ++-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- @@ -98,7 +108,7 @@ Signals - **input_event** **(** :ref:`Node` viewport, :ref:`InputEvent` event, :ref:`int` shape_idx **)** -Emitted when an input event occurs. Requires :ref:`input_pickable` to be ``true`` and at least one ``collision_layer`` bit to be set. See :ref:`_input_event` for details. +Emitted when an input event occurs. Requires :ref:`input_pickable` to be ``true`` and at least one :ref:`collision_layer` bit to be set. See :ref:`_input_event` for details. ---- @@ -108,6 +118,8 @@ Emitted when an input event occurs. Requires :ref:`input_pickable` to be ``true`` and at least one :ref:`collision_layer` bit to be set. Note that moving between different shapes within a single ``CollisionObject2D`` won't cause this signal to be emitted. +\ **Note:** Due to the lack of continuous collision detection, this signal may not be emitted in the expected order if the mouse moves fast enough and the ``CollisionObject2D``'s area is small. This signal may also not be emitted if another ``CollisionObject2D`` is overlapping the ``CollisionObject2D`` in question. + ---- .. _class_CollisionObject2D_signal_mouse_exited: @@ -116,6 +128,8 @@ Emitted when the mouse pointer enters any of this object's shapes. Requires :ref Emitted when the mouse pointer exits all this object's shapes. Requires :ref:`input_pickable` to be ``true`` and at least one :ref:`collision_layer` bit to be set. Note that moving between different shapes within a single ``CollisionObject2D`` won't cause this signal to be emitted. +\ **Note:** Due to the lack of continuous collision detection, this signal may not be emitted in the expected order if the mouse moves fast enough and the ``CollisionObject2D``'s area is small. This signal may also not be emitted if another ``CollisionObject2D`` is overlapping the ``CollisionObject2D`` in question. + ---- .. _class_CollisionObject2D_signal_mouse_shape_entered: @@ -194,6 +208,22 @@ The physics layers this CollisionObject2D scans. Collision objects can scan one ---- +.. _class_CollisionObject2D_property_collision_priority: + +- :ref:`float` **collision_priority** + ++-----------+-------------------------------+ +| *Default* | ``1.0`` | ++-----------+-------------------------------+ +| *Setter* | set_collision_priority(value) | ++-----------+-------------------------------+ +| *Getter* | get_collision_priority() | ++-----------+-------------------------------+ + +The priority used to solve colliding when occurring penetration. The higher the priority is, the lower the penetration into the object will be. This can for example be used to prevent the player from breaking through the boundaries of a level. + +---- + .. _class_CollisionObject2D_property_disable_mode: - :ref:`DisableMode` **disable_mode** @@ -231,7 +261,41 @@ Method Descriptions - void **_input_event** **(** :ref:`Viewport` viewport, :ref:`InputEvent` event, :ref:`int` shape_idx **)** |virtual| -Accepts unhandled :ref:`InputEvent`\ s. Requires :ref:`input_pickable` to be ``true``. ``shape_idx`` is the child index of the clicked :ref:`Shape2D`. Connect to the ``input_event`` signal to easily pick up these events. +Accepts unhandled :ref:`InputEvent`\ s. ``shape_idx`` is the child index of the clicked :ref:`Shape2D`. Connect to the ``input_event`` signal to easily pick up these events. + +\ **Note:** :ref:`_input_event` requires :ref:`input_pickable` to be ``true`` and at least one :ref:`collision_layer` bit to be set. + +---- + +.. _class_CollisionObject2D_method__mouse_enter: + +- void **_mouse_enter** **(** **)** |virtual| + +Called when the mouse pointer enters any of this object's shapes. Requires :ref:`input_pickable` to be ``true`` and at least one :ref:`collision_layer` bit to be set. Note that moving between different shapes within a single ``CollisionObject2D`` won't cause this function to be called. + +---- + +.. _class_CollisionObject2D_method__mouse_exit: + +- void **_mouse_exit** **(** **)** |virtual| + +Called when the mouse pointer exits all this object's shapes. Requires :ref:`input_pickable` to be ``true`` and at least one :ref:`collision_layer` bit to be set. Note that moving between different shapes within a single ``CollisionObject2D`` won't cause this function to be called. + +---- + +.. _class_CollisionObject2D_method__mouse_shape_enter: + +- void **_mouse_shape_enter** **(** :ref:`int` shape_idx **)** |virtual| + +Called when the mouse pointer enters any of this object's shapes or moves from one shape to another. ``shape_idx`` is the child index of the newly entered :ref:`Shape2D`. Requires :ref:`input_pickable` to be ``true`` and at least one :ref:`collision_layer` bit to be called. + +---- + +.. _class_CollisionObject2D_method__mouse_shape_exit: + +- void **_mouse_shape_exit** **(** :ref:`int` shape_idx **)** |virtual| + +Called when the mouse pointer exits any of this object's shapes. ``shape_idx`` is the child index of the exited :ref:`Shape2D`. Requires :ref:`input_pickable` to be ``true`` and at least one :ref:`collision_layer` bit to be called. ---- @@ -277,7 +341,7 @@ Returns the ``one_way_collision_margin`` of the shape owner identified by given .. _class_CollisionObject2D_method_get_shape_owners: -- :ref:`Array` **get_shape_owners** **(** **)** +- :ref:`PackedInt32Array` **get_shape_owners** **(** **)** Returns an :ref:`Array` of ``owner_id`` identifiers. You can use these ids in other methods that take ``owner_id`` as an argument. diff --git a/classes/class_collisionobject3d.rst b/classes/class_collisionobject3d.rst index bfb7b7cf9..f2ad3c424 100644 --- a/classes/class_collisionobject3d.rst +++ b/classes/class_collisionobject3d.rst @@ -29,6 +29,8 @@ Properties +--------------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ | :ref:`int` | :ref:`collision_mask` | ``1`` | +--------------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ +| :ref:`float` | :ref:`collision_priority` | ``1.0`` | ++--------------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ | :ref:`DisableMode` | :ref:`disable_mode` | ``0`` | +--------------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`input_capture_on_drag` | ``false`` | @@ -39,49 +41,53 @@ Properties Methods ------- -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_input_event` **(** :ref:`Camera3D` camera, :ref:`InputEvent` event, :ref:`Vector3` position, :ref:`Vector3` normal, :ref:`int` shape_idx **)** |virtual| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`create_shape_owner` **(** :ref:`Object` owner **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_collision_layer_value` **(** :ref:`int` layer_number **)** |const| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_collision_mask_value` **(** :ref:`int` layer_number **)** |const| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_rid` **(** **)** |const| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_shape_owners` **(** **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_shape_owner_disabled` **(** :ref:`int` owner_id **)** |const| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_shape_owner` **(** :ref:`int` owner_id **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_collision_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_collision_mask_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`shape_find_owner` **(** :ref:`int` shape_index **)** |const| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`shape_owner_add_shape` **(** :ref:`int` owner_id, :ref:`Shape3D` shape **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`shape_owner_clear_shapes` **(** :ref:`int` owner_id **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`shape_owner_get_owner` **(** :ref:`int` owner_id **)** |const| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Shape3D` | :ref:`shape_owner_get_shape` **(** :ref:`int` owner_id, :ref:`int` shape_id **)** |const| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`shape_owner_get_shape_count` **(** :ref:`int` owner_id **)** |const| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`shape_owner_get_shape_index` **(** :ref:`int` owner_id, :ref:`int` shape_id **)** |const| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`shape_owner_get_transform` **(** :ref:`int` owner_id **)** |const| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`shape_owner_remove_shape` **(** :ref:`int` owner_id, :ref:`int` shape_id **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`shape_owner_set_disabled` **(** :ref:`int` owner_id, :ref:`bool` disabled **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`shape_owner_set_transform` **(** :ref:`int` owner_id, :ref:`Transform3D` transform **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_input_event` **(** :ref:`Camera3D` camera, :ref:`InputEvent` event, :ref:`Vector3` position, :ref:`Vector3` normal, :ref:`int` shape_idx **)** |virtual| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_mouse_enter` **(** **)** |virtual| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_mouse_exit` **(** **)** |virtual| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`create_shape_owner` **(** :ref:`Object` owner **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_collision_layer_value` **(** :ref:`int` layer_number **)** |const| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_collision_mask_value` **(** :ref:`int` layer_number **)** |const| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`get_rid` **(** **)** |const| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedInt32Array` | :ref:`get_shape_owners` **(** **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_shape_owner_disabled` **(** :ref:`int` owner_id **)** |const| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_shape_owner` **(** :ref:`int` owner_id **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_collision_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_collision_mask_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`shape_find_owner` **(** :ref:`int` shape_index **)** |const| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`shape_owner_add_shape` **(** :ref:`int` owner_id, :ref:`Shape3D` shape **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`shape_owner_clear_shapes` **(** :ref:`int` owner_id **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`shape_owner_get_owner` **(** :ref:`int` owner_id **)** |const| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Shape3D` | :ref:`shape_owner_get_shape` **(** :ref:`int` owner_id, :ref:`int` shape_id **)** |const| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`shape_owner_get_shape_count` **(** :ref:`int` owner_id **)** |const| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`shape_owner_get_shape_index` **(** :ref:`int` owner_id, :ref:`int` shape_id **)** |const| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform3D` | :ref:`shape_owner_get_transform` **(** :ref:`int` owner_id **)** |const| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`shape_owner_remove_shape` **(** :ref:`int` owner_id, :ref:`int` shape_id **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`shape_owner_set_disabled` **(** :ref:`int` owner_id, :ref:`bool` disabled **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`shape_owner_set_transform` **(** :ref:`int` owner_id, :ref:`Transform3D` transform **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- @@ -98,7 +104,9 @@ Emitted when the object receives an unhandled :ref:`InputEvent - **mouse_entered** **(** **)** -Emitted when the mouse pointer enters any of this object's shapes. +Emitted when the mouse pointer enters any of this object's shapes. Requires :ref:`input_ray_pickable` to be ``true`` and at least one :ref:`collision_layer` bit to be set. + +\ **Note:** Due to the lack of continuous collision detection, this signal may not be emitted in the expected order if the mouse moves fast enough and the :ref:`CollisionObject2D`'s area is small. This signal may also not be emitted if another :ref:`CollisionObject2D` is overlapping the :ref:`CollisionObject2D` in question. ---- @@ -106,7 +114,9 @@ Emitted when the mouse pointer enters any of this object's shapes. - **mouse_exited** **(** **)** -Emitted when the mouse pointer exits all this object's shapes. +Emitted when the mouse pointer exits all this object's shapes. Requires :ref:`input_ray_pickable` to be ``true`` and at least one :ref:`collision_layer` bit to be set. + +\ **Note:** Due to the lack of continuous collision detection, this signal may not be emitted in the expected order if the mouse moves fast enough and the :ref:`CollisionObject2D`'s area is small. This signal may also not be emitted if another :ref:`CollisionObject2D` is overlapping the :ref:`CollisionObject2D` in question. Enumerations ------------ @@ -170,6 +180,22 @@ The physics layers this CollisionObject3D **scans**. Collision objects can scan ---- +.. _class_CollisionObject3D_property_collision_priority: + +- :ref:`float` **collision_priority** + ++-----------+-------------------------------+ +| *Default* | ``1.0`` | ++-----------+-------------------------------+ +| *Setter* | set_collision_priority(value) | ++-----------+-------------------------------+ +| *Getter* | get_collision_priority() | ++-----------+-------------------------------+ + +The priority used to solve colliding when occurring penetration. The higher the priority is, the lower the penetration into the object will be. This can for example be used to prevent the player from breaking through the boundaries of a level. + +---- + .. _class_CollisionObject3D_property_disable_mode: - :ref:`DisableMode` **disable_mode** @@ -225,6 +251,24 @@ Method Descriptions Receives unhandled :ref:`InputEvent`\ s. ``position`` is the location in world space of the mouse pointer on the surface of the shape with index ``shape_idx`` and ``normal`` is the normal vector of the surface at that point. Connect to the :ref:`input_event` signal to easily pick up these events. +\ **Note:** :ref:`_input_event` requires :ref:`input_ray_pickable` to be ``true`` and at least one :ref:`collision_layer` bit to be set. + +---- + +.. _class_CollisionObject3D_method__mouse_enter: + +- void **_mouse_enter** **(** **)** |virtual| + +Called when the mouse pointer enters any of this object's shapes. Requires :ref:`input_ray_pickable` to be ``true`` and at least one :ref:`collision_layer` bit to be set. Note that moving between different shapes within a single ``CollisionObject3D`` won't cause this function to be called. + +---- + +.. _class_CollisionObject3D_method__mouse_exit: + +- void **_mouse_exit** **(** **)** |virtual| + +Called when the mouse pointer exits all this object's shapes. Requires :ref:`input_ray_pickable` to be ``true`` and at least one :ref:`collision_layer` bit to be set. Note that moving between different shapes within a single ``CollisionObject3D`` won't cause this function to be called. + ---- .. _class_CollisionObject3D_method_create_shape_owner: @@ -261,7 +305,7 @@ Returns the object's :ref:`RID`. .. _class_CollisionObject3D_method_get_shape_owners: -- :ref:`Array` **get_shape_owners** **(** **)** +- :ref:`PackedInt32Array` **get_shape_owners** **(** **)** Returns an :ref:`Array` of ``owner_id`` identifiers. You can use these ids in other methods that take ``owner_id`` as an argument. diff --git a/classes/class_collisionshape2d.rst b/classes/class_collisionshape2d.rst index c11da949b..8479efbcf 100644 --- a/classes/class_collisionshape2d.rst +++ b/classes/class_collisionshape2d.rst @@ -17,7 +17,9 @@ Node that represents collision shape data in 2D space. Description ----------- -Editor facility for creating and editing collision shapes in 2D space. You can use this node to represent all sorts of collision shapes, for example, add this to an :ref:`Area2D` to give it a detection shape, or add it to a :ref:`PhysicsBody2D` to create a solid object. **IMPORTANT**: this is an Editor-only helper to create shapes, use :ref:`CollisionObject2D.shape_owner_get_shape` to get the actual shape. +Editor facility for creating and editing collision shapes in 2D space. Set the :ref:`shape` property to configure the shape. **IMPORTANT**: this is an Editor-only helper to create shapes, use :ref:`CollisionObject2D.shape_owner_get_shape` to get the actual shape. + +You can use this node to represent all sorts of collision shapes, for example, add this to an :ref:`Area2D` to give it a detection shape, or add it to a :ref:`PhysicsBody2D` to create a solid object. Tutorials --------- diff --git a/classes/class_collisionshape3d.rst b/classes/class_collisionshape3d.rst index 4e80fcc32..c45d22c80 100644 --- a/classes/class_collisionshape3d.rst +++ b/classes/class_collisionshape3d.rst @@ -17,7 +17,9 @@ Node that represents collision shape data in 3D space. Description ----------- -Editor facility for creating and editing collision shapes in 3D space. You can use this node to represent all sorts of collision shapes, for example, add this to an :ref:`Area3D` to give it a detection shape, or add it to a :ref:`PhysicsBody3D` to create a solid object. **IMPORTANT**: this is an Editor-only helper to create shapes, use :ref:`CollisionObject3D.shape_owner_get_shape` to get the actual shape. +Editor facility for creating and editing collision shapes in 3D space. Set the :ref:`shape` property to configure the shape. **IMPORTANT**: this is an Editor-only helper to create shapes, use :ref:`CollisionObject3D.shape_owner_get_shape` to get the actual shape. + +You can use this node to represent all sorts of collision shapes, for example, add this to an :ref:`Area3D` to give it a detection shape, or add it to a :ref:`PhysicsBody3D` to create a solid object. Tutorials --------- diff --git a/classes/class_color.rst b/classes/class_color.rst index aca6aca6e..132345ef7 100644 --- a/classes/class_color.rst +++ b/classes/class_color.rst @@ -1068,7 +1068,7 @@ Constructs a color from an `HSV profile ` **from_ok_hsl** **(** :ref:`float` h, :ref:`float` s, :ref:`float` l, :ref:`float` alpha=1.0 **)** |static| -Constructs a color from an `OK HSL profile `__. ``h`` (hue), ``s`` (saturation), and ``v`` (value) are typically between 0 and 1. +Constructs a color from an `OK HSL profile `__. ``h`` (hue), ``s`` (saturation), and ``l`` (lightness) are typically between 0 and 1. .. tabs:: @@ -1145,7 +1145,7 @@ This is useful when determining light or dark color. Colors with a luminance sma Returns a new color from ``rgba``, an HTML hexadecimal color string. ``rgba`` is not case sensitive, and may be prefixed with a '#' character. -\ ``rgba`` must be a valid three-digit or six-digit hexadecimal color string, and may contain an alpha channel value. If ``rgba`` does not contain an alpha channel value, an alpha channel value of 1.0 is applied. +``rgba`` must be a valid three-digit or six-digit hexadecimal color string, and may contain an alpha channel value. If ``rgba`` does not contain an alpha channel value, an alpha channel value of 1.0 is applied. If ``rgba`` is invalid a Color(0.0, 0.0, 0.0, 1.0) is returned. @@ -1228,7 +1228,7 @@ Returns the inverted color ``(1 - r, 1 - g, 1 - b, a)``. - :ref:`bool` **is_equal_approx** **(** :ref:`Color` to **)** |const| -Returns ``true`` if this color and ``color`` are approximately equal, by running :ref:`@GlobalScope.is_equal_approx` on each component. +Returns ``true`` if this color and ``to`` are approximately equal, by running :ref:`@GlobalScope.is_equal_approx` on each component. ---- diff --git a/classes/class_concavepolygonshape2d.rst b/classes/class_concavepolygonshape2d.rst index 2db19c656..579b5d63b 100644 --- a/classes/class_concavepolygonshape2d.rst +++ b/classes/class_concavepolygonshape2d.rst @@ -17,12 +17,14 @@ Concave polygon shape resource for 2D physics. Description ----------- -2D concave polygon shape to be added as a *direct* child of a :ref:`PhysicsBody2D` or :ref:`Area2D` using a :ref:`CollisionShape2D` node. It is made out of segments and is optimal for complex polygonal concave collisions. However, it is not advised to use for :ref:`RigidDynamicBody2D` nodes. A CollisionPolygon2D in convex decomposition mode (solids) or several convex objects are advised for that instead. Otherwise, a concave polygon 2D shape is better for static collisions. +2D concave polygon shape to be added as a *direct* child of a :ref:`PhysicsBody2D` or :ref:`Area2D` using a :ref:`CollisionShape2D` node. It is made out of segments and is optimal for complex polygonal concave collisions. However, it is not advised to use for :ref:`RigidBody2D` nodes. A CollisionPolygon2D in convex decomposition mode (solids) or several convex objects are advised for that instead. Otherwise, a concave polygon 2D shape is better for static collisions. The main difference between a :ref:`ConvexPolygonShape2D` and a ``ConcavePolygonShape2D`` is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex to speed up collision detection. \ **Performance:** Due to its complexity, ``ConcavePolygonShape2D`` is the slowest collision shape to check collisions against. Its use should generally be limited to level geometry. For convex geometry, using :ref:`ConvexPolygonShape2D` will perform better. For dynamic physics bodies that need concave collision, several :ref:`ConvexPolygonShape2D`\ s can be used to represent its collision by using convex decomposition; see :ref:`ConvexPolygonShape2D`'s documentation for instructions. However, consider using primitive collision shapes such as :ref:`CircleShape2D` or :ref:`RectangleShape2D` first. +\ **Warning:** Using this shape for an :ref:`Area2D` (via a :ref:`CollisionShape2D` node) may give unexpected results: the area will only detect collisions with the segments in the ``ConcavePolygonShape2D`` (and not with any "inside" of the shape, for example). + Properties ---------- diff --git a/classes/class_concavepolygonshape3d.rst b/classes/class_concavepolygonshape3d.rst index 607760299..911b1ac22 100644 --- a/classes/class_concavepolygonshape3d.rst +++ b/classes/class_concavepolygonshape3d.rst @@ -19,10 +19,12 @@ Description 3D concave polygon shape resource (also called "trimesh") to be added as a *direct* child of a :ref:`PhysicsBody3D` or :ref:`Area3D` using a :ref:`CollisionShape3D` node. This shape is created by feeding a list of triangles. Despite its name, ``ConcavePolygonShape3D`` can also store convex polygon shapes. However, unlike :ref:`ConvexPolygonShape3D`, ``ConcavePolygonShape3D`` is *not* limited to storing convex shapes exclusively. -\ **Note:** When used for collision, ``ConcavePolygonShape3D`` is intended to work with static :ref:`PhysicsBody3D` nodes like :ref:`StaticBody3D` and will not work with :ref:`CharacterBody3D` or :ref:`RigidDynamicBody3D` with a mode other than Static. +\ **Note:** When used for collision, ``ConcavePolygonShape3D`` is intended to work with static :ref:`PhysicsBody3D` nodes like :ref:`StaticBody3D` and will not work with :ref:`CharacterBody3D` or :ref:`RigidBody3D` with a mode other than Static. \ **Performance:** Due to its complexity, ``ConcavePolygonShape3D`` is the slowest collision shape to check collisions against. Its use should generally be limited to level geometry. For convex geometry, using :ref:`ConvexPolygonShape3D` will perform better. For dynamic physics bodies that need concave collision, several :ref:`ConvexPolygonShape3D`\ s can be used to represent its collision by using convex decomposition; see :ref:`ConvexPolygonShape3D`'s documentation for instructions. However, consider using primitive collision shapes such as :ref:`SphereShape3D` or :ref:`BoxShape3D` first. +\ **Warning:** Using this shape for an :ref:`Area3D` (via a :ref:`CollisionShape3D` node, created e.g. by using the *Create Trimesh Collision Sibling* option in the *Mesh* menu that appears when selecting a :ref:`MeshInstance3D` node) may give unexpected results: the area will only detect collisions with the triangle faces in the ``ConcavePolygonShape3D`` (and not with any "inside" of the shape, for example); moreover it will only detect all such collisions if :ref:`backface_collision` is ``true``. + Tutorials --------- diff --git a/classes/class_conetwistjoint3d.rst b/classes/class_conetwistjoint3d.rst index 64d0264c6..926c49aef 100644 --- a/classes/class_conetwistjoint3d.rst +++ b/classes/class_conetwistjoint3d.rst @@ -26,17 +26,17 @@ Once the Bodies swing, the twist axis is calculated as the middle of the x-axes Properties ---------- -+---------------------------+---------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`bias` | ``0.3`` | -+---------------------------+---------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`relaxation` | ``1.0`` | -+---------------------------+---------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`softness` | ``0.8`` | -+---------------------------+---------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`swing_span` | ``45.0`` | -+---------------------------+---------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`twist_span` | ``180.0`` | -+---------------------------+---------------------------------------------------------------+-----------+ ++---------------------------+---------------------------------------------------------------+--------------+ +| :ref:`float` | :ref:`bias` | ``0.3`` | ++---------------------------+---------------------------------------------------------------+--------------+ +| :ref:`float` | :ref:`relaxation` | ``1.0`` | ++---------------------------+---------------------------------------------------------------+--------------+ +| :ref:`float` | :ref:`softness` | ``0.8`` | ++---------------------------+---------------------------------------------------------------+--------------+ +| :ref:`float` | :ref:`swing_span` | ``0.785398`` | ++---------------------------+---------------------------------------------------------------+--------------+ +| :ref:`float` | :ref:`twist_span` | ``3.14159`` | ++---------------------------+---------------------------------------------------------------+--------------+ Methods ------- @@ -145,9 +145,13 @@ The ease with which the joint starts to twist. If it's too low, it takes more fo - :ref:`float` **swing_span** -+-----------+----------+ -| *Default* | ``45.0`` | -+-----------+----------+ ++-----------+------------------+ +| *Default* | ``0.785398`` | ++-----------+------------------+ +| *Setter* | set_param(value) | ++-----------+------------------+ +| *Getter* | get_param() | ++-----------+------------------+ Swing is rotation from side to side, around the axis perpendicular to the twist axis. @@ -163,9 +167,13 @@ If below 0.05, this behavior is locked. - :ref:`float` **twist_span** -+-----------+-----------+ -| *Default* | ``180.0`` | -+-----------+-----------+ ++-----------+------------------+ +| *Default* | ``3.14159`` | ++-----------+------------------+ +| *Setter* | set_param(value) | ++-----------+------------------+ +| *Getter* | get_param() | ++-----------+------------------+ Twist is the rotation around the twist axis, this value defined how far the joint can twist. diff --git a/classes/class_control.rst b/classes/class_control.rst index 386b773e3..a35422178 100644 --- a/classes/class_control.rst +++ b/classes/class_control.rst @@ -12,7 +12,7 @@ Control **Inherits:** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`BaseButton`, :ref:`ColorRect`, :ref:`Container`, :ref:`EditorDebuggerPlugin`, :ref:`GraphEdit`, :ref:`ItemList`, :ref:`Label`, :ref:`LineEdit`, :ref:`NinePatchRect`, :ref:`Panel`, :ref:`Range`, :ref:`ReferenceRect`, :ref:`RichTextLabel`, :ref:`Separator`, :ref:`TabBar`, :ref:`TextEdit`, :ref:`TextureRect`, :ref:`Tree`, :ref:`VideoStreamPlayer` +**Inherited By:** :ref:`BaseButton`, :ref:`ColorRect`, :ref:`Container`, :ref:`EditorDebuggerPlugin`, :ref:`GraphEdit`, :ref:`ItemList`, :ref:`Label`, :ref:`LineEdit`, :ref:`MenuBar`, :ref:`NinePatchRect`, :ref:`Panel`, :ref:`Range`, :ref:`ReferenceRect`, :ref:`RichTextLabel`, :ref:`Separator`, :ref:`TabBar`, :ref:`TextEdit`, :ref:`TextureRect`, :ref:`Tree`, :ref:`VideoStreamPlayer` All user interface nodes inherit from Control. A control's anchors and offsets adapt its position and size relative to its parent. @@ -88,8 +88,6 @@ Properties +------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ | :ref:`GrowDirection` | :ref:`grow_vertical` | ``1`` | +------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ -| :ref:`String` | :ref:`hint_tooltip` | ``""`` | -+------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ | :ref:`LayoutDirection` | :ref:`layout_direction` | ``0`` | +------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ | :ref:`CursorShape` | :ref:`mouse_default_cursor_shape` | ``0`` | @@ -126,6 +124,8 @@ Properties +------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ | :ref:`StringName` | :ref:`theme_type_variation` | ``&""`` | +------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ +| :ref:`String` | :ref:`tooltip_text` | ``""`` | ++------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ Methods ------- @@ -145,7 +145,7 @@ Methods +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Object` | :ref:`_make_custom_tooltip` **(** :ref:`String` for_text **)** |virtual| |const| | +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`_structured_text_parser` **(** :ref:`Array` args, :ref:`String` text **)** |virtual| |const| | +| :ref:`Vector2i[]` | :ref:`_structured_text_parser` **(** :ref:`Array` args, :ref:`String` text **)** |virtual| |const| | +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`accept_event` **(** **)** | +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -383,6 +383,8 @@ Emitted when one of the size flags changes. See :ref:`size_flags_horizontal` notification is sent. + Enumerations ------------ @@ -725,7 +727,17 @@ Constants - **NOTIFICATION_FOCUS_EXIT** = **44** --- Sent when the node loses focus. -- **NOTIFICATION_THEME_CHANGED** = **45** --- Sent when the node's :ref:`theme` changes, right before Godot redraws the control. Happens when you call one of the ``add_theme_*_override`` methods. +- **NOTIFICATION_THEME_CHANGED** = **45** --- Sent when the node needs to refresh its theme items. This happens in one of the following cases: + +- The :ref:`theme` property is changed on this node or any of its ancestors. + +- The :ref:`theme_type_variation` property is changed on this node. + +- One of the node's theme property overrides is changed. + +- The node enters the scene tree. + +\ **Note:** As an optimization, this notification won't be sent from changes that occur while this node is outside of the scene tree. Instead, all of the theme item updates can be applied at once when the node enters the scene tree. - **NOTIFICATION_SCROLL_BEGIN** = **47** --- Sent when this node is inside a :ref:`ScrollContainer` which has begun being scrolled. @@ -1000,45 +1012,6 @@ Controls the direction on the horizontal axis in which the control should grow i Controls the direction on the vertical axis in which the control should grow if its vertical minimum size is changed to be greater than its current size, as the control always has to be at least the minimum size. ----- - -.. _class_Control_property_hint_tooltip: - -- :ref:`String` **hint_tooltip** - -+-----------+--------------------+ -| *Default* | ``""`` | -+-----------+--------------------+ -| *Setter* | set_tooltip(value) | -+-----------+--------------------+ - -Changes the tooltip text. The tooltip appears when the user's mouse cursor stays idle over this control for a few moments, provided that the :ref:`mouse_filter` property is not :ref:`MOUSE_FILTER_IGNORE`. You can change the time required for the tooltip to appear with ``gui/timers/tooltip_delay_sec`` option in Project Settings. - -The tooltip popup will use either a default implementation, or a custom one that you can provide by overriding :ref:`_make_custom_tooltip`. The default tooltip includes a :ref:`PopupPanel` and :ref:`Label` whose theme properties can be customized using :ref:`Theme` methods with the ``"TooltipPanel"`` and ``"TooltipLabel"`` respectively. For example: - - -.. tabs:: - - .. code-tab:: gdscript - - var style_box = StyleBoxFlat.new() - style_box.set_bg_color(Color(1, 1, 0)) - style_box.set_border_width_all(2) - # We assume here that the `theme` property has been assigned a custom Theme beforehand. - theme.set_stylebox("panel", "TooltipPanel", style_box) - theme.set_color("font_color", "TooltipLabel", Color(0, 1, 1)) - - .. code-tab:: csharp - - var styleBox = new StyleBoxFlat(); - styleBox.SetBgColor(new Color(1, 1, 0)); - styleBox.SetBorderWidthAll(2); - // We assume here that the `Theme` property has been assigned a custom Theme beforehand. - Theme.SetStyleBox("panel", "TooltipPanel", styleBox); - Theme.SetColor("font_color", "TooltipLabel", new Color(0, 1, 1)); - - - ---- .. _class_Control_property_layout_direction: @@ -1239,7 +1212,7 @@ The node's rotation around its pivot, in radians. See :ref:`pivot_offset`. Change this property to scale the node around its :ref:`pivot_offset`. The Control's :ref:`hint_tooltip` will also scale according to this value. +The node's scale, relative to its :ref:`size`. Change this property to scale the node around its :ref:`pivot_offset`. The Control's :ref:`tooltip_text` will also scale according to this value. \ **Note:** This property is mainly intended to be used for animation purposes. Text inside the Control will look pixelated or blurry when the Control is scaled. To support multiple resolutions in your project, use an appropriate viewport stretch mode as described in the :doc:`documentation <../tutorials/viewports/multiple_resolutions>` instead of scaling Controls individually. @@ -1343,6 +1316,47 @@ When set, this property gives the highest priority to the type of the specified \ **Note:** Theme items are looked for in the tree order, from branch to root, where each ``Control`` node is checked for its :ref:`theme` property. The earliest match against any type/class name is returned. The project-level Theme and the default Theme are checked last. +---- + +.. _class_Control_property_tooltip_text: + +- :ref:`String` **tooltip_text** + ++-----------+-------------------------+ +| *Default* | ``""`` | ++-----------+-------------------------+ +| *Setter* | set_tooltip_text(value) | ++-----------+-------------------------+ +| *Getter* | get_tooltip_text() | ++-----------+-------------------------+ + +The default tooltip text. The tooltip appears when the user's mouse cursor stays idle over this control for a few moments, provided that the :ref:`mouse_filter` property is not :ref:`MOUSE_FILTER_IGNORE`. The time required for the tooltip to appear can be changed with the ``gui/timers/tooltip_delay_sec`` option in Project Settings. See also :ref:`get_tooltip`. + +The tooltip popup will use either a default implementation, or a custom one that you can provide by overriding :ref:`_make_custom_tooltip`. The default tooltip includes a :ref:`PopupPanel` and :ref:`Label` whose theme properties can be customized using :ref:`Theme` methods with the ``"TooltipPanel"`` and ``"TooltipLabel"`` respectively. For example: + + +.. tabs:: + + .. code-tab:: gdscript + + var style_box = StyleBoxFlat.new() + style_box.set_bg_color(Color(1, 1, 0)) + style_box.set_border_width_all(2) + # We assume here that the `theme` property has been assigned a custom Theme beforehand. + theme.set_stylebox("panel", "TooltipPanel", style_box) + theme.set_color("font_color", "TooltipLabel", Color(0, 1, 1)) + + .. code-tab:: csharp + + var styleBox = new StyleBoxFlat(); + styleBox.SetBgColor(new Color(1, 1, 0)); + styleBox.SetBorderWidthAll(2); + // We assume here that the `Theme` property has been assigned a custom Theme beforehand. + Theme.SetStyleBox("panel", "TooltipPanel", styleBox); + Theme.SetColor("font_color", "TooltipLabel", new Color(0, 1, 1)); + + + Method Descriptions ------------------- @@ -1350,7 +1364,7 @@ Method Descriptions - :ref:`bool` **_can_drop_data** **(** :ref:`Vector2` at_position, :ref:`Variant` data **)** |virtual| |const| -Godot calls this method to test if ``data`` from a control's :ref:`_get_drag_data` can be dropped at ``position``. ``position`` is local to this control. +Godot calls this method to test if ``data`` from a control's :ref:`_get_drag_data` can be dropped at ``at_position``. ``at_position`` is local to this control. This method should only be used to test the data. Process the data in :ref:`_drop_data`. @@ -1381,7 +1395,7 @@ This method should only be used to test the data. Process the data in :ref:`_dro - void **_drop_data** **(** :ref:`Vector2` at_position, :ref:`Variant` data **)** |virtual| -Godot calls this method to pass you the ``data`` from a control's :ref:`_get_drag_data` result. Godot first calls :ref:`_can_drop_data` to test if ``data`` is allowed to drop at ``position`` where ``position`` is local to this control. +Godot calls this method to pass you the ``data`` from a control's :ref:`_get_drag_data` result. Godot first calls :ref:`_can_drop_data` to test if ``data`` is allowed to drop at ``at_position`` where ``at_position`` is local to this control. .. tabs:: @@ -1412,7 +1426,7 @@ Godot calls this method to pass you the ``data`` from a control's :ref:`_get_dra - :ref:`Variant` **_get_drag_data** **(** :ref:`Vector2` at_position **)** |virtual| |const| -Godot calls this method to get data that can be dragged and dropped onto controls that expect drop data. Returns ``null`` if there is no data to drag. Controls that want to receive drop data should implement :ref:`_can_drop_data` and :ref:`_drop_data`. ``position`` is local to this control. Drag may be forced with :ref:`force_drag`. +Godot calls this method to get data that can be dragged and dropped onto controls that expect drop data. Returns ``null`` if there is no data to drag. Controls that want to receive drop data should implement :ref:`_can_drop_data` and :ref:`_drop_data`. ``at_position`` is local to this control. Drag may be forced with :ref:`force_drag`. A preview that will follow the mouse that should represent the data can be set with :ref:`set_drag_preview`. A good time to set the preview is in this method. @@ -1505,7 +1519,7 @@ The event won't trigger if: - :ref:`bool` **_has_point** **(** :ref:`Vector2` position **)** |virtual| |const| -Virtual method to be implemented by the user. Returns whether the given ``point`` is inside this control. +Virtual method to be implemented by the user. Returns whether the given ``position`` is inside this control. If not overridden, default behavior is checking if the point is within control's Rect. @@ -1517,11 +1531,11 @@ If not overridden, default behavior is checking if the point is within control's - :ref:`Object` **_make_custom_tooltip** **(** :ref:`String` for_text **)** |virtual| |const| -Virtual method to be implemented by the user. Returns a ``Control`` node that should be used as a tooltip instead of the default one. The ``for_text`` includes the contents of the :ref:`hint_tooltip` property. +Virtual method to be implemented by the user. Returns a ``Control`` node that should be used as a tooltip instead of the default one. The ``for_text`` includes the contents of the :ref:`tooltip_text` property. The returned node must be of type ``Control`` or Control-derived. It can have child nodes of any type. It is freed when the tooltip disappears, so make sure you always provide a new instance (if you want to use a pre-existing node from your scene tree, you can duplicate it and pass the duplicated instance). When ``null`` or a non-Control node is returned, the default tooltip will be used instead. -The returned node will be added as child to a :ref:`PopupPanel`, so you should only provide the contents of that panel. That :ref:`PopupPanel` can be themed using :ref:`Theme.set_stylebox` for the type ``"TooltipPanel"`` (see :ref:`hint_tooltip` for an example). +The returned node will be added as child to a :ref:`PopupPanel`, so you should only provide the contents of that panel. That :ref:`PopupPanel` can be themed using :ref:`Theme.set_stylebox` for the type ``"TooltipPanel"`` (see :ref:`tooltip_text` for an example). \ **Note:** The tooltip is shrunk to minimal size. If you want to ensure it's fully visible, you might want to set its :ref:`custom_minimum_size` to some non-zero value. @@ -1577,7 +1591,7 @@ Example of usage with a custom scene instance: .. _class_Control_method__structured_text_parser: -- :ref:`Array` **_structured_text_parser** **(** :ref:`Array` args, :ref:`String` text **)** |virtual| |const| +- :ref:`Vector2i[]` **_structured_text_parser** **(** :ref:`Array` args, :ref:`String` text **)** |virtual| |const| User defined BiDi algorithm override function. @@ -1871,7 +1885,7 @@ Example usage for showing a popup: Returns a :ref:`Color` from the first matching :ref:`Theme` in the tree if that :ref:`Theme` has a color item with the specified ``name`` and ``theme_type``. If ``theme_type`` is omitted the class name of the current control is used as the type, or :ref:`theme_type_variation` if it is defined. If the type is a class name its parent classes are also checked, in order of inheritance. If the type is a variation its base types are checked, in order of dependency, then the control's class name and its parent classes are checked. -For the current control its local overrides are considered first (see :ref:`add_theme_color_override`), then its assigned :ref:`theme`. After the current control, each parent control and its assigned :ref:`theme` are considered; controls without a :ref:`theme` assigned are skipped. If no matching :ref:`Theme` is found in the tree, a custom project :ref:`Theme` (see :ref:`ProjectSettings.gui/theme/custom`) and the default :ref:`Theme` are used. +For the current control its local overrides are considered first (see :ref:`add_theme_color_override`), then its assigned :ref:`theme`. After the current control, each parent control and its assigned :ref:`theme` are considered; controls without a :ref:`theme` assigned are skipped. If no matching :ref:`Theme` is found in the tree, the custom project :ref:`Theme` (see :ref:`ProjectSettings.gui/theme/custom`) and the default :ref:`Theme` are used (see :ref:`ThemeDB`). .. tabs:: @@ -1982,7 +1996,9 @@ See :ref:`get_theme_color` for details. - :ref:`String` **get_tooltip** **(** :ref:`Vector2` at_position=Vector2(0, 0) **)** |const| -Returns the tooltip, which will appear when the cursor is resting over this control. See :ref:`hint_tooltip`. +Returns the tooltip text ``at_position`` in local coordinates, which will typically appear when the cursor is resting over this control. By default, it returns :ref:`tooltip_text`. + +\ **Note:** This method can be overriden to customise its behaviour. If this method returns an empty :ref:`String`, no tooltip is displayed. ---- @@ -2017,6 +2033,8 @@ Creates an :ref:`InputEventMouseButton` that attemp Steal the focus from another control and become the focused control (see :ref:`focus_mode`). +\ **Note**: Using this method together with :ref:`Callable.call_deferred` makes it more reliable, especially when called inside :ref:`Node._ready`. + ---- .. _class_Control_method_has_focus: diff --git a/classes/class_cpuparticles2d.rst b/classes/class_cpuparticles2d.rst index 987dcac01..b69b8a275 100644 --- a/classes/class_cpuparticles2d.rst +++ b/classes/class_cpuparticles2d.rst @@ -114,7 +114,7 @@ Properties +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ | :ref:`float` | :ref:`linear_accel_min` | ``0.0`` | +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`local_coords` | ``true`` | +| :ref:`bool` | :ref:`local_coords` | ``false`` | +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ | :ref:`bool` | :ref:`one_shot` | ``false`` | +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ @@ -935,14 +935,14 @@ Each particle's linear acceleration will vary along this :ref:`Curve` **local_coords** +-----------+----------------------------------+ -| *Default* | ``true`` | +| *Default* | ``false`` | +-----------+----------------------------------+ | *Setter* | set_use_local_coordinates(value) | +-----------+----------------------------------+ | *Getter* | get_use_local_coordinates() | +-----------+----------------------------------+ -If ``true``, particles use the parent node's coordinate space. If ``false``, they use global coordinates. +If ``true``, particles use the parent node's coordinate space (known as local coordinates). This will cause particles to move and rotate along the ``CPUParticles2D`` node (and its parents) when it is moved or rotated. If ``false``, particles use global coordinates; they will not move or rotate along the ``CPUParticles2D`` node (and its parents) when it is moved or rotated. ---- @@ -1267,7 +1267,7 @@ Method Descriptions - void **convert_from_particles** **(** :ref:`Node` particles **)** -Sets this node's properties to match a given :ref:`GPUParticles2D` node with an assigned :ref:`ParticlesMaterial`. +Sets this node's properties to match a given :ref:`GPUParticles2D` node with an assigned :ref:`ParticleProcessMaterial`. ---- diff --git a/classes/class_cpuparticles3d.rst b/classes/class_cpuparticles3d.rst index 78ec66a87..637ab3d61 100644 --- a/classes/class_cpuparticles3d.rst +++ b/classes/class_cpuparticles3d.rst @@ -119,7 +119,7 @@ Properties +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ | :ref:`float` | :ref:`linear_accel_min` | ``0.0`` | +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`bool` | :ref:`local_coords` | ``true`` | +| :ref:`bool` | :ref:`local_coords` | ``false`` | +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ | :ref:`Mesh` | :ref:`mesh` | | +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ @@ -549,7 +549,9 @@ Minimum particle animation speed. | *Getter* | get_color() | +-----------+-----------------------+ -Each particle's initial color. To have particle display color in a :ref:`BaseMaterial3D` make sure to set :ref:`BaseMaterial3D.vertex_color_use_as_albedo` to ``true``. +Each particle's initial color. + +\ **Note:** :ref:`color` multiplies the particle mesh's vertex colors. To have a visible effect on a :ref:`BaseMaterial3D`, :ref:`BaseMaterial3D.vertex_color_use_as_albedo` *must* be ``true``. For a :ref:`ShaderMaterial`, ``ALBEDO *= COLOR.rgb;`` must be inserted in the shader's ``fragment()`` function. Otherwise, :ref:`color` will have no visible effect. ---- @@ -565,6 +567,8 @@ Each particle's initial color. To have particle display color in a :ref:`BaseMat Each particle's initial color will vary along this :ref:`GradientTexture1D` (multiplied with :ref:`color`). +\ **Note:** :ref:`color_initial_ramp` multiplies the particle mesh's vertex colors. To have a visible effect on a :ref:`BaseMaterial3D`, :ref:`BaseMaterial3D.vertex_color_use_as_albedo` *must* be ``true``. For a :ref:`ShaderMaterial`, ``ALBEDO *= COLOR.rgb;`` must be inserted in the shader's ``fragment()`` function. Otherwise, :ref:`color_initial_ramp` will have no visible effect. + ---- .. _class_CPUParticles3D_property_color_ramp: @@ -579,6 +583,8 @@ Each particle's initial color will vary along this :ref:`GradientTexture1D` over its lifetime (multiplied with :ref:`color`). +\ **Note:** :ref:`color_ramp` multiplies the particle mesh's vertex colors. To have a visible effect on a :ref:`BaseMaterial3D`, :ref:`BaseMaterial3D.vertex_color_use_as_albedo` *must* be ``true``. For a :ref:`ShaderMaterial`, ``ALBEDO *= COLOR.rgb;`` must be inserted in the shader's ``fragment()`` function. Otherwise, :ref:`color_ramp` will have no visible effect. + ---- .. _class_CPUParticles3D_property_damping_curve: @@ -687,6 +693,8 @@ The rectangle's extents if :ref:`emission_shape`\ s to modulate particles by when using :ref:`EMISSION_SHAPE_POINTS` or :ref:`EMISSION_SHAPE_DIRECTED_POINTS`. +\ **Note:** :ref:`emission_colors` multiplies the particle mesh's vertex colors. To have a visible effect on a :ref:`BaseMaterial3D`, :ref:`BaseMaterial3D.vertex_color_use_as_albedo` *must* be ``true``. For a :ref:`ShaderMaterial`, ``ALBEDO *= COLOR.rgb;`` must be inserted in the shader's ``fragment()`` function. Otherwise, :ref:`emission_colors` will have no visible effect. + ---- .. _class_CPUParticles3D_property_emission_normals: @@ -1060,14 +1068,14 @@ Minimum linear acceleration. - :ref:`bool` **local_coords** +-----------+----------------------------------+ -| *Default* | ``true`` | +| *Default* | ``false`` | +-----------+----------------------------------+ | *Setter* | set_use_local_coordinates(value) | +-----------+----------------------------------+ | *Getter* | get_use_local_coordinates() | +-----------+----------------------------------+ -If ``true``, particles use the parent node's coordinate space. If ``false``, they use global coordinates. +If ``true``, particles use the parent node's coordinate space (known as local coordinates). This will cause particles to move and rotate along the ``CPUParticles3D`` node (and its parents) when it is moved or rotated. If ``false``, particles use global coordinates; they will not move or rotate along the ``CPUParticles3D`` node (and its parents) when it is moved or rotated. ---- @@ -1456,7 +1464,7 @@ Method Descriptions - void **convert_from_particles** **(** :ref:`Node` particles **)** -Sets this node's properties to match a given :ref:`GPUParticles3D` node with an assigned :ref:`ParticlesMaterial`. +Sets this node's properties to match a given :ref:`GPUParticles3D` node with an assigned :ref:`ParticleProcessMaterial`. ---- diff --git a/classes/class_cryptokey.rst b/classes/class_cryptokey.rst index de3718e7e..422f9a01c 100644 --- a/classes/class_cryptokey.rst +++ b/classes/class_cryptokey.rst @@ -61,7 +61,7 @@ Loads a key from ``path``. If ``public_only`` is ``true``, only the public key w - :ref:`Error` **load_from_string** **(** :ref:`String` string_key, :ref:`bool` public_only=false **)** -Loads a key from the given ``string``. If ``public_only`` is ``true``, only the public key will be loaded. +Loads a key from the given ``string_key``. If ``public_only`` is ``true``, only the public key will be loaded. ---- diff --git a/classes/class_csgshape3d.rst b/classes/class_csgshape3d.rst index 0ee3bd6d6..8db086a1f 100644 --- a/classes/class_csgshape3d.rst +++ b/classes/class_csgshape3d.rst @@ -38,6 +38,8 @@ Properties +---------------------------------------------+-------------------------------------------------------------------------+-----------+ | :ref:`int` | :ref:`collision_mask` | ``1`` | +---------------------------------------------+-------------------------------------------------------------------------+-----------+ +| :ref:`float` | :ref:`collision_priority` | ``1.0`` | ++---------------------------------------------+-------------------------------------------------------------------------+-----------+ | :ref:`Operation` | :ref:`operation` | ``0`` | +---------------------------------------------+-------------------------------------------------------------------------+-----------+ | :ref:`float` | :ref:`snap` | ``0.001`` | @@ -136,6 +138,20 @@ The physics layers this CSG shape scans for collisions. See `Collision layers an ---- +.. _class_CSGShape3D_property_collision_priority: + +- :ref:`float` **collision_priority** + ++-----------+-------------------------------+ +| *Default* | ``1.0`` | ++-----------+-------------------------------+ +| *Setter* | set_collision_priority(value) | ++-----------+-------------------------------+ +| *Getter* | get_collision_priority() | ++-----------+-------------------------------+ + +---- + .. _class_CSGShape3D_property_operation: - :ref:`Operation` **operation** diff --git a/classes/class_curve.rst b/classes/class_curve.rst index c9530222e..e751a4da8 100644 --- a/classes/class_curve.rst +++ b/classes/class_curve.rst @@ -19,6 +19,8 @@ Description A curve that can be saved and re-used for other objects. By default, it ranges between ``0`` and ``1`` on the Y axis and positions points relative to the ``0.5`` Y position. +See also :ref:`Gradient` which is designed for color interpolation. See also :ref:`Curve2D` and :ref:`Curve3D`. + Properties ---------- @@ -54,12 +56,12 @@ Methods +--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_point_right_tangent` **(** :ref:`int` index **)** |const| | +--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`interpolate` **(** :ref:`float` offset **)** |const| | -+--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`interpolate_baked` **(** :ref:`float` offset **)** |const| | -+--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`remove_point` **(** :ref:`int` index **)** | +--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`sample` **(** :ref:`float` offset **)** |const| | ++--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`sample_baked` **(** :ref:`float` offset **)** |const| | ++--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_point_left_mode` **(** :ref:`int` index, :ref:`TangentMode` mode **)** | +--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_point_left_tangent` **(** :ref:`int` index, :ref:`float` tangent **)** | @@ -241,22 +243,6 @@ Returns the right tangent angle (in degrees) for the point at ``index``. ---- -.. _class_Curve_method_interpolate: - -- :ref:`float` **interpolate** **(** :ref:`float` offset **)** |const| - -Returns the Y value for the point that would exist at the X position ``offset`` along the curve. - ----- - -.. _class_Curve_method_interpolate_baked: - -- :ref:`float` **interpolate_baked** **(** :ref:`float` offset **)** |const| - -Returns the Y value for the point that would exist at the X position ``offset`` along the curve using the baked cache. Bakes the curve's points if not already baked. - ----- - .. _class_Curve_method_remove_point: - void **remove_point** **(** :ref:`int` index **)** @@ -265,6 +251,22 @@ Removes the point at ``index`` from the curve. ---- +.. _class_Curve_method_sample: + +- :ref:`float` **sample** **(** :ref:`float` offset **)** |const| + +Returns the Y value for the point that would exist at the X position ``offset`` along the curve. + +---- + +.. _class_Curve_method_sample_baked: + +- :ref:`float` **sample_baked** **(** :ref:`float` offset **)** |const| + +Returns the Y value for the point that would exist at the X position ``offset`` along the curve using the baked cache. Bakes the curve's points if not already baked. + +---- + .. _class_Curve_method_set_point_left_mode: - void **set_point_left_mode** **(** :ref:`int` index, :ref:`TangentMode` mode **)** diff --git a/classes/class_curve2d.rst b/classes/class_curve2d.rst index 0ea283931..1aee4fa49 100644 --- a/classes/class_curve2d.rst +++ b/classes/class_curve2d.rst @@ -33,41 +33,41 @@ Properties Methods ------- -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_point` **(** :ref:`Vector2` position, :ref:`Vector2` in=Vector2(0, 0), :ref:`Vector2` out=Vector2(0, 0), :ref:`int` at_position=-1 **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_points` **(** **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_baked_length` **(** **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector2Array` | :ref:`get_baked_points` **(** **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_closest_offset` **(** :ref:`Vector2` to_point **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_closest_point` **(** :ref:`Vector2` to_point **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_point_in` **(** :ref:`int` idx **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_point_out` **(** :ref:`int` idx **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_point_position` **(** :ref:`int` idx **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`interpolate` **(** :ref:`int` idx, :ref:`float` t **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`interpolate_baked` **(** :ref:`float` offset, :ref:`bool` cubic=false **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`interpolatef` **(** :ref:`float` fofs **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_point` **(** :ref:`int` idx **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_point_in` **(** :ref:`int` idx, :ref:`Vector2` position **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_point_out` **(** :ref:`int` idx, :ref:`Vector2` position **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_point_position` **(** :ref:`int` idx, :ref:`Vector2` position **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector2Array` | :ref:`tessellate` **(** :ref:`int` max_stages=5, :ref:`float` tolerance_degrees=4 **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_point` **(** :ref:`Vector2` position, :ref:`Vector2` in=Vector2(0, 0), :ref:`Vector2` out=Vector2(0, 0), :ref:`int` index=-1 **)** | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_points` **(** **)** | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_baked_length` **(** **)** |const| | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedVector2Array` | :ref:`get_baked_points` **(** **)** |const| | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_closest_offset` **(** :ref:`Vector2` to_point **)** |const| | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_closest_point` **(** :ref:`Vector2` to_point **)** |const| | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_point_in` **(** :ref:`int` idx **)** |const| | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_point_out` **(** :ref:`int` idx **)** |const| | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_point_position` **(** :ref:`int` idx **)** |const| | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_point` **(** :ref:`int` idx **)** | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`sample` **(** :ref:`int` idx, :ref:`float` t **)** |const| | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`sample_baked` **(** :ref:`float` offset, :ref:`bool` cubic=false **)** |const| | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`samplef` **(** :ref:`float` fofs **)** |const| | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_point_in` **(** :ref:`int` idx, :ref:`Vector2` position **)** | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_point_out` **(** :ref:`int` idx, :ref:`Vector2` position **)** | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_point_position` **(** :ref:`int` idx, :ref:`Vector2` position **)** | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedVector2Array` | :ref:`tessellate` **(** :ref:`int` max_stages=5, :ref:`float` tolerance_degrees=4 **)** |const| | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Property Descriptions --------------------- @@ -107,11 +107,11 @@ Method Descriptions .. _class_Curve2D_method_add_point: -- void **add_point** **(** :ref:`Vector2` position, :ref:`Vector2` in=Vector2(0, 0), :ref:`Vector2` out=Vector2(0, 0), :ref:`int` at_position=-1 **)** +- void **add_point** **(** :ref:`Vector2` position, :ref:`Vector2` in=Vector2(0, 0), :ref:`Vector2` out=Vector2(0, 0), :ref:`int` index=-1 **)** -Adds a point to a curve at ``position`` relative to the ``Curve2D``'s position, with control points ``in`` and ``out``. +Adds a point with the specified ``position`` relative to the curve's own position, with control points ``in`` and ``out``. Appends the new point at the end of the point list. -If ``at_position`` is given, the point is inserted before the point number ``at_position``, moving that point (and every point after) after the inserted point. If ``at_position`` is not given, or is an illegal value (``at_position <0`` or ``at_position >= [method get_point_count]``), the point will be appended at the end of the point list. +If ``index`` is given, the new point is inserted before the existing point identified by index ``index``. Every existing point starting from ``index`` is shifted further down the list of points. The index must be greater than or equal to ``0`` and must not exceed the number of existing points in the line. See :ref:`point_count`. ---- @@ -143,9 +143,9 @@ Returns the cache of points as a :ref:`PackedVector2Array` **get_closest_offset** **(** :ref:`Vector2` to_point **)** |const| -Returns the closest offset to ``to_point``. This offset is meant to be used in :ref:`interpolate_baked`. +Returns the closest offset to ``to_point``. This offset is meant to be used in :ref:`sample_baked`. -\ ``to_point`` must be in this curve's local space. +``to_point`` must be in this curve's local space. ---- @@ -155,7 +155,7 @@ Returns the closest offset to ``to_point``. This offset is meant to be used in : Returns the closest baked point (in curve's local space) to ``to_point``. -\ ``to_point`` must be in this curve's local space. +``to_point`` must be in this curve's local space. ---- @@ -183,9 +183,17 @@ Returns the position of the vertex ``idx``. If the index is out of bounds, the f ---- -.. _class_Curve2D_method_interpolate: +.. _class_Curve2D_method_remove_point: -- :ref:`Vector2` **interpolate** **(** :ref:`int` idx, :ref:`float` t **)** |const| +- void **remove_point** **(** :ref:`int` idx **)** + +Deletes the point ``idx`` from the curve. Sends an error to the console if ``idx`` is out of bounds. + +---- + +.. _class_Curve2D_method_sample: + +- :ref:`Vector2` **sample** **(** :ref:`int` idx, :ref:`float` t **)** |const| Returns the position between the vertex ``idx`` and the vertex ``idx + 1``, where ``t`` controls if the point is the first vertex (``t = 0.0``), the last vertex (``t = 1.0``), or in between. Values of ``t`` outside the range (``0.0 >= t <=1``) give strange, but predictable results. @@ -193,9 +201,9 @@ If ``idx`` is out of bounds it is truncated to the first or last vertex, and ``t ---- -.. _class_Curve2D_method_interpolate_baked: +.. _class_Curve2D_method_sample_baked: -- :ref:`Vector2` **interpolate_baked** **(** :ref:`float` offset, :ref:`bool` cubic=false **)** |const| +- :ref:`Vector2` **sample_baked** **(** :ref:`float` offset, :ref:`bool` cubic=false **)** |const| Returns a point within the curve at position ``offset``, where ``offset`` is measured as a pixel distance along the curve. @@ -205,19 +213,11 @@ Cubic interpolation tends to follow the curves better, but linear is faster (and ---- -.. _class_Curve2D_method_interpolatef: +.. _class_Curve2D_method_samplef: -- :ref:`Vector2` **interpolatef** **(** :ref:`float` fofs **)** |const| +- :ref:`Vector2` **samplef** **(** :ref:`float` fofs **)** |const| -Returns the position at the vertex ``fofs``. It calls :ref:`interpolate` using the integer part of ``fofs`` as ``idx``, and its fractional part as ``t``. - ----- - -.. _class_Curve2D_method_remove_point: - -- void **remove_point** **(** :ref:`int` idx **)** - -Deletes the point ``idx`` from the curve. Sends an error to the console if ``idx`` is out of bounds. +Returns the position at the vertex ``fofs``. It calls :ref:`sample` using the integer part of ``fofs`` as ``idx``, and its fractional part as ``t``. ---- @@ -253,9 +253,9 @@ Returns a list of points along the curve, with a curvature controlled point dens This approximation makes straight segments between each point, then subdivides those segments until the resulting shape is similar enough. -\ ``max_stages`` controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care! +``max_stages`` controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care! -\ ``tolerance_degrees`` controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided. +``tolerance_degrees`` controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_curve3d.rst b/classes/class_curve3d.rst index c4451cabc..c92957d47 100644 --- a/classes/class_curve3d.rst +++ b/classes/class_curve3d.rst @@ -35,51 +35,51 @@ Properties Methods ------- -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_point` **(** :ref:`Vector3` position, :ref:`Vector3` in=Vector3(0, 0, 0), :ref:`Vector3` out=Vector3(0, 0, 0), :ref:`int` at_position=-1 **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_points` **(** **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_baked_length` **(** **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector3Array` | :ref:`get_baked_points` **(** **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedFloat32Array` | :ref:`get_baked_tilts` **(** **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector3Array` | :ref:`get_baked_up_vectors` **(** **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_closest_offset` **(** :ref:`Vector3` to_point **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_closest_point` **(** :ref:`Vector3` to_point **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_point_in` **(** :ref:`int` idx **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_point_out` **(** :ref:`int` idx **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_point_position` **(** :ref:`int` idx **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_point_tilt` **(** :ref:`int` idx **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`interpolate` **(** :ref:`int` idx, :ref:`float` t **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`interpolate_baked` **(** :ref:`float` offset, :ref:`bool` cubic=false **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`interpolate_baked_up_vector` **(** :ref:`float` offset, :ref:`bool` apply_tilt=false **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`interpolatef` **(** :ref:`float` fofs **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_point` **(** :ref:`int` idx **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_point_in` **(** :ref:`int` idx, :ref:`Vector3` position **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_point_out` **(** :ref:`int` idx, :ref:`Vector3` position **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_point_position` **(** :ref:`int` idx, :ref:`Vector3` position **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_point_tilt` **(** :ref:`int` idx, :ref:`float` tilt **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector3Array` | :ref:`tessellate` **(** :ref:`int` max_stages=5, :ref:`float` tolerance_degrees=4 **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_point` **(** :ref:`Vector3` position, :ref:`Vector3` in=Vector3(0, 0, 0), :ref:`Vector3` out=Vector3(0, 0, 0), :ref:`int` index=-1 **)** | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_points` **(** **)** | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_baked_length` **(** **)** |const| | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedVector3Array` | :ref:`get_baked_points` **(** **)** |const| | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedFloat32Array` | :ref:`get_baked_tilts` **(** **)** |const| | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedVector3Array` | :ref:`get_baked_up_vectors` **(** **)** |const| | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_closest_offset` **(** :ref:`Vector3` to_point **)** |const| | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_closest_point` **(** :ref:`Vector3` to_point **)** |const| | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_point_in` **(** :ref:`int` idx **)** |const| | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_point_out` **(** :ref:`int` idx **)** |const| | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_point_position` **(** :ref:`int` idx **)** |const| | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_point_tilt` **(** :ref:`int` idx **)** |const| | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_point` **(** :ref:`int` idx **)** | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`sample` **(** :ref:`int` idx, :ref:`float` t **)** |const| | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`sample_baked` **(** :ref:`float` offset, :ref:`bool` cubic=false **)** |const| | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`sample_baked_up_vector` **(** :ref:`float` offset, :ref:`bool` apply_tilt=false **)** |const| | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`samplef` **(** :ref:`float` fofs **)** |const| | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_point_in` **(** :ref:`int` idx, :ref:`Vector3` position **)** | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_point_out` **(** :ref:`int` idx, :ref:`Vector3` position **)** | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_point_position` **(** :ref:`int` idx, :ref:`Vector3` position **)** | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_point_tilt` **(** :ref:`int` idx, :ref:`float` tilt **)** | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedVector3Array` | :ref:`tessellate` **(** :ref:`int` max_stages=5, :ref:`float` tolerance_degrees=4 **)** |const| | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Property Descriptions --------------------- @@ -135,11 +135,11 @@ Method Descriptions .. _class_Curve3D_method_add_point: -- void **add_point** **(** :ref:`Vector3` position, :ref:`Vector3` in=Vector3(0, 0, 0), :ref:`Vector3` out=Vector3(0, 0, 0), :ref:`int` at_position=-1 **)** +- void **add_point** **(** :ref:`Vector3` position, :ref:`Vector3` in=Vector3(0, 0, 0), :ref:`Vector3` out=Vector3(0, 0, 0), :ref:`int` index=-1 **)** -Adds a point to a curve at ``position`` relative to the ``Curve3D``'s position, with control points ``in`` and ``out``. +Adds a point with the specified ``position`` relative to the curve's own position, with control points ``in`` and ``out``. Appends the new point at the end of the point list. -If ``at_position`` is given, the point is inserted before the point number ``at_position``, moving that point (and every point after) after the inserted point. If ``at_position`` is not given, or is an illegal value (``at_position <0`` or ``at_position >= [method get_point_count]``), the point will be appended at the end of the point list. +If ``index`` is given, the new point is inserted before the existing point identified by index ``index``. Every existing point starting from ``index`` is shifted further down the list of points. The index must be greater than or equal to ``0`` and must not exceed the number of existing points in the line. See :ref:`point_count`. ---- @@ -189,9 +189,9 @@ If :ref:`up_vector_enabled` is ``false - :ref:`float` **get_closest_offset** **(** :ref:`Vector3` to_point **)** |const| -Returns the closest offset to ``to_point``. This offset is meant to be used in :ref:`interpolate_baked` or :ref:`interpolate_baked_up_vector`. +Returns the closest offset to ``to_point``. This offset is meant to be used in :ref:`sample_baked` or :ref:`sample_baked_up_vector`. -\ ``to_point`` must be in this curve's local space. +``to_point`` must be in this curve's local space. ---- @@ -201,7 +201,7 @@ Returns the closest offset to ``to_point``. This offset is meant to be used in : Returns the closest baked point (in curve's local space) to ``to_point``. -\ ``to_point`` must be in this curve's local space. +``to_point`` must be in this curve's local space. ---- @@ -237,9 +237,17 @@ Returns the tilt angle in radians for the point ``idx``. If the index is out of ---- -.. _class_Curve3D_method_interpolate: +.. _class_Curve3D_method_remove_point: -- :ref:`Vector3` **interpolate** **(** :ref:`int` idx, :ref:`float` t **)** |const| +- void **remove_point** **(** :ref:`int` idx **)** + +Deletes the point ``idx`` from the curve. Sends an error to the console if ``idx`` is out of bounds. + +---- + +.. _class_Curve3D_method_sample: + +- :ref:`Vector3` **sample** **(** :ref:`int` idx, :ref:`float` t **)** |const| Returns the position between the vertex ``idx`` and the vertex ``idx + 1``, where ``t`` controls if the point is the first vertex (``t = 0.0``), the last vertex (``t = 1.0``), or in between. Values of ``t`` outside the range (``0.0 >= t <=1``) give strange, but predictable results. @@ -247,9 +255,9 @@ If ``idx`` is out of bounds it is truncated to the first or last vertex, and ``t ---- -.. _class_Curve3D_method_interpolate_baked: +.. _class_Curve3D_method_sample_baked: -- :ref:`Vector3` **interpolate_baked** **(** :ref:`float` offset, :ref:`bool` cubic=false **)** |const| +- :ref:`Vector3` **sample_baked** **(** :ref:`float` offset, :ref:`bool` cubic=false **)** |const| Returns a point within the curve at position ``offset``, where ``offset`` is measured as a distance in 3D units along the curve. @@ -259,9 +267,9 @@ Cubic interpolation tends to follow the curves better, but linear is faster (and ---- -.. _class_Curve3D_method_interpolate_baked_up_vector: +.. _class_Curve3D_method_sample_baked_up_vector: -- :ref:`Vector3` **interpolate_baked_up_vector** **(** :ref:`float` offset, :ref:`bool` apply_tilt=false **)** |const| +- :ref:`Vector3` **sample_baked_up_vector** **(** :ref:`float` offset, :ref:`bool` apply_tilt=false **)** |const| Returns an up vector within the curve at position ``offset``, where ``offset`` is measured as a distance in 3D units along the curve. @@ -271,19 +279,11 @@ If the curve has no up vectors, the function sends an error to the console, and ---- -.. _class_Curve3D_method_interpolatef: +.. _class_Curve3D_method_samplef: -- :ref:`Vector3` **interpolatef** **(** :ref:`float` fofs **)** |const| +- :ref:`Vector3` **samplef** **(** :ref:`float` fofs **)** |const| -Returns the position at the vertex ``fofs``. It calls :ref:`interpolate` using the integer part of ``fofs`` as ``idx``, and its fractional part as ``t``. - ----- - -.. _class_Curve3D_method_remove_point: - -- void **remove_point** **(** :ref:`int` idx **)** - -Deletes the point ``idx`` from the curve. Sends an error to the console if ``idx`` is out of bounds. +Returns the position at the vertex ``fofs``. It calls :ref:`sample` using the integer part of ``fofs`` as ``idx``, and its fractional part as ``t``. ---- @@ -329,9 +329,9 @@ Returns a list of points along the curve, with a curvature controlled point dens This approximation makes straight segments between each point, then subdivides those segments until the resulting shape is similar enough. -\ ``max_stages`` controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care! +``max_stages`` controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care! -\ ``tolerance_degrees`` controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided. +``tolerance_degrees`` controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_decal.rst b/classes/class_decal.rst index 94fe03300..db95a8b2a 100644 --- a/classes/class_decal.rst +++ b/classes/class_decal.rst @@ -111,7 +111,7 @@ Property Descriptions | *Getter* | get_albedo_mix() | +-----------+-----------------------+ -Blends the albedo :ref:`Color` of the decal with albedo :ref:`Color` of the underlying mesh. +Blends the albedo :ref:`Color` of the decal with albedo :ref:`Color` of the underlying mesh. This can be set to ``0.0`` to create a decal that only affects normal or ORM. In this case, an albedo texture is still required as its alpha channel will determine where the normal and ORM will be overridden. See also :ref:`modulate`. ---- @@ -175,7 +175,7 @@ If ``true``, decals will smoothly fade away when far from the active :ref:`Camer | *Getter* | get_distance_fade_length() | +-----------+---------------------------------+ -The distance over which the Decal fades (in 3D units). The Decal becomes slowly more transparent over this distance and is completely invisible at the end. +The distance over which the Decal fades (in 3D units). The Decal becomes slowly more transparent over this distance and is completely invisible at the end. Higher values result in a smoother fade-out transition, which is more suited when the camera moves fast. ---- @@ -191,7 +191,7 @@ The distance over which the Decal fades (in 3D units). The Decal becomes slowly | *Getter* | get_emission_energy() | +-----------+----------------------------+ -Energy multiplier for the emission texture. This will make the decal emit light at a higher intensity. +Energy multiplier for the emission texture. This will make the decal emit light at a higher or lower intensity, independently of the albedo color. See also :ref:`modulate`. ---- @@ -223,7 +223,7 @@ Sets the size of the :ref:`AABB` used by the decal. The AABB goes fr | *Getter* | get_lower_fade() | +-----------+-----------------------+ -Sets the curve over which the decal will fade as the surface gets further from the center of the :ref:`AABB`. Only positive values are valid (negative values will be clamped to ``0.0``). +Sets the curve over which the decal will fade as the surface gets further from the center of the :ref:`AABB`. Only positive values are valid (negative values will be clamped to ``0.0``). See also :ref:`upper_fade`. ---- @@ -239,7 +239,7 @@ Sets the curve over which the decal will fade as the surface gets further from t | *Getter* | get_modulate() | +-----------+-----------------------+ -Changes the :ref:`Color` of the Decal by multiplying it with this value. +Changes the :ref:`Color` of the Decal by multiplying the albedo and emission colors with this value. The alpha component is only taken into account when multiplying the albedo color, not the emission color. See also :ref:`emission_energy` and :ref:`albedo_mix` to change the emission and albedo intensity independently of each other. ---- @@ -257,6 +257,8 @@ Changes the :ref:`Color` of the Decal by multiplying it with this v Fades the Decal if the angle between the Decal's :ref:`AABB` and the target surface becomes too large. A value of ``0`` projects the Decal regardless of angle, a value of ``1`` limits the Decal to surfaces that are nearly perpendicular. +\ **Note:** Setting :ref:`normal_fade` to a value greater than ``0.0`` has a small performance cost due to the added normal angle computations. + ---- .. _class_Decal_property_texture_albedo: @@ -305,6 +307,8 @@ Fades the Decal if the angle between the Decal's :ref:`AABB` and the \ **Note:** Unlike :ref:`BaseMaterial3D` whose filter mode can be adjusted on a per-material basis, the filter mode for ``Decal`` textures is set globally with :ref:`ProjectSettings.rendering/textures/decals/filter`. +\ **Note:** Setting this texture alone will not result in a visible decal, as :ref:`texture_albedo` must also be set. To create a normal-only decal, load an albedo texture into :ref:`texture_albedo` and set :ref:`albedo_mix` to ``0.0``. The albedo texture's alpha channel will be used to determine where the underlying surface's normal map should be overridden (and its intensity). + ---- .. _class_Decal_property_texture_orm: @@ -321,6 +325,8 @@ Fades the Decal if the angle between the Decal's :ref:`AABB` and the \ **Note:** Unlike :ref:`BaseMaterial3D` whose filter mode can be adjusted on a per-material basis, the filter mode for ``Decal`` textures is set globally with :ref:`ProjectSettings.rendering/textures/decals/filter`. +\ **Note:** Setting this texture alone will not result in a visible decal, as :ref:`texture_albedo` must also be set. To create a ORM-only decal, load an albedo texture into :ref:`texture_albedo` and set :ref:`albedo_mix` to ``0.0``. The albedo texture's alpha channel will be used to determine where the underlying surface's ORM map should be overridden (and its intensity). + ---- .. _class_Decal_property_upper_fade: @@ -335,7 +341,7 @@ Fades the Decal if the angle between the Decal's :ref:`AABB` and the | *Getter* | get_upper_fade() | +-----------+-----------------------+ -Sets the curve over which the decal will fade as the surface gets further from the center of the :ref:`AABB`. Only positive values are valid (negative values will be clamped to ``0.0``). +Sets the curve over which the decal will fade as the surface gets further from the center of the :ref:`AABB`. Only positive values are valid (negative values will be clamped to ``0.0``). See also :ref:`lower_fade`. Method Descriptions ------------------- diff --git a/classes/class_displayserver.rst b/classes/class_displayserver.rst index 72c706862..8ea9dd542 100644 --- a/classes/class_displayserver.rst +++ b/classes/class_displayserver.rst @@ -46,7 +46,7 @@ Methods +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`force_process_and_drop_events` **(** **)** | +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_display_cutouts` **(** **)** |const| | +| :ref:`Rect2[]` | :ref:`get_display_cutouts` **(** **)** |const| | +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Rect2i` | :ref:`get_display_safe_area` **(** **)** |const| | +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -60,23 +60,23 @@ Methods +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedInt32Array` | :ref:`get_window_list` **(** **)** |const| | +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`global_menu_add_check_item` **(** :ref:`String` menu_root, :ref:`String` label, :ref:`Callable` callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** | +| :ref:`int` | :ref:`global_menu_add_check_item` **(** :ref:`String` menu_root, :ref:`String` label, :ref:`Callable` callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** | +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`global_menu_add_icon_check_item` **(** :ref:`String` menu_root, :ref:`Texture2D` icon, :ref:`String` label, :ref:`Callable` callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** | +| :ref:`int` | :ref:`global_menu_add_icon_check_item` **(** :ref:`String` menu_root, :ref:`Texture2D` icon, :ref:`String` label, :ref:`Callable` callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** | +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`global_menu_add_icon_item` **(** :ref:`String` menu_root, :ref:`Texture2D` icon, :ref:`String` label, :ref:`Callable` callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** | +| :ref:`int` | :ref:`global_menu_add_icon_item` **(** :ref:`String` menu_root, :ref:`Texture2D` icon, :ref:`String` label, :ref:`Callable` callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** | +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`global_menu_add_icon_radio_check_item` **(** :ref:`String` menu_root, :ref:`Texture2D` icon, :ref:`String` label, :ref:`Callable` callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** | +| :ref:`int` | :ref:`global_menu_add_icon_radio_check_item` **(** :ref:`String` menu_root, :ref:`Texture2D` icon, :ref:`String` label, :ref:`Callable` callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** | +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`global_menu_add_item` **(** :ref:`String` menu_root, :ref:`String` label, :ref:`Callable` callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** | +| :ref:`int` | :ref:`global_menu_add_item` **(** :ref:`String` menu_root, :ref:`String` label, :ref:`Callable` callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** | +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`global_menu_add_multistate_item` **(** :ref:`String` menu_root, :ref:`String` labe, :ref:`int` max_states, :ref:`int` default_state, :ref:`Callable` callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** | +| :ref:`int` | :ref:`global_menu_add_multistate_item` **(** :ref:`String` menu_root, :ref:`String` labe, :ref:`int` max_states, :ref:`int` default_state, :ref:`Callable` callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** | +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`global_menu_add_radio_check_item` **(** :ref:`String` menu_root, :ref:`String` label, :ref:`Callable` callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** | +| :ref:`int` | :ref:`global_menu_add_radio_check_item` **(** :ref:`String` menu_root, :ref:`String` label, :ref:`Callable` callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** | +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`global_menu_add_separator` **(** :ref:`String` menu_root, :ref:`int` index=-1 **)** | +| :ref:`int` | :ref:`global_menu_add_separator` **(** :ref:`String` menu_root, :ref:`int` index=-1 **)** | +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`global_menu_add_submenu_item` **(** :ref:`String` menu_root, :ref:`String` label, :ref:`String` submenu, :ref:`int` index=-1 **)** | +| :ref:`int` | :ref:`global_menu_add_submenu_item` **(** :ref:`String` menu_root, :ref:`String` label, :ref:`String` submenu, :ref:`int` index=-1 **)** | +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`global_menu_clear` **(** :ref:`String` menu_root **)** | +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -86,6 +86,8 @@ Methods +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Texture2D` | :ref:`global_menu_get_item_icon` **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| | +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`global_menu_get_item_indentation_level` **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`global_menu_get_item_index_from_tag` **(** :ref:`String` menu_root, :ref:`Variant` tag **)** |const| | +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`global_menu_get_item_index_from_text` **(** :ref:`String` menu_root, :ref:`String` text **)** |const| | @@ -124,6 +126,8 @@ Methods +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`global_menu_set_item_icon` **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`Texture2D` icon **)** | +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`global_menu_set_item_indentation_level` **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`int` level **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`global_menu_set_item_max_states` **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`int` max_states **)** | +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`global_menu_set_item_radio_checkable` **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`bool` checkable **)** | @@ -202,7 +206,7 @@ Methods +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`tablet_set_current_driver` **(** :ref:`String` name **)** | +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`tts_get_voices` **(** **)** |const| | +| :ref:`Dictionary[]` | :ref:`tts_get_voices` **(** **)** |const| | +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`tts_get_voices_for_language` **(** :ref:`String` language **)** |const| | +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -224,7 +228,7 @@ Methods +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`virtual_keyboard_hide` **(** **)** | +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`virtual_keyboard_show` **(** :ref:`String` existing_text, :ref:`Rect2` position=Rect2(0, 0, 0, 0), :ref:`bool` multiline=false, :ref:`int` max_length=-1, :ref:`int` cursor_start=-1, :ref:`int` cursor_end=-1 **)** | +| void | :ref:`virtual_keyboard_show` **(** :ref:`String` existing_text, :ref:`Rect2` position=Rect2(0, 0, 0, 0), :ref:`VirtualKeyboardType` type=0, :ref:`int` max_length=-1, :ref:`int` cursor_start=-1, :ref:`int` cursor_end=-1 **)** | +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`warp_mouse` **(** :ref:`Vector2i` position **)** | +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -254,10 +258,16 @@ Methods +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2i` | :ref:`window_get_real_size` **(** :ref:`int` window_id=0 **)** |const| | +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2i` | :ref:`window_get_safe_title_margins` **(** :ref:`int` window_id=0 **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2i` | :ref:`window_get_size` **(** :ref:`int` window_id=0 **)** |const| | +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`VSyncMode` | :ref:`window_get_vsync_mode` **(** :ref:`int` window_id=0 **)** |const| | +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`window_maximize_on_title_dbl_click` **(** **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`window_minimize_on_title_dbl_click` **(** **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`window_move_to_foreground` **(** :ref:`int` window_id=0 **)** | +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`window_request_attention` **(** :ref:`int` window_id=0 **)** | @@ -346,6 +356,8 @@ Enumerations .. _class_DisplayServer_constant_FEATURE_TEXT_TO_SPEECH: +.. _class_DisplayServer_constant_FEATURE_EXTEND_TO_TITLE: + enum **Feature**: - **FEATURE_GLOBAL_MENU** = **0** @@ -386,6 +398,8 @@ enum **Feature**: - **FEATURE_TEXT_TO_SPEECH** = **19** --- Display server supports text-to-speech. See ``tts_*`` methods. +- **FEATURE_EXTEND_TO_TITLE** = **20** --- Display server supports expanding window content to the title. See :ref:`WINDOW_FLAG_EXTEND_TO_TITLE`. + ---- .. _enum_DisplayServer_MouseMode: @@ -450,6 +464,46 @@ enum **ScreenOrientation**: ---- +.. _enum_DisplayServer_VirtualKeyboardType: + +.. _class_DisplayServer_constant_KEYBOARD_TYPE_DEFAULT: + +.. _class_DisplayServer_constant_KEYBOARD_TYPE_MULTILINE: + +.. _class_DisplayServer_constant_KEYBOARD_TYPE_NUMBER: + +.. _class_DisplayServer_constant_KEYBOARD_TYPE_NUMBER_DECIMAL: + +.. _class_DisplayServer_constant_KEYBOARD_TYPE_PHONE: + +.. _class_DisplayServer_constant_KEYBOARD_TYPE_EMAIL_ADDRESS: + +.. _class_DisplayServer_constant_KEYBOARD_TYPE_PASSWORD: + +.. _class_DisplayServer_constant_KEYBOARD_TYPE_URL: + +enum **VirtualKeyboardType**: + +- **KEYBOARD_TYPE_DEFAULT** = **0** --- Default text virtual keyboard. + +- **KEYBOARD_TYPE_MULTILINE** = **1** --- Multiline virtual keyboard. + +- **KEYBOARD_TYPE_NUMBER** = **2** --- Virtual number keypad, useful for PIN entry. + +- **KEYBOARD_TYPE_NUMBER_DECIMAL** = **3** --- Virtual number keypad, useful for entering fractional numbers. + +- **KEYBOARD_TYPE_PHONE** = **4** --- Virtual phone number keypad. + +- **KEYBOARD_TYPE_EMAIL_ADDRESS** = **5** --- Virtual keyboard with additional keys to assist with typing email addresses. + +- **KEYBOARD_TYPE_PASSWORD** = **6** --- Virtual keyboard for entering a password. On most platforms, this should disable autocomplete and autocapitalization. + +\ **Note:** This is not supported on Web. Instead, this behaves identically to :ref:`KEYBOARD_TYPE_DEFAULT`. + +- **KEYBOARD_TYPE_URL** = **7** --- Virtual keyboard with additional keys to assist with typing URLs. + +---- + .. _enum_DisplayServer_CursorShape: .. _class_DisplayServer_constant_CURSOR_ARROW: @@ -574,6 +628,8 @@ Regardless of the platform, enabling fullscreen will change the window size to m .. _class_DisplayServer_constant_WINDOW_FLAG_POPUP: +.. _class_DisplayServer_constant_WINDOW_FLAG_EXTEND_TO_TITLE: + .. _class_DisplayServer_constant_WINDOW_FLAG_MAX: enum **WindowFlags**: @@ -590,7 +646,11 @@ enum **WindowFlags**: - **WINDOW_FLAG_POPUP** = **5** --- Window is part of menu or :ref:`OptionButton` dropdown. This flag can't be changed when window is visible. An active popup window will exclusively receive all input, without stealing focus from its parent. Popup windows are automatically closed when uses click outside it, or when an application is switched. Popup window must have :ref:`WINDOW_FLAG_TRANSPARENT` set. -- **WINDOW_FLAG_MAX** = **6** +- **WINDOW_FLAG_EXTEND_TO_TITLE** = **6** --- Window content is expanded to the full size of the window. Unlike borderless window, the frame is left intact and can be used to resize the window, title bar is transparent, but have minimize/maximize/close buttons. + +\ **Note:** This flag is implemented on macOS. + +- **WINDOW_FLAG_MAX** = **7** ---- @@ -672,7 +732,7 @@ enum **HandleType**: - Linux: ``X11::Window*`` for the window. - - MacOS: ``NSWindow*`` for the window. + - macOS: ``NSWindow*`` for the window. - iOS: ``UIViewController*`` for the view controller. @@ -680,7 +740,7 @@ enum **HandleType**: - **WINDOW_VIEW** = **2** --- Window view: - - MacOS: ``NSView*`` for the window main view. + - macOS: ``NSView*`` for the window main view. - iOS: ``UIView*`` for the window main view. @@ -824,7 +884,7 @@ Sets the user's primary clipboard content to the given string. .. _class_DisplayServer_method_get_display_cutouts: -- :ref:`Array` **get_display_cutouts** **(** **)** |const| +- :ref:`Rect2[]` **get_display_cutouts** **(** **)** |const| Returns an :ref:`Array` of :ref:`Rect2`, each of which is the bounding rectangle for a display cutout or notch. These are non-functional areas on edge-to-edge screens used by cameras and sensors. Returns an empty array if the device does not have cutouts. See also :ref:`get_display_safe_area`. @@ -872,61 +932,69 @@ Returns the unobscured area of the display where interactive controls should be .. _class_DisplayServer_method_global_menu_add_check_item: -- void **global_menu_add_check_item** **(** :ref:`String` menu_root, :ref:`String` label, :ref:`Callable` callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** +- :ref:`int` **global_menu_add_check_item** **(** :ref:`String` menu_root, :ref:`String` label, :ref:`Callable` callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** Adds a new checkable item with text ``label`` to the global menu with ID ``menu_root``. +Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value. + \ **Note:** This method is implemented on macOS. \ **Supported system menu IDs:**\ :: - "" - Main menu (macOS). + "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). ---- .. _class_DisplayServer_method_global_menu_add_icon_check_item: -- void **global_menu_add_icon_check_item** **(** :ref:`String` menu_root, :ref:`Texture2D` icon, :ref:`String` label, :ref:`Callable` callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** +- :ref:`int` **global_menu_add_icon_check_item** **(** :ref:`String` menu_root, :ref:`Texture2D` icon, :ref:`String` label, :ref:`Callable` callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** Adds a new checkable item with text ``label`` and icon ``icon`` to the global menu with ID ``menu_root``. +Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value. + \ **Note:** This method is implemented on macOS. \ **Supported system menu IDs:**\ :: - "" - Main menu (macOS). + "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). ---- .. _class_DisplayServer_method_global_menu_add_icon_item: -- void **global_menu_add_icon_item** **(** :ref:`String` menu_root, :ref:`Texture2D` icon, :ref:`String` label, :ref:`Callable` callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** +- :ref:`int` **global_menu_add_icon_item** **(** :ref:`String` menu_root, :ref:`Texture2D` icon, :ref:`String` label, :ref:`Callable` callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** Adds a new item with text ``label`` and icon ``icon`` to the global menu with ID ``menu_root``. +Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value. + \ **Note:** This method is implemented on macOS. \ **Supported system menu IDs:**\ :: - "" - Main menu (macOS). + "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). ---- .. _class_DisplayServer_method_global_menu_add_icon_radio_check_item: -- void **global_menu_add_icon_radio_check_item** **(** :ref:`String` menu_root, :ref:`Texture2D` icon, :ref:`String` label, :ref:`Callable` callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** +- :ref:`int` **global_menu_add_icon_radio_check_item** **(** :ref:`String` menu_root, :ref:`Texture2D` icon, :ref:`String` label, :ref:`Callable` callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** Adds a new radio-checkable item with text ``label`` and icon ``icon`` to the global menu with ID ``menu_root``. +Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value. + \ **Note:** Radio-checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See :ref:`global_menu_set_item_checked` for more info on how to control it. \ **Note:** This method is implemented on macOS. @@ -935,53 +1003,61 @@ Adds a new radio-checkable item with text ``label`` and icon ``icon`` to the glo :: - "" - Main menu (macOS). + "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). ---- .. _class_DisplayServer_method_global_menu_add_item: -- void **global_menu_add_item** **(** :ref:`String` menu_root, :ref:`String` label, :ref:`Callable` callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** +- :ref:`int` **global_menu_add_item** **(** :ref:`String` menu_root, :ref:`String` label, :ref:`Callable` callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** Adds a new item with text ``label`` to the global menu with ID ``menu_root``. +Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value. + \ **Note:** This method is implemented on macOS. \ **Supported system menu IDs:**\ :: - "" - Main menu (macOS). + "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). ---- .. _class_DisplayServer_method_global_menu_add_multistate_item: -- void **global_menu_add_multistate_item** **(** :ref:`String` menu_root, :ref:`String` labe, :ref:`int` max_states, :ref:`int` default_state, :ref:`Callable` callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** +- :ref:`int` **global_menu_add_multistate_item** **(** :ref:`String` menu_root, :ref:`String` labe, :ref:`int` max_states, :ref:`int` default_state, :ref:`Callable` callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** -Adds a new item with text ``label`` to the global menu with ID ``menu_root``. +Adds a new item with text ``labe`` to the global menu with ID ``menu_root``. Contrarily to normal binary items, multistate items can have more than two states, as defined by ``max_states``. Each press or activate of the item will increase the state by one. The default value is defined by ``default_state``. +Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value. + +\ **Note:** By default, there's no indication of the current item state, it should be changed manually. + \ **Note:** This method is implemented on macOS. \ **Supported system menu IDs:**\ :: - "" - Main menu (macOS). + "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). ---- .. _class_DisplayServer_method_global_menu_add_radio_check_item: -- void **global_menu_add_radio_check_item** **(** :ref:`String` menu_root, :ref:`String` label, :ref:`Callable` callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** +- :ref:`int` **global_menu_add_radio_check_item** **(** :ref:`String` menu_root, :ref:`String` label, :ref:`Callable` callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** Adds a new radio-checkable item with text ``label`` to the global menu with ID ``menu_root``. +Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value. + \ **Note:** Radio-checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See :ref:`global_menu_set_item_checked` for more info on how to control it. \ **Note:** This method is implemented on macOS. @@ -990,41 +1066,45 @@ Adds a new radio-checkable item with text ``label`` to the global menu with ID ` :: - "" - Main menu (macOS). + "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). ---- .. _class_DisplayServer_method_global_menu_add_separator: -- void **global_menu_add_separator** **(** :ref:`String` menu_root, :ref:`int` index=-1 **)** +- :ref:`int` **global_menu_add_separator** **(** :ref:`String` menu_root, :ref:`int` index=-1 **)** Adds a separator between items to the global menu with ID ``menu_root``. Separators also occupy an index. +Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value. + \ **Note:** This method is implemented on macOS. \ **Supported system menu IDs:**\ :: - "" - Main menu (macOS). + "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). ---- .. _class_DisplayServer_method_global_menu_add_submenu_item: -- void **global_menu_add_submenu_item** **(** :ref:`String` menu_root, :ref:`String` label, :ref:`String` submenu, :ref:`int` index=-1 **)** +- :ref:`int` **global_menu_add_submenu_item** **(** :ref:`String` menu_root, :ref:`String` label, :ref:`String` submenu, :ref:`int` index=-1 **)** Adds an item that will act as a submenu of the global menu ``menu_root``. The ``submenu`` argument is the ID of the global menu root that will be shown when the item is clicked. +Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value. + \ **Note:** This method is implemented on macOS. \ **Supported system menu IDs:**\ :: - "" - Main menu (macOS). + "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). ---- @@ -1041,7 +1121,7 @@ Removes all items from the global menu with ID ``menu_root``. :: - "" - Main menu (macOS). + "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). ---- @@ -1076,6 +1156,16 @@ Returns the icon of the item at index ``idx``. ---- +.. _class_DisplayServer_method_global_menu_get_item_indentation_level: + +- :ref:`int` **global_menu_get_item_indentation_level** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| + +Returns the horizontal offset of the item at the given ``idx``. + +\ **Note:** This method is implemented on macOS. + +---- + .. _class_DisplayServer_method_global_menu_get_item_index_from_tag: - :ref:`int` **global_menu_get_item_index_from_tag** **(** :ref:`String` menu_root, :ref:`Variant` tag **)** |const| @@ -1274,6 +1364,16 @@ Replaces the :ref:`Texture2D` icon of the specified ``idx``. ---- +.. _class_DisplayServer_method_global_menu_set_item_indentation_level: + +- void **global_menu_set_item_indentation_level** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`int` level **)** + +Sets the horizontal offset of the item at the given ``idx``. + +\ **Note:** This method is implemented on macOS. + +---- + .. _class_DisplayServer_method_global_menu_set_item_max_states: - void **global_menu_set_item_max_states** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`int` max_states **)** @@ -1460,7 +1560,7 @@ Returns the mouse cursor's current position. - :ref:`int` **screen_get_dpi** **(** :ref:`int` screen=-1 **)** |const| -Returns the dots per inch density of the specified screen. If ``screen`` is ``\ SCREEN_OF_MAIN_WINDOW`` (the default value), a screen with the main window will be used. +Returns the dots per inch density of the specified screen. If ``screen`` is :ref:`SCREEN_OF_MAIN_WINDOW` (the default value), a screen with the main window will be used. \ **Note:** On macOS, returned value is inaccurate if fractional display scaling mode is used. @@ -1509,7 +1609,7 @@ Returns the greatest scale factor of all screens. Returns the current refresh rate of the specified screen. If ``screen`` is :ref:`SCREEN_OF_MAIN_WINDOW` (the default value), a screen with the main window will be used. -\ **Note:** Returns ``-1.0`` if the DisplayServer fails to find the refresh rate for the specified screen. On HTML5, :ref:`screen_get_refresh_rate` will always return ``-1.0`` as there is no way to retrieve the refresh rate on that platform. +\ **Note:** Returns ``-1.0`` if the DisplayServer fails to find the refresh rate for the specified screen. On Web, :ref:`screen_get_refresh_rate` will always return ``-1.0`` as there is no way to retrieve the refresh rate on that platform. To fallback to a default refresh rate if the method fails, try: @@ -1623,7 +1723,7 @@ Set active tablet driver name. .. _class_DisplayServer_method_tts_get_voices: -- :ref:`Array` **tts_get_voices** **(** **)** |const| +- :ref:`Dictionary[]` **tts_get_voices** **(** **)** |const| Returns an :ref:`Array` of voice information dictionaries. @@ -1635,7 +1735,7 @@ Each :ref:`Dictionary` contains two :ref:`String - ``language`` is language code in ``lang_Variant`` format. ``lang`` part is a 2 or 3-letter code based on the ISO-639 standard, in lowercase. And ``Variant`` part is an engine dependent string describing country, region or/and dialect. -\ **Note:** This method is implemented on Android, iOS, HTML5, Linux, macOS, and Windows. +\ **Note:** This method is implemented on Android, iOS, Web, Linux, macOS, and Windows. ---- @@ -1645,7 +1745,7 @@ Each :ref:`Dictionary` contains two :ref:`String Returns an :ref:`PackedStringArray` of voice identifiers for the ``language``. -\ **Note:** This method is implemented on Android, iOS, HTML5, Linux, macOS, and Windows. +\ **Note:** This method is implemented on Android, iOS, Web, Linux, macOS, and Windows. ---- @@ -1655,7 +1755,7 @@ Returns an :ref:`PackedStringArray` of voice identifier Returns ``true`` if the synthesizer is in a paused state. -\ **Note:** This method is implemented on Android, iOS, HTML5, Linux, macOS, and Windows. +\ **Note:** This method is implemented on Android, iOS, Web, Linux, macOS, and Windows. ---- @@ -1665,7 +1765,7 @@ Returns ``true`` if the synthesizer is in a paused state. Returns ``true`` if the synthesizer is generating speech, or have utterance waiting in the queue. -\ **Note:** This method is implemented on Android, iOS, HTML5, Linux, macOS, and Windows. +\ **Note:** This method is implemented on Android, iOS, Web, Linux, macOS, and Windows. ---- @@ -1675,7 +1775,7 @@ Returns ``true`` if the synthesizer is generating speech, or have utterance wait Puts the synthesizer into a paused state. -\ **Note:** This method is implemented on Android, iOS, HTML5, Linux, macOS, and Windows. +\ **Note:** This method is implemented on Android, iOS, Web, Linux, macOS, and Windows. ---- @@ -1685,7 +1785,7 @@ Puts the synthesizer into a paused state. Resumes the synthesizer if it was paused. -\ **Note:** This method is implemented on Android, iOS, HTML5, Linux, macOS, and Windows. +\ **Note:** This method is implemented on Android, iOS, Web, Linux, macOS, and Windows. ---- @@ -1701,7 +1801,7 @@ Adds a callback, which is called when the utterance has started, finished, cance \ **Note:** The granularity of the boundary callbacks is engine dependent. -\ **Note:** This method is implemented on Android, iOS, HTML5, Linux, macOS, and Windows. +\ **Note:** This method is implemented on Android, iOS, Web, Linux, macOS, and Windows. ---- @@ -1725,7 +1825,7 @@ Adds an utterance to the queue. If ``interrupt`` is ``true``, the queue is clear \ **Note:** The granularity of pitch, rate, and volume is engine and voice dependent. Values may be truncated. -\ **Note:** This method is implemented on Android, iOS, HTML5, Linux, macOS, and Windows. +\ **Note:** This method is implemented on Android, iOS, Web, Linux, macOS, and Windows. ---- @@ -1735,7 +1835,7 @@ Adds an utterance to the queue. If ``interrupt`` is ``true``, the queue is clear Stops synthesis in progress and removes all utterances from the queue. -\ **Note:** This method is implemented on Android, iOS, HTML5, Linux, macOS, and Windows. +\ **Note:** This method is implemented on Android, iOS, Web, Linux, macOS, and Windows. ---- @@ -1757,23 +1857,23 @@ Hides the virtual keyboard if it is shown, does nothing otherwise. .. _class_DisplayServer_method_virtual_keyboard_show: -- void **virtual_keyboard_show** **(** :ref:`String` existing_text, :ref:`Rect2` position=Rect2(0, 0, 0, 0), :ref:`bool` multiline=false, :ref:`int` max_length=-1, :ref:`int` cursor_start=-1, :ref:`int` cursor_end=-1 **)** +- void **virtual_keyboard_show** **(** :ref:`String` existing_text, :ref:`Rect2` position=Rect2(0, 0, 0, 0), :ref:`VirtualKeyboardType` type=0, :ref:`int` max_length=-1, :ref:`int` cursor_start=-1, :ref:`int` cursor_end=-1 **)** Shows the virtual keyboard if the platform has one. -\ ``existing_text`` parameter is useful for implementing your own :ref:`LineEdit` or :ref:`TextEdit`, as it tells the virtual keyboard what text has already been typed (the virtual keyboard uses it for auto-correct and predictions). +``existing_text`` parameter is useful for implementing your own :ref:`LineEdit` or :ref:`TextEdit`, as it tells the virtual keyboard what text has already been typed (the virtual keyboard uses it for auto-correct and predictions). -\ ``position`` parameter is the screen space :ref:`Rect2` of the edited text. +``position`` parameter is the screen space :ref:`Rect2` of the edited text. -\ ``multiline`` parameter needs to be set to ``true`` to be able to enter multiple lines of text, as in :ref:`TextEdit`. +``type`` parameter allows configuring which type of virtual keyboard to show. -\ ``max_length`` limits the number of characters that can be entered if different from ``-1``. +``max_length`` limits the number of characters that can be entered if different from ``-1``. -\ ``cursor_start`` can optionally define the current text cursor position if ``cursor_end`` is not set. +``cursor_start`` can optionally define the current text cursor position if ``cursor_end`` is not set. -\ ``cursor_start`` and ``cursor_end`` can optionally define the current text selection. +``cursor_start`` and ``cursor_end`` can optionally define the current text selection. -\ **Note:** This method is implemented on Android, iOS and UWP. +\ **Note:** This method is implemented on Android, iOS and Web. ---- @@ -1877,6 +1977,14 @@ Returns the position of the given window to on the screen. ---- +.. _class_DisplayServer_method_window_get_safe_title_margins: + +- :ref:`Vector2i` **window_get_safe_title_margins** **(** :ref:`int` window_id=0 **)** |const| + +Returns left and right margins of the title that are safe to use (contains no buttons or other elements) when :ref:`WINDOW_FLAG_EXTEND_TO_TITLE` flag is set. + +---- + .. _class_DisplayServer_method_window_get_size: - :ref:`Vector2i` **window_get_size** **(** :ref:`int` window_id=0 **)** |const| @@ -1887,7 +1995,27 @@ Returns the position of the given window to on the screen. - :ref:`VSyncMode` **window_get_vsync_mode** **(** :ref:`int` window_id=0 **)** |const| -Returns the VSync mode of the given window. +Returns the V-Sync mode of the given window. + +---- + +.. _class_DisplayServer_method_window_maximize_on_title_dbl_click: + +- :ref:`bool` **window_maximize_on_title_dbl_click** **(** **)** |const| + +Returns ``true``, if double-click on a window title should maximize it. + +\ **Note:** This method is implemented on macOS. + +---- + +.. _class_DisplayServer_method_window_minimize_on_title_dbl_click: + +- :ref:`bool` **window_minimize_on_title_dbl_click** **(** **)** |const| + +Returns ``true``, if double-click on a window title should minimize it. + +\ **Note:** This method is implemented on macOS. ---- @@ -2074,7 +2202,7 @@ Sets the title of the given window to ``title``. - void **window_set_vsync_mode** **(** :ref:`VSyncMode` vsync_mode, :ref:`int` window_id=0 **)** -Sets the VSync mode of the given window. +Sets the V-Sync mode of the given window. See :ref:`VSyncMode` for possible values and how they affect the behavior of your application. diff --git a/classes/class_dtlsserver.rst b/classes/class_dtlsserver.rst index fcc058bd9..d86946ba9 100644 --- a/classes/class_dtlsserver.rst +++ b/classes/class_dtlsserver.rst @@ -183,7 +183,7 @@ Method Descriptions - :ref:`Error` **setup** **(** :ref:`CryptoKey` key, :ref:`X509Certificate` certificate, :ref:`X509Certificate` chain=null **)** -Setup the DTLS server to use the given ``private_key`` and provide the given ``certificate`` to clients. You can pass the optional ``chain`` parameter to provide additional CA chain information along with the certificate. +Setup the DTLS server to use the given ``key`` and provide the given ``certificate`` to clients. You can pass the optional ``chain`` parameter to provide additional CA chain information along with the certificate. ---- diff --git a/classes/class_editorfeatureprofile.rst b/classes/class_editorfeatureprofile.rst index 1d20e8fba..2a6c91aba 100644 --- a/classes/class_editorfeatureprofile.rst +++ b/classes/class_editorfeatureprofile.rst @@ -142,7 +142,7 @@ Loads an editor feature profile from a file. The file must follow the JSON forma - :ref:`Error` **save_to_file** **(** :ref:`String` path **)** -Saves the editor feature profile to a file in JSON format. It can then be imported using the feature profile manager's **Import** button or the :ref:`load_from_file` button. +Saves the editor feature profile to a file in JSON format. It can then be imported using the feature profile manager's **Import** button or the :ref:`load_from_file` method. ---- diff --git a/classes/class_editorimportplugin.rst b/classes/class_editorimportplugin.rst index cff2e5686..d204bf1f1 100644 --- a/classes/class_editorimportplugin.rst +++ b/classes/class_editorimportplugin.rst @@ -140,7 +140,7 @@ Methods ------- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`_get_import_options` **(** :ref:`String` path, :ref:`int` preset_index **)** |virtual| |const| | +| :ref:`Dictionary[]` | :ref:`_get_import_options` **(** :ref:`String` path, :ref:`int` preset_index **)** |virtual| |const| | +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`_get_import_order` **(** **)** |virtual| |const| | +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -170,7 +170,7 @@ Method Descriptions .. _class_EditorImportPlugin_method__get_import_options: -- :ref:`Array` **_get_import_options** **(** :ref:`String` path, :ref:`int` preset_index **)** |virtual| |const| +- :ref:`Dictionary[]` **_get_import_options** **(** :ref:`String` path, :ref:`int` preset_index **)** |virtual| |const| Gets the options and default values for the preset at this index. Returns an Array of Dictionaries with the following keys: ``name``, ``default_value``, ``property_hint`` (optional), ``hint_string`` (optional), ``usage`` (optional). diff --git a/classes/class_editorinterface.rst b/classes/class_editorinterface.rst index 4d4ea0ddf..9847f6917 100644 --- a/classes/class_editorinterface.rst +++ b/classes/class_editorinterface.rst @@ -58,7 +58,7 @@ Methods +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`EditorInspector` | :ref:`get_inspector` **(** **)** |const| | +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_open_scenes` **(** **)** |const| | +| :ref:`PackedStringArray` | :ref:`get_open_scenes` **(** **)** |const| | +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_playing_scene` **(** **)** |const| | +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -78,7 +78,7 @@ Methods +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_plugin_enabled` **(** :ref:`String` plugin **)** |const| | +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`make_mesh_previews` **(** :ref:`Array` meshes, :ref:`int` preview_size **)** | +| :ref:`Texture2D[]` | :ref:`make_mesh_previews` **(** :ref:`Array` meshes, :ref:`int` preview_size **)** | +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`open_scene_from_path` **(** :ref:`String` scene_filepath **)** | +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -90,6 +90,8 @@ Methods +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`reload_scene_from_path` **(** :ref:`String` scene_filepath **)** | +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`restart_editor` **(** :ref:`bool` save=true **)** | ++-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`save_scene` **(** **)** | +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`save_scene_as` **(** :ref:`String` path, :ref:`bool` with_preview=true **)** | @@ -239,7 +241,7 @@ Returns the editor's :ref:`EditorInspector` instance. .. _class_EditorInterface_method_get_open_scenes: -- :ref:`Array` **get_open_scenes** **(** **)** |const| +- :ref:`PackedStringArray` **get_open_scenes** **(** **)** |const| Returns an :ref:`Array` with the file paths of the currently opened scenes. @@ -321,7 +323,7 @@ Returns ``true`` if the specified ``plugin`` is enabled. The plugin name is the .. _class_EditorInterface_method_make_mesh_previews: -- :ref:`Array` **make_mesh_previews** **(** :ref:`Array` meshes, :ref:`int` preview_size **)** +- :ref:`Texture2D[]` **make_mesh_previews** **(** :ref:`Array` meshes, :ref:`int` preview_size **)** Returns mesh previews rendered at the given size as an :ref:`Array` of :ref:`Texture2D`\ s. @@ -367,6 +369,14 @@ Reloads the scene at the given path. ---- +.. _class_EditorInterface_method_restart_editor: + +- void **restart_editor** **(** :ref:`bool` save=true **)** + +Restarts the editor. This closes the editor and then opens the same project. If ``save`` is ``true``, the project will be saved before restarting. + +---- + .. _class_EditorInterface_method_save_scene: - :ref:`Error` **save_scene** **(** **)** diff --git a/classes/class_editornode3dgizmo.rst b/classes/class_editornode3dgizmo.rst index afb32bd3a..ef6d267b7 100644 --- a/classes/class_editornode3dgizmo.rst +++ b/classes/class_editornode3dgizmo.rst @@ -91,9 +91,9 @@ The ``secondary`` argument is ``true`` when the committed handle is secondary (s - void **_commit_subgizmos** **(** :ref:`PackedInt32Array` ids, :ref:`Transform3D[]` restores, :ref:`bool` cancel **)** |virtual| -Override this method to commit a group of subgizmos being edited (see :ref:`_subgizmos_intersect_ray` and :ref:`_subgizmos_intersect_frustum`). This usually means creating an :ref:`UndoRedo` action for the change, using the current transforms as "do" and the ``restore`` transforms as "undo". +Override this method to commit a group of subgizmos being edited (see :ref:`_subgizmos_intersect_ray` and :ref:`_subgizmos_intersect_frustum`). This usually means creating an :ref:`UndoRedo` action for the change, using the current transforms as "do" and the ``restores`` transforms as "undo". -If the ``cancel`` argument is ``true``, the ``restore`` transforms should be directly set, without any :ref:`UndoRedo` action. +If the ``cancel`` argument is ``true``, the ``restores`` transforms should be directly set, without any :ref:`UndoRedo` action. ---- @@ -199,7 +199,7 @@ Adds collision triangles to the gizmo for picking. A :ref:`TriangleMesh`. diff --git a/classes/class_editornode3dgizmoplugin.rst b/classes/class_editornode3dgizmoplugin.rst index a163fb223..38ea775fa 100644 --- a/classes/class_editornode3dgizmoplugin.rst +++ b/classes/class_editornode3dgizmoplugin.rst @@ -104,9 +104,9 @@ Called for this plugin's active gizmos. - void **_commit_subgizmos** **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`PackedInt32Array` ids, :ref:`Transform3D[]` restores, :ref:`bool` cancel **)** |virtual| -Override this method to commit a group of subgizmos being edited (see :ref:`_subgizmos_intersect_ray` and :ref:`_subgizmos_intersect_frustum`). This usually means creating an :ref:`UndoRedo` action for the change, using the current transforms as "do" and the ``restore`` transforms as "undo". +Override this method to commit a group of subgizmos being edited (see :ref:`_subgizmos_intersect_ray` and :ref:`_subgizmos_intersect_frustum`). This usually means creating an :ref:`UndoRedo` action for the change, using the current transforms as "do" and the ``restores`` transforms as "undo". -If the ``cancel`` argument is ``true``, the ``restore`` transforms should be directly set, without any :ref:`UndoRedo` action. As with all subgizmo methods, transforms are given in local space respect to the gizmo's Node3D. Called for this plugin's active gizmos. +If the ``cancel`` argument is ``true``, the ``restores`` transforms should be directly set, without any :ref:`UndoRedo` action. As with all subgizmo methods, transforms are given in local space respect to the gizmo's Node3D. Called for this plugin's active gizmos. ---- @@ -200,7 +200,7 @@ Override this method to add all the gizmo elements whenever a gizmo update is re - void **_set_handle** **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` handle_id, :ref:`bool` secondary, :ref:`Camera3D` camera, :ref:`Vector2` screen_pos **)** |virtual| -Override this method to update the node's properties when the user drags a gizmo handle (previously added with :ref:`EditorNode3DGizmo.add_handles`). The provided ``point`` is the mouse position in screen coordinates and the ``camera`` can be used to convert it to raycasts. +Override this method to update the node's properties when the user drags a gizmo handle (previously added with :ref:`EditorNode3DGizmo.add_handles`). The provided ``screen_pos`` is the mouse position in screen coordinates and the ``camera`` can be used to convert it to raycasts. The ``secondary`` argument is ``true`` when the edited handle is secondary (see :ref:`EditorNode3DGizmo.add_handles` for more information). @@ -220,7 +220,7 @@ Override this method to update the node properties during subgizmo editing (see - :ref:`PackedInt32Array` **_subgizmos_intersect_frustum** **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`Camera3D` camera, :ref:`Plane[]` frustum_planes **)** |virtual| |const| -Override this method to allow selecting subgizmos using mouse drag box selection. Given a ``camera`` and a ``frustum``, this method should return which subgizmos are contained within the frustum. The ``frustum`` argument consists of an ``Array`` with all the ``Plane``\ s that make up the selection frustum. The returned value should contain a list of unique subgizmo identifiers, these identifiers can have any non-negative value and will be used in other virtual methods like :ref:`_get_subgizmo_transform` or :ref:`_commit_subgizmos`. Called for this plugin's active gizmos. +Override this method to allow selecting subgizmos using mouse drag box selection. Given a ``camera`` and ``frustum_planes``, this method should return which subgizmos are contained within the frustums. The ``frustum_planes`` argument consists of an ``Array`` with all the ``Plane``\ s that make up the selection frustum. The returned value should contain a list of unique subgizmo identifiers, these identifiers can have any non-negative value and will be used in other virtual methods like :ref:`_get_subgizmo_transform` or :ref:`_commit_subgizmos`. Called for this plugin's active gizmos. ---- @@ -228,7 +228,7 @@ Override this method to allow selecting subgizmos using mouse drag box selection - :ref:`int` **_subgizmos_intersect_ray** **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`Camera3D` camera, :ref:`Vector2` screen_pos **)** |virtual| |const| -Override this method to allow selecting subgizmos using mouse clicks. Given a ``camera`` and a ``point`` in screen coordinates, this method should return which subgizmo should be selected. The returned value should be a unique subgizmo identifier, which can have any non-negative value and will be used in other virtual methods like :ref:`_get_subgizmo_transform` or :ref:`_commit_subgizmos`. Called for this plugin's active gizmos. +Override this method to allow selecting subgizmos using mouse clicks. Given a ``camera`` and a ``screen_pos`` in screen coordinates, this method should return which subgizmo should be selected. The returned value should be a unique subgizmo identifier, which can have any non-negative value and will be used in other virtual methods like :ref:`_get_subgizmo_transform` or :ref:`_commit_subgizmos`. Called for this plugin's active gizmos. ---- diff --git a/classes/class_editorpaths.rst b/classes/class_editorpaths.rst index 827f750ac..fcedff2ba 100644 --- a/classes/class_editorpaths.rst +++ b/classes/class_editorpaths.rst @@ -31,17 +31,19 @@ Tutorials Methods ------- -+-----------------------------+------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_cache_dir` **(** **)** |const| | -+-----------------------------+------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_config_dir` **(** **)** |const| | -+-----------------------------+------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_data_dir` **(** **)** |const| | -+-----------------------------+------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_self_contained_file` **(** **)** |const| | -+-----------------------------+------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_self_contained` **(** **)** |const| | -+-----------------------------+------------------------------------------------------------------------------------------------------+ ++-----------------------------+--------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_cache_dir` **(** **)** |const| | ++-----------------------------+--------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_config_dir` **(** **)** |const| | ++-----------------------------+--------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_data_dir` **(** **)** |const| | ++-----------------------------+--------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_project_settings_dir` **(** **)** |const| | ++-----------------------------+--------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_self_contained_file` **(** **)** |const| | ++-----------------------------+--------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_self_contained` **(** **)** |const| | ++-----------------------------+--------------------------------------------------------------------------------------------------------+ Method Descriptions ------------------- @@ -94,6 +96,14 @@ Returns the absolute path to the user's data folder. This folder should be used ---- +.. _class_EditorPaths_method_get_project_settings_dir: + +- :ref:`String` **get_project_settings_dir** **(** **)** |const| + +Returns the project-specific editor settings path. Projects all have a unique subdirectory inside the settings path where project-specific editor settings are saved. + +---- + .. _class_EditorPaths_method_get_self_contained_file: - :ref:`String` **get_self_contained_file** **(** **)** |const| diff --git a/classes/class_editorplugin.rst b/classes/class_editorplugin.rst index 1bb122404..4a1d739f5 100644 --- a/classes/class_editorplugin.rst +++ b/classes/class_editorplugin.rst @@ -27,135 +27,135 @@ Tutorials Methods ------- -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_apply_changes` **(** **)** |virtual| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_build` **(** **)** |virtual| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_clear` **(** **)** |virtual| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_disable_plugin` **(** **)** |virtual| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_edit` **(** :ref:`Variant` object **)** |virtual| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_enable_plugin` **(** **)** |virtual| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_forward_3d_draw_over_viewport` **(** :ref:`Control` viewport_control **)** |virtual| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_forward_3d_force_draw_over_viewport` **(** :ref:`Control` viewport_control **)** |virtual| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_forward_3d_gui_input` **(** :ref:`Camera3D` viewport_camera, :ref:`InputEvent` event **)** |virtual| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_forward_canvas_draw_over_viewport` **(** :ref:`Control` viewport_control **)** |virtual| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_forward_canvas_force_draw_over_viewport` **(** :ref:`Control` viewport_control **)** |virtual| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_forward_canvas_gui_input` **(** :ref:`InputEvent` event **)** |virtual| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`_get_breakpoints` **(** **)** |virtual| |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`_get_plugin_icon` **(** **)** |virtual| |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_get_plugin_name` **(** **)** |virtual| |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`_get_state` **(** **)** |virtual| |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_get_window_layout` **(** :ref:`ConfigFile` configuration **)** |virtual| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_handles` **(** :ref:`Variant` object **)** |virtual| |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_has_main_screen` **(** **)** |virtual| |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_make_visible` **(** :ref:`bool` visible **)** |virtual| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_save_external_data` **(** **)** |virtual| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_set_state` **(** :ref:`Dictionary` state **)** |virtual| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_set_window_layout` **(** :ref:`ConfigFile` configuration **)** |virtual| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_autoload_singleton` **(** :ref:`String` name, :ref:`String` path **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Button` | :ref:`add_control_to_bottom_panel` **(** :ref:`Control` control, :ref:`String` title **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_control_to_container` **(** :ref:`CustomControlContainer` container, :ref:`Control` control **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_control_to_dock` **(** :ref:`DockSlot` slot, :ref:`Control` control **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_custom_type` **(** :ref:`String` type, :ref:`String` base, :ref:`Script` script, :ref:`Texture2D` icon **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_debugger_plugin` **(** :ref:`Script` script **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_export_plugin` **(** :ref:`EditorExportPlugin` plugin **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_import_plugin` **(** :ref:`EditorImportPlugin` importer, :ref:`bool` first_priority=false **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_inspector_plugin` **(** :ref:`EditorInspectorPlugin` plugin **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_scene_format_importer_plugin` **(** :ref:`EditorSceneFormatImporter` scene_format_importer, :ref:`bool` first_priority=false **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_scene_post_import_plugin` **(** :ref:`EditorScenePostImportPlugin` scene_import_plugin, :ref:`bool` first_priority=false **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_spatial_gizmo_plugin` **(** :ref:`EditorNode3DGizmoPlugin` plugin **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_tool_menu_item` **(** :ref:`String` name, :ref:`Callable` callable **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_tool_submenu_item` **(** :ref:`String` name, :ref:`PopupMenu` submenu **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_translation_parser_plugin` **(** :ref:`EditorTranslationParserPlugin` parser **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_undo_redo_inspector_hook_callback` **(** :ref:`Callable` callable **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`EditorInterface` | :ref:`get_editor_interface` **(** **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PopupMenu` | :ref:`get_export_as_menu` **(** **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`ScriptCreateDialog` | :ref:`get_script_create_dialog` **(** **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`UndoRedo` | :ref:`get_undo_redo` **(** **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`hide_bottom_panel` **(** **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`make_bottom_panel_item_visible` **(** :ref:`Control` item **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`queue_save_layout` **(** **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_autoload_singleton` **(** :ref:`String` name **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_control_from_bottom_panel` **(** :ref:`Control` control **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_control_from_container` **(** :ref:`CustomControlContainer` container, :ref:`Control` control **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_control_from_docks` **(** :ref:`Control` control **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_custom_type` **(** :ref:`String` type **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_debugger_plugin` **(** :ref:`Script` script **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_export_plugin` **(** :ref:`EditorExportPlugin` plugin **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_import_plugin` **(** :ref:`EditorImportPlugin` importer **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_inspector_plugin` **(** :ref:`EditorInspectorPlugin` plugin **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_scene_format_importer_plugin` **(** :ref:`EditorSceneFormatImporter` scene_format_importer **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_scene_post_import_plugin` **(** :ref:`EditorScenePostImportPlugin` scene_import_plugin **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_spatial_gizmo_plugin` **(** :ref:`EditorNode3DGizmoPlugin` plugin **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_tool_menu_item` **(** :ref:`String` name **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_translation_parser_plugin` **(** :ref:`EditorTranslationParserPlugin` parser **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_undo_redo_inspector_hook_callback` **(** :ref:`Callable` callable **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_force_draw_over_forwarding_enabled` **(** **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_input_event_forwarding_always_enabled` **(** **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`update_overlays` **(** **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_apply_changes` **(** **)** |virtual| | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_build` **(** **)** |virtual| | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_clear` **(** **)** |virtual| | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_disable_plugin` **(** **)** |virtual| | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_edit` **(** :ref:`Variant` object **)** |virtual| | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_enable_plugin` **(** **)** |virtual| | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_forward_3d_draw_over_viewport` **(** :ref:`Control` viewport_control **)** |virtual| | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_forward_3d_force_draw_over_viewport` **(** :ref:`Control` viewport_control **)** |virtual| | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_forward_3d_gui_input` **(** :ref:`Camera3D` viewport_camera, :ref:`InputEvent` event **)** |virtual| | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_forward_canvas_draw_over_viewport` **(** :ref:`Control` viewport_control **)** |virtual| | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_forward_canvas_force_draw_over_viewport` **(** :ref:`Control` viewport_control **)** |virtual| | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_forward_canvas_gui_input` **(** :ref:`InputEvent` event **)** |virtual| | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedStringArray` | :ref:`_get_breakpoints` **(** **)** |virtual| |const| | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Texture2D` | :ref:`_get_plugin_icon` **(** **)** |virtual| |const| | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`_get_plugin_name` **(** **)** |virtual| |const| | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`_get_state` **(** **)** |virtual| |const| | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_get_window_layout` **(** :ref:`ConfigFile` configuration **)** |virtual| | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_handles` **(** :ref:`Variant` object **)** |virtual| |const| | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_has_main_screen` **(** **)** |virtual| |const| | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_make_visible` **(** :ref:`bool` visible **)** |virtual| | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_save_external_data` **(** **)** |virtual| | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_set_state` **(** :ref:`Dictionary` state **)** |virtual| | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_set_window_layout` **(** :ref:`ConfigFile` configuration **)** |virtual| | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_autoload_singleton` **(** :ref:`String` name, :ref:`String` path **)** | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Button` | :ref:`add_control_to_bottom_panel` **(** :ref:`Control` control, :ref:`String` title **)** | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_control_to_container` **(** :ref:`CustomControlContainer` container, :ref:`Control` control **)** | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_control_to_dock` **(** :ref:`DockSlot` slot, :ref:`Control` control **)** | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_custom_type` **(** :ref:`String` type, :ref:`String` base, :ref:`Script` script, :ref:`Texture2D` icon **)** | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_debugger_plugin` **(** :ref:`Script` script **)** | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_export_plugin` **(** :ref:`EditorExportPlugin` plugin **)** | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_import_plugin` **(** :ref:`EditorImportPlugin` importer, :ref:`bool` first_priority=false **)** | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_inspector_plugin` **(** :ref:`EditorInspectorPlugin` plugin **)** | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_scene_format_importer_plugin` **(** :ref:`EditorSceneFormatImporter` scene_format_importer, :ref:`bool` first_priority=false **)** | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_scene_post_import_plugin` **(** :ref:`EditorScenePostImportPlugin` scene_import_plugin, :ref:`bool` first_priority=false **)** | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_spatial_gizmo_plugin` **(** :ref:`EditorNode3DGizmoPlugin` plugin **)** | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_tool_menu_item` **(** :ref:`String` name, :ref:`Callable` callable **)** | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_tool_submenu_item` **(** :ref:`String` name, :ref:`PopupMenu` submenu **)** | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_translation_parser_plugin` **(** :ref:`EditorTranslationParserPlugin` parser **)** | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_undo_redo_inspector_hook_callback` **(** :ref:`Callable` callable **)** | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`EditorInterface` | :ref:`get_editor_interface` **(** **)** | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PopupMenu` | :ref:`get_export_as_menu` **(** **)** | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`ScriptCreateDialog` | :ref:`get_script_create_dialog` **(** **)** | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`EditorUndoRedoManager` | :ref:`get_undo_redo` **(** **)** | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`hide_bottom_panel` **(** **)** | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`make_bottom_panel_item_visible` **(** :ref:`Control` item **)** | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`queue_save_layout` **(** **)** | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_autoload_singleton` **(** :ref:`String` name **)** | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_control_from_bottom_panel` **(** :ref:`Control` control **)** | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_control_from_container` **(** :ref:`CustomControlContainer` container, :ref:`Control` control **)** | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_control_from_docks` **(** :ref:`Control` control **)** | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_custom_type` **(** :ref:`String` type **)** | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_debugger_plugin` **(** :ref:`Script` script **)** | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_export_plugin` **(** :ref:`EditorExportPlugin` plugin **)** | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_import_plugin` **(** :ref:`EditorImportPlugin` importer **)** | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_inspector_plugin` **(** :ref:`EditorInspectorPlugin` plugin **)** | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_scene_format_importer_plugin` **(** :ref:`EditorSceneFormatImporter` scene_format_importer **)** | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_scene_post_import_plugin` **(** :ref:`EditorScenePostImportPlugin` scene_import_plugin **)** | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_spatial_gizmo_plugin` **(** :ref:`EditorNode3DGizmoPlugin` plugin **)** | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_tool_menu_item` **(** :ref:`String` name **)** | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_translation_parser_plugin` **(** :ref:`EditorTranslationParserPlugin` parser **)** | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_undo_redo_inspector_hook_callback` **(** :ref:`Callable` callable **)** | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_force_draw_over_forwarding_enabled` **(** **)** | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_input_event_forwarding_always_enabled` **(** **)** | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`update_overlays` **(** **)** |const| | ++-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- @@ -217,7 +217,7 @@ Enumerations .. _class_EditorPlugin_constant_CONTAINER_CANVAS_EDITOR_BOTTOM: -.. _class_EditorPlugin_constant_CONTAINER_PROPERTY_EDITOR_BOTTOM: +.. _class_EditorPlugin_constant_CONTAINER_INSPECTOR_BOTTOM: .. _class_EditorPlugin_constant_CONTAINER_PROJECT_SETTING_TAB_LEFT: @@ -243,7 +243,7 @@ enum **CustomControlContainer**: - **CONTAINER_CANVAS_EDITOR_BOTTOM** = **8** -- **CONTAINER_PROPERTY_EDITOR_BOTTOM** = **9** +- **CONTAINER_INSPECTOR_BOTTOM** = **9** - **CONTAINER_PROJECT_SETTING_TAB_LEFT** = **10** @@ -939,7 +939,7 @@ Gets the Editor's dialog used for making scripts. .. _class_EditorPlugin_method_get_undo_redo: -- :ref:`UndoRedo` **get_undo_redo** **(** **)** +- :ref:`EditorUndoRedoManager` **get_undo_redo** **(** **)** Gets the undo/redo object. Most actions in the editor can be undoable, so use this object to make sure this happens when it's worth it. diff --git a/classes/class_editorproperty.rst b/classes/class_editorproperty.rst index 46ebe28ea..7e5565504 100644 --- a/classes/class_editorproperty.rst +++ b/classes/class_editorproperty.rst @@ -52,8 +52,6 @@ Methods +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`StringName` | :ref:`get_edited_property` **(** **)** |const| | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_tooltip_text` **(** **)** |const| | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_bottom_editor` **(** :ref:`Control` editor **)** | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`update_property` **(** **)** | @@ -78,9 +76,17 @@ Used by sub-inspectors. Emit it if what was selected was an Object ID. ---- +.. _class_EditorProperty_signal_property_can_revert_changed: + +- **property_can_revert_changed** **(** :ref:`StringName` property, :ref:`bool` can_revert **)** + +Emitted when the revertability (i.e., whether it has a non-default value and thus is displayed with a revert icon) of a property has changed. + +---- + .. _class_EditorProperty_signal_property_changed: -- **property_changed** **(** :ref:`StringName` property, :ref:`Variant` value **)** +- **property_changed** **(** :ref:`StringName` property, :ref:`Variant` value, :ref:`StringName` field, :ref:`bool` changing **)** Do not emit this manually, use the :ref:`emit_changed` method instead. @@ -298,14 +304,6 @@ Gets the edited property. If your editor is for a single property (added via :re ---- -.. _class_EditorProperty_method_get_tooltip_text: - -- :ref:`String` **get_tooltip_text** **(** **)** |const| - -Must be implemented to provide a custom tooltip to the property editor. - ----- - .. _class_EditorProperty_method_set_bottom_editor: - void **set_bottom_editor** **(** :ref:`Control` editor **)** diff --git a/classes/class_editorresourcepicker.rst b/classes/class_editorresourcepicker.rst index dbe0f17a8..e99f915dc 100644 --- a/classes/class_editorresourcepicker.rst +++ b/classes/class_editorresourcepicker.rst @@ -62,9 +62,9 @@ Emitted when the value of the edited resource was changed. .. _class_EditorResourcePicker_signal_resource_selected: -- **resource_selected** **(** :ref:`Resource` resource, :ref:`bool` edit **)** +- **resource_selected** **(** :ref:`Resource` resource, :ref:`bool` inspect **)** -Emitted when the resource value was set and user clicked to edit it. When ``edit`` is ``true``, the signal was caused by the context menu "Edit" option. +Emitted when the resource value was set and user clicked to edit it. When ``inspect`` is ``true``, the signal was caused by the context menu "Edit" or "Inspect" option. Property Descriptions --------------------- diff --git a/classes/class_editorselection.rst b/classes/class_editorselection.rst index 2cd12afb4..446500a65 100644 --- a/classes/class_editorselection.rst +++ b/classes/class_editorselection.rst @@ -31,7 +31,7 @@ Methods +---------------------------+--------------------------------------------------------------------------------------------------------------------+ | :ref:`Node[]` | :ref:`get_selected_nodes` **(** **)** | +---------------------------+--------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_transformable_selected_nodes` **(** **)** | +| :ref:`Node[]` | :ref:`get_transformable_selected_nodes` **(** **)** | +---------------------------+--------------------------------------------------------------------------------------------------------------------+ | void | :ref:`remove_node` **(** :ref:`Node` node **)** | +---------------------------+--------------------------------------------------------------------------------------------------------------------+ @@ -76,7 +76,7 @@ Gets the list of selected nodes. .. _class_EditorSelection_method_get_transformable_selected_nodes: -- :ref:`Array` **get_transformable_selected_nodes** **(** **)** +- :ref:`Node[]` **get_transformable_selected_nodes** **(** **)** Gets the list of selected nodes, optimized for transform operations (i.e. moving them, rotating, etc). This list avoids situations where a node is selected and also child/grandchild. diff --git a/classes/class_editorsettings.rst b/classes/class_editorsettings.rst index 552c7d26b..6665ac0c3 100644 --- a/classes/class_editorsettings.rst +++ b/classes/class_editorsettings.rst @@ -48,6 +48,461 @@ Accessing the settings can be done using the following methods, such as: \ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_editor_settings`. +Properties +---------- + ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`debugger/profiler_frame_history_size` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`docks/filesystem/always_show_folders` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`docks/filesystem/textfile_extensions` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`docks/filesystem/thumbnail_size` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`docks/property_editor/auto_refresh_interval` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`docks/property_editor/subresource_hue_tint` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`docks/scene_tree/auto_expand_to_selected` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`docks/scene_tree/start_create_dialog_fully_expanded` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`editors/2d/bone_color1` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`editors/2d/bone_color2` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`editors/2d/bone_ik_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`editors/2d/bone_outline_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`editors/2d/bone_outline_size` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`editors/2d/bone_selected_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`editors/2d/bone_width` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`editors/2d/constrain_editor_view` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`editors/2d/grid_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`editors/2d/guides_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`editors/2d/smart_snapping_line_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`editors/2d/viewport_border_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`editors/3d/default_fov` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`editors/3d/default_z_far` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`editors/3d/default_z_near` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`editors/3d/freelook/freelook_activation_modifier` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`editors/3d/freelook/freelook_base_speed` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`editors/3d/freelook/freelook_inertia` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`editors/3d/freelook/freelook_navigation_scheme` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`editors/3d/freelook/freelook_sensitivity` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`editors/3d/freelook/freelook_speed_zoom_link` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`editors/3d/grid_division_level_bias` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`editors/3d/grid_division_level_max` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`editors/3d/grid_division_level_min` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`editors/3d/grid_size` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`editors/3d/grid_xy_plane` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`editors/3d/grid_xz_plane` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`editors/3d/grid_yz_plane` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`editors/3d/navigation/emulate_3_button_mouse` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`editors/3d/navigation/emulate_numpad` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`editors/3d/navigation/invert_x_axis` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`editors/3d/navigation/invert_y_axis` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`editors/3d/navigation/navigation_scheme` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`editors/3d/navigation/orbit_modifier` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`editors/3d/navigation/pan_modifier` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`editors/3d/navigation/warped_mouse_panning` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`editors/3d/navigation/zoom_modifier` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`editors/3d/navigation/zoom_style` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`editors/3d/navigation_feel/orbit_inertia` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`editors/3d/navigation_feel/orbit_sensitivity` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`editors/3d/navigation_feel/translation_inertia` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`editors/3d/navigation_feel/zoom_inertia` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`editors/3d/primary_grid_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`editors/3d/primary_grid_steps` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`editors/3d/secondary_grid_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`editors/3d/selection_box_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/instantiated` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/joint` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/shape` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`editors/animation/autorename_animation_tracks` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`editors/animation/confirm_insert_track` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`editors/animation/default_create_bezier_tracks` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`editors/animation/default_create_reset_tracks` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`editors/animation/onion_layers_future_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`editors/animation/onion_layers_past_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`editors/grid_map/pick_distance` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`editors/panning/2d_editor_pan_speed` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`editors/panning/2d_editor_panning_scheme` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`editors/panning/animation_editors_panning_scheme` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`editors/panning/simple_panning` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`editors/panning/sub_editors_panning_scheme` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`editors/panning/warped_mouse_panning` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`editors/polygon_editor/point_grab_radius` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`editors/polygon_editor/show_previous_outline` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`editors/tiles_editor/display_grid` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`editors/tiles_editor/grid_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`editors/visual_editors/lines_curvature` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`editors/visual_editors/minimap_opacity` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`editors/visual_editors/visual_shader/port_preview_size` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`filesystem/directories/autoscan_project_path` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`filesystem/directories/default_project_path` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`filesystem/file_dialog/display_mode` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`filesystem/file_dialog/show_hidden_files` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`filesystem/file_dialog/thumbnail_size` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`filesystem/on_save/compress_binary_resources` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`filesystem/on_save/safe_save_on_backup_then_rename` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`interface/editor/automatically_open_screenshots` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`interface/editor/code_font` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`interface/editor/code_font_contextual_ligatures` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`interface/editor/code_font_custom_opentype_features` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`interface/editor/code_font_custom_variations` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`interface/editor/code_font_size` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`interface/editor/custom_display_scale` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`interface/editor/debug/enable_pseudolocalization` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`interface/editor/display_scale` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`interface/editor/editor_language` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`interface/editor/expand_to_title` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`interface/editor/font_antialiasing` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`interface/editor/font_hinting` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`interface/editor/font_subpixel_positioning` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`interface/editor/low_processor_mode_sleep_usec` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`interface/editor/main_font` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`interface/editor/main_font_bold` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`interface/editor/main_font_size` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`interface/editor/mouse_extra_buttons_navigate_history` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`interface/editor/save_each_scene_on_quit` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`interface/editor/separate_distraction_mode` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`interface/editor/show_internal_errors_in_toast_notifications` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`interface/editor/single_window_mode` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`interface/editor/unfocused_low_processor_mode_sleep_usec` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`interface/editor/use_embedded_menu` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`interface/inspector/max_array_dictionary_items_per_page` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`interface/inspector/show_low_level_opentype_features` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`interface/scene_tabs/display_close_button` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`interface/scene_tabs/maximum_width` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`interface/scene_tabs/show_script_button` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`interface/scene_tabs/show_thumbnail_on_hover` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`interface/theme/accent_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`interface/theme/additional_spacing` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`interface/theme/base_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`interface/theme/border_size` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`interface/theme/contrast` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`interface/theme/corner_radius` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`interface/theme/custom_theme` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`interface/theme/icon_and_font_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`interface/theme/icon_saturation` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`interface/theme/preset` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`interface/theme/relationship_line_opacity` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`network/debug/remote_host` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`network/debug/remote_port` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`network/http_proxy/host` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`network/http_proxy/port` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`network/ssl/editor_ssl_certificates` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`project_manager/sorting_order` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`run/auto_save/save_before_running` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`run/output/always_clear_output_on_play` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`run/output/always_close_output_on_stop` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`run/output/always_open_output_on_play` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`run/output/font_size` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`run/window_placement/rect` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`run/window_placement/rect_custom_position` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`run/window_placement/screen` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`text_editor/appearance/caret/caret_blink` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`text_editor/appearance/caret/caret_blink_speed` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`text_editor/appearance/caret/highlight_all_occurrences` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`text_editor/appearance/caret/highlight_current_line` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`text_editor/appearance/caret/type` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`text_editor/appearance/guidelines/line_length_guideline_hard_column` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`text_editor/appearance/guidelines/line_length_guideline_soft_column` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`text_editor/appearance/guidelines/show_line_length_guidelines` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`text_editor/appearance/gutters/highlight_type_safe_lines` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`text_editor/appearance/gutters/line_numbers_zero_padded` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`text_editor/appearance/gutters/show_bookmark_gutter` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`text_editor/appearance/gutters/show_info_gutter` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`text_editor/appearance/gutters/show_line_numbers` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`text_editor/appearance/lines/code_folding` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`text_editor/appearance/lines/word_wrap` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`text_editor/appearance/minimap/minimap_width` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`text_editor/appearance/minimap/show_minimap` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`text_editor/appearance/whitespace/draw_spaces` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`text_editor/appearance/whitespace/draw_tabs` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`text_editor/appearance/whitespace/line_spacing` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`text_editor/behavior/files/auto_reload_scripts_on_external_change` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`text_editor/behavior/files/autosave_interval_secs` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`text_editor/behavior/files/convert_indent_on_save` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`text_editor/behavior/files/restore_scripts_on_load` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`text_editor/behavior/files/trim_trailing_whitespace_on_save` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`text_editor/behavior/indent/auto_indent` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`text_editor/behavior/indent/size` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`text_editor/behavior/indent/type` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`text_editor/behavior/navigation/drag_and_drop_selection` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`text_editor/behavior/navigation/move_caret_on_right_click` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`text_editor/behavior/navigation/scroll_past_end_of_file` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`text_editor/behavior/navigation/smooth_scrolling` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`text_editor/behavior/navigation/stay_in_script_editor_on_node_selected` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`text_editor/behavior/navigation/v_scroll_speed` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`text_editor/completion/add_type_hints` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`text_editor/completion/auto_brace_complete` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`text_editor/completion/code_complete_delay` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`text_editor/completion/complete_file_paths` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`text_editor/completion/idle_parse_delay` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`text_editor/completion/put_callhint_tooltip_below_current_line` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`text_editor/completion/use_single_quotes` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`text_editor/help/class_reference_examples` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`text_editor/help/help_font_size` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`text_editor/help/help_source_font_size` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`text_editor/help/help_title_font_size` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`text_editor/help/show_help_index` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`text_editor/script_list/show_members_overview` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`text_editor/script_list/sort_members_outline_alphabetically` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`text_editor/theme/color_theme` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`text_editor/theme/highlighting/background_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`text_editor/theme/highlighting/base_type_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`text_editor/theme/highlighting/bookmark_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`text_editor/theme/highlighting/brace_mismatch_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`text_editor/theme/highlighting/breakpoint_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`text_editor/theme/highlighting/caret_background_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`text_editor/theme/highlighting/caret_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`text_editor/theme/highlighting/code_folding_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`text_editor/theme/highlighting/comment_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`text_editor/theme/highlighting/completion_background_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`text_editor/theme/highlighting/completion_existing_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`text_editor/theme/highlighting/completion_font_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`text_editor/theme/highlighting/completion_scroll_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`text_editor/theme/highlighting/completion_scroll_hovered_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`text_editor/theme/highlighting/completion_selected_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`text_editor/theme/highlighting/control_flow_keyword_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`text_editor/theme/highlighting/current_line_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`text_editor/theme/highlighting/engine_type_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`text_editor/theme/highlighting/executing_line_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`text_editor/theme/highlighting/function_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`text_editor/theme/highlighting/keyword_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`text_editor/theme/highlighting/line_length_guideline_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`text_editor/theme/highlighting/line_number_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`text_editor/theme/highlighting/mark_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`text_editor/theme/highlighting/member_variable_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`text_editor/theme/highlighting/number_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`text_editor/theme/highlighting/safe_line_number_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`text_editor/theme/highlighting/search_result_border_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`text_editor/theme/highlighting/search_result_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`text_editor/theme/highlighting/selection_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`text_editor/theme/highlighting/string_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`text_editor/theme/highlighting/symbol_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`text_editor/theme/highlighting/text_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`text_editor/theme/highlighting/text_selected_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`text_editor/theme/highlighting/user_type_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`text_editor/theme/highlighting/word_highlighted_color` | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + Methods ------- @@ -58,14 +513,12 @@ Methods +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`erase` **(** :ref:`String` property **)** | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_changed_settings` **(** **)** |const| | +| :ref:`PackedStringArray` | :ref:`get_changed_settings` **(** **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`get_favorites` **(** **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`get_project_metadata` **(** :ref:`String` section, :ref:`String` key, :ref:`Variant` default=null **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_project_settings_dir` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`get_recent_dirs` **(** **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`get_setting` **(** :ref:`String` name **)** |const| | @@ -74,10 +527,6 @@ Methods +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`mark_setting_changed` **(** :ref:`String` setting **)** | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`property_can_revert` **(** :ref:`String` name **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`property_get_revert` **(** :ref:`String` name **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_builtin_action_override` **(** :ref:`String` name, :ref:`Array` actions_list **)** | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_favorites` **(** :ref:`PackedStringArray` dirs **)** | @@ -107,6 +556,1917 @@ Constants - **NOTIFICATION_EDITOR_SETTINGS_CHANGED** = **10000** --- Emitted after any editor setting has changed. It's used by various editor plugins to update their visuals on theme changes or logic on configuration changes. +Property Descriptions +--------------------- + +.. _class_EditorSettings_property_debugger/profiler_frame_history_size: + +- :ref:`int` **debugger/profiler_frame_history_size** + +The size of the profiler's frame history. The default value (3600) allows seeing up to 60 seconds of profiling if the project renders at a constant 60 FPS. Higher values allow viewing longer periods of profiling in the graphs, especially when the project is running at high framerates. + +---- + +.. _class_EditorSettings_property_docks/filesystem/always_show_folders: + +- :ref:`bool` **docks/filesystem/always_show_folders** + +If ``true``, displays folders in the FileSystem dock's bottom pane when split mode is enabled. If ``false``, only files will be displayed in the bottom pane. Split mode can be toggled by pressing the icon next to the ``res://`` folder path. + +\ **Note:** This setting has no effect when split mode is disabled (which is the default). + +---- + +.. _class_EditorSettings_property_docks/filesystem/textfile_extensions: + +- :ref:`String` **docks/filesystem/textfile_extensions** + +List of file extensions to consider as editable text files in the FileSystem dock (by double-clicking on the files). + +---- + +.. _class_EditorSettings_property_docks/filesystem/thumbnail_size: + +- :ref:`int` **docks/filesystem/thumbnail_size** + +The thumbnail size to use in the FileSystem dock (in pixels). See also :ref:`filesystem/file_dialog/thumbnail_size`. + +---- + +.. _class_EditorSettings_property_docks/property_editor/auto_refresh_interval: + +- :ref:`float` **docks/property_editor/auto_refresh_interval** + +The refresh interval to use for the inspector dock's properties. The effect of this setting is mainly noticeable when adjusting gizmos in the 2D/3D editor and looking at the inspector at the same time. Lower values make the inspector more often, but take up more CPU time. + +---- + +.. _class_EditorSettings_property_docks/property_editor/subresource_hue_tint: + +- :ref:`float` **docks/property_editor/subresource_hue_tint** + +The tint intensity to use for the subresources background in the inspector dock. The tint is used to distinguish between different subresources in the inspector. Higher values result in a more noticeable background color difference. + +---- + +.. _class_EditorSettings_property_docks/scene_tree/auto_expand_to_selected: + +- :ref:`bool` **docks/scene_tree/auto_expand_to_selected** + +If ``true``, the scene tree dock will automatically unfold nodes when a node that has folded parents is selected. + +---- + +.. _class_EditorSettings_property_docks/scene_tree/start_create_dialog_fully_expanded: + +- :ref:`bool` **docks/scene_tree/start_create_dialog_fully_expanded** + +If ``true``, the Create dialog (Create New Node/Create New Resource) will start with all its sections expanded. Otherwise, sections will be collapsed until the user starts searching (which will automatically expand sections as needed). + +---- + +.. _class_EditorSettings_property_editors/2d/bone_color1: + +- :ref:`Color` **editors/2d/bone_color1** + +The "start" stop of the color gradient to use for bones in the 2D skeleton editor. + +---- + +.. _class_EditorSettings_property_editors/2d/bone_color2: + +- :ref:`Color` **editors/2d/bone_color2** + +The "end" stop of the color gradient to use for bones in the 2D skeleton editor. + +---- + +.. _class_EditorSettings_property_editors/2d/bone_ik_color: + +- :ref:`Color` **editors/2d/bone_ik_color** + +The color to use for inverse kinematics-enabled bones in the 2D skeleton editor. + +---- + +.. _class_EditorSettings_property_editors/2d/bone_outline_color: + +- :ref:`Color` **editors/2d/bone_outline_color** + +The outline color to use for non-selected bones in the 2D skeleton editor. See also :ref:`editors/2d/bone_selected_color`. + +---- + +.. _class_EditorSettings_property_editors/2d/bone_outline_size: + +- :ref:`int` **editors/2d/bone_outline_size** + +The outline size in the 2D skeleton editor (in pixels). See also :ref:`editors/2d/bone_width`. + +---- + +.. _class_EditorSettings_property_editors/2d/bone_selected_color: + +- :ref:`Color` **editors/2d/bone_selected_color** + +The color to use for selected bones in the 2D skeleton editor. See also :ref:`editors/2d/bone_outline_color`. + +---- + +.. _class_EditorSettings_property_editors/2d/bone_width: + +- :ref:`int` **editors/2d/bone_width** + +The bone width in the 2D skeleton editor (in pixels). See also :ref:`editors/2d/bone_outline_size`. + +---- + +.. _class_EditorSettings_property_editors/2d/constrain_editor_view: + +- :ref:`bool` **editors/2d/constrain_editor_view** + +If ``true``, prevents the 2D editor viewport from leaving the scene. Limits are calculated dynamically based on nodes present in the current scene. If ``false``, the 2D editor viewport will be able to move freely, but you risk getting lost when zooming out too far. You can refocus on the scene by selecting a node then pressing :kbd:`F`. + +---- + +.. _class_EditorSettings_property_editors/2d/grid_color: + +- :ref:`Color` **editors/2d/grid_color** + +The grid color to use in the 2D editor. + +---- + +.. _class_EditorSettings_property_editors/2d/guides_color: + +- :ref:`Color` **editors/2d/guides_color** + +The guides color to use in the 2D editor. Guides can be created by dragging the mouse cursor from the rulers. + +---- + +.. _class_EditorSettings_property_editors/2d/smart_snapping_line_color: + +- :ref:`Color` **editors/2d/smart_snapping_line_color** + +The color to use when drawing smart snapping lines in the 2D editor. The smart snapping lines will automatically display when moving 2D nodes if smart snapping is enabled in the Snapping Options menu at the top of the 2D editor viewport. + +---- + +.. _class_EditorSettings_property_editors/2d/viewport_border_color: + +- :ref:`Color` **editors/2d/viewport_border_color** + +The color of the viewport border in the 2D editor. This border represents the viewport's size at the base resolution defined in the Project Settings. Objects placed outside this border will not be visible unless a :ref:`Camera2D` node is used, or unless the window is resized and the stretch mode is set to ``disabled``. + +---- + +.. _class_EditorSettings_property_editors/3d/default_fov: + +- :ref:`float` **editors/3d/default_fov** + +The default camera field of view to use in the 3D editor (in degrees). The camera field of view can be adjusted on a per-scene basis using the **View** menu at the top of the 3D editor. If a scene had its camera field of view adjusted using the **View** menu, this setting is ignored in the scene in question. This setting is also ignored while a Camera3D node is being previewed in the editor. + +---- + +.. _class_EditorSettings_property_editors/3d/default_z_far: + +- :ref:`float` **editors/3d/default_z_far** + +The default camera far clip distance to use in the 3D editor (in degrees). Higher values make it possible to view objects placed further away from the camera, at the cost of lower precision in the depth buffer (which can result in visible Z-fighting in the distance). The camera far clip distance can be adjusted on a per-scene basis using the **View** menu at the top of the 3D editor. If a scene had its camera far clip distance adjusted using the **View** menu, this setting is ignored in the scene in question. This setting is also ignored while a Camera3D node is being previewed in the editor. + +---- + +.. _class_EditorSettings_property_editors/3d/default_z_near: + +- :ref:`float` **editors/3d/default_z_near** + +The default camera near clip distance to use in the 3D editor (in degrees). Lower values make it possible to view objects placed closer to the camera, at the cost of lower precision in the depth buffer (which can result in visible Z-fighting in the distance). The camera near clip distance can be adjusted on a per-scene basis using the **View** menu at the top of the 3D editor. If a scene had its camera near clip distance adjusted using the **View** menu, this setting is ignored in the scene in question. This setting is also ignored while a Camera3D node is being previewed in the editor. + +---- + +.. _class_EditorSettings_property_editors/3d/freelook/freelook_activation_modifier: + +- :ref:`int` **editors/3d/freelook/freelook_activation_modifier** + +The modifier key to use to enable freelook in the 3D editor (on top of pressing the right mouse button). + +\ **Note:** Regardless of this setting, the freelook toggle keyboard shortcut (:kbd:`Shift + F` by default) is always available. + +\ **Note:** On certain window managers on Linux, the :kbd:`Alt` key will be intercepted by the window manager when clicking a mouse button at the same time. This means Godot will not see the modifier key as being pressed. + +---- + +.. _class_EditorSettings_property_editors/3d/freelook/freelook_base_speed: + +- :ref:`float` **editors/3d/freelook/freelook_base_speed** + +The base 3D freelook speed in units per second. This can be adjusted by using the mouse wheel while in freelook mode, or by holding down the "fast" or "slow" modifier keys (:kbd:`Shift` and :kbd:`Alt` by default, respectively). + +---- + +.. _class_EditorSettings_property_editors/3d/freelook/freelook_inertia: + +- :ref:`float` **editors/3d/freelook/freelook_inertia** + +The inertia of the 3D freelook camera. Higher values make the camera start and stop slower, which looks smoother but adds latency. + +---- + +.. _class_EditorSettings_property_editors/3d/freelook/freelook_navigation_scheme: + +- :ref:`int` **editors/3d/freelook/freelook_navigation_scheme** + +The navigation scheme to use when freelook is enabled in the 3D editor. Some of the navigation schemes below may be more convenient when designing specific levels in the 3D editor. + +- **Default:** The "Freelook Forward", "Freelook Backward", "Freelook Up" and "Freelook Down" keys will move relative to the camera, taking its pitch angle into account for the movement. + +- **Partially Axis-Locked:** The "Freelook Forward" and "Freelook Backward" keys will move relative to the camera, taking its pitch angle into account for the movement. The "Freelook Up" and "Freelook Down" keys will move in an "absolute" manner, *not* taking the camera's pitch angle into account for the movement. + +- **Fully Axis-Locked:** The "Freelook Forward", "Freelook Backward", "Freelook Up" and "Freelook Down" keys will move in an "absolute" manner, *not* taking the camera's pitch angle into account for the movement. + +See also :ref:`editors/3d/navigation/navigation_scheme`. + +---- + +.. _class_EditorSettings_property_editors/3d/freelook/freelook_sensitivity: + +- :ref:`float` **editors/3d/freelook/freelook_sensitivity** + +The mouse sensitivity to use while freelook mode is active in the 3D editor. See also :ref:`editors/3d/navigation_feel/orbit_sensitivity`. + +---- + +.. _class_EditorSettings_property_editors/3d/freelook/freelook_speed_zoom_link: + +- :ref:`bool` **editors/3d/freelook/freelook_speed_zoom_link** + +If ``true``, freelook speed is linked to the zoom value used in the camera orbit mode in the 3D editor. + +---- + +.. _class_EditorSettings_property_editors/3d/grid_division_level_bias: + +- :ref:`float` **editors/3d/grid_division_level_bias** + +The grid division bias to use in the 3D editor. Negative values will cause small grid divisions to appear earlier, whereas positive values will cause small grid divisions to appear later. + +---- + +.. _class_EditorSettings_property_editors/3d/grid_division_level_max: + +- :ref:`int` **editors/3d/grid_division_level_max** + +The smallest grid division to use in the 3D editor, specified as a power of 2. The grid will not be able to get larger than ``1 ^ grid_division_level_max`` units. By default, this means grid divisions cannot get smaller than 100 units each, no matter how far away the camera is from the grid. + +---- + +.. _class_EditorSettings_property_editors/3d/grid_division_level_min: + +- :ref:`int` **editors/3d/grid_division_level_min** + +The smallest grid division to use in the 3D editor, specified as a power of 2. The grid will not be able to get smaller than ``1 ^ grid_division_level_min`` units. By default, this means grid divisions cannot get smaller than 1 unit each, no matter how close the camera is from the grid. + +---- + +.. _class_EditorSettings_property_editors/3d/grid_size: + +- :ref:`int` **editors/3d/grid_size** + +The grid size in units. Higher values prevent the grid from appearing "cut off" at certain angles, but make the grid more demanding to render. Depending on the camera's position, the grid may not be fully visible since a shader is used to fade it progressively. + +---- + +.. _class_EditorSettings_property_editors/3d/grid_xy_plane: + +- :ref:`bool` **editors/3d/grid_xy_plane** + +If ``true``, render the grid on an XY plane. This can be useful for 3D side-scrolling games. + +---- + +.. _class_EditorSettings_property_editors/3d/grid_xz_plane: + +- :ref:`bool` **editors/3d/grid_xz_plane** + +If ``true``, render the grid on an XZ plane. + +---- + +.. _class_EditorSettings_property_editors/3d/grid_yz_plane: + +- :ref:`bool` **editors/3d/grid_yz_plane** + +If ``true``, render the grid on an YZ plane. This can be useful for 3D side-scrolling games. + +---- + +.. _class_EditorSettings_property_editors/3d/navigation/emulate_3_button_mouse: + +- :ref:`bool` **editors/3d/navigation/emulate_3_button_mouse** + +If ``true``, enables 3-button mouse emulation mode. This is useful on laptops when using a trackpad. + +When 3-button mouse emulation mode is enabled, the pan, zoom and orbit modifiers can always be used in the 3D editor viewport, even when not holding down any mouse button. + +\ **Note:** No matter the orbit modifier configured in :ref:`editors/3d/navigation/orbit_modifier`, :kbd:`Alt` will always remain usable for orbiting in this mode to improve usability with graphics tablets. + +---- + +.. _class_EditorSettings_property_editors/3d/navigation/emulate_numpad: + +- :ref:`bool` **editors/3d/navigation/emulate_numpad** + +If ``true``, allows using the top row :kbd:`0`-:kbd:`9` keys to function as their equivalent numpad keys for 3D editor navigation. This should be enabled on keyboards that have no numeric keypad available. + +---- + +.. _class_EditorSettings_property_editors/3d/navigation/invert_x_axis: + +- :ref:`bool` **editors/3d/navigation/invert_x_axis** + +If ``true``, invert the horizontal mouse axis when panning or orbiting in the 3D editor. This setting does *not* apply to freelook mode. + +---- + +.. _class_EditorSettings_property_editors/3d/navigation/invert_y_axis: + +- :ref:`bool` **editors/3d/navigation/invert_y_axis** + +If ``true``, invert the vertical mouse axis when panning, orbiting, or using freelook mode in the 3D editor. + +---- + +.. _class_EditorSettings_property_editors/3d/navigation/navigation_scheme: + +- :ref:`int` **editors/3d/navigation/navigation_scheme** + +The navigation scheme to use in the 3D editor. Changing this setting will affect the mouse buttons that must be held down to perform certain operations in the 3D editor viewport. + +- **Godot** Middle mouse button to orbit, :kbd:`Shift + Middle mouse button` to pan. :kbd:`Mouse wheel` to zoom. + +- **Maya:** :kbd:`Alt + Left mouse buttton` to orbit. :kbd:`Middle mouse button` to pan, :kbd:`Shift + Middle mouse button` to pan 10 times faster. :kbd:`Mouse wheel` to zoom. + +- **Modo:** :kbd:`Alt + Left mouse buttton` to orbit. :kbd:`Alt + Shift + Left mouse button` to pan. :kbd:`Ctrl + Alt + Left mouse button` to zoom. + +See also :ref:`editors/3d/freelook/freelook_navigation_scheme`. + +\ **Note:** On certain window managers on Linux, the :kbd:`Alt` key will be intercepted by the window manager when clicking a mouse button at the same time. This means Godot will not see the modifier key as being pressed. + +---- + +.. _class_EditorSettings_property_editors/3d/navigation/orbit_modifier: + +- :ref:`int` **editors/3d/navigation/orbit_modifier** + +The modifier key that must be held to orbit in the 3D editor. + +\ **Note:** If :ref:`editors/3d/navigation/emulate_3_button_mouse` is ``true``, :kbd:`Alt` will always remain usable for orbiting to improve usability with graphics tablets. + +\ **Note:** On certain window managers on Linux, the :kbd:`Alt` key will be intercepted by the window manager when clicking a mouse button at the same time. This means Godot will not see the modifier key as being pressed. + +---- + +.. _class_EditorSettings_property_editors/3d/navigation/pan_modifier: + +- :ref:`int` **editors/3d/navigation/pan_modifier** + +The modifier key that must be held to pan in the 3D editor. + +\ **Note:** On certain window managers on Linux, the :kbd:`Alt` key will be intercepted by the window manager when clicking a mouse button at the same time. This means Godot will not see the modifier key as being pressed. + +---- + +.. _class_EditorSettings_property_editors/3d/navigation/warped_mouse_panning: + +- :ref:`bool` **editors/3d/navigation/warped_mouse_panning** + +If ``true``, warps the mouse around the 3D viewport while panning in the 3D editor. This makes it possible to pan over a large area without having to exit panning then mouse the mouse back constantly. + +---- + +.. _class_EditorSettings_property_editors/3d/navigation/zoom_modifier: + +- :ref:`int` **editors/3d/navigation/zoom_modifier** + +The modifier key that must be held to zoom in the 3D editor. + +\ **Note:** On certain window managers on Linux, the :kbd:`Alt` key will be intercepted by the window manager when clicking a mouse button at the same time. This means Godot will not see the modifier key as being pressed. + +---- + +.. _class_EditorSettings_property_editors/3d/navigation/zoom_style: + +- :ref:`int` **editors/3d/navigation/zoom_style** + +The mouse cursor movement direction to use when zooming by moving the mouse. This does not affect zooming with the mouse wheel. + +---- + +.. _class_EditorSettings_property_editors/3d/navigation_feel/orbit_inertia: + +- :ref:`float` **editors/3d/navigation_feel/orbit_inertia** + +The inertia to use when orbiting in the 3D editor. Higher values make the camera start and stop slower, which looks smoother but adds latency. + +---- + +.. _class_EditorSettings_property_editors/3d/navigation_feel/orbit_sensitivity: + +- :ref:`float` **editors/3d/navigation_feel/orbit_sensitivity** + +The mouse sensitivity to use when orbiting in the 3D editor. See also :ref:`editors/3d/freelook/freelook_sensitivity`. + +---- + +.. _class_EditorSettings_property_editors/3d/navigation_feel/translation_inertia: + +- :ref:`float` **editors/3d/navigation_feel/translation_inertia** + +The inertia to use when panning in the 3D editor. Higher values make the camera start and stop slower, which looks smoother but adds latency. + +---- + +.. _class_EditorSettings_property_editors/3d/navigation_feel/zoom_inertia: + +- :ref:`float` **editors/3d/navigation_feel/zoom_inertia** + +The inertia to use when zooming in the 3D editor. Higher values make the camera start and stop slower, which looks smoother but adds latency. + +---- + +.. _class_EditorSettings_property_editors/3d/primary_grid_color: + +- :ref:`Color` **editors/3d/primary_grid_color** + +The color to use for the primary 3D grid. The color's alpha channel affects the grid's opacity. + +---- + +.. _class_EditorSettings_property_editors/3d/primary_grid_steps: + +- :ref:`int` **editors/3d/primary_grid_steps** + +If set above 0, where a primary grid line should be drawn. By default, primary lines are configured to be more visible than secondary lines. This helps with measurements in the 3D editor. See also :ref:`editors/3d/primary_grid_color` and :ref:`editors/3d/secondary_grid_color`. + +---- + +.. _class_EditorSettings_property_editors/3d/secondary_grid_color: + +- :ref:`Color` **editors/3d/secondary_grid_color** + +The color to use for the secondary 3D grid. This is generally a less visible color than :ref:`editors/3d/primary_grid_color`. The color's alpha channel affects the grid's opacity. + +---- + +.. _class_EditorSettings_property_editors/3d/selection_box_color: + +- :ref:`Color` **editors/3d/selection_box_color** + +The color to use for the selection box that surrounds selected nodes in the 3D editor viewport. The color's alpha channel influences the selection box's opacity. + +---- + +.. _class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/instantiated: + +- :ref:`Color` **editors/3d_gizmos/gizmo_colors/instantiated** + +The color override to use for 3D editor gizmos if the :ref:`Node3D` in question is part of an instanced scene file (from the perspective of the current scene). + +---- + +.. _class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/joint: + +- :ref:`Color` **editors/3d_gizmos/gizmo_colors/joint** + +The 3D editor gizmo color for :ref:`Joint3D`\ s and :ref:`PhysicalBone3D`\ s. + +---- + +.. _class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/shape: + +- :ref:`Color` **editors/3d_gizmos/gizmo_colors/shape** + +The 3D editor gizmo color for :ref:`CollisionShape3D`\ s, :ref:`VehicleWheel3D`\ s, :ref:`RayCast3D`\ s and :ref:`SpringArm3D`\ s. + +---- + +.. _class_EditorSettings_property_editors/animation/autorename_animation_tracks: + +- :ref:`bool` **editors/animation/autorename_animation_tracks** + +If ``true``, automatically updates animation tracks' target paths when renaming or reparenting nodes in the Scene tree dock. + +---- + +.. _class_EditorSettings_property_editors/animation/confirm_insert_track: + +- :ref:`bool` **editors/animation/confirm_insert_track** + +If ``true``, display a confirmation dialog when adding a new track to an animation by pressing the "key" icon next to a property. + +---- + +.. _class_EditorSettings_property_editors/animation/default_create_bezier_tracks: + +- :ref:`bool` **editors/animation/default_create_bezier_tracks** + +If ``true``, create a Bezier track instead of a standard track when pressing the "key" icon next to a property. Bezier tracks provide more control over animation curves, but are more difficult to adjust quickly. + +---- + +.. _class_EditorSettings_property_editors/animation/default_create_reset_tracks: + +- :ref:`bool` **editors/animation/default_create_reset_tracks** + +If ``true``, create a ``RESET`` track when creating a new animation track. This track can be used to restore the animation to a "default" state. + +---- + +.. _class_EditorSettings_property_editors/animation/onion_layers_future_color: + +- :ref:`Color` **editors/animation/onion_layers_future_color** + +The modulate color to use for "future" frames displayed in the animation editor's onion skinning feature. + +---- + +.. _class_EditorSettings_property_editors/animation/onion_layers_past_color: + +- :ref:`Color` **editors/animation/onion_layers_past_color** + +The modulate color to use for "past" frames displayed in the animation editor's onion skinning feature. + +---- + +.. _class_EditorSettings_property_editors/grid_map/pick_distance: + +- :ref:`float` **editors/grid_map/pick_distance** + +The maximum distance at which tiles can be placed on a GridMap, relative to the camera position (in 3D units). + +---- + +.. _class_EditorSettings_property_editors/panning/2d_editor_pan_speed: + +- :ref:`int` **editors/panning/2d_editor_pan_speed** + +The panning speed when using the mouse wheel or touchscreen events in the 2D editor. This setting does not apply to panning by holding down the middle or right mouse buttons. + +---- + +.. _class_EditorSettings_property_editors/panning/2d_editor_panning_scheme: + +- :ref:`int` **editors/panning/2d_editor_panning_scheme** + +Controls whether the mouse wheel scroll zooms or pans in the 2D editor. See also :ref:`editors/panning/sub_editors_panning_scheme` and :ref:`editors/panning/animation_editors_panning_scheme`. + +---- + +.. _class_EditorSettings_property_editors/panning/animation_editors_panning_scheme: + +- :ref:`int` **editors/panning/animation_editors_panning_scheme** + +Controls whether the mouse wheel scroll zooms or pans in the animation track and Bezier editors. See also :ref:`editors/panning/2d_editor_panning_scheme` and :ref:`editors/panning/sub_editors_panning_scheme` (which controls the animation blend tree editor's pan behavior). + +---- + +.. _class_EditorSettings_property_editors/panning/simple_panning: + +- :ref:`bool` **editors/panning/simple_panning** + +If ``true``, allows panning by holding down :kbd:`Space` in the 2D editor viewport (in addition to panning with the middle or right mouse buttons). If ``false``, the left mouse button must be held down while holding down :kbd:`Space` to pan in the 2D editor viewport. + +---- + +.. _class_EditorSettings_property_editors/panning/sub_editors_panning_scheme: + +- :ref:`int` **editors/panning/sub_editors_panning_scheme** + +Controls whether the mouse wheel scroll zooms or pans in subeditors. The list of affected subeditors is: animation blend tree editor, :ref:`Polygon2D` editor, tileset editor, texture region editor, visual shader editor and visual script editor. See also :ref:`editors/panning/2d_editor_panning_scheme` and :ref:`editors/panning/animation_editors_panning_scheme`. + +---- + +.. _class_EditorSettings_property_editors/panning/warped_mouse_panning: + +- :ref:`bool` **editors/panning/warped_mouse_panning** + +If ``true``, warps the mouse around the 2D viewport while panning in the 2D editor. This makes it possible to pan over a large area without having to exit panning then mouse the mouse back constantly. + +---- + +.. _class_EditorSettings_property_editors/polygon_editor/point_grab_radius: + +- :ref:`int` **editors/polygon_editor/point_grab_radius** + +The radius in which points can be selected in the :ref:`Polygon2D` and :ref:`CollisionPolygon2D` editors (in pixels). Higher values make it easier to select points quickly, but can make it more difficult to select the expected point when several points are located close to each other. + +---- + +.. _class_EditorSettings_property_editors/polygon_editor/show_previous_outline: + +- :ref:`bool` **editors/polygon_editor/show_previous_outline** + +If ``true``, displays the polygon's previous shape in the 2D polygon editors with an opaque gray outline. This outline is displayed while dragging a point until the left mouse button is released. + +---- + +.. _class_EditorSettings_property_editors/tiles_editor/display_grid: + +- :ref:`bool` **editors/tiles_editor/display_grid** + +If ``true``, displays a grid while the TileMap editor is active. See also :ref:`editors/tiles_editor/grid_color`. + +---- + +.. _class_EditorSettings_property_editors/tiles_editor/grid_color: + +- :ref:`Color` **editors/tiles_editor/grid_color** + +The color to use for the TileMap editor's grid. + +\ **Note:** Only effective if :ref:`editors/tiles_editor/display_grid` is ``true``. + +---- + +.. _class_EditorSettings_property_editors/visual_editors/lines_curvature: + +- :ref:`float` **editors/visual_editors/lines_curvature** + +The curvature to use for connection lines in the visual script and visual shader editors. Higher values will make connection lines appear more curved, with values above ``0.5`` resulting in more "angular" turns in the middle of connection lines. + +---- + +.. _class_EditorSettings_property_editors/visual_editors/minimap_opacity: + +- :ref:`float` **editors/visual_editors/minimap_opacity** + +The opacity of the minimap displayed in the bottom-right corner of the visual script and visual shader editors. + +---- + +.. _class_EditorSettings_property_editors/visual_editors/visual_shader/port_preview_size: + +- :ref:`int` **editors/visual_editors/visual_shader/port_preview_size** + +The size to use for port previews in the visual shader uniforms (toggled by clicking the "eye" icon next to an output). The value is defined in pixels at 100% zoom, and will scale with zoom automatically. + +---- + +.. _class_EditorSettings_property_filesystem/directories/autoscan_project_path: + +- :ref:`String` **filesystem/directories/autoscan_project_path** + +The folder where projects should be scanned for (recursively), in a way similar to the project manager's **Scan**\ button. This can be set to the same value as :ref:`filesystem/directories/default_project_path` for convenience. + +\ **Note:** Setting this path to a folder with very large amounts of files/folders can slow down the project manager startup significantly. To keep the project manager quick to start up, it is recommended to set this value to a folder as "specific" as possible. + +---- + +.. _class_EditorSettings_property_filesystem/directories/default_project_path: + +- :ref:`String` **filesystem/directories/default_project_path** + +The folder where new projects should be created by default when clicking the project manager's **New Project** button. This can be set to the same value as :ref:`filesystem/directories/autoscan_project_path` for convenience. + +---- + +.. _class_EditorSettings_property_filesystem/file_dialog/display_mode: + +- :ref:`int` **filesystem/file_dialog/display_mode** + +The display mode to use in the editor's file dialogs. + +- **Thumbnails** takes more space, but displays dynamic resource thumbnails, making resources easier to preview without having to open them. + +- **List** is more compact but doesn't display dynamic resource thumbnails. Instead, it displays static icons based on the file extension. + +---- + +.. _class_EditorSettings_property_filesystem/file_dialog/show_hidden_files: + +- :ref:`bool` **filesystem/file_dialog/show_hidden_files** + +If ``true``, display hidden files in the editor's file dialogs. Files that have names starting with ``.`` are considered hidden (e.g. ``.hidden_file``). + +---- + +.. _class_EditorSettings_property_filesystem/file_dialog/thumbnail_size: + +- :ref:`int` **filesystem/file_dialog/thumbnail_size** + +The thumbnail size to use in the editor's file dialogs (in pixels). See also :ref:`docks/filesystem/thumbnail_size`. + +---- + +.. _class_EditorSettings_property_filesystem/on_save/compress_binary_resources: + +- :ref:`bool` **filesystem/on_save/compress_binary_resources** + +If ``true``, uses lossless compression for binary resources. + +---- + +.. _class_EditorSettings_property_filesystem/on_save/safe_save_on_backup_then_rename: + +- :ref:`bool` **filesystem/on_save/safe_save_on_backup_then_rename** + +If ``true``, when saving a file, the editor will rename the old file to a different name, save a new file, then only remove the old file once the new file has been saved. This makes loss of data less likely to happen if the editor or operating system exits unexpectedly while saving (e.g. due to a crash or power outage). + +\ **Note:** On Windows, this feature can interact negatively with certain antivirus programs. In this case, you may have to set this to ``false`` to prevent file locking issues. + +---- + +.. _class_EditorSettings_property_interface/editor/automatically_open_screenshots: + +- :ref:`bool` **interface/editor/automatically_open_screenshots** + +If ``true``, automatically opens screenshots with the default program associated to ``.png`` files after a screenshot is taken using the **Editor > Take Screenshot** action. + +---- + +.. _class_EditorSettings_property_interface/editor/code_font: + +- :ref:`String` **interface/editor/code_font** + +The font to use for the script editor. Must be a resource of a :ref:`Font` type such as a ``.ttf`` or ``.otf`` font file. + +---- + +.. _class_EditorSettings_property_interface/editor/code_font_contextual_ligatures: + +- :ref:`int` **interface/editor/code_font_contextual_ligatures** + +The font ligatures to enable for the currently configured code font. Not all fonts include support for ligatures. + +\ **Note:** The default editor code font (`JetBrains Mono `__) has contextual ligatures in its font file. + +---- + +.. _class_EditorSettings_property_interface/editor/code_font_custom_opentype_features: + +- :ref:`String` **interface/editor/code_font_custom_opentype_features** + +List of custom OpenType features to use, if supported by the currently configured code font. Not all fonts include support for custom OpenType features. The string should follow the OpenType specification. + +\ **Note:** The default editor code font (`JetBrains Mono `__) has custom OpenType features in its font file, but there is no documented list yet. + +---- + +.. _class_EditorSettings_property_interface/editor/code_font_custom_variations: + +- :ref:`String` **interface/editor/code_font_custom_variations** + +List of alternative characters to use, if supported by the currently configured code font. Not all fonts include support for custom variations. The string should follow the OpenType specification. + +\ **Note:** The default editor code font (`JetBrains Mono `__) has alternate characters in its font file, but there is no documented list yet. + +---- + +.. _class_EditorSettings_property_interface/editor/code_font_size: + +- :ref:`int` **interface/editor/code_font_size** + +The size of the font in the script editor. This setting does not impact the font size of the Output panel (see :ref:`run/output/font_size`). + +---- + +.. _class_EditorSettings_property_interface/editor/custom_display_scale: + +- :ref:`float` **interface/editor/custom_display_scale** + +The custom editor scale factor to use. This can be used for displays with very high DPI where a scale factor of 200% is not sufficient. + +\ **Note:** Only effective if :ref:`interface/editor/display_scale` is set to **Custom**. + +---- + +.. _class_EditorSettings_property_interface/editor/debug/enable_pseudolocalization: + +- :ref:`bool` **interface/editor/debug/enable_pseudolocalization** + +If ``true``, lengthens the editor's localizable strings and replaces their characters with accented variants. This allows spotting non-localizable strings easily, while also ensuring the UI layout doesn't break when strings are made longer (as many languages require strings to be longer). + +This is a debugging feature and should only be enabled when working on the editor itself. + +---- + +.. _class_EditorSettings_property_interface/editor/display_scale: + +- :ref:`int` **interface/editor/display_scale** + +The display scale factor to use for the editor interface. Higher values are more suited to hiDPI/Retina displays. + +If set to **Auto**, the editor scale is automatically determined based on the screen resolution and reported display DPI. This heuristic is not always ideal, which means you can get better results by setting the editor scale manually. + +If set to **Custom**, the scaling value in :ref:`interface/editor/custom_display_scale` will be used. + +---- + +.. _class_EditorSettings_property_interface/editor/editor_language: + +- :ref:`String` **interface/editor/editor_language** + +The language to use for the editor interface. + +Translations are provided by the community. If you spot a mistake, `contribute to editor translations on Weblate! `__ + +---- + +.. _class_EditorSettings_property_interface/editor/expand_to_title: + +- :ref:`bool` **interface/editor/expand_to_title** + +Expanding main editor window content to the title, if supported by :ref:`DisplayServer`. See :ref:`DisplayServer.WINDOW_FLAG_EXTEND_TO_TITLE`. + +Specific to the macOS platform. + +---- + +.. _class_EditorSettings_property_interface/editor/font_antialiasing: + +- :ref:`int` **interface/editor/font_antialiasing** + +FreeType's font anti-aliasing mode used to render the editor fonts. Most fonts are not designed to look good with anti-aliasing disabled, so it's recommended to leave this enabled unless you're using a pixel art font. + +---- + +.. _class_EditorSettings_property_interface/editor/font_hinting: + +- :ref:`int` **interface/editor/font_hinting** + +The font hinting mode to use for the editor fonts. FreeType supports the following font hinting modes: + +- **None:** Don't use font hinting when rasterizing the font. This results in a smooth font, but it can look blurry. + +- **Light:** Use hinting on the X axis only. This is a compromise between font sharpness and smoothness. + +- **Normal:** Use hinting on both X and Y axes. This results in a sharp font, but it doesn't look very smooth. + +If set to **Auto**, the font hinting mode will be set to match the current operating system in use. This means the **Light** hinting mode will be used on Windows and Linux, and the **None** hinting mode will be used on macOS. + +---- + +.. _class_EditorSettings_property_interface/editor/font_subpixel_positioning: + +- :ref:`int` **interface/editor/font_subpixel_positioning** + +The subpixel positioning mode to use when rendering editor font glyphs. This affects both the main and code fonts. **Disabled** is the fastest to render and uses the least memory. **Auto** only uses subpixel positioning for small font sizes (where the benefit is the most noticeable). **One half of a pixel** and **One quarter of a pixel** force the same subpixel positioning mode for all editor fonts, regardless of their size (with **One quarter of a pixel** being the highest-quality option). + +---- + +.. _class_EditorSettings_property_interface/editor/low_processor_mode_sleep_usec: + +- :ref:`float` **interface/editor/low_processor_mode_sleep_usec** + +The amount of sleeping between frames when the low-processor usage mode is enabled (in microseconds). Higher values will result in lower CPU/GPU usage, which can improve battery life on laptops. However, higher values will result in a less responsive editor. The default value is set to allow for maximum smoothness on monitors up to 144 Hz. See also :ref:`interface/editor/unfocused_low_processor_mode_sleep_usec`. + +---- + +.. _class_EditorSettings_property_interface/editor/main_font: + +- :ref:`String` **interface/editor/main_font** + +The font to use for the editor interface. Must be a resource of a :ref:`Font` type such as a ``.ttf`` or ``.otf`` font file. + +---- + +.. _class_EditorSettings_property_interface/editor/main_font_bold: + +- :ref:`String` **interface/editor/main_font_bold** + +The font to use for bold text in the editor interface. Must be a resource of a :ref:`Font` type such as a ``.ttf`` or ``.otf`` font file. + +---- + +.. _class_EditorSettings_property_interface/editor/main_font_size: + +- :ref:`int` **interface/editor/main_font_size** + +The size of the font in the editor interface. + +---- + +.. _class_EditorSettings_property_interface/editor/mouse_extra_buttons_navigate_history: + +- :ref:`bool` **interface/editor/mouse_extra_buttons_navigate_history** + +If ``true``, the mouse's additional side buttons will be usable to navigate in the script editor's file history. Set this to ``false`` if you're using the side buttons for other purposes (such as a push-to-talk button in a VoIP program). + +---- + +.. _class_EditorSettings_property_interface/editor/save_each_scene_on_quit: + +- :ref:`bool` **interface/editor/save_each_scene_on_quit** + +If ``true``, the editor will save all scenes when confirming the **Save** action when quitting the editor or quitting to the project list. If ``false``, the editor will ask to save each scene individually. + +---- + +.. _class_EditorSettings_property_interface/editor/separate_distraction_mode: + +- :ref:`bool` **interface/editor/separate_distraction_mode** + +If ``true``, the editor's Script tab will have a separate distraction mode setting from the 2D/3D/AssetLib tabs. If ``false``, the distraction-free mode toggle is shared between all tabs. + +---- + +.. _class_EditorSettings_property_interface/editor/show_internal_errors_in_toast_notifications: + +- :ref:`int` **interface/editor/show_internal_errors_in_toast_notifications** + +If enabled, displays internal engine errors in toast notifications (toggleable by clicking the "bell" icon at the bottom of the editor). No matter the value of this setting, non-internal engine errors will always be visible in toast notifications. + +The default **Auto** value will only enable this if the editor was compiled with the ``dev=yes`` option (the default is ``dev=no``). + +---- + +.. _class_EditorSettings_property_interface/editor/single_window_mode: + +- :ref:`bool` **interface/editor/single_window_mode** + +If ``true``, embed modal windows such as docks inside the main editor window. When single-window mode is enabled, tooltips will also be embedded inside the main editor window, which means they can't be displayed outside of the editor window. + +---- + +.. _class_EditorSettings_property_interface/editor/unfocused_low_processor_mode_sleep_usec: + +- :ref:`float` **interface/editor/unfocused_low_processor_mode_sleep_usec** + +When the editor window is unfocused, the amount of sleeping between frames when the low-processor usage mode is enabled (in microseconds). Higher values will result in lower CPU/GPU usage, which can improve battery life on laptops (in addition to improving the running project's performance if the editor has to redraw continuously). However, higher values will result in a less responsive editor. The default value is set to limit the editor to 20 FPS when the editor window is unfocused. See also :ref:`interface/editor/low_processor_mode_sleep_usec`. + +---- + +.. _class_EditorSettings_property_interface/editor/use_embedded_menu: + +- :ref:`bool` **interface/editor/use_embedded_menu** + +If ``true``, editor main menu is using embedded :ref:`MenuBar` instead of system global menu. + +Specific to the macOS platform. + +---- + +.. _class_EditorSettings_property_interface/inspector/max_array_dictionary_items_per_page: + +- :ref:`int` **interface/inspector/max_array_dictionary_items_per_page** + +The number of :ref:`Array` or :ref:`Dictionary` items to display on each "page" in the inspector. Higher values allow viewing more values per page, but take more time to load. This increased load time is noticeable when selecting nodes that have array or dictionary properties in the editor. + +---- + +.. _class_EditorSettings_property_interface/inspector/show_low_level_opentype_features: + +- :ref:`bool` **interface/inspector/show_low_level_opentype_features** + +If ``true``, display OpenType features marked as ``hidden`` by the font file in the :ref:`Font` editor. + +---- + +.. _class_EditorSettings_property_interface/scene_tabs/display_close_button: + +- :ref:`int` **interface/scene_tabs/display_close_button** + +Controls when the Close (X) button is displayed on scene tabs at the top of the editor. + +---- + +.. _class_EditorSettings_property_interface/scene_tabs/maximum_width: + +- :ref:`int` **interface/scene_tabs/maximum_width** + +The maximum width of each scene tab at the top editor (in pixels). + +---- + +.. _class_EditorSettings_property_interface/scene_tabs/show_script_button: + +- :ref:`bool` **interface/scene_tabs/show_script_button** + +If ``true``, show a button next to each scene tab that opens the scene's "dominant" script when clicked. The "dominant" script is the one that is at the highest level in the scene's hierarchy. + +---- + +.. _class_EditorSettings_property_interface/scene_tabs/show_thumbnail_on_hover: + +- :ref:`bool` **interface/scene_tabs/show_thumbnail_on_hover** + +If ``true``, display an automatically-generated thumbnail when hovering scene tabs with the mouse. Scene thumbnails are generated when saving the scene. + +---- + +.. _class_EditorSettings_property_interface/theme/accent_color: + +- :ref:`Color` **interface/theme/accent_color** + +The color to use for "highlighted" user interface elements in the editor (pressed and hovered items). + +---- + +.. _class_EditorSettings_property_interface/theme/additional_spacing: + +- :ref:`float` **interface/theme/additional_spacing** + +The spacing to add for buttons and list items in the editor (in pixels). Increasing this value is useful to improve usability on touch screens, at the cost of reducing the amount of usable screen real estate. + +---- + +.. _class_EditorSettings_property_interface/theme/base_color: + +- :ref:`Color` **interface/theme/base_color** + +The base color to use for user interface elements in the editor. Secondary colors (such as darker/lighter variants) are derived from this color. + +---- + +.. _class_EditorSettings_property_interface/theme/border_size: + +- :ref:`int` **interface/theme/border_size** + +The border size to use for interface elements (in pixels). + +---- + +.. _class_EditorSettings_property_interface/theme/contrast: + +- :ref:`float` **interface/theme/contrast** + +The contrast factor to use when deriving the editor theme's base color (see :ref:`interface/theme/base_color`). When using a positive values, the derived colors will be *darker* than the base color. This contrast factor can be set to a negative value, which will make the derived colors *brighter* than the base color. Negative contrast rates often look better for light themes. + +---- + +.. _class_EditorSettings_property_interface/theme/corner_radius: + +- :ref:`int` **interface/theme/corner_radius** + +The corner radius to use for interface elements (in pixels). ``0`` is square. + +---- + +.. _class_EditorSettings_property_interface/theme/custom_theme: + +- :ref:`String` **interface/theme/custom_theme** + +The custom theme resource to use for the editor. Must be a Godot theme resource in ``.tres`` or ``.res`` format. + +---- + +.. _class_EditorSettings_property_interface/theme/icon_and_font_color: + +- :ref:`int` **interface/theme/icon_and_font_color** + +The icon and font color scheme to use in the editor. + +- **Auto** determines the color scheme to use automatically based on :ref:`interface/theme/base_color`. + +- **Dark** makes fonts and icons light (suitable for dark themes). + +- **Light** makes fonts and icons dark (suitable for light themes). Icon colors are automatically converted by the editor following `this set of rules `__. + +---- + +.. _class_EditorSettings_property_interface/theme/icon_saturation: + +- :ref:`float` **interface/theme/icon_saturation** + +The saturation to use for editor icons. Higher values result in more vibrant colors. + +\ **Note:** The default editor icon saturation was increased by 30% in Godot 4.0 and later. To get Godot 3.x's icon saturation back, set :ref:`interface/theme/icon_saturation` to ``0.77``. + +---- + +.. _class_EditorSettings_property_interface/theme/preset: + +- :ref:`String` **interface/theme/preset** + +The editor theme preset to use. + +---- + +.. _class_EditorSettings_property_interface/theme/relationship_line_opacity: + +- :ref:`float` **interface/theme/relationship_line_opacity** + +The opacity to use when drawing relationship lines in the editor's :ref:`Tree`-based GUIs (such as the Scene tree dock). + +---- + +.. _class_EditorSettings_property_network/debug/remote_host: + +- :ref:`String` **network/debug/remote_host** + +The address to listen to when starting the remote debugger. This can be set to ``0.0.0.0`` to allow external clients to connect to the remote debugger (instead of restricting the remote debugger to connections from ``localhost``). + +---- + +.. _class_EditorSettings_property_network/debug/remote_port: + +- :ref:`int` **network/debug/remote_port** + +The port to listen to when starting the remote debugger. Godot will try to use port numbers above the configured number if the configured number is already taken by another application. + +---- + +.. _class_EditorSettings_property_network/http_proxy/host: + +- :ref:`String` **network/http_proxy/host** + +The host to use to contact the HTTP and HTTPS proxy in the editor (for the asset library and export template downloads). See also :ref:`network/http_proxy/port`. + +\ **Note:** Godot currently doesn't automatically use system proxy settings, so you have to enter them manually here if needed. + +---- + +.. _class_EditorSettings_property_network/http_proxy/port: + +- :ref:`int` **network/http_proxy/port** + +The port number to use to contact the HTTP and HTTPS proxy in the editor (for the asset library and export template downloads). See also :ref:`network/http_proxy/host`. + +\ **Note:** Godot currently doesn't automatically use system proxy settings, so you have to enter them manually here if needed. + +---- + +.. _class_EditorSettings_property_network/ssl/editor_ssl_certificates: + +- :ref:`String` **network/ssl/editor_ssl_certificates** + +The SSL certificate bundle to use for HTTP requests made within the editor (e.g. from the AssetLib tab). If left empty, the `included Mozilla certificate bundle `__ will be used. + +---- + +.. _class_EditorSettings_property_project_manager/sorting_order: + +- :ref:`int` **project_manager/sorting_order** + +The sorting order to use in the project manager. When changing the sorting order in the project manager, this setting is set permanently in the editor settings. + +---- + +.. _class_EditorSettings_property_run/auto_save/save_before_running: + +- :ref:`bool` **run/auto_save/save_before_running** + +If ``true``, saves all scenes and scripts automatically before running the project. Setting this to ``false`` prevents the editor from saving if there are no changes which can speed up the project startup slightly, but it makes it possible to run a project that has unsaved changes. (Unsaved changes will not be visible in the running project.) + +---- + +.. _class_EditorSettings_property_run/output/always_clear_output_on_play: + +- :ref:`bool` **run/output/always_clear_output_on_play** + +If ``true``, the editor will clear the Output panel when running the project. + +---- + +.. _class_EditorSettings_property_run/output/always_close_output_on_stop: + +- :ref:`bool` **run/output/always_close_output_on_stop** + +If ``true``, the editor will collapse the Output panel when stopping the project. + +---- + +.. _class_EditorSettings_property_run/output/always_open_output_on_play: + +- :ref:`bool` **run/output/always_open_output_on_play** + +If ``true``, the editor will expand the Output panel when running the project. + +---- + +.. _class_EditorSettings_property_run/output/font_size: + +- :ref:`int` **run/output/font_size** + +The size of the font in the **Output** panel at the bottom of the editor. This setting does not impact the font size of the script editor (see :ref:`interface/editor/code_font_size`). + +---- + +.. _class_EditorSettings_property_run/window_placement/rect: + +- :ref:`int` **run/window_placement/rect** + +The window mode to use to display the project when starting the project from the editor. + +---- + +.. _class_EditorSettings_property_run/window_placement/rect_custom_position: + +- :ref:`Vector2` **run/window_placement/rect_custom_position** + +The custom position to use when starting the project from the editor (in pixels from the top-left corner). Only effective if :ref:`run/window_placement/rect` is set to **Custom Position**. + +---- + +.. _class_EditorSettings_property_run/window_placement/screen: + +- :ref:`int` **run/window_placement/screen** + +The monitor to display the project on when starting the project from the editor. + +---- + +.. _class_EditorSettings_property_text_editor/appearance/caret/caret_blink: + +- :ref:`bool` **text_editor/appearance/caret/caret_blink** + +If ``true``, makes the caret blink according to :ref:`text_editor/appearance/caret/caret_blink_speed`. Disabling this setting can improve battery life on laptops if you spend long amounts of time in the script editor, since it will reduce the frequency at which the editor needs to be redrawn. + +---- + +.. _class_EditorSettings_property_text_editor/appearance/caret/caret_blink_speed: + +- :ref:`float` **text_editor/appearance/caret/caret_blink_speed** + +The interval at which to blink the caret (in seconds). See also :ref:`text_editor/appearance/caret/caret_blink`. + +---- + +.. _class_EditorSettings_property_text_editor/appearance/caret/highlight_all_occurrences: + +- :ref:`bool` **text_editor/appearance/caret/highlight_all_occurrences** + +If ``true``, highlights all occurrences of the currently selected text in the script editor. See also :ref:`text_editor/theme/highlighting/word_highlighted_color`. + +---- + +.. _class_EditorSettings_property_text_editor/appearance/caret/highlight_current_line: + +- :ref:`bool` **text_editor/appearance/caret/highlight_current_line** + +If ``true``, colors the background of the line the caret is currently on with :ref:`text_editor/theme/highlighting/current_line_color`. + +---- + +.. _class_EditorSettings_property_text_editor/appearance/caret/type: + +- :ref:`int` **text_editor/appearance/caret/type** + +The shape of the caret to use in the script editor. **Line** displays a vertical line to the left of the current character, whereas **Block** displays a outline over the current character. + +---- + +.. _class_EditorSettings_property_text_editor/appearance/guidelines/line_length_guideline_hard_column: + +- :ref:`int` **text_editor/appearance/guidelines/line_length_guideline_hard_column** + +The column at which to display a subtle line as a line length guideline for scripts. This should generally be greater than :ref:`text_editor/appearance/guidelines/line_length_guideline_soft_column`. + +---- + +.. _class_EditorSettings_property_text_editor/appearance/guidelines/line_length_guideline_soft_column: + +- :ref:`int` **text_editor/appearance/guidelines/line_length_guideline_soft_column** + +The column at which to display a *very* subtle line as a line length guideline for scripts. This should generally be lower than :ref:`text_editor/appearance/guidelines/line_length_guideline_hard_column`. + +---- + +.. _class_EditorSettings_property_text_editor/appearance/guidelines/show_line_length_guidelines: + +- :ref:`bool` **text_editor/appearance/guidelines/show_line_length_guidelines** + +If ``true``, displays line length guidelines to help you keep line lengths in check. See also :ref:`text_editor/appearance/guidelines/line_length_guideline_soft_column` and :ref:`text_editor/appearance/guidelines/line_length_guideline_hard_column`. + +---- + +.. _class_EditorSettings_property_text_editor/appearance/gutters/highlight_type_safe_lines: + +- :ref:`bool` **text_editor/appearance/gutters/highlight_type_safe_lines** + +If ``true``, highlights type-safe lines by displaying their line number color with :ref:`text_editor/theme/highlighting/safe_line_number_color` instead of :ref:`text_editor/theme/highlighting/line_number_color`. Type-safe lines are lines of code where the type of all variables is known at compile-time. These type-safe lines will run faster in Godot 4.0 and later thanks to typed instructions. + +---- + +.. _class_EditorSettings_property_text_editor/appearance/gutters/line_numbers_zero_padded: + +- :ref:`bool` **text_editor/appearance/gutters/line_numbers_zero_padded** + +If ``true``, displays line numbers with zero padding (e.g. ``007`` instead of ``7``). + +---- + +.. _class_EditorSettings_property_text_editor/appearance/gutters/show_bookmark_gutter: + +- :ref:`bool` **text_editor/appearance/gutters/show_bookmark_gutter** + +If ``true``, displays a gutter at the left containing icons for bookmarks. + +---- + +.. _class_EditorSettings_property_text_editor/appearance/gutters/show_info_gutter: + +- :ref:`bool` **text_editor/appearance/gutters/show_info_gutter** + +If ``true``, displays a gutter at the left containing icons for methods with signal connections. + +---- + +.. _class_EditorSettings_property_text_editor/appearance/gutters/show_line_numbers: + +- :ref:`bool` **text_editor/appearance/gutters/show_line_numbers** + +If ``true``, displays line numbers in the gutter at the left. + +---- + +.. _class_EditorSettings_property_text_editor/appearance/lines/code_folding: + +- :ref:`bool` **text_editor/appearance/lines/code_folding** + +If ``true``, displays the folding arrows next to indented code sections and allows code folding. If ``false``, hides the folding arrows next to indented code sections and disallows code folding. + +---- + +.. _class_EditorSettings_property_text_editor/appearance/lines/word_wrap: + +- :ref:`int` **text_editor/appearance/lines/word_wrap** + +If ``true``, wraps long lines over multiple lines to avoid horizontal scrolling. This is a display-only feature; it does not actually insert line breaks in your scripts. + +---- + +.. _class_EditorSettings_property_text_editor/appearance/minimap/minimap_width: + +- :ref:`int` **text_editor/appearance/minimap/minimap_width** + +The width of the minimap in the script editor (in pixels). + +---- + +.. _class_EditorSettings_property_text_editor/appearance/minimap/show_minimap: + +- :ref:`bool` **text_editor/appearance/minimap/show_minimap** + +If ``true``, draws an overview of the script near the scroll bar. The minimap can be left-clicked to scroll directly to a location in an "absolute" manner. + +---- + +.. _class_EditorSettings_property_text_editor/appearance/whitespace/draw_spaces: + +- :ref:`bool` **text_editor/appearance/whitespace/draw_spaces** + +If ``true``, draws space characters as centered points. + +---- + +.. _class_EditorSettings_property_text_editor/appearance/whitespace/draw_tabs: + +- :ref:`bool` **text_editor/appearance/whitespace/draw_tabs** + +If ``true``, draws tab characters as chevrons. + +---- + +.. _class_EditorSettings_property_text_editor/appearance/whitespace/line_spacing: + +- :ref:`int` **text_editor/appearance/whitespace/line_spacing** + +The space to add between lines (in pixels). Greater line spacing can help improve readability at the cost of displaying fewer lines on screen. + +---- + +.. _class_EditorSettings_property_text_editor/behavior/files/auto_reload_scripts_on_external_change: + +- :ref:`bool` **text_editor/behavior/files/auto_reload_scripts_on_external_change** + +If ``true``, automatically reloads scripts in the editor when they have been modified and saved by external editors. + +---- + +.. _class_EditorSettings_property_text_editor/behavior/files/autosave_interval_secs: + +- :ref:`int` **text_editor/behavior/files/autosave_interval_secs** + +If set to a value greater than ``0``, automatically saves the current script following the specified interval (in seconds). This can be used to prevent data loss if the editor crashes. + +---- + +.. _class_EditorSettings_property_text_editor/behavior/files/convert_indent_on_save: + +- :ref:`bool` **text_editor/behavior/files/convert_indent_on_save** + +If ``true``, converts indentation to match the script editor's indentation settings when saving a script. See also :ref:`text_editor/behavior/indent/type`. + +---- + +.. _class_EditorSettings_property_text_editor/behavior/files/restore_scripts_on_load: + +- :ref:`bool` **text_editor/behavior/files/restore_scripts_on_load** + +If ``true``, reopens scripts that were opened in the last session when the editor is reopened on a given project. + +---- + +.. _class_EditorSettings_property_text_editor/behavior/files/trim_trailing_whitespace_on_save: + +- :ref:`bool` **text_editor/behavior/files/trim_trailing_whitespace_on_save** + +If ``true``, trims trailing whitespace when saving a script. Trailing whitespace refers to tab and space characters placed at the end of lines. Since these serve no practical purpose, they can and should be removed to make version control diffs less noisy. + +---- + +.. _class_EditorSettings_property_text_editor/behavior/indent/auto_indent: + +- :ref:`bool` **text_editor/behavior/indent/auto_indent** + +If ``true``, automatically indents code when pressing the :kbd:`Enter` key based on blocks above the new line. + +---- + +.. _class_EditorSettings_property_text_editor/behavior/indent/size: + +- :ref:`int` **text_editor/behavior/indent/size** + +When using tab indentation, determines the length of each tab. When using space indentation, determines how many spaces are inserted when pressing :kbd:`Tab` and when automatic indentation is performed. + +---- + +.. _class_EditorSettings_property_text_editor/behavior/indent/type: + +- :ref:`int` **text_editor/behavior/indent/type** + +The indentation style to use (tabs or spaces). + +\ **Note:** The `GDScript style guide `__ recommends using tabs for indentation. It is advised to change this setting only if you need to work on a project that currently uses spaces for indentation. + +---- + +.. _class_EditorSettings_property_text_editor/behavior/navigation/drag_and_drop_selection: + +- :ref:`bool` **text_editor/behavior/navigation/drag_and_drop_selection** + +If ``true``, allows drag-and-dropping text in the script editor to move text. Disable this if you find yourself accidentally drag-and-dropping text in the script editor. + +---- + +.. _class_EditorSettings_property_text_editor/behavior/navigation/move_caret_on_right_click: + +- :ref:`bool` **text_editor/behavior/navigation/move_caret_on_right_click** + +If ``true``, the caret will be moved when right-clicking somewhere in the script editor (like when left-clicking or middle-clicking). If ``false``, the caret will only be moved when left-clicking or middle-clicking somewhere. + +---- + +.. _class_EditorSettings_property_text_editor/behavior/navigation/scroll_past_end_of_file: + +- :ref:`bool` **text_editor/behavior/navigation/scroll_past_end_of_file** + +If ``true``, allows scrolling past the end of the file. + +---- + +.. _class_EditorSettings_property_text_editor/behavior/navigation/smooth_scrolling: + +- :ref:`bool` **text_editor/behavior/navigation/smooth_scrolling** + +If ``true``, allows scrolling in sub-line intervals and enables a smooth scrolling animation when using the mouse wheel to scroll. + +\ **Note:** :ref:`text_editor/behavior/navigation/smooth_scrolling` currently behaves poorly in projects where :ref:`ProjectSettings.physics/common/physics_ticks_per_second` has been increased significantly from its default value (``60``). In this case, it is recommended to disable this setting. + +---- + +.. _class_EditorSettings_property_text_editor/behavior/navigation/stay_in_script_editor_on_node_selected: + +- :ref:`bool` **text_editor/behavior/navigation/stay_in_script_editor_on_node_selected** + +If ``true``, prevents automatically switching between the Script and 2D/3D screens when selecting a node in the Scene tree dock. + +---- + +.. _class_EditorSettings_property_text_editor/behavior/navigation/v_scroll_speed: + +- :ref:`int` **text_editor/behavior/navigation/v_scroll_speed** + +The number of pixels to scroll with every mouse wheel increment. Higher values make the script scroll by faster when using the mouse wheel. + +\ **Note:** You can hold down :kbd:`Alt` while using the mouse wheel to temporarily scroll 5 times faster. + +---- + +.. _class_EditorSettings_property_text_editor/completion/add_type_hints: + +- :ref:`bool` **text_editor/completion/add_type_hints** + +If ``true``, adds static typing hints such as ``-> void`` and ``: int`` when performing method definition autocompletion. + +---- + +.. _class_EditorSettings_property_text_editor/completion/auto_brace_complete: + +- :ref:`bool` **text_editor/completion/auto_brace_complete** + +If ``true``, automatically completes braces when making use of code completion. + +---- + +.. _class_EditorSettings_property_text_editor/completion/code_complete_delay: + +- :ref:`float` **text_editor/completion/code_complete_delay** + +The delay in seconds after which autocompletion suggestions should be displayed when the user stops typing. + +---- + +.. _class_EditorSettings_property_text_editor/completion/complete_file_paths: + +- :ref:`bool` **text_editor/completion/complete_file_paths** + +If ``true``, provides autocompletion suggestions for file paths in methods such as ``load()`` and ``preload()``. + +---- + +.. _class_EditorSettings_property_text_editor/completion/idle_parse_delay: + +- :ref:`float` **text_editor/completion/idle_parse_delay** + +The delay in seconds after which the script editor should check for errors when the user stops typing. + +---- + +.. _class_EditorSettings_property_text_editor/completion/put_callhint_tooltip_below_current_line: + +- :ref:`bool` **text_editor/completion/put_callhint_tooltip_below_current_line** + +If ``true``, the code completion tooltip will appear below the current line unless there is no space on screen below the current line. If ``false``, the code completion tooltip will appear above the current line. + +---- + +.. _class_EditorSettings_property_text_editor/completion/use_single_quotes: + +- :ref:`bool` **text_editor/completion/use_single_quotes** + +If ``true``, performs string autocompletion with single quotes. If ``false``, performs string autocompletion with double quotes (which matches the `GDScript style guide `__). + +---- + +.. _class_EditorSettings_property_text_editor/help/class_reference_examples: + +- :ref:`int` **text_editor/help/class_reference_examples** + +Controls which multi-line code blocks should be displayed in the editor help. This setting does not affect single-line code literals in the editor help. + +---- + +.. _class_EditorSettings_property_text_editor/help/help_font_size: + +- :ref:`int` **text_editor/help/help_font_size** + +The font size to use for the editor help (built-in class reference). + +---- + +.. _class_EditorSettings_property_text_editor/help/help_source_font_size: + +- :ref:`int` **text_editor/help/help_source_font_size** + +The font size to use for code samples in the editor help (built-in class reference). + +---- + +.. _class_EditorSettings_property_text_editor/help/help_title_font_size: + +- :ref:`int` **text_editor/help/help_title_font_size** + +The font size to use for headings in the editor help (built-in class reference). + +---- + +.. _class_EditorSettings_property_text_editor/help/show_help_index: + +- :ref:`bool` **text_editor/help/show_help_index** + +If ``true``, displays a table of contents at the left of the editor help (at the location where the members overview would appear when editing a script). + +---- + +.. _class_EditorSettings_property_text_editor/script_list/show_members_overview: + +- :ref:`bool` **text_editor/script_list/show_members_overview** + +If ``true``, displays an overview of the current script's member variables and functions at the left of the script editor. See also :ref:`text_editor/script_list/sort_members_outline_alphabetically`. + +---- + +.. _class_EditorSettings_property_text_editor/script_list/sort_members_outline_alphabetically: + +- :ref:`bool` **text_editor/script_list/sort_members_outline_alphabetically** + +If ``true``, sorts the members outline (located at the left of the script editor) using alphabetical order. If ``false``, sorts the members outline depending on the order in which members are found in the script. + +\ **Note:** Only effective if :ref:`text_editor/script_list/show_members_overview` is ``true``. + +---- + +.. _class_EditorSettings_property_text_editor/theme/color_theme: + +- :ref:`String` **text_editor/theme/color_theme** + +The syntax theme to use in the script editor. + +You can save your own syntax theme from your current settings by using **File > Theme > Save As...** at the top of the script editor. The syntax theme will then be available locally in the list of color themes. + +You can find additional syntax themes to install in the `godot-syntax-themes `__ repository. + +---- + +.. _class_EditorSettings_property_text_editor/theme/highlighting/background_color: + +- :ref:`Color` **text_editor/theme/highlighting/background_color** + +The script editor's background color. If set to a translucent color, the editor theme's base color will be visible behind. + +---- + +.. _class_EditorSettings_property_text_editor/theme/highlighting/base_type_color: + +- :ref:`Color` **text_editor/theme/highlighting/base_type_color** + +The script editor's base type color (used for types like :ref:`Vector2`, :ref:`Vector3`, ...). + +---- + +.. _class_EditorSettings_property_text_editor/theme/highlighting/bookmark_color: + +- :ref:`Color` **text_editor/theme/highlighting/bookmark_color** + +The script editor's bookmark icon color (displayed in the gutter). + +---- + +.. _class_EditorSettings_property_text_editor/theme/highlighting/brace_mismatch_color: + +- :ref:`Color` **text_editor/theme/highlighting/brace_mismatch_color** + +The script editor's brace mismatch color. Used when the caret is currently on a mismatched brace, parenthesis or bracket character. + +---- + +.. _class_EditorSettings_property_text_editor/theme/highlighting/breakpoint_color: + +- :ref:`Color` **text_editor/theme/highlighting/breakpoint_color** + +The script editor's breakpoint icon color (displayed in the gutter). + +---- + +.. _class_EditorSettings_property_text_editor/theme/highlighting/caret_background_color: + +- :ref:`Color` **text_editor/theme/highlighting/caret_background_color** + +The script editor's caret background color. + +\ **Note:** This setting has no effect as it's currently unused. + +---- + +.. _class_EditorSettings_property_text_editor/theme/highlighting/caret_color: + +- :ref:`Color` **text_editor/theme/highlighting/caret_color** + +The script editor's caret color. + +---- + +.. _class_EditorSettings_property_text_editor/theme/highlighting/code_folding_color: + +- :ref:`Color` **text_editor/theme/highlighting/code_folding_color** + +The script editor's color for the code folding icon (displayed in the gutter). + +---- + +.. _class_EditorSettings_property_text_editor/theme/highlighting/comment_color: + +- :ref:`Color` **text_editor/theme/highlighting/comment_color** + +The script editor's comment color. + +\ **Note:** In GDScript, unlike Python, multiline strings are not considered to be comments, and will use the string highlighting color instead. + +---- + +.. _class_EditorSettings_property_text_editor/theme/highlighting/completion_background_color: + +- :ref:`Color` **text_editor/theme/highlighting/completion_background_color** + +The script editor's autocompletion box background color. + +---- + +.. _class_EditorSettings_property_text_editor/theme/highlighting/completion_existing_color: + +- :ref:`Color` **text_editor/theme/highlighting/completion_existing_color** + +The script editor's autocompletion box background color to highlight existing characters in the completion results. This should be a translucent color so that :ref:`text_editor/theme/highlighting/completion_selected_color` can be seen behind. + +---- + +.. _class_EditorSettings_property_text_editor/theme/highlighting/completion_font_color: + +- :ref:`Color` **text_editor/theme/highlighting/completion_font_color** + +The script editor's autocompletion box text color. + +---- + +.. _class_EditorSettings_property_text_editor/theme/highlighting/completion_scroll_color: + +- :ref:`Color` **text_editor/theme/highlighting/completion_scroll_color** + +The script editor's autocompletion box scroll bar color. + +---- + +.. _class_EditorSettings_property_text_editor/theme/highlighting/completion_scroll_hovered_color: + +- :ref:`Color` **text_editor/theme/highlighting/completion_scroll_hovered_color** + +The script editor's autocompletion box scroll bar color when hovered or pressed with the mouse. + +---- + +.. _class_EditorSettings_property_text_editor/theme/highlighting/completion_selected_color: + +- :ref:`Color` **text_editor/theme/highlighting/completion_selected_color** + +The script editor's autocompletion box background color for the currently selected line. + +---- + +.. _class_EditorSettings_property_text_editor/theme/highlighting/control_flow_keyword_color: + +- :ref:`Color` **text_editor/theme/highlighting/control_flow_keyword_color** + +The script editor's control flow keyword color (used for keywords like ``if``, ``for``, ``return``, ...). + +---- + +.. _class_EditorSettings_property_text_editor/theme/highlighting/current_line_color: + +- :ref:`Color` **text_editor/theme/highlighting/current_line_color** + +The script editor's background color for the line the caret is currently on. This should be set to a translucent color so that it can display on top of other line color modifiers such as :ref:`text_editor/theme/highlighting/mark_color`. + +---- + +.. _class_EditorSettings_property_text_editor/theme/highlighting/engine_type_color: + +- :ref:`Color` **text_editor/theme/highlighting/engine_type_color** + +The script editor's engine type color (:ref:`Vector2`, :ref:`Vector3`, :ref:`Color`, ...). + +---- + +.. _class_EditorSettings_property_text_editor/theme/highlighting/executing_line_color: + +- :ref:`Color` **text_editor/theme/highlighting/executing_line_color** + +The script editor's color for the debugger's executing line icon (displayed in the gutter). + +---- + +.. _class_EditorSettings_property_text_editor/theme/highlighting/function_color: + +- :ref:`Color` **text_editor/theme/highlighting/function_color** + +The script editor's function call color. + +\ **Note:** When using the GDScript syntax highlighter, this is replaced by the function definition color configured in the syntax theme for function definitions (e.g. ``func _ready():``). + +---- + +.. _class_EditorSettings_property_text_editor/theme/highlighting/keyword_color: + +- :ref:`Color` **text_editor/theme/highlighting/keyword_color** + +The script editor's non-control flow keyword color (used for keywords like ``var``, ``func``, some built-in methods, ...). + +---- + +.. _class_EditorSettings_property_text_editor/theme/highlighting/line_length_guideline_color: + +- :ref:`Color` **text_editor/theme/highlighting/line_length_guideline_color** + +The script editor's color for the line length guideline. The "hard" line length guideline will be drawn with this color, whereas the "soft" line length guideline will be drawn with an opacity twice as low. + +---- + +.. _class_EditorSettings_property_text_editor/theme/highlighting/line_number_color: + +- :ref:`Color` **text_editor/theme/highlighting/line_number_color** + +The script editor's color for line numbers. See also :ref:`text_editor/theme/highlighting/safe_line_number_color`. + +---- + +.. _class_EditorSettings_property_text_editor/theme/highlighting/mark_color: + +- :ref:`Color` **text_editor/theme/highlighting/mark_color** + +The script editor's background color for lines with errors. This should be set to a translucent color so that it can display on top of other line color modifiers such as :ref:`text_editor/theme/highlighting/current_line_color`. + +---- + +.. _class_EditorSettings_property_text_editor/theme/highlighting/member_variable_color: + +- :ref:`Color` **text_editor/theme/highlighting/member_variable_color** + +The script editor's color for member variables on objects (e.g. ``self.some_property``). + +\ **Note:** This color is not used for local variable declaration and access. + +---- + +.. _class_EditorSettings_property_text_editor/theme/highlighting/number_color: + +- :ref:`Color` **text_editor/theme/highlighting/number_color** + +The script editor's color for numbers (integer and floating-point). + +---- + +.. _class_EditorSettings_property_text_editor/theme/highlighting/safe_line_number_color: + +- :ref:`Color` **text_editor/theme/highlighting/safe_line_number_color** + +The script editor's color for type-safe line numbers. See also :ref:`text_editor/theme/highlighting/line_number_color`. + +\ **Note:** Only displayed if :ref:`text_editor/appearance/gutters/highlight_type_safe_lines` is ``true``. + +---- + +.. _class_EditorSettings_property_text_editor/theme/highlighting/search_result_border_color: + +- :ref:`Color` **text_editor/theme/highlighting/search_result_border_color** + +The script editor's color for the border of search results. This border helps bring further attention to the search result. Set this color's opacity to 0 to disable the border. + +---- + +.. _class_EditorSettings_property_text_editor/theme/highlighting/search_result_color: + +- :ref:`Color` **text_editor/theme/highlighting/search_result_color** + +The script editor's background color for search results. + +---- + +.. _class_EditorSettings_property_text_editor/theme/highlighting/selection_color: + +- :ref:`Color` **text_editor/theme/highlighting/selection_color** + +The script editor's background color for the currently selected text. + +---- + +.. _class_EditorSettings_property_text_editor/theme/highlighting/string_color: + +- :ref:`Color` **text_editor/theme/highlighting/string_color** + +The script editor's color for strings (single-line and multi-line). + +---- + +.. _class_EditorSettings_property_text_editor/theme/highlighting/symbol_color: + +- :ref:`Color` **text_editor/theme/highlighting/symbol_color** + +The script editor's color for operators (``( ) [ ] { } + - * /``, ...). + +---- + +.. _class_EditorSettings_property_text_editor/theme/highlighting/text_color: + +- :ref:`Color` **text_editor/theme/highlighting/text_color** + +The script editor's color for text not highlighted by any syntax highlighting rule. + +---- + +.. _class_EditorSettings_property_text_editor/theme/highlighting/text_selected_color: + +- :ref:`Color` **text_editor/theme/highlighting/text_selected_color** + +The script editor's background color for text. This should be set to a translucent color so that it can display on top of other line color modifiers such as :ref:`text_editor/theme/highlighting/current_line_color`. + +---- + +.. _class_EditorSettings_property_text_editor/theme/highlighting/user_type_color: + +- :ref:`Color` **text_editor/theme/highlighting/user_type_color** + +The script editor's color for user-defined types (using ``@class_name``). + +---- + +.. _class_EditorSettings_property_text_editor/theme/highlighting/word_highlighted_color: + +- :ref:`Color` **text_editor/theme/highlighting/word_highlighted_color** + +The script editor's color for words highlighted by selecting them. Only visible if :ref:`text_editor/appearance/caret/highlight_all_occurrences` is ``true``. + Method Descriptions ------------------- @@ -178,7 +2538,7 @@ Erases the setting whose name is specified by ``property``. .. _class_EditorSettings_method_get_changed_settings: -- :ref:`Array` **get_changed_settings** **(** **)** |const| +- :ref:`PackedStringArray` **get_changed_settings** **(** **)** |const| Gets an array of the settings which have been changed since the last save. Note that internally ``changed_settings`` is cleared after a successful save, so generally the most appropriate place to use this method is when processing :ref:`NOTIFICATION_EDITOR_SETTINGS_CHANGED` @@ -200,14 +2560,6 @@ Returns project-specific metadata for the ``section`` and ``key`` specified. If ---- -.. _class_EditorSettings_method_get_project_settings_dir: - -- :ref:`String` **get_project_settings_dir** **(** **)** |const| - -Returns the project-specific settings path. Projects all have a unique subdirectory inside the settings path where project-specific settings are saved. - ----- - .. _class_EditorSettings_method_get_recent_dirs: - :ref:`PackedStringArray` **get_recent_dirs** **(** **)** |const| @@ -240,26 +2592,12 @@ Marks the passed editor setting as being changed, see :ref:`get_changed_settings ---- -.. _class_EditorSettings_method_property_can_revert: - -- :ref:`bool` **property_can_revert** **(** :ref:`String` name **)** - -Returns ``true`` if the setting specified by ``name`` can have its value reverted to the default value, ``false`` otherwise. When this method returns ``true``, a Revert button will display next to the setting in the Editor Settings. - ----- - -.. _class_EditorSettings_method_property_get_revert: - -- :ref:`Variant` **property_get_revert** **(** :ref:`String` name **)** - -Returns the default value of the setting specified by ``name``. This is the value that would be applied when clicking the Revert button in the Editor Settings. - ----- - .. _class_EditorSettings_method_set_builtin_action_override: - void **set_builtin_action_override** **(** :ref:`String` name, :ref:`Array` actions_list **)** +Overrides the built-in editor action ``name`` with the input actions defined in ``actions_list``. + ---- .. _class_EditorSettings_method_set_favorites: diff --git a/classes/class_editorsyntaxhighlighter.rst b/classes/class_editorsyntaxhighlighter.rst index 55e2f0104..3021513ac 100644 --- a/classes/class_editorsyntaxhighlighter.rst +++ b/classes/class_editorsyntaxhighlighter.rst @@ -24,11 +24,11 @@ Add a syntax highlighter to an individual script by calling :ref:`ScriptEditorBa Methods ------- -+-----------------------------+------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_get_name` **(** **)** |virtual| |const| | -+-----------------------------+------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`_get_supported_languages` **(** **)** |virtual| |const| | -+-----------------------------+------------------------------------------------------------------------------------------------------------------------------+ ++---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`_get_name` **(** **)** |virtual| |const| | ++---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedStringArray` | :ref:`_get_supported_languages` **(** **)** |virtual| |const| | ++---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ Method Descriptions ------------------- @@ -43,7 +43,7 @@ Virtual method which can be overridden to return the syntax highlighter name. .. _class_EditorSyntaxHighlighter_method__get_supported_languages: -- :ref:`Array` **_get_supported_languages** **(** **)** |virtual| |const| +- :ref:`PackedStringArray` **_get_supported_languages** **(** **)** |virtual| |const| Virtual method which can be overridden to return the supported language names. diff --git a/classes/class_editorundoredomanager.rst b/classes/class_editorundoredomanager.rst new file mode 100644 index 000000000..4c0cc6b9a --- /dev/null +++ b/classes/class_editorundoredomanager.rst @@ -0,0 +1,184 @@ +: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/EditorUndoRedoManager.xml. + +.. _class_EditorUndoRedoManager: + +EditorUndoRedoManager +===================== + +**Inherits:** :ref:`RefCounted` **<** :ref:`Object` + +Manages undo history of scenes opened in the editor. + +Description +----------- + +``EditorUndoRedoManager`` is a manager for :ref:`UndoRedo` objects associated with edited scenes. Each scene has its own undo history and ``EditorUndoRedoManager`` ensures that each action performed in the editor gets associated with a proper scene. For actions not related to scenes (:ref:`ProjectSettings` edits, external resources, etc.), a separate global history is used. + +The usage is mostly the same as :ref:`UndoRedo`. You create and commit actions and the manager automatically decides under-the-hood what scenes it belongs to. The scene is deduced based on the first operation in an action, using the object from the operation. The rules are as follows: + +- If the object is a :ref:`Node`, use the currently edited scene; + +- If the object is a built-in resource, use the scene from its path; + +- If the object is external resource or anything else, use global history. + +This guessing can sometimes yield false results, so you can provide a custom context object when creating an action. + +Methods +------- + ++---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_do_method` **(** :ref:`Object` object, :ref:`StringName` method, ... **)** |vararg| | ++---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_do_property` **(** :ref:`Object` object, :ref:`StringName` property, :ref:`Variant` value **)** | ++---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_do_reference` **(** :ref:`Object` object **)** | ++---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_undo_method` **(** :ref:`Object` object, :ref:`StringName` method, ... **)** |vararg| | ++---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_undo_property` **(** :ref:`Object` object, :ref:`StringName` property, :ref:`Variant` value **)** | ++---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_undo_reference` **(** :ref:`Object` object **)** | ++---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`commit_action` **(** :ref:`bool` execute=true **)** | ++---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`create_action` **(** :ref:`String` name, :ref:`MergeMode` merge_mode=0, :ref:`Object` custom_context=null **)** | ++---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`UndoRedo` | :ref:`get_history_undo_redo` **(** :ref:`int` id **)** |const| | ++---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_object_history_id` **(** :ref:`Object` object **)** |const| | ++---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_committing_action` **(** **)** |const| | ++---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Enumerations +------------ + +.. _enum_EditorUndoRedoManager_SpecialHistory: + +.. _class_EditorUndoRedoManager_constant_GLOBAL_HISTORY: + +.. _class_EditorUndoRedoManager_constant_INVALID_HISTORY: + +enum **SpecialHistory**: + +- **GLOBAL_HISTORY** = **0** --- Global history not associated with any scene, but with external resources etc. + +- **INVALID_HISTORY** = **-99** --- Invalid "null" history. It's a special value, not associated with any object. + +Method Descriptions +------------------- + +.. _class_EditorUndoRedoManager_method_add_do_method: + +- void **add_do_method** **(** :ref:`Object` object, :ref:`StringName` method, ... **)** |vararg| + +Register a method that will be called when the action is committed (i.e. the "do" action). + +If this is the first operation, the ``object`` will be used to deduce target undo history. + +---- + +.. _class_EditorUndoRedoManager_method_add_do_property: + +- void **add_do_property** **(** :ref:`Object` object, :ref:`StringName` property, :ref:`Variant` value **)** + +Register a property value change for "do". + +If this is the first operation, the ``object`` will be used to deduce target undo history. + +---- + +.. _class_EditorUndoRedoManager_method_add_do_reference: + +- void **add_do_reference** **(** :ref:`Object` object **)** + +Register a reference for "do" that will be erased if the "do" history is lost. This is useful mostly for new nodes created for the "do" call. Do not use for resources. + +---- + +.. _class_EditorUndoRedoManager_method_add_undo_method: + +- void **add_undo_method** **(** :ref:`Object` object, :ref:`StringName` method, ... **)** |vararg| + +Register a method that will be called when the action is undone (i.e. the "undo" action). + +If this is the first operation, the ``object`` will be used to deduce target undo history. + +---- + +.. _class_EditorUndoRedoManager_method_add_undo_property: + +- void **add_undo_property** **(** :ref:`Object` object, :ref:`StringName` property, :ref:`Variant` value **)** + +Register a property value change for "undo". + +If this is the first operation, the ``object`` will be used to deduce target undo history. + +---- + +.. _class_EditorUndoRedoManager_method_add_undo_reference: + +- void **add_undo_reference** **(** :ref:`Object` object **)** + +Register a reference for "undo" that will be erased if the "undo" history is lost. This is useful mostly for nodes removed with the "do" call (not the "undo" call!). + +---- + +.. _class_EditorUndoRedoManager_method_commit_action: + +- void **commit_action** **(** :ref:`bool` execute=true **)** + +Commit the action. If ``execute`` is true (default), all "do" methods/properties are called/set when this function is called. + +---- + +.. _class_EditorUndoRedoManager_method_create_action: + +- void **create_action** **(** :ref:`String` name, :ref:`MergeMode` merge_mode=0, :ref:`Object` custom_context=null **)** + +Create a new action. After this is called, do all your calls to :ref:`add_do_method`, :ref:`add_undo_method`, :ref:`add_do_property`, and :ref:`add_undo_property`, then commit the action with :ref:`commit_action`. + +The way actions are merged is dictated by the ``merge_mode`` argument. See :ref:`MergeMode` for details. + +If ``custom_context`` object is provided, it will be used for deducing target history (instead of using the first operation). + +---- + +.. _class_EditorUndoRedoManager_method_get_history_undo_redo: + +- :ref:`UndoRedo` **get_history_undo_redo** **(** :ref:`int` id **)** |const| + +Returns the :ref:`UndoRedo` object associated with the given history ``id``. + +``id`` above ``0`` are mapped to the opened scene tabs (but it doesn't match their order). ``id`` of ``0`` or lower have special meaning (see :ref:`SpecialHistory`). + +Best used with :ref:`get_object_history_id`. This method is only provided in case you need some more advanced methods of :ref:`UndoRedo` (but keep in mind that directly operating on the :ref:`UndoRedo` object might affect editor's stability). + +---- + +.. _class_EditorUndoRedoManager_method_get_object_history_id: + +- :ref:`int` **get_object_history_id** **(** :ref:`Object` object **)** |const| + +Returns the history ID deduced from the given ``object``. It can be used with :ref:`get_history_undo_redo`. + +---- + +.. _class_EditorUndoRedoManager_method_is_committing_action: + +- :ref:`bool` **is_committing_action** **(** **)** |const| + +Returns ``true`` if the ``EditorUndoRedoManager`` is currently committing the action, i.e. running its "do" method or property change (see :ref:`commit_action`). + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_editorvcsinterface.rst b/classes/class_editorvcsinterface.rst index 86b9e3bfe..640d010dc 100644 --- a/classes/class_editorvcsinterface.rst +++ b/classes/class_editorvcsinterface.rst @@ -12,154 +12,377 @@ EditorVCSInterface **Inherits:** :ref:`Object` -Version Control System (VCS) interface which reads and writes to the local VCS in use. +Version Control System (VCS) interface, which reads and writes to the local VCS in use. Description ----------- -Used by the editor to display VCS extracted information in the editor. The implementation of this API is included in VCS addons, which are essentially GDExtension plugins that need to be put into the project folder. These VCS addons are scripts which are attached (on demand) to the object instance of ``EditorVCSInterface``. All the functions listed below, instead of performing the task themselves, they call the internally defined functions in the VCS addons to provide a plug-n-play experience. +Defines the API that the editor uses to extract information from the underlying VCS. The implementation of this API is included in VCS plugins, which are GDExtension plugins that inherit ``EditorVCSInterface`` and are attached (on demand) to the singleton instance of ``EditorVCSInterface``. Instead of performing the task themselves, all the virtual functions listed below are calling the internally overridden functions in the VCS plugins to provide a plug-n-play experience. A custom VCS plugin is supposed to inherit from ``EditorVCSInterface`` and override each of these virtual functions. Methods ------- -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`commit` **(** :ref:`String` msg **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_file_diff` **(** :ref:`String` file_path **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_modified_files_data` **(** **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_project_name` **(** **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_vcs_name` **(** **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`initialize` **(** :ref:`String` project_root_path **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_addon_ready` **(** **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_vcs_initialized` **(** **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`shut_down` **(** **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`stage_file` **(** :ref:`String` file_path **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`unstage_file` **(** :ref:`String` file_path **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_checkout_branch` **(** :ref:`String` branch_name **)** |virtual| | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_commit` **(** :ref:`String` msg **)** |virtual| | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_create_branch` **(** :ref:`String` branch_name **)** |virtual| | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_create_remote` **(** :ref:`String` remote_name, :ref:`String` remote_url **)** |virtual| | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_discard_file` **(** :ref:`String` file_path **)** |virtual| | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_fetch` **(** :ref:`String` remote **)** |virtual| | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`_get_branch_list` **(** **)** |virtual| | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`_get_current_branch_name` **(** **)** |virtual| | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary[]` | :ref:`_get_diff` **(** :ref:`String` identifier, :ref:`int` area **)** |virtual| | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`_get_line_diff` **(** :ref:`String` file_path, :ref:`String` text **)** |virtual| | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`_get_modified_files_data` **(** **)** |virtual| | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`_get_previous_commits` **(** :ref:`int` max_commits **)** |virtual| | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`_get_remotes` **(** **)** |virtual| | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`_get_vcs_name` **(** **)** |virtual| | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_initialize` **(** :ref:`String` project_path **)** |virtual| | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_pull` **(** :ref:`String` remote **)** |virtual| | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_push` **(** :ref:`String` remote, :ref:`bool` force **)** |virtual| | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_remove_branch` **(** :ref:`String` branch_name **)** |virtual| | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_remove_remote` **(** :ref:`String` remote_name **)** |virtual| | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_set_credentials` **(** :ref:`String` username, :ref:`String` password, :ref:`String` ssh_public_key_path, :ref:`String` ssh_private_key_path, :ref:`String` ssh_passphrase **)** |virtual| | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_shut_down` **(** **)** |virtual| | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_stage_file` **(** :ref:`String` file_path **)** |virtual| | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_unstage_file` **(** :ref:`String` file_path **)** |virtual| | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`add_diff_hunks_into_diff_file` **(** :ref:`Dictionary` diff_file, :ref:`Array` diff_hunks **)** | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`add_line_diffs_into_diff_hunk` **(** :ref:`Dictionary` diff_hunk, :ref:`Array` line_diffs **)** | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`create_commit` **(** :ref:`String` msg, :ref:`String` author, :ref:`String` id, :ref:`int` unix_timestamp, :ref:`int` offset_minutes **)** | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`create_diff_file` **(** :ref:`String` new_file, :ref:`String` old_file **)** | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`create_diff_hunk` **(** :ref:`int` old_start, :ref:`int` new_start, :ref:`int` old_lines, :ref:`int` new_lines **)** | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`create_diff_line` **(** :ref:`int` new_line_no, :ref:`int` old_line_no, :ref:`String` content, :ref:`String` status **)** | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`create_status_file` **(** :ref:`String` file_path, :ref:`ChangeType` change_type, :ref:`TreeArea` area **)** | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`popup_error` **(** :ref:`String` msg **)** | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Enumerations +------------ + +.. _enum_EditorVCSInterface_ChangeType: + +.. _class_EditorVCSInterface_constant_CHANGE_TYPE_NEW: + +.. _class_EditorVCSInterface_constant_CHANGE_TYPE_MODIFIED: + +.. _class_EditorVCSInterface_constant_CHANGE_TYPE_RENAMED: + +.. _class_EditorVCSInterface_constant_CHANGE_TYPE_DELETED: + +.. _class_EditorVCSInterface_constant_CHANGE_TYPE_TYPECHANGE: + +.. _class_EditorVCSInterface_constant_CHANGE_TYPE_UNMERGED: + +enum **ChangeType**: + +- **CHANGE_TYPE_NEW** = **0** --- A new file has been added. + +- **CHANGE_TYPE_MODIFIED** = **1** --- An earlier added file has been modified. + +- **CHANGE_TYPE_RENAMED** = **2** --- An earlier added file has been renamed. + +- **CHANGE_TYPE_DELETED** = **3** --- An earlier added file has been deleted. + +- **CHANGE_TYPE_TYPECHANGE** = **4** --- An earlier added file has been typechanged. + +- **CHANGE_TYPE_UNMERGED** = **5** --- A file is left unmerged. + +---- + +.. _enum_EditorVCSInterface_TreeArea: + +.. _class_EditorVCSInterface_constant_TREE_AREA_COMMIT: + +.. _class_EditorVCSInterface_constant_TREE_AREA_STAGED: + +.. _class_EditorVCSInterface_constant_TREE_AREA_UNSTAGED: + +enum **TreeArea**: + +- **TREE_AREA_COMMIT** = **0** --- A commit is encountered from the commit area. + +- **TREE_AREA_STAGED** = **1** --- A file is encountered from the staged area. + +- **TREE_AREA_UNSTAGED** = **2** --- A file is encountered from the unstaged area. Method Descriptions ------------------- -.. _class_EditorVCSInterface_method_commit: +.. _class_EditorVCSInterface_method__checkout_branch: -- void **commit** **(** :ref:`String` msg **)** +- :ref:`bool` **_checkout_branch** **(** :ref:`String` branch_name **)** |virtual| -Creates a version commit if the addon is initialized, else returns without doing anything. Uses the files which have been staged previously, with the commit message set to a value as provided as in the argument. +Checks out a ``branch_name`` in the VCS. ---- -.. _class_EditorVCSInterface_method_get_file_diff: +.. _class_EditorVCSInterface_method__commit: -- :ref:`Array` **get_file_diff** **(** :ref:`String` file_path **)** +- void **_commit** **(** :ref:`String` msg **)** |virtual| -Returns an :ref:`Array` of :ref:`Dictionary` objects containing the diff output from the VCS in use, if a VCS addon is initialized, else returns an empty :ref:`Array` object. The diff contents also consist of some contextual lines which provide context to the observed line change in the file. - -Each :ref:`Dictionary` object has the line diff contents under the keys: - -- ``"content"`` to store a :ref:`String` containing the line contents - -- ``"status"`` to store a :ref:`String` which contains ``"+"`` in case the content is a line addition but it stores a ``"-"`` in case of deletion and an empty string in the case the line content is neither an addition nor a deletion. - -- ``"new_line_number"`` to store an integer containing the new line number of the line content. - -- ``"line_count"`` to store an integer containing the number of lines in the line content. - -- ``"old_line_number"`` to store an integer containing the old line number of the line content. - -- ``"offset"`` to store the offset of the line change since the first contextual line content. +Commits the currently staged changes and applies the commit ``msg`` to the resulting commit. ---- -.. _class_EditorVCSInterface_method_get_modified_files_data: +.. _class_EditorVCSInterface_method__create_branch: -- :ref:`Dictionary` **get_modified_files_data** **(** **)** +- void **_create_branch** **(** :ref:`String` branch_name **)** |virtual| -Returns a :ref:`Dictionary` containing the path of the detected file change mapped to an integer signifying what kind of change the corresponding file has experienced. - -The following integer values are being used to signify that the detected file is: - -- ``0``: New to the VCS working directory - -- ``1``: Modified - -- ``2``: Renamed - -- ``3``: Deleted - -- ``4``: Typechanged +Creates a new branch named ``branch_name`` in the VCS. ---- -.. _class_EditorVCSInterface_method_get_project_name: +.. _class_EditorVCSInterface_method__create_remote: -- :ref:`String` **get_project_name** **(** **)** +- void **_create_remote** **(** :ref:`String` remote_name, :ref:`String` remote_url **)** |virtual| -Returns the project name of the VCS working directory. +Creates a new remote destination with name ``remote_name`` and points it to ``remote_url``. This can be an HTTPS remote or an SSH remote. ---- -.. _class_EditorVCSInterface_method_get_vcs_name: +.. _class_EditorVCSInterface_method__discard_file: -- :ref:`String` **get_vcs_name** **(** **)** +- void **_discard_file** **(** :ref:`String` file_path **)** |virtual| -Returns the name of the VCS if the VCS has been initialized, else return an empty string. +Discards the changes made in a file present at ``file_path``. ---- -.. _class_EditorVCSInterface_method_initialize: +.. _class_EditorVCSInterface_method__fetch: -- :ref:`bool` **initialize** **(** :ref:`String` project_root_path **)** +- void **_fetch** **(** :ref:`String` remote **)** |virtual| -Initializes the VCS addon if not already. Uses the argument value as the path to the working directory of the project. Creates the initial commit if required. Returns ``true`` if no failure occurs, else returns ``false``. +Fetches new changes from the remote, but doesn't write changes to the current working directory. Equivalent to ``git fetch``. ---- -.. _class_EditorVCSInterface_method_is_addon_ready: +.. _class_EditorVCSInterface_method__get_branch_list: -- :ref:`bool` **is_addon_ready** **(** **)** +- :ref:`Array` **_get_branch_list** **(** **)** |virtual| -Returns ``true`` if the addon is ready to respond to function calls, else returns ``false``. +Gets an instance of an :ref:`Array` of :ref:`String`\ s containing available branch names in the VCS. ---- -.. _class_EditorVCSInterface_method_is_vcs_initialized: +.. _class_EditorVCSInterface_method__get_current_branch_name: -- :ref:`bool` **is_vcs_initialized** **(** **)** +- :ref:`String` **_get_current_branch_name** **(** **)** |virtual| -Returns ``true`` if the VCS addon has been initialized, else returns ``false``. +Gets the current branch name defined in the VCS. ---- -.. _class_EditorVCSInterface_method_shut_down: +.. _class_EditorVCSInterface_method__get_diff: -- :ref:`bool` **shut_down** **(** **)** +- :ref:`Dictionary[]` **_get_diff** **(** :ref:`String` identifier, :ref:`int` area **)** |virtual| -Shuts down the VCS addon to allow cleanup code to run on call. Returns ``true`` is no failure occurs, else returns ``false``. +Returns an array of :ref:`Dictionary` items (see :ref:`create_diff_file`, :ref:`create_diff_hunk`, :ref:`create_diff_line`, :ref:`add_line_diffs_into_diff_hunk` and :ref:`add_diff_hunks_into_diff_file`), each containing information about a diff. If ``identifier`` is a file path, returns a file diff, and if it is a commit identifier, then returns a commit diff. ---- -.. _class_EditorVCSInterface_method_stage_file: +.. _class_EditorVCSInterface_method__get_line_diff: -- void **stage_file** **(** :ref:`String` file_path **)** +- :ref:`Array` **_get_line_diff** **(** :ref:`String` file_path, :ref:`String` text **)** |virtual| -Stages the file which should be committed when :ref:`commit` is called. Argument should contain the absolute path. +Returns an :ref:`Array` of :ref:`Dictionary` items (see :ref:`create_diff_hunk`), each containing a line diff between a file at ``file_path`` and the ``text`` which is passed in. ---- -.. _class_EditorVCSInterface_method_unstage_file: +.. _class_EditorVCSInterface_method__get_modified_files_data: -- void **unstage_file** **(** :ref:`String` file_path **)** +- :ref:`Array` **_get_modified_files_data** **(** **)** |virtual| -Unstages the file which was staged previously to be committed, so that it is no longer committed when :ref:`commit` is called. Argument should contain the absolute path. +Returns an :ref:`Array` of :ref:`Dictionary` items (see :ref:`create_status_file`), each containing the status data of every modified file in the project folder. + +---- + +.. _class_EditorVCSInterface_method__get_previous_commits: + +- :ref:`Array` **_get_previous_commits** **(** :ref:`int` max_commits **)** |virtual| + +Returns an :ref:`Array` of :ref:`Dictionary` items (see :ref:`create_commit`), each containing the data for a past commit. + +---- + +.. _class_EditorVCSInterface_method__get_remotes: + +- :ref:`Array` **_get_remotes** **(** **)** |virtual| + +Returns an :ref:`Array` of :ref:`String`\ s, each containing the name of a remote configured in the VCS. + +---- + +.. _class_EditorVCSInterface_method__get_vcs_name: + +- :ref:`String` **_get_vcs_name** **(** **)** |virtual| + +Returns the name of the underlying VCS provider. + +---- + +.. _class_EditorVCSInterface_method__initialize: + +- :ref:`bool` **_initialize** **(** :ref:`String` project_path **)** |virtual| + +Initializes the VCS plugin when called from the editor. Returns whether or not the plugin was successfully initialized. A VCS project is initialized at ``project_path``. + +---- + +.. _class_EditorVCSInterface_method__pull: + +- void **_pull** **(** :ref:`String` remote **)** |virtual| + +Pulls changes from the remote. This can give rise to merge conflicts. + +---- + +.. _class_EditorVCSInterface_method__push: + +- void **_push** **(** :ref:`String` remote, :ref:`bool` force **)** |virtual| + +Pushes changes to the ``remote``. Optionally, if ``force`` is set to true, a force push will override the change history already present on the remote. + +---- + +.. _class_EditorVCSInterface_method__remove_branch: + +- void **_remove_branch** **(** :ref:`String` branch_name **)** |virtual| + +Remove a branch from the local VCS. + +---- + +.. _class_EditorVCSInterface_method__remove_remote: + +- void **_remove_remote** **(** :ref:`String` remote_name **)** |virtual| + +Remove a remote from the local VCS. + +---- + +.. _class_EditorVCSInterface_method__set_credentials: + +- void **_set_credentials** **(** :ref:`String` username, :ref:`String` password, :ref:`String` ssh_public_key_path, :ref:`String` ssh_private_key_path, :ref:`String` ssh_passphrase **)** |virtual| + +Set user credentials in the underlying VCS. ``username`` and ``password`` are used only during HTTPS authentication unless not already mentioned in the remote URL. ``ssh_public_key_path``, ``ssh_private_key_path``, and ``ssh_passphrase`` are only used during SSH authentication. + +---- + +.. _class_EditorVCSInterface_method__shut_down: + +- :ref:`bool` **_shut_down** **(** **)** |virtual| + +Shuts down VCS plugin instance. Called when the user either closes the editor or shuts down the VCS plugin through the editor UI. + +---- + +.. _class_EditorVCSInterface_method__stage_file: + +- void **_stage_file** **(** :ref:`String` file_path **)** |virtual| + +Stages the file present at ``file_path`` to the staged area. + +---- + +.. _class_EditorVCSInterface_method__unstage_file: + +- void **_unstage_file** **(** :ref:`String` file_path **)** |virtual| + +Unstages the file present at ``file_path`` from the staged area to the unstaged area. + +---- + +.. _class_EditorVCSInterface_method_add_diff_hunks_into_diff_file: + +- :ref:`Dictionary` **add_diff_hunks_into_diff_file** **(** :ref:`Dictionary` diff_file, :ref:`Array` diff_hunks **)** + +Helper function to add an array of ``diff_hunks`` into a ``diff_file``. + +---- + +.. _class_EditorVCSInterface_method_add_line_diffs_into_diff_hunk: + +- :ref:`Dictionary` **add_line_diffs_into_diff_hunk** **(** :ref:`Dictionary` diff_hunk, :ref:`Array` line_diffs **)** + +Helper function to add an array of ``line_diffs`` into a ``diff_hunk``. + +---- + +.. _class_EditorVCSInterface_method_create_commit: + +- :ref:`Dictionary` **create_commit** **(** :ref:`String` msg, :ref:`String` author, :ref:`String` id, :ref:`int` unix_timestamp, :ref:`int` offset_minutes **)** + +Helper function to create a commit :ref:`Dictionary` item. ``msg`` is the commit message of the commit. ``author`` is a single human-readable string containing all the author's details, e.g. the email and name configured in the VCS. ``id`` is the identifier of the commit, in whichever format your VCS may provide an identifier to commits. ``unix_timestamp`` is the UTC Unix timestamp of when the commit was created. ``offset_minutes`` is the timezone offset in minutes, recorded from the system timezone where the commit was created. + +---- + +.. _class_EditorVCSInterface_method_create_diff_file: + +- :ref:`Dictionary` **create_diff_file** **(** :ref:`String` new_file, :ref:`String` old_file **)** + +Helper function to create a ``Dictionary`` for storing old and new diff file paths. + +---- + +.. _class_EditorVCSInterface_method_create_diff_hunk: + +- :ref:`Dictionary` **create_diff_hunk** **(** :ref:`int` old_start, :ref:`int` new_start, :ref:`int` old_lines, :ref:`int` new_lines **)** + +Helper function to create a ``Dictionary`` for storing diff hunk data. ``old_start`` is the starting line number in old file. ``new_start`` is the starting line number in new file. ``old_lines`` is the number of lines in the old file. ``new_lines`` is the number of lines in the new file. + +---- + +.. _class_EditorVCSInterface_method_create_diff_line: + +- :ref:`Dictionary` **create_diff_line** **(** :ref:`int` new_line_no, :ref:`int` old_line_no, :ref:`String` content, :ref:`String` status **)** + +Helper function to create a ``Dictionary`` for storing a line diff. ``new_line_no`` is the line number in the new file (can be ``-1`` if the line is deleted). ``old_line_no`` is the line number in the old file (can be ``-1`` if the line is added). ``content`` is the diff text. ``status`` is a single character string which stores the line origin. + +---- + +.. _class_EditorVCSInterface_method_create_status_file: + +- :ref:`Dictionary` **create_status_file** **(** :ref:`String` file_path, :ref:`ChangeType` change_type, :ref:`TreeArea` area **)** + +Helper function to create a ``Dictionary`` used by editor to read the status of a file. + +---- + +.. _class_EditorVCSInterface_method_popup_error: + +- void **popup_error** **(** :ref:`String` msg **)** + +Pops up an error message in the edior which is shown as coming from the underlying VCS. Use this to show VCS specific error messages. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_enetconnection.rst b/classes/class_enetconnection.rst index ddd7b9192..2fc4c0911 100644 --- a/classes/class_enetconnection.rst +++ b/classes/class_enetconnection.rst @@ -27,41 +27,41 @@ Tutorials Methods ------- -+---------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`bandwidth_limit` **(** :ref:`int` in_bandwidth=0, :ref:`int` out_bandwidth=0 **)** | -+---------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`broadcast` **(** :ref:`int` channel, :ref:`PackedByteArray` packet, :ref:`int` flags **)** | -+---------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`channel_limit` **(** :ref:`int` limit **)** | -+---------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`compress` **(** :ref:`CompressionMode` mode **)** | -+---------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`ENetPacketPeer` | :ref:`connect_to_host` **(** :ref:`String` address, :ref:`int` port, :ref:`int` channels=0, :ref:`int` data=0 **)** | -+---------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`create_host` **(** :ref:`int` max_peers=32, :ref:`int` max_channels=0, :ref:`int` in_bandwidth=0, :ref:`int` out_bandwidth=0 **)** | -+---------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`create_host_bound` **(** :ref:`String` bind_address, :ref:`int` bind_port, :ref:`int` max_peers=32, :ref:`int` max_channels=0, :ref:`int` in_bandwidth=0, :ref:`int` out_bandwidth=0 **)** | -+---------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`destroy` **(** **)** | -+---------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`dtls_client_setup` **(** :ref:`X509Certificate` certificate, :ref:`String` hostname, :ref:`bool` verify=true **)** | -+---------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`dtls_server_setup` **(** :ref:`CryptoKey` key, :ref:`X509Certificate` certificate **)** | -+---------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`flush` **(** **)** | -+---------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_local_port` **(** **)** |const| | -+---------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_max_channels` **(** **)** |const| | -+---------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_peers` **(** **)** | -+---------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`pop_statistic` **(** :ref:`HostStatistic` statistic **)** | -+---------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`refuse_new_connections` **(** :ref:`bool` refuse **)** | -+---------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`service` **(** :ref:`int` timeout=0 **)** | -+---------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`bandwidth_limit` **(** :ref:`int` in_bandwidth=0, :ref:`int` out_bandwidth=0 **)** | ++-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`broadcast` **(** :ref:`int` channel, :ref:`PackedByteArray` packet, :ref:`int` flags **)** | ++-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`channel_limit` **(** :ref:`int` limit **)** | ++-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`compress` **(** :ref:`CompressionMode` mode **)** | ++-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`ENetPacketPeer` | :ref:`connect_to_host` **(** :ref:`String` address, :ref:`int` port, :ref:`int` channels=0, :ref:`int` data=0 **)** | ++-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Error` | :ref:`create_host` **(** :ref:`int` max_peers=32, :ref:`int` max_channels=0, :ref:`int` in_bandwidth=0, :ref:`int` out_bandwidth=0 **)** | ++-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Error` | :ref:`create_host_bound` **(** :ref:`String` bind_address, :ref:`int` bind_port, :ref:`int` max_peers=32, :ref:`int` max_channels=0, :ref:`int` in_bandwidth=0, :ref:`int` out_bandwidth=0 **)** | ++-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`destroy` **(** **)** | ++-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Error` | :ref:`dtls_client_setup` **(** :ref:`X509Certificate` certificate, :ref:`String` hostname, :ref:`bool` verify=true **)** | ++-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Error` | :ref:`dtls_server_setup` **(** :ref:`CryptoKey` key, :ref:`X509Certificate` certificate **)** | ++-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`flush` **(** **)** | ++-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_local_port` **(** **)** |const| | ++-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_max_channels` **(** **)** |const| | ++-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`ENetPacketPeer[]` | :ref:`get_peers` **(** **)** | ++-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`pop_statistic` **(** :ref:`HostStatistic` statistic **)** | ++-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`refuse_new_connections` **(** :ref:`bool` refuse **)** | ++-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`service` **(** :ref:`int` timeout=0 **)** | ++-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Enumerations ------------ @@ -253,7 +253,7 @@ Returns the maximum number of channels allowed for connected peers. .. _class_ENetConnection_method_get_peers: -- :ref:`Array` **get_peers** **(** **)** +- :ref:`ENetPacketPeer[]` **get_peers** **(** **)** Returns the list of peers associated with this host. diff --git a/classes/class_enetpacketpeer.rst b/classes/class_enetpacketpeer.rst index 8fe18f921..39ffa6afd 100644 --- a/classes/class_enetpacketpeer.rst +++ b/classes/class_enetpacketpeer.rst @@ -34,6 +34,10 @@ Methods +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_channels` **(** **)** |const| | +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_remote_address` **(** **)** |const| | ++-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_remote_port` **(** **)** |const| | ++-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PeerState` | :ref:`get_state` **(** **)** |const| | +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_statistic` **(** :ref:`PeerStatistic` statistic **)** | @@ -202,6 +206,22 @@ Returns the number of channels allocated for communication with peer. ---- +.. _class_ENetPacketPeer_method_get_remote_address: + +- :ref:`String` **get_remote_address** **(** **)** |const| + +Returns the IP address of this peer. + +---- + +.. _class_ENetPacketPeer_method_get_remote_port: + +- :ref:`int` **get_remote_port** **(** **)** |const| + +Returns the remote port of this peer. + +---- + .. _class_ENetPacketPeer_method_get_state: - :ref:`PeerState` **get_state** **(** **)** |const| diff --git a/classes/class_engine.rst b/classes/class_engine.rst index b29986172..159886089 100644 --- a/classes/class_engine.rst +++ b/classes/class_engine.rst @@ -37,10 +37,12 @@ Properties Methods ------- ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_architecture_name` **(** **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Dictionary` | :ref:`get_author_info` **(** **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_copyright_info` **(** **)** |const| | +| :ref:`Dictionary[]` | :ref:`get_copyright_info` **(** **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Dictionary` | :ref:`get_donor_info` **(** **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -70,6 +72,8 @@ Methods +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Dictionary` | :ref:`get_version_info` **(** **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_write_movie_path` **(** **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_singleton` **(** :ref:`StringName` name **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_editor_hint` **(** **)** |const| | @@ -175,6 +179,25 @@ Controls how fast or slow the in-game clock ticks versus the real life one. It d Method Descriptions ------------------- +.. _class_Engine_method_get_architecture_name: + +- :ref:`String` **get_architecture_name** **(** **)** |const| + +Returns the name of the CPU architecture the Godot binary was built for. Possible return values are ``x86_64``, ``x86_32``, ``arm64``, ``armv7``, ``rv64``, ``riscv``, ``ppc64``, ``ppc``, ``wasm64`` and ``wasm32``. + +To detect whether the current CPU architecture is 64-bit, you can use the fact that all 64-bit architecture names have ``64`` in their name: + +:: + + if "64" in Engine.get_architecture_name(): + print("Running on 64-bit CPU.") + else: + print("Running on 32-bit CPU.") + +\ **Note:** :ref:`get_architecture_name` does *not* return the name of the host CPU architecture. For example, if running an x86_32 Godot binary on a x86_64 system, the returned value will be ``x86_32``. + +---- + .. _class_Engine_method_get_author_info: - :ref:`Dictionary` **get_author_info** **(** **)** |const| @@ -193,7 +216,7 @@ Returns engine author information in a Dictionary. .. _class_Engine_method_get_copyright_info: -- :ref:`Array` **get_copyright_info** **(** **)** |const| +- :ref:`Dictionary[]` **get_copyright_info** **(** **)** |const| Returns an Array of copyright information Dictionaries. @@ -368,6 +391,14 @@ The ``hex`` value is encoded as follows, from left to right: one byte for the ma +---- + +.. _class_Engine_method_get_write_movie_path: + +- :ref:`String` **get_write_movie_path** **(** **)** |const| + +Returns the path to the :ref:`MovieWriter`'s output file, or an empty string if the engine wasn't started in Movie Maker mode. This path can be absolute or relative depending on how the user specified it. + ---- .. _class_Engine_method_has_singleton: diff --git a/classes/class_environment.rst b/classes/class_environment.rst index 6aea72a54..49ea9e7c9 100644 --- a/classes/class_environment.rst +++ b/classes/class_environment.rst @@ -43,199 +43,199 @@ Tutorials Properties ---------- -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`adjustment_brightness` | ``1.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`Texture` | :ref:`adjustment_color_correction` | | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`adjustment_contrast` | ``1.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`bool` | :ref:`adjustment_enabled` | ``false`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`adjustment_saturation` | ``1.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`Color` | :ref:`ambient_light_color` | ``Color(0, 0, 0, 1)`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`ambient_light_energy` | ``1.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`ambient_light_sky_contribution` | ``1.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`AmbientSource` | :ref:`ambient_light_source` | ``0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`bool` | :ref:`auto_exposure_enabled` | ``false`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`auto_exposure_max_luma` | ``8.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`auto_exposure_min_luma` | ``0.05`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`auto_exposure_scale` | ``0.4`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`auto_exposure_speed` | ``0.5`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`int` | :ref:`background_camera_feed_id` | ``1`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`int` | :ref:`background_canvas_max_layer` | ``0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`Color` | :ref:`background_color` | ``Color(0, 0, 0, 1)`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`background_energy` | ``1.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`BGMode` | :ref:`background_mode` | ``0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`fog_aerial_perspective` | ``0.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`fog_density` | ``0.001`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`bool` | :ref:`fog_enabled` | ``false`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`fog_height` | ``0.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`fog_height_density` | ``0.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`Color` | :ref:`fog_light_color` | ``Color(0.5, 0.6, 0.7, 1)`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`fog_light_energy` | ``1.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`fog_sun_scatter` | ``0.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`GlowBlendMode` | :ref:`glow_blend_mode` | ``2`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`glow_bloom` | ``0.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`bool` | :ref:`glow_enabled` | ``false`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`glow_hdr_luminance_cap` | ``12.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`glow_hdr_scale` | ``2.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`glow_hdr_threshold` | ``1.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`glow_intensity` | ``0.8`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`glow_levels/1` | ``0.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`glow_levels/2` | ``0.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`glow_levels/3` | ``1.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`glow_levels/4` | ``0.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`glow_levels/5` | ``1.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`glow_levels/6` | ``0.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`glow_levels/7` | ``0.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`Texture` | :ref:`glow_map` | | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`glow_map_strength` | ``0.8`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`glow_mix` | ``0.05`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`bool` | :ref:`glow_normalized` | ``false`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`glow_strength` | ``1.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`ReflectionSource` | :ref:`reflected_light_source` | ``0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`sdfgi_bounce_feedback` | ``0.5`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`sdfgi_cascade0_distance` | ``12.8`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`int` | :ref:`sdfgi_cascades` | ``4`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`bool` | :ref:`sdfgi_enabled` | ``false`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`sdfgi_energy` | ``1.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`sdfgi_max_distance` | ``204.8`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`sdfgi_min_cell_size` | ``0.2`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`sdfgi_normal_bias` | ``1.1`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`sdfgi_probe_bias` | ``1.1`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`bool` | :ref:`sdfgi_read_sky_light` | ``true`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`bool` | :ref:`sdfgi_use_occlusion` | ``false`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`SDFGIYScale` | :ref:`sdfgi_y_scale` | ``1`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`Sky` | :ref:`sky` | | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`sky_custom_fov` | ``0.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`Vector3` | :ref:`sky_rotation` | ``Vector3(0, 0, 0)`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`ssao_ao_channel_affect` | ``0.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`ssao_detail` | ``0.5`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`bool` | :ref:`ssao_enabled` | ``false`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`ssao_horizon` | ``0.06`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`ssao_intensity` | ``2.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`ssao_light_affect` | ``0.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`ssao_power` | ``1.5`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`ssao_radius` | ``1.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`ssao_sharpness` | ``0.98`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`bool` | :ref:`ssil_enabled` | ``false`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`ssil_intensity` | ``1.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`ssil_normal_rejection` | ``1.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`ssil_radius` | ``5.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`ssil_sharpness` | ``0.98`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`ssr_depth_tolerance` | ``0.2`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`bool` | :ref:`ssr_enabled` | ``false`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`ssr_fade_in` | ``0.15`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`ssr_fade_out` | ``2.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`int` | :ref:`ssr_max_steps` | ``64`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`tonemap_exposure` | ``1.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`ToneMapper` | :ref:`tonemap_mode` | ``0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`tonemap_white` | ``1.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`Color` | :ref:`volumetric_fog_albedo` | ``Color(1, 1, 1, 1)`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`volumetric_fog_ambient_inject` | ``0.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`volumetric_fog_anisotropy` | ``0.2`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`volumetric_fog_density` | ``0.05`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`volumetric_fog_detail_spread` | ``2.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`Color` | :ref:`volumetric_fog_emission` | ``Color(0, 0, 0, 1)`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`volumetric_fog_emission_energy` | ``1.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`bool` | :ref:`volumetric_fog_enabled` | ``false`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`volumetric_fog_gi_inject` | ``0.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`volumetric_fog_length` | ``64.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`volumetric_fog_temporal_reprojection_amount` | ``0.9`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`bool` | :ref:`volumetric_fog_temporal_reprojection_enabled` | ``true`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`adjustment_brightness` | ``1.0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`Texture` | :ref:`adjustment_color_correction` | | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`adjustment_contrast` | ``1.0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`bool` | :ref:`adjustment_enabled` | ``false`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`adjustment_saturation` | ``1.0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`Color` | :ref:`ambient_light_color` | ``Color(0, 0, 0, 1)`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`ambient_light_energy` | ``1.0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`ambient_light_sky_contribution` | ``1.0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`AmbientSource` | :ref:`ambient_light_source` | ``0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`bool` | :ref:`auto_exposure_enabled` | ``false`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`auto_exposure_max_luma` | ``8.0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`auto_exposure_min_luma` | ``0.05`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`auto_exposure_scale` | ``0.4`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`auto_exposure_speed` | ``0.5`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`int` | :ref:`background_camera_feed_id` | ``1`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`int` | :ref:`background_canvas_max_layer` | ``0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`Color` | :ref:`background_color` | ``Color(0, 0, 0, 1)`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`background_energy` | ``1.0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`BGMode` | :ref:`background_mode` | ``0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`fog_aerial_perspective` | ``0.0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`fog_density` | ``0.01`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`bool` | :ref:`fog_enabled` | ``false`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`fog_height` | ``0.0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`fog_height_density` | ``0.0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`Color` | :ref:`fog_light_color` | ``Color(0.518, 0.553, 0.608, 1)`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`fog_light_energy` | ``1.0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`fog_sun_scatter` | ``0.0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`GlowBlendMode` | :ref:`glow_blend_mode` | ``2`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`glow_bloom` | ``0.0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`bool` | :ref:`glow_enabled` | ``false`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`glow_hdr_luminance_cap` | ``12.0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`glow_hdr_scale` | ``2.0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`glow_hdr_threshold` | ``1.0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`glow_intensity` | ``0.8`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`glow_levels/1` | ``0.0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`glow_levels/2` | ``0.0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`glow_levels/3` | ``1.0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`glow_levels/4` | ``0.0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`glow_levels/5` | ``1.0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`glow_levels/6` | ``0.0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`glow_levels/7` | ``0.0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`Texture` | :ref:`glow_map` | | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`glow_map_strength` | ``0.8`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`glow_mix` | ``0.05`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`bool` | :ref:`glow_normalized` | ``false`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`glow_strength` | ``1.0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`ReflectionSource` | :ref:`reflected_light_source` | ``0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`sdfgi_bounce_feedback` | ``0.5`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`sdfgi_cascade0_distance` | ``12.8`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`int` | :ref:`sdfgi_cascades` | ``4`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`bool` | :ref:`sdfgi_enabled` | ``false`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`sdfgi_energy` | ``1.0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`sdfgi_max_distance` | ``204.8`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`sdfgi_min_cell_size` | ``0.2`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`sdfgi_normal_bias` | ``1.1`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`sdfgi_probe_bias` | ``1.1`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`bool` | :ref:`sdfgi_read_sky_light` | ``true`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`bool` | :ref:`sdfgi_use_occlusion` | ``false`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`SDFGIYScale` | :ref:`sdfgi_y_scale` | ``1`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`Sky` | :ref:`sky` | | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`sky_custom_fov` | ``0.0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`Vector3` | :ref:`sky_rotation` | ``Vector3(0, 0, 0)`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`ssao_ao_channel_affect` | ``0.0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`ssao_detail` | ``0.5`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`bool` | :ref:`ssao_enabled` | ``false`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`ssao_horizon` | ``0.06`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`ssao_intensity` | ``2.0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`ssao_light_affect` | ``0.0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`ssao_power` | ``1.5`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`ssao_radius` | ``1.0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`ssao_sharpness` | ``0.98`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`bool` | :ref:`ssil_enabled` | ``false`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`ssil_intensity` | ``1.0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`ssil_normal_rejection` | ``1.0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`ssil_radius` | ``5.0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`ssil_sharpness` | ``0.98`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`ssr_depth_tolerance` | ``0.2`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`bool` | :ref:`ssr_enabled` | ``false`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`ssr_fade_in` | ``0.15`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`ssr_fade_out` | ``2.0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`int` | :ref:`ssr_max_steps` | ``64`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`tonemap_exposure` | ``1.0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`ToneMapper` | :ref:`tonemap_mode` | ``0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`tonemap_white` | ``1.0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`Color` | :ref:`volumetric_fog_albedo` | ``Color(1, 1, 1, 1)`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`volumetric_fog_ambient_inject` | ``0.0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`volumetric_fog_anisotropy` | ``0.2`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`volumetric_fog_density` | ``0.05`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`volumetric_fog_detail_spread` | ``2.0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`Color` | :ref:`volumetric_fog_emission` | ``Color(0, 0, 0, 1)`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`volumetric_fog_emission_energy` | ``1.0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`bool` | :ref:`volumetric_fog_enabled` | ``false`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`volumetric_fog_gi_inject` | ``1.0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`volumetric_fog_length` | ``64.0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`float` | :ref:`volumetric_fog_temporal_reprojection_amount` | ``0.9`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`bool` | :ref:`volumetric_fog_temporal_reprojection_enabled` | ``true`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ Methods ------- @@ -719,7 +719,7 @@ This is useful to simulate `aerial perspective ` **fog_density** +-----------+------------------------+ -| *Default* | ``0.001`` | +| *Default* | ``0.01`` | +-----------+------------------------+ | *Setter* | set_fog_density(value) | +-----------+------------------------+ @@ -782,13 +782,13 @@ The density used to increase fog as height decreases. To make fog increase as he - :ref:`Color` **fog_light_color** -+-----------+-----------------------------+ -| *Default* | ``Color(0.5, 0.6, 0.7, 1)`` | -+-----------+-----------------------------+ -| *Setter* | set_fog_light_color(value) | -+-----------+-----------------------------+ -| *Getter* | get_fog_light_color() | -+-----------+-----------------------------+ ++-----------+-----------------------------------+ +| *Default* | ``Color(0.518, 0.553, 0.608, 1)`` | ++-----------+-----------------------------------+ +| *Setter* | set_fog_light_color(value) | ++-----------+-----------------------------------+ +| *Getter* | get_fog_light_color() | ++-----------+-----------------------------------+ The fog's color. @@ -1881,14 +1881,16 @@ Enables the volumetric fog effect. Volumetric fog uses a screen-aligned froxel b - :ref:`float` **volumetric_fog_gi_inject** +-----------+-------------------------------------+ -| *Default* | ``0.0`` | +| *Default* | ``1.0`` | +-----------+-------------------------------------+ | *Setter* | set_volumetric_fog_gi_inject(value) | +-----------+-------------------------------------+ | *Getter* | get_volumetric_fog_gi_inject() | +-----------+-------------------------------------+ -Scales the strength of Global Illumination used in the volumetric fog. A value of ``0`` means that Global Illumination will not impact the volumetric fog. +Scales the strength of Global Illumination used in the volumetric fog. A value of ``0.0`` means that Global Illumination will not impact the volumetric fog. + +\ **Note:** Only :ref:`VoxelGI` and SDFGI (:ref:`sdfgi_enabled`) are taken into account when using :ref:`volumetric_fog_gi_inject`. Global illumination from :ref:`LightmapGI`, :ref:`ReflectionProbe` and SSIL (see :ref:`ssil_enabled`) will be ignored by volumetric fog. ---- diff --git a/classes/class_file.rst b/classes/class_file.rst index 0d2e489df..407af247d 100644 --- a/classes/class_file.rst +++ b/classes/class_file.rst @@ -100,7 +100,7 @@ Methods +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_8` **(** **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_as_text` **(** **)** |const| | +| :ref:`String` | :ref:`get_as_text` **(** :ref:`bool` skip_cr=false **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedByteArray` | :ref:`get_buffer` **(** :ref:`int` length **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -333,11 +333,11 @@ Returns the next 8 bits from the file as an integer. See :ref:`store_8` **get_as_text** **(** **)** |const| +- :ref:`String` **get_as_text** **(** :ref:`bool` skip_cr=false **)** |const| -Returns the whole file as a :ref:`String`. +Returns the whole file as a :ref:`String`. Text is interpreted as being UTF-8 encoded. -Text is interpreted as being UTF-8 encoded. +If ``skip_cr`` is ``true``, carriage return characters (``\r``, CR) will be ignored when parsing the UTF-8, so that only line feed characters (``\n``, LF) represent a new line (Unix convention). ---- diff --git a/classes/class_filedialog.rst b/classes/class_filedialog.rst index 16235915d..3246fd5d4 100644 --- a/classes/class_filedialog.rst +++ b/classes/class_filedialog.rst @@ -175,7 +175,7 @@ Property Descriptions The file system access scope. See enum ``Access`` constants. -\ **Warning:** Currently, in sandboxed environments such as HTML5 builds or sandboxed macOS apps, FileDialog cannot access the host file system. See `godot-proposals#1123 `__. +\ **Warning:** Currently, in sandboxed environments such as Web builds or sandboxed macOS apps, FileDialog cannot access the host file system. See `godot-proposals#1123 `__. ---- diff --git a/classes/class_float.rst b/classes/class_float.rst index fcd3a6900..d05d73b1b 100644 --- a/classes/class_float.rst +++ b/classes/class_float.rst @@ -85,13 +85,13 @@ Operators +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`operator /` **(** :ref:`int` right **)** | +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator <` **(** :ref:`float` right **)** | +| :ref:`bool` | :ref:`operator \<` **(** :ref:`float` right **)** | +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator <` **(** :ref:`int` right **)** | +| :ref:`bool` | :ref:`operator \<` **(** :ref:`int` right **)** | +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator <=` **(** :ref:`float` right **)** | +| :ref:`bool` | :ref:`operator \<=` **(** :ref:`float` right **)** | +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator <=` **(** :ref:`int` right **)** | +| :ref:`bool` | :ref:`operator \<=` **(** :ref:`int` right **)** | +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`float` right **)** | +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ diff --git a/classes/class_font.rst b/classes/class_font.rst index 4013c9d6c..e282b0eea 100644 --- a/classes/class_font.rst +++ b/classes/class_font.rst @@ -95,7 +95,7 @@ Method Descriptions - :ref:`float` **draw_char** **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`int` char, :ref:`int` font_size, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** |const| -Draw a single Unicode character ``char`` into a canvas item using the font, at a given position, with ``modulate`` color. ``position`` specifies the baseline, not the top. To draw from the top, *ascent* must be added to the Y axis. +Draw a single Unicode character ``char`` into a canvas item using the font, at a given position, with ``modulate`` color. ``pos`` specifies the baseline, not the top. To draw from the top, *ascent* must be added to the Y axis. \ **Note:** Do not use this function to draw strings character by character, use :ref:`draw_string` or :ref:`TextLine` instead. @@ -105,7 +105,7 @@ Draw a single Unicode character ``char`` into a canvas item using the font, at a - :ref:`float` **draw_char_outline** **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`int` char, :ref:`int` font_size, :ref:`int` size=-1, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** |const| -Draw a single Unicode character ``char`` outline into a canvas item using the font, at a given position, with ``modulate`` color and ``size`` outline size. ``position`` specifies the baseline, not the top. To draw from the top, *ascent* must be added to the Y axis. +Draw a single Unicode character ``char`` outline into a canvas item using the font, at a given position, with ``modulate`` color and ``size`` outline size. ``pos`` specifies the baseline, not the top. To draw from the top, *ascent* must be added to the Y axis. \ **Note:** Do not use this function to draw strings character by character, use :ref:`draw_string` or :ref:`TextLine` instead. @@ -115,7 +115,7 @@ Draw a single Unicode character ``char`` outline into a canvas item using the fo - void **draw_multiline_string** **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| -Breaks ``text`` to the lines using rules specified by ``flags`` and draws it into a canvas item using the font, at a given position, with ``modulate`` color, optionally clipping the width and aligning horizontally. ``position`` specifies the baseline of the first line, not the top. To draw from the top, *ascent* must be added to the Y axis. +Breaks ``text`` into lines using rules specified by ``brk_flags`` and draws it into a canvas item using the font, at a given position, with ``modulate`` color, optionally clipping the width and aligning horizontally. ``pos`` specifies the baseline of the first line, not the top. To draw from the top, *ascent* must be added to the Y axis. See also :ref:`CanvasItem.draw_multiline_string`. @@ -125,7 +125,7 @@ See also :ref:`CanvasItem.draw_multiline_string` canvas_item, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`int` size=1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| -Breaks ``text`` to the lines using rules specified by ``flags`` and draws text outline into a canvas item using the font, at a given position, with ``modulate`` color and ``size`` outline size, optionally clipping the width and aligning horizontally. ``position`` specifies the baseline of the first line, not the top. To draw from the top, *ascent* must be added to the Y axis. +Breaks ``text`` to the lines using rules specified by ``brk_flags`` and draws text outline into a canvas item using the font, at a given position, with ``modulate`` color and ``size`` outline size, optionally clipping the width and aligning horizontally. ``pos`` specifies the baseline of the first line, not the top. To draw from the top, *ascent* must be added to the Y axis. See also :ref:`CanvasItem.draw_multiline_string_outline`. @@ -135,7 +135,7 @@ See also :ref:`CanvasItem.draw_multiline_string_outline` canvas_item, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| -Draw ``text`` into a canvas item using the font, at a given position, with ``modulate`` color, optionally clipping the width and aligning horizontally. ``position`` specifies the baseline, not the top. To draw from the top, *ascent* must be added to the Y axis. +Draw ``text`` into a canvas item using the font, at a given position, with ``modulate`` color, optionally clipping the width and aligning horizontally. ``pos`` specifies the baseline, not the top. To draw from the top, *ascent* must be added to the Y axis. See also :ref:`CanvasItem.draw_string`. @@ -145,7 +145,7 @@ See also :ref:`CanvasItem.draw_string`. - void **draw_string_outline** **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` size=1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| -Draw ``text`` outline into a canvas item using the font, at a given position, with ``modulate`` color and ``size`` outline size, optionally clipping the width and aligning horizontally. ``position`` specifies the baseline, not the top. To draw from the top, *ascent* must be added to the Y axis. +Draw ``text`` outline into a canvas item using the font, at a given position, with ``modulate`` color and ``size`` outline size, optionally clipping the width and aligning horizontally. ``pos`` specifies the baseline, not the top. To draw from the top, *ascent* must be added to the Y axis. See also :ref:`CanvasItem.draw_string_outline`. diff --git a/classes/class_fontfile.rst b/classes/class_fontfile.rst index d019a60fd..b82219007 100644 --- a/classes/class_fontfile.rst +++ b/classes/class_fontfile.rst @@ -60,7 +60,7 @@ Properties ---------- +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`antialiased` | ``true`` | +| :ref:`FontAntialiasing` | :ref:`antialiasing` | ``1`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`PackedByteArray` | :ref:`data` | ``PackedByteArray()`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ @@ -127,7 +127,7 @@ Methods +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_glyph_index` **(** :ref:`int` size, :ref:`int` char, :ref:`int` variation_selector **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_glyph_list` **(** :ref:`int` cache_index, :ref:`Vector2i` size **)** |const| | +| :ref:`PackedInt32Array` | :ref:`get_glyph_list` **(** :ref:`int` cache_index, :ref:`Vector2i` size **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_glyph_offset` **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -139,7 +139,7 @@ Methods +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_kerning` **(** :ref:`int` cache_index, :ref:`int` size, :ref:`Vector2i` glyph_pair **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_kerning_list` **(** :ref:`int` cache_index, :ref:`int` size **)** |const| | +| :ref:`Vector2i[]` | :ref:`get_kerning_list` **(** :ref:`int` cache_index, :ref:`int` size **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`get_language_support_override` **(** :ref:`String` language **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -149,7 +149,7 @@ Methods +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`get_script_support_overrides` **(** **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_size_cache_list` **(** :ref:`int` cache_index **)** |const| | +| :ref:`Vector2i[]` | :ref:`get_size_cache_list` **(** :ref:`int` cache_index **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_texture_count` **(** :ref:`int` cache_index, :ref:`Vector2i` size **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -225,19 +225,19 @@ Methods Property Descriptions --------------------- -.. _class_FontFile_property_antialiased: +.. _class_FontFile_property_antialiasing: -- :ref:`bool` **antialiased** +- :ref:`FontAntialiasing` **antialiasing** -+-----------+------------------------+ -| *Default* | ``true`` | -+-----------+------------------------+ -| *Setter* | set_antialiased(value) | -+-----------+------------------------+ -| *Getter* | is_antialiased() | -+-----------+------------------------+ ++-----------+-------------------------+ +| *Default* | ``1`` | ++-----------+-------------------------+ +| *Setter* | set_antialiasing(value) | ++-----------+-------------------------+ +| *Getter* | get_antialiasing() | ++-----------+-------------------------+ -If set to ``true``, font 8-bit anitialiased glyph rendering is supported and enabled. +Font anti-aliasing mode. ---- @@ -602,7 +602,7 @@ Returns the glyph index of a ``char``, optionally modified by the ``variation_se .. _class_FontFile_method_get_glyph_list: -- :ref:`Array` **get_glyph_list** **(** :ref:`int` cache_index, :ref:`Vector2i` size **)** |const| +- :ref:`PackedInt32Array` **get_glyph_list** **(** :ref:`int` cache_index, :ref:`Vector2i` size **)** |const| Returns list of rendered glyphs in the cache entry. @@ -650,7 +650,7 @@ Returns kerning for the pair of glyphs. .. _class_FontFile_method_get_kerning_list: -- :ref:`Array` **get_kerning_list** **(** :ref:`int` cache_index, :ref:`int` size **)** |const| +- :ref:`Vector2i[]` **get_kerning_list** **(** :ref:`int` cache_index, :ref:`int` size **)** |const| Returns list of the kerning overrides. @@ -690,7 +690,7 @@ Returns list of script support overrides. .. _class_FontFile_method_get_size_cache_list: -- :ref:`Array` **get_size_cache_list** **(** :ref:`int` cache_index **)** |const| +- :ref:`Vector2i[]` **get_size_cache_list** **(** :ref:`int` cache_index **)** |const| Returns list of the font sizes in the cache. Each size is ``Vector2i`` with font size and outline size. diff --git a/classes/class_generic6dofjoint3d.rst b/classes/class_generic6dofjoint3d.rst index 3aaa1f4c2..f4d1a70da 100644 --- a/classes/class_generic6dofjoint3d.rst +++ b/classes/class_generic6dofjoint3d.rst @@ -427,9 +427,13 @@ The maximum amount of force that can occur, when rotating around the X axis. - :ref:`float` **angular_limit_x/lower_angle** -+-----------+---------+ -| *Default* | ``0.0`` | -+-----------+---------+ ++-----------+--------------------+ +| *Default* | ``0.0`` | ++-----------+--------------------+ +| *Setter* | set_param_x(value) | ++-----------+--------------------+ +| *Getter* | get_param_x() | ++-----------+--------------------+ The minimum rotation in negative direction to break loose and rotate around the X axis. @@ -471,9 +475,13 @@ The speed of all rotations across the X axis. - :ref:`float` **angular_limit_x/upper_angle** -+-----------+---------+ -| *Default* | ``0.0`` | -+-----------+---------+ ++-----------+--------------------+ +| *Default* | ``0.0`` | ++-----------+--------------------+ +| *Setter* | set_param_x(value) | ++-----------+--------------------+ +| *Getter* | get_param_x() | ++-----------+--------------------+ The minimum rotation in positive direction to break loose and rotate around the X axis. @@ -547,9 +555,13 @@ The maximum amount of force that can occur, when rotating around the Y axis. - :ref:`float` **angular_limit_y/lower_angle** -+-----------+---------+ -| *Default* | ``0.0`` | -+-----------+---------+ ++-----------+--------------------+ +| *Default* | ``0.0`` | ++-----------+--------------------+ +| *Setter* | set_param_y(value) | ++-----------+--------------------+ +| *Getter* | get_param_y() | ++-----------+--------------------+ The minimum rotation in negative direction to break loose and rotate around the Y axis. @@ -591,9 +603,13 @@ The speed of all rotations across the Y axis. - :ref:`float` **angular_limit_y/upper_angle** -+-----------+---------+ -| *Default* | ``0.0`` | -+-----------+---------+ ++-----------+--------------------+ +| *Default* | ``0.0`` | ++-----------+--------------------+ +| *Setter* | set_param_y(value) | ++-----------+--------------------+ +| *Getter* | get_param_y() | ++-----------+--------------------+ The minimum rotation in positive direction to break loose and rotate around the Y axis. @@ -667,9 +683,13 @@ The maximum amount of force that can occur, when rotating around the Z axis. - :ref:`float` **angular_limit_z/lower_angle** -+-----------+---------+ -| *Default* | ``0.0`` | -+-----------+---------+ ++-----------+--------------------+ +| *Default* | ``0.0`` | ++-----------+--------------------+ +| *Setter* | set_param_z(value) | ++-----------+--------------------+ +| *Getter* | get_param_z() | ++-----------+--------------------+ The minimum rotation in negative direction to break loose and rotate around the Z axis. @@ -711,9 +731,13 @@ The speed of all rotations across the Z axis. - :ref:`float` **angular_limit_z/upper_angle** -+-----------+---------+ -| *Default* | ``0.0`` | -+-----------+---------+ ++-----------+--------------------+ +| *Default* | ``0.0`` | ++-----------+--------------------+ +| *Setter* | set_param_z(value) | ++-----------+--------------------+ +| *Getter* | get_param_z() | ++-----------+--------------------+ The minimum rotation in positive direction to break loose and rotate around the Z axis. diff --git a/classes/class_geometry2d.rst b/classes/class_geometry2d.rst index 88d6fd74e..a1dfe00a0 100644 --- a/classes/class_geometry2d.rst +++ b/classes/class_geometry2d.rst @@ -22,49 +22,51 @@ Geometry2D provides users with a set of helper functions to create geometric sha Methods ------- -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`clip_polygons` **(** :ref:`PackedVector2Array` polygon_a, :ref:`PackedVector2Array` polygon_b **)** | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`clip_polyline_with_polygon` **(** :ref:`PackedVector2Array` polyline, :ref:`PackedVector2Array` polygon **)** | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector2Array` | :ref:`convex_hull` **(** :ref:`PackedVector2Array` points **)** | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`exclude_polygons` **(** :ref:`PackedVector2Array` polygon_a, :ref:`PackedVector2Array` polygon_b **)** | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_closest_point_to_segment` **(** :ref:`Vector2` point, :ref:`Vector2` s1, :ref:`Vector2` s2 **)** | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_closest_point_to_segment_uncapped` **(** :ref:`Vector2` point, :ref:`Vector2` s1, :ref:`Vector2` s2 **)** | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector2Array` | :ref:`get_closest_points_between_segments` **(** :ref:`Vector2` p1, :ref:`Vector2` q1, :ref:`Vector2` p2, :ref:`Vector2` q2 **)** | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`intersect_polygons` **(** :ref:`PackedVector2Array` polygon_a, :ref:`PackedVector2Array` polygon_b **)** | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`intersect_polyline_with_polygon` **(** :ref:`PackedVector2Array` polyline, :ref:`PackedVector2Array` polygon **)** | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_point_in_circle` **(** :ref:`Vector2` point, :ref:`Vector2` circle_position, :ref:`float` circle_radius **)** | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_point_in_polygon` **(** :ref:`Vector2` point, :ref:`PackedVector2Array` polygon **)** | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_polygon_clockwise` **(** :ref:`PackedVector2Array` polygon **)** | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`line_intersects_line` **(** :ref:`Vector2` from_a, :ref:`Vector2` dir_a, :ref:`Vector2` from_b, :ref:`Vector2` dir_b **)** | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`make_atlas` **(** :ref:`PackedVector2Array` sizes **)** | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`merge_polygons` **(** :ref:`PackedVector2Array` polygon_a, :ref:`PackedVector2Array` polygon_b **)** | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`offset_polygon` **(** :ref:`PackedVector2Array` polygon, :ref:`float` delta, :ref:`PolyJoinType` join_type=0 **)** | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`offset_polyline` **(** :ref:`PackedVector2Array` polyline, :ref:`float` delta, :ref:`PolyJoinType` join_type=0, :ref:`PolyEndType` end_type=3 **)** | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`point_is_inside_triangle` **(** :ref:`Vector2` point, :ref:`Vector2` a, :ref:`Vector2` b, :ref:`Vector2` c **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`segment_intersects_segment` **(** :ref:`Vector2` from_a, :ref:`Vector2` to_a, :ref:`Vector2` from_b, :ref:`Vector2` to_b **)** | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`triangulate_delaunay` **(** :ref:`PackedVector2Array` points **)** | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`triangulate_polygon` **(** :ref:`PackedVector2Array` polygon **)** | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedVector2Array[]` | :ref:`clip_polygons` **(** :ref:`PackedVector2Array` polygon_a, :ref:`PackedVector2Array` polygon_b **)** | ++-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedVector2Array[]` | :ref:`clip_polyline_with_polygon` **(** :ref:`PackedVector2Array` polyline, :ref:`PackedVector2Array` polygon **)** | ++-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedVector2Array` | :ref:`convex_hull` **(** :ref:`PackedVector2Array` points **)** | ++-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedVector2Array[]` | :ref:`exclude_polygons` **(** :ref:`PackedVector2Array` polygon_a, :ref:`PackedVector2Array` polygon_b **)** | ++-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_closest_point_to_segment` **(** :ref:`Vector2` point, :ref:`Vector2` s1, :ref:`Vector2` s2 **)** | ++-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_closest_point_to_segment_uncapped` **(** :ref:`Vector2` point, :ref:`Vector2` s1, :ref:`Vector2` s2 **)** | ++-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedVector2Array` | :ref:`get_closest_points_between_segments` **(** :ref:`Vector2` p1, :ref:`Vector2` q1, :ref:`Vector2` p2, :ref:`Vector2` q2 **)** | ++-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedVector2Array[]` | :ref:`intersect_polygons` **(** :ref:`PackedVector2Array` polygon_a, :ref:`PackedVector2Array` polygon_b **)** | ++-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedVector2Array[]` | :ref:`intersect_polyline_with_polygon` **(** :ref:`PackedVector2Array` polyline, :ref:`PackedVector2Array` polygon **)** | ++-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_point_in_circle` **(** :ref:`Vector2` point, :ref:`Vector2` circle_position, :ref:`float` circle_radius **)** | ++-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_point_in_polygon` **(** :ref:`Vector2` point, :ref:`PackedVector2Array` polygon **)** | ++-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_polygon_clockwise` **(** :ref:`PackedVector2Array` polygon **)** | ++-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`line_intersects_line` **(** :ref:`Vector2` from_a, :ref:`Vector2` dir_a, :ref:`Vector2` from_b, :ref:`Vector2` dir_b **)** | ++-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`make_atlas` **(** :ref:`PackedVector2Array` sizes **)** | ++-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedVector2Array[]` | :ref:`merge_polygons` **(** :ref:`PackedVector2Array` polygon_a, :ref:`PackedVector2Array` polygon_b **)** | ++-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedVector2Array[]` | :ref:`offset_polygon` **(** :ref:`PackedVector2Array` polygon, :ref:`float` delta, :ref:`PolyJoinType` join_type=0 **)** | ++-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedVector2Array[]` | :ref:`offset_polyline` **(** :ref:`PackedVector2Array` polyline, :ref:`float` delta, :ref:`PolyJoinType` join_type=0, :ref:`PolyEndType` end_type=3 **)** | ++-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`point_is_inside_triangle` **(** :ref:`Vector2` point, :ref:`Vector2` a, :ref:`Vector2` b, :ref:`Vector2` c **)** |const| | ++-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`segment_intersects_circle` **(** :ref:`Vector2` segment_from, :ref:`Vector2` segment_to, :ref:`Vector2` circle_position, :ref:`float` circle_radius **)** | ++-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`segment_intersects_segment` **(** :ref:`Vector2` from_a, :ref:`Vector2` to_a, :ref:`Vector2` from_b, :ref:`Vector2` to_b **)** | ++-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedInt32Array` | :ref:`triangulate_delaunay` **(** :ref:`PackedVector2Array` points **)** | ++-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedInt32Array` | :ref:`triangulate_polygon` **(** :ref:`PackedVector2Array` polygon **)** | ++-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Enumerations ------------ @@ -138,7 +140,7 @@ Method Descriptions .. _class_Geometry2D_method_clip_polygons: -- :ref:`Array` **clip_polygons** **(** :ref:`PackedVector2Array` polygon_a, :ref:`PackedVector2Array` polygon_b **)** +- :ref:`PackedVector2Array[]` **clip_polygons** **(** :ref:`PackedVector2Array` polygon_a, :ref:`PackedVector2Array` polygon_b **)** Clips ``polygon_a`` against ``polygon_b`` and returns an array of clipped polygons. This performs :ref:`OPERATION_DIFFERENCE` between polygons. Returns an empty array if ``polygon_b`` completely overlaps ``polygon_a``. @@ -148,7 +150,7 @@ If ``polygon_b`` is enclosed by ``polygon_a``, returns an outer polygon (boundar .. _class_Geometry2D_method_clip_polyline_with_polygon: -- :ref:`Array` **clip_polyline_with_polygon** **(** :ref:`PackedVector2Array` polyline, :ref:`PackedVector2Array` polygon **)** +- :ref:`PackedVector2Array[]` **clip_polyline_with_polygon** **(** :ref:`PackedVector2Array` polyline, :ref:`PackedVector2Array` polygon **)** Clips ``polyline`` against ``polygon`` and returns an array of clipped polylines. This performs :ref:`OPERATION_DIFFERENCE` between the polyline and the polygon. This operation can be thought of as cutting a line with a closed shape. @@ -164,7 +166,7 @@ Given an array of :ref:`Vector2`\ s, returns the convex hull as a .. _class_Geometry2D_method_exclude_polygons: -- :ref:`Array` **exclude_polygons** **(** :ref:`PackedVector2Array` polygon_a, :ref:`PackedVector2Array` polygon_b **)** +- :ref:`PackedVector2Array[]` **exclude_polygons** **(** :ref:`PackedVector2Array` polygon_a, :ref:`PackedVector2Array` polygon_b **)** Mutually excludes common area defined by intersection of ``polygon_a`` and ``polygon_b`` (see :ref:`intersect_polygons`) and returns an array of excluded polygons. This performs :ref:`OPERATION_XOR` between polygons. In other words, returns all but common area between polygons. @@ -198,7 +200,7 @@ Given the two 2D segments (``p1``, ``q1``) and (``p2``, ``q2``), finds those two .. _class_Geometry2D_method_intersect_polygons: -- :ref:`Array` **intersect_polygons** **(** :ref:`PackedVector2Array` polygon_a, :ref:`PackedVector2Array` polygon_b **)** +- :ref:`PackedVector2Array[]` **intersect_polygons** **(** :ref:`PackedVector2Array` polygon_a, :ref:`PackedVector2Array` polygon_b **)** Intersects ``polygon_a`` with ``polygon_b`` and returns an array of intersected polygons. This performs :ref:`OPERATION_INTERSECTION` between polygons. In other words, returns common area shared by polygons. Returns an empty array if no intersection occurs. @@ -208,7 +210,7 @@ The operation may result in an outer polygon (boundary) and inner polygon (hole) .. _class_Geometry2D_method_intersect_polyline_with_polygon: -- :ref:`Array` **intersect_polyline_with_polygon** **(** :ref:`PackedVector2Array` polyline, :ref:`PackedVector2Array` polygon **)** +- :ref:`PackedVector2Array[]` **intersect_polyline_with_polygon** **(** :ref:`PackedVector2Array` polyline, :ref:`PackedVector2Array` polygon **)** Intersects ``polyline`` with ``polygon`` and returns an array of intersected polylines. This performs :ref:`OPERATION_INTERSECTION` between the polyline and the polygon. This operation can be thought of as chopping a line with a closed shape. @@ -252,13 +254,13 @@ Checks if the two lines (``from_a``, ``dir_a``) and (``from_b``, ``dir_b``) inte - :ref:`Dictionary` **make_atlas** **(** :ref:`PackedVector2Array` sizes **)** -Given an array of :ref:`Vector2`\ s representing tiles, builds an atlas. The returned dictionary has two keys: ``points`` is a vector of :ref:`Vector2` that specifies the positions of each tile, ``size`` contains the overall size of the whole atlas as :ref:`Vector2`. +Given an array of :ref:`Vector2`\ s representing tiles, builds an atlas. The returned dictionary has two keys: ``points`` is an array of :ref:`Vector2` that specifies the positions of each tile, ``size`` contains the overall size of the whole atlas as :ref:`Vector2`. ---- .. _class_Geometry2D_method_merge_polygons: -- :ref:`Array` **merge_polygons** **(** :ref:`PackedVector2Array` polygon_a, :ref:`PackedVector2Array` polygon_b **)** +- :ref:`PackedVector2Array[]` **merge_polygons** **(** :ref:`PackedVector2Array` polygon_a, :ref:`PackedVector2Array` polygon_b **)** Merges (combines) ``polygon_a`` and ``polygon_b`` and returns an array of merged polygons. This performs :ref:`OPERATION_UNION` between polygons. @@ -268,7 +270,7 @@ The operation may result in an outer polygon (boundary) and multiple inner polyg .. _class_Geometry2D_method_offset_polygon: -- :ref:`Array` **offset_polygon** **(** :ref:`PackedVector2Array` polygon, :ref:`float` delta, :ref:`PolyJoinType` join_type=0 **)** +- :ref:`PackedVector2Array[]` **offset_polygon** **(** :ref:`PackedVector2Array` polygon, :ref:`float` delta, :ref:`PolyJoinType` join_type=0 **)** Inflates or deflates ``polygon`` by ``delta`` units (pixels). If ``delta`` is positive, makes the polygon grow outward. If ``delta`` is negative, shrinks the polygon inward. Returns an array of polygons because inflating/deflating may result in multiple discrete polygons. Returns an empty array if ``delta`` is negative and the absolute value of it approximately exceeds the minimum bounding rectangle dimensions of the polygon. @@ -302,7 +304,7 @@ The operation may result in an outer polygon (boundary) and inner polygon (hole) .. _class_Geometry2D_method_offset_polyline: -- :ref:`Array` **offset_polyline** **(** :ref:`PackedVector2Array` polyline, :ref:`float` delta, :ref:`PolyJoinType` join_type=0, :ref:`PolyEndType` end_type=3 **)** +- :ref:`PackedVector2Array[]` **offset_polyline** **(** :ref:`PackedVector2Array` polyline, :ref:`float` delta, :ref:`PolyJoinType` join_type=0, :ref:`PolyEndType` end_type=3 **)** Inflates or deflates ``polyline`` by ``delta`` units (pixels), producing polygons. If ``delta`` is positive, makes the polyline grow outward. Returns an array of polygons because inflating/deflating may result in multiple discrete polygons. If ``delta`` is negative, returns an empty array. @@ -322,6 +324,14 @@ Returns if ``point`` is inside the triangle specified by ``a``, ``b`` and ``c``. ---- +.. _class_Geometry2D_method_segment_intersects_circle: + +- :ref:`float` **segment_intersects_circle** **(** :ref:`Vector2` segment_from, :ref:`Vector2` segment_to, :ref:`Vector2` circle_position, :ref:`float` circle_radius **)** + +Given the 2D segment (``segment_from``, ``segment_to``), returns the position on the segment (as a number between 0 and 1) at which the segment hits the circle that is located at position ``circle_position`` and has radius ``circle_radius``. If the segment does not intersect the circle, -1 is returned (this is also the case if the line extending the segment would intersect the circle, but the segment does not). + +---- + .. _class_Geometry2D_method_segment_intersects_segment: - :ref:`Variant` **segment_intersects_segment** **(** :ref:`Vector2` from_a, :ref:`Vector2` to_a, :ref:`Vector2` from_b, :ref:`Vector2` to_b **)** diff --git a/classes/class_geometry3d.rst b/classes/class_geometry3d.rst index 2b927b617..22c08c866 100644 --- a/classes/class_geometry3d.rst +++ b/classes/class_geometry3d.rst @@ -23,11 +23,11 @@ Methods ------- +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`build_box_planes` **(** :ref:`Vector3` extents **)** | +| :ref:`Plane[]` | :ref:`build_box_planes` **(** :ref:`Vector3` extents **)** | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`build_capsule_planes` **(** :ref:`float` radius, :ref:`float` height, :ref:`int` sides, :ref:`int` lats, Vector3.Axis axis=2 **)** | +| :ref:`Plane[]` | :ref:`build_capsule_planes` **(** :ref:`float` radius, :ref:`float` height, :ref:`int` sides, :ref:`int` lats, Vector3.Axis axis=2 **)** | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`build_cylinder_planes` **(** :ref:`float` radius, :ref:`float` height, :ref:`int` sides, Vector3.Axis axis=2 **)** | +| :ref:`Plane[]` | :ref:`build_cylinder_planes` **(** :ref:`float` radius, :ref:`float` height, :ref:`int` sides, Vector3.Axis axis=2 **)** | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedVector3Array` | :ref:`clip_polygon` **(** :ref:`PackedVector3Array` points, :ref:`Plane` plane **)** | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -53,7 +53,7 @@ Method Descriptions .. _class_Geometry3D_method_build_box_planes: -- :ref:`Array` **build_box_planes** **(** :ref:`Vector3` extents **)** +- :ref:`Plane[]` **build_box_planes** **(** :ref:`Vector3` extents **)** Returns an array with 6 :ref:`Plane`\ s that describe the sides of a box centered at the origin. The box size is defined by ``extents``, which represents one (positive) corner of the box (i.e. half its actual size). @@ -61,7 +61,7 @@ Returns an array with 6 :ref:`Plane`\ s that describe the sides of .. _class_Geometry3D_method_build_capsule_planes: -- :ref:`Array` **build_capsule_planes** **(** :ref:`float` radius, :ref:`float` height, :ref:`int` sides, :ref:`int` lats, Vector3.Axis axis=2 **)** +- :ref:`Plane[]` **build_capsule_planes** **(** :ref:`float` radius, :ref:`float` height, :ref:`int` sides, :ref:`int` lats, Vector3.Axis axis=2 **)** Returns an array of :ref:`Plane`\ s closely bounding a faceted capsule centered at the origin with radius ``radius`` and height ``height``. The parameter ``sides`` defines how many planes will be generated for the side part of the capsule, whereas ``lats`` gives the number of latitudinal steps at the bottom and top of the capsule. The parameter ``axis`` describes the axis along which the capsule is oriented (0 for X, 1 for Y, 2 for Z). @@ -69,7 +69,7 @@ Returns an array of :ref:`Plane`\ s closely bounding a faceted caps .. _class_Geometry3D_method_build_cylinder_planes: -- :ref:`Array` **build_cylinder_planes** **(** :ref:`float` radius, :ref:`float` height, :ref:`int` sides, Vector3.Axis axis=2 **)** +- :ref:`Plane[]` **build_cylinder_planes** **(** :ref:`float` radius, :ref:`float` height, :ref:`int` sides, Vector3.Axis axis=2 **)** Returns an array of :ref:`Plane`\ s closely bounding a faceted cylinder centered at the origin with radius ``radius`` and height ``height``. The parameter ``sides`` defines how many planes will be generated for the round part of the cylinder. The parameter ``axis`` describes the axis along which the cylinder is oriented (0 for X, 1 for Y, 2 for Z). diff --git a/classes/class_geometryinstance3d.rst b/classes/class_geometryinstance3d.rst index 959ea0945..b05b6bff6 100644 --- a/classes/class_geometryinstance3d.rst +++ b/classes/class_geometryinstance3d.rst @@ -58,11 +58,11 @@ Methods ------- +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get_shader_instance_uniform` **(** :ref:`StringName` uniform **)** |const| | +| :ref:`Variant` | :ref:`get_instance_shader_uniform` **(** :ref:`StringName` uniform **)** |const| | +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_custom_aabb` **(** :ref:`AABB` aabb **)** | +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_shader_instance_uniform` **(** :ref:`StringName` uniform, :ref:`Variant` value **)** | +| void | :ref:`set_instance_shader_uniform` **(** :ref:`StringName` uniform, :ref:`Variant` value **)** | +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Enumerations @@ -366,9 +366,9 @@ Controls which instances will be faded when approaching the limits of the visibi Method Descriptions ------------------- -.. _class_GeometryInstance3D_method_get_shader_instance_uniform: +.. _class_GeometryInstance3D_method_get_instance_shader_uniform: -- :ref:`Variant` **get_shader_instance_uniform** **(** :ref:`StringName` uniform **)** |const| +- :ref:`Variant` **get_instance_shader_uniform** **(** :ref:`StringName` uniform **)** |const| ---- @@ -380,9 +380,9 @@ Overrides the bounding box of this node with a custom one. To remove it, set an ---- -.. _class_GeometryInstance3D_method_set_shader_instance_uniform: +.. _class_GeometryInstance3D_method_set_instance_shader_uniform: -- void **set_shader_instance_uniform** **(** :ref:`StringName` uniform, :ref:`Variant` value **)** +- void **set_instance_shader_uniform** **(** :ref:`StringName` uniform, :ref:`Variant` value **)** .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_gltfcamera.rst b/classes/class_gltfcamera.rst index 569512ca2..6db6644b2 100644 --- a/classes/class_gltfcamera.rst +++ b/classes/class_gltfcamera.rst @@ -12,7 +12,19 @@ GLTFCamera **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +Represents a GLTF camera. +Description +----------- + +Represents a camera as defined by the base GLTF spec. + +Tutorials +--------- + +- `GLTF camera detailed specification `__ + +- `GLTF camera spec and example file `__ Properties ---------- @@ -22,10 +34,25 @@ Properties +---------------------------+-----------------------------------------------------------+------------+ | :ref:`float` | :ref:`depth_near` | ``0.05`` | +---------------------------+-----------------------------------------------------------+------------+ -| :ref:`float` | :ref:`fov_size` | ``75.0`` | +| :ref:`float` | :ref:`fov` | ``1.309`` | +---------------------------+-----------------------------------------------------------+------------+ | :ref:`bool` | :ref:`perspective` | ``true`` | +---------------------------+-----------------------------------------------------------+------------+ +| :ref:`float` | :ref:`size_mag` | ``0.5`` | ++---------------------------+-----------------------------------------------------------+------------+ + +Methods +------- + ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`GLTFCamera` | :ref:`from_dictionary` **(** :ref:`Dictionary` dictionary **)** |static| | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`GLTFCamera` | :ref:`from_node` **(** :ref:`Camera3D` camera_node **)** |static| | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`to_dictionary` **(** **)** |const| | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Camera3D` | :ref:`to_node` **(** **)** |const| | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ Property Descriptions --------------------- @@ -42,6 +69,8 @@ Property Descriptions | *Getter* | get_depth_far() | +-----------+----------------------+ +The distance to the far culling boundary for this camera relative to its local Z axis, in meters. This maps to GLTF's ``zfar`` property. + ---- .. _class_GLTFCamera_property_depth_near: @@ -56,19 +85,23 @@ Property Descriptions | *Getter* | get_depth_near() | +-----------+-----------------------+ +The distance to the near culling boundary for this camera relative to its local Z axis, in meters. This maps to GLTF's ``znear`` property. + ---- -.. _class_GLTFCamera_property_fov_size: +.. _class_GLTFCamera_property_fov: -- :ref:`float` **fov_size** +- :ref:`float` **fov** -+-----------+---------------------+ -| *Default* | ``75.0`` | -+-----------+---------------------+ -| *Setter* | set_fov_size(value) | -+-----------+---------------------+ -| *Getter* | get_fov_size() | -+-----------+---------------------+ ++-----------+----------------+ +| *Default* | ``1.309`` | ++-----------+----------------+ +| *Setter* | set_fov(value) | ++-----------+----------------+ +| *Getter* | get_fov() | ++-----------+----------------+ + +The FOV of the camera. This class and GLTF define the camera FOV in radians, while Godot uses degrees. This maps to GLTF's ``yfov`` property. This value is only used for perspective cameras, when :ref:`perspective` is true. ---- @@ -84,6 +117,57 @@ Property Descriptions | *Getter* | get_perspective() | +-----------+------------------------+ +Whether or not the camera is in perspective mode. If false, the camera is in orthographic/orthogonal mode. This maps to GLTF's camera ``type`` property. See :ref:`Camera3D.projection` and the GLTF spec for more information. + +---- + +.. _class_GLTFCamera_property_size_mag: + +- :ref:`float` **size_mag** + ++-----------+---------------------+ +| *Default* | ``0.5`` | ++-----------+---------------------+ +| *Setter* | set_size_mag(value) | ++-----------+---------------------+ +| *Getter* | get_size_mag() | ++-----------+---------------------+ + +The size of the camera. This class and GLTF define the camera size magnitude as a radius in meters, while Godot defines it as a diameter in meters. This maps to GLTF's ``ymag`` property. This value is only used for orthographic/orthogonal cameras, when :ref:`perspective` is false. + +Method Descriptions +------------------- + +.. _class_GLTFCamera_method_from_dictionary: + +- :ref:`GLTFCamera` **from_dictionary** **(** :ref:`Dictionary` dictionary **)** |static| + +Creates a new GLTFCamera instance by parsing the given :ref:`Dictionary`. + +---- + +.. _class_GLTFCamera_method_from_node: + +- :ref:`GLTFCamera` **from_node** **(** :ref:`Camera3D` camera_node **)** |static| + +Create a new GLTFCamera instance from the given Godot :ref:`Camera3D` node. + +---- + +.. _class_GLTFCamera_method_to_dictionary: + +- :ref:`Dictionary` **to_dictionary** **(** **)** |const| + +Serializes this GLTFCamera instance into a :ref:`Dictionary`. + +---- + +.. _class_GLTFCamera_method_to_node: + +- :ref:`Camera3D` **to_node** **(** **)** |const| + +Converts this GLTFCamera instance into a Godot :ref:`Camera3D` node. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_gltflight.rst b/classes/class_gltflight.rst index 7a30eac72..5da2d1270 100644 --- a/classes/class_gltflight.rst +++ b/classes/class_gltflight.rst @@ -12,7 +12,17 @@ GLTFLight **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +Represents a GLTF light. +Description +----------- + +Represents a light as defined by the ``KHR_lights_punctual`` GLTF extension. + +Tutorials +--------- + +- `KHR_lights_punctual GLTF extension spec `__ Properties ---------- @@ -31,6 +41,19 @@ Properties | :ref:`float` | :ref:`range` | ``inf`` | +-----------------------------+--------------------------------------------------------------------+-----------------------+ +Methods +------- + ++-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`GLTFLight` | :ref:`from_dictionary` **(** :ref:`Dictionary` dictionary **)** |static| | ++-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`GLTFLight` | :ref:`from_node` **(** :ref:`Light3D` light_node **)** |static| | ++-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`to_dictionary` **(** **)** |const| | ++-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Light3D` | :ref:`to_node` **(** **)** |const| | ++-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + Property Descriptions --------------------- @@ -132,6 +155,39 @@ At this angle, the light drops off to zero brightness. Between the inner and out The range of the light, beyond which the light has no effect. GLTF lights with no range defined behave like physical lights (which have infinite range). When creating a Godot light, the range is clamped to 4096. +Method Descriptions +------------------- + +.. _class_GLTFLight_method_from_dictionary: + +- :ref:`GLTFLight` **from_dictionary** **(** :ref:`Dictionary` dictionary **)** |static| + +Creates a new GLTFLight instance by parsing the given :ref:`Dictionary`. + +---- + +.. _class_GLTFLight_method_from_node: + +- :ref:`GLTFLight` **from_node** **(** :ref:`Light3D` light_node **)** |static| + +Create a new GLTFLight instance from the given Godot :ref:`Light3D` node. + +---- + +.. _class_GLTFLight_method_to_dictionary: + +- :ref:`Dictionary` **to_dictionary** **(** **)** |const| + +Serializes this GLTFLight instance into a :ref:`Dictionary`. + +---- + +.. _class_GLTFLight_method_to_node: + +- :ref:`Light3D` **to_node** **(** **)** |const| + +Converts this GLTFLight instance into a Godot :ref:`Light3D` node. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_gltfskeleton.rst b/classes/class_gltfskeleton.rst index f7ba27e37..74eb8d2bb 100644 --- a/classes/class_gltfskeleton.rst +++ b/classes/class_gltfskeleton.rst @@ -35,11 +35,11 @@ Methods +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Skeleton3D` | :ref:`get_godot_skeleton` **(** **)** | +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_unique_names` **(** **)** | +| :ref:`String[]` | :ref:`get_unique_names` **(** **)** | +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_godot_bone_node` **(** :ref:`Dictionary` godot_bone_node **)** | +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_unique_names` **(** :ref:`Array` unique_names **)** | +| void | :ref:`set_unique_names` **(** :ref:`String[]` unique_names **)** | +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ Property Descriptions @@ -100,7 +100,7 @@ Method Descriptions .. _class_GLTFSkeleton_method_get_unique_names: -- :ref:`Array` **get_unique_names** **(** **)** +- :ref:`String[]` **get_unique_names** **(** **)** ---- @@ -112,7 +112,7 @@ Method Descriptions .. _class_GLTFSkeleton_method_set_unique_names: -- void **set_unique_names** **(** :ref:`Array` unique_names **)** +- void **set_unique_names** **(** :ref:`String[]` unique_names **)** .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_gltfskin.rst b/classes/class_gltfskin.rst index 4883a481a..39cd7543c 100644 --- a/classes/class_gltfskin.rst +++ b/classes/class_gltfskin.rst @@ -36,19 +36,19 @@ Properties Methods ------- -+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_inverse_binds` **(** **)** | -+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_joint_i_to_bone_i` **(** **)** | -+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_joint_i_to_name` **(** **)** | -+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_inverse_binds` **(** :ref:`Array` inverse_binds **)** | -+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_joint_i_to_bone_i` **(** :ref:`Dictionary` joint_i_to_bone_i **)** | -+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_joint_i_to_name` **(** :ref:`Dictionary` joint_i_to_name **)** | -+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ ++-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform3D[]` | :ref:`get_inverse_binds` **(** **)** | ++-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`get_joint_i_to_bone_i` **(** **)** | ++-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`get_joint_i_to_name` **(** **)** | ++-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_inverse_binds` **(** :ref:`Transform3D[]` inverse_binds **)** | ++-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_joint_i_to_bone_i` **(** :ref:`Dictionary` joint_i_to_bone_i **)** | ++-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_joint_i_to_name` **(** :ref:`Dictionary` joint_i_to_name **)** | ++-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ Property Descriptions --------------------- @@ -152,7 +152,7 @@ Method Descriptions .. _class_GLTFSkin_method_get_inverse_binds: -- :ref:`Array` **get_inverse_binds** **(** **)** +- :ref:`Transform3D[]` **get_inverse_binds** **(** **)** ---- @@ -170,7 +170,7 @@ Method Descriptions .. _class_GLTFSkin_method_set_inverse_binds: -- void **set_inverse_binds** **(** :ref:`Array` inverse_binds **)** +- void **set_inverse_binds** **(** :ref:`Transform3D[]` inverse_binds **)** ---- diff --git a/classes/class_gltfspecgloss.rst b/classes/class_gltfspecgloss.rst index fc1733612..650dbda03 100644 --- a/classes/class_gltfspecgloss.rst +++ b/classes/class_gltfspecgloss.rst @@ -12,7 +12,17 @@ GLTFSpecGloss **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +Archived GLTF extension for specular/glossy materials. +Description +----------- + +KHR_materials_pbrSpecularGlossiness is an archived GLTF extension. This means that it is deprecated and not recommended for new files. However, it is still supported for loading old files. + +Tutorials +--------- + +- `KHR_materials_pbrSpecularGlossiness GLTF extension spec `__ Properties ---------- @@ -44,6 +54,8 @@ Property Descriptions | *Getter* | get_diffuse_factor() | +-----------+---------------------------+ +The reflected diffuse factor of the material. + ---- .. _class_GLTFSpecGloss_property_diffuse_img: @@ -56,6 +68,8 @@ Property Descriptions | *Getter* | get_diffuse_img() | +----------+------------------------+ +The diffuse texture. + ---- .. _class_GLTFSpecGloss_property_gloss_factor: @@ -70,6 +84,8 @@ Property Descriptions | *Getter* | get_gloss_factor() | +-----------+-------------------------+ +The glossiness or smoothness of the material. + ---- .. _class_GLTFSpecGloss_property_spec_gloss_img: @@ -82,6 +98,8 @@ Property Descriptions | *Getter* | get_spec_gloss_img() | +----------+---------------------------+ +The specular-glossiness texture. + ---- .. _class_GLTFSpecGloss_property_specular_factor: @@ -96,6 +114,8 @@ Property Descriptions | *Getter* | get_specular_factor() | +-----------+----------------------------+ +The specular RGB color of the material. The alpha channel is unused. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_gltfstate.rst b/classes/class_gltfstate.rst index a094719de..0226fc613 100644 --- a/classes/class_gltfstate.rst +++ b/classes/class_gltfstate.rst @@ -17,96 +17,98 @@ GLTFState Properties ---------- -+-----------------------------------------------+----------------------------------------------------------------------------+-----------------------+ -| :ref:`String` | :ref:`base_path` | ``""`` | -+-----------------------------------------------+----------------------------------------------------------------------------+-----------------------+ -| :ref:`Array` | :ref:`buffers` | ``[]`` | -+-----------------------------------------------+----------------------------------------------------------------------------+-----------------------+ -| :ref:`PackedByteArray` | :ref:`glb_data` | ``PackedByteArray()`` | -+-----------------------------------------------+----------------------------------------------------------------------------+-----------------------+ -| :ref:`Dictionary` | :ref:`json` | ``{}`` | -+-----------------------------------------------+----------------------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`major_version` | ``0`` | -+-----------------------------------------------+----------------------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`minor_version` | ``0`` | -+-----------------------------------------------+----------------------------------------------------------------------------+-----------------------+ -| :ref:`Array` | :ref:`root_nodes` | ``[]`` | -+-----------------------------------------------+----------------------------------------------------------------------------+-----------------------+ -| :ref:`String` | :ref:`scene_name` | ``""`` | -+-----------------------------------------------+----------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`use_named_skin_binds` | ``false`` | -+-----------------------------------------------+----------------------------------------------------------------------------+-----------------------+ ++-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ +| :ref:`String` | :ref:`base_path` | ``""`` | ++-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ +| :ref:`PackedByteArray[]` | :ref:`buffers` | ``[]`` | ++-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ +| :ref:`bool` | :ref:`create_animations` | ``true`` | ++-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ +| :ref:`PackedByteArray` | :ref:`glb_data` | ``PackedByteArray()`` | ++-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ +| :ref:`Dictionary` | :ref:`json` | ``{}`` | ++-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ +| :ref:`int` | :ref:`major_version` | ``0`` | ++-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ +| :ref:`int` | :ref:`minor_version` | ``0`` | ++-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ +| :ref:`PackedInt32Array` | :ref:`root_nodes` | ``PackedInt32Array()`` | ++-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ +| :ref:`String` | :ref:`scene_name` | ``""`` | ++-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ +| :ref:`bool` | :ref:`use_named_skin_binds` | ``false`` | ++-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ Methods ------- -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_accessors` **(** **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`AnimationPlayer` | :ref:`get_animation_player` **(** :ref:`int` idx **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_animation_players_count` **(** :ref:`int` idx **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_animations` **(** **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_buffer_views` **(** **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_cameras` **(** **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_images` **(** **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_lights` **(** **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_materials` **(** **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_meshes` **(** **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_nodes` **(** **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Node` | :ref:`get_scene_node` **(** :ref:`int` idx **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_skeleton_to_node` **(** **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_skeletons` **(** **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_skins` **(** **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_textures` **(** **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_unique_animation_names` **(** **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_unique_names` **(** **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_accessors` **(** :ref:`Array` accessors **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_animations` **(** :ref:`Array` animations **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_buffer_views` **(** :ref:`Array` buffer_views **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_cameras` **(** :ref:`Array` cameras **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_images` **(** :ref:`Array` images **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_lights` **(** :ref:`Array` lights **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_materials` **(** :ref:`Array` materials **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_meshes` **(** :ref:`Array` meshes **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_nodes` **(** :ref:`Array` nodes **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_skeleton_to_node` **(** :ref:`Dictionary` skeleton_to_node **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_skeletons` **(** :ref:`Array` skeletons **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_skins` **(** :ref:`Array` skins **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_textures` **(** :ref:`Array` textures **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_unique_animation_names` **(** :ref:`Array` unique_animation_names **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_unique_names` **(** :ref:`Array` unique_names **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ ++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`GLTFAccessor[]` | :ref:`get_accessors` **(** **)** | ++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`AnimationPlayer` | :ref:`get_animation_player` **(** :ref:`int` idx **)** | ++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_animation_players_count` **(** :ref:`int` idx **)** | ++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`GLTFAnimation[]` | :ref:`get_animations` **(** **)** | ++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`GLTFBufferView[]` | :ref:`get_buffer_views` **(** **)** | ++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`GLTFCamera[]` | :ref:`get_cameras` **(** **)** | ++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Texture2D[]` | :ref:`get_images` **(** **)** | ++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`GLTFLight[]` | :ref:`get_lights` **(** **)** | ++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`BaseMaterial3D[]` | :ref:`get_materials` **(** **)** | ++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`GLTFMesh[]` | :ref:`get_meshes` **(** **)** | ++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`GLTFNode[]` | :ref:`get_nodes` **(** **)** | ++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Node` | :ref:`get_scene_node` **(** :ref:`int` idx **)** | ++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`get_skeleton_to_node` **(** **)** | ++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`GLTFSkeleton[]` | :ref:`get_skeletons` **(** **)** | ++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`GLTFSkin[]` | :ref:`get_skins` **(** **)** | ++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`GLTFTexture[]` | :ref:`get_textures` **(** **)** | ++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String[]` | :ref:`get_unique_animation_names` **(** **)** | ++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String[]` | :ref:`get_unique_names` **(** **)** | ++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_accessors` **(** :ref:`GLTFAccessor[]` accessors **)** | ++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_animations` **(** :ref:`GLTFAnimation[]` animations **)** | ++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_buffer_views` **(** :ref:`GLTFBufferView[]` buffer_views **)** | ++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_cameras` **(** :ref:`GLTFCamera[]` cameras **)** | ++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_images` **(** :ref:`Texture2D[]` images **)** | ++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_lights` **(** :ref:`GLTFLight[]` lights **)** | ++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_materials` **(** :ref:`BaseMaterial3D[]` materials **)** | ++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_meshes` **(** :ref:`GLTFMesh[]` meshes **)** | ++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_nodes` **(** :ref:`GLTFNode[]` nodes **)** | ++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_skeleton_to_node` **(** :ref:`Dictionary` skeleton_to_node **)** | ++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_skeletons` **(** :ref:`GLTFSkeleton[]` skeletons **)** | ++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_skins` **(** :ref:`GLTFSkin[]` skins **)** | ++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_textures` **(** :ref:`GLTFTexture[]` textures **)** | ++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_unique_animation_names` **(** :ref:`String[]` unique_animation_names **)** | ++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_unique_names` **(** :ref:`String[]` unique_names **)** | ++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ Property Descriptions --------------------- @@ -127,7 +129,7 @@ Property Descriptions .. _class_GLTFState_property_buffers: -- :ref:`Array` **buffers** +- :ref:`PackedByteArray[]` **buffers** +-----------+--------------------+ | *Default* | ``[]`` | @@ -139,6 +141,20 @@ Property Descriptions ---- +.. _class_GLTFState_property_create_animations: + +- :ref:`bool` **create_animations** + ++-----------+------------------------------+ +| *Default* | ``true`` | ++-----------+------------------------------+ +| *Setter* | set_create_animations(value) | ++-----------+------------------------------+ +| *Getter* | get_create_animations() | ++-----------+------------------------------+ + +---- + .. _class_GLTFState_property_glb_data: - :ref:`PackedByteArray` **glb_data** @@ -197,15 +213,15 @@ Property Descriptions .. _class_GLTFState_property_root_nodes: -- :ref:`Array` **root_nodes** +- :ref:`PackedInt32Array` **root_nodes** -+-----------+-----------------------+ -| *Default* | ``[]`` | -+-----------+-----------------------+ -| *Setter* | set_root_nodes(value) | -+-----------+-----------------------+ -| *Getter* | get_root_nodes() | -+-----------+-----------------------+ ++-----------+------------------------+ +| *Default* | ``PackedInt32Array()`` | ++-----------+------------------------+ +| *Setter* | set_root_nodes(value) | ++-----------+------------------------+ +| *Getter* | get_root_nodes() | ++-----------+------------------------+ ---- @@ -240,7 +256,7 @@ Method Descriptions .. _class_GLTFState_method_get_accessors: -- :ref:`Array` **get_accessors** **(** **)** +- :ref:`GLTFAccessor[]` **get_accessors** **(** **)** ---- @@ -258,49 +274,49 @@ Method Descriptions .. _class_GLTFState_method_get_animations: -- :ref:`Array` **get_animations** **(** **)** +- :ref:`GLTFAnimation[]` **get_animations** **(** **)** ---- .. _class_GLTFState_method_get_buffer_views: -- :ref:`Array` **get_buffer_views** **(** **)** +- :ref:`GLTFBufferView[]` **get_buffer_views** **(** **)** ---- .. _class_GLTFState_method_get_cameras: -- :ref:`Array` **get_cameras** **(** **)** +- :ref:`GLTFCamera[]` **get_cameras** **(** **)** ---- .. _class_GLTFState_method_get_images: -- :ref:`Array` **get_images** **(** **)** +- :ref:`Texture2D[]` **get_images** **(** **)** ---- .. _class_GLTFState_method_get_lights: -- :ref:`Array` **get_lights** **(** **)** +- :ref:`GLTFLight[]` **get_lights** **(** **)** ---- .. _class_GLTFState_method_get_materials: -- :ref:`Array` **get_materials** **(** **)** +- :ref:`BaseMaterial3D[]` **get_materials** **(** **)** ---- .. _class_GLTFState_method_get_meshes: -- :ref:`Array` **get_meshes** **(** **)** +- :ref:`GLTFMesh[]` **get_meshes** **(** **)** ---- .. _class_GLTFState_method_get_nodes: -- :ref:`Array` **get_nodes** **(** **)** +- :ref:`GLTFNode[]` **get_nodes** **(** **)** ---- @@ -318,85 +334,85 @@ Method Descriptions .. _class_GLTFState_method_get_skeletons: -- :ref:`Array` **get_skeletons** **(** **)** +- :ref:`GLTFSkeleton[]` **get_skeletons** **(** **)** ---- .. _class_GLTFState_method_get_skins: -- :ref:`Array` **get_skins** **(** **)** +- :ref:`GLTFSkin[]` **get_skins** **(** **)** ---- .. _class_GLTFState_method_get_textures: -- :ref:`Array` **get_textures** **(** **)** +- :ref:`GLTFTexture[]` **get_textures** **(** **)** ---- .. _class_GLTFState_method_get_unique_animation_names: -- :ref:`Array` **get_unique_animation_names** **(** **)** +- :ref:`String[]` **get_unique_animation_names** **(** **)** ---- .. _class_GLTFState_method_get_unique_names: -- :ref:`Array` **get_unique_names** **(** **)** +- :ref:`String[]` **get_unique_names** **(** **)** ---- .. _class_GLTFState_method_set_accessors: -- void **set_accessors** **(** :ref:`Array` accessors **)** +- void **set_accessors** **(** :ref:`GLTFAccessor[]` accessors **)** ---- .. _class_GLTFState_method_set_animations: -- void **set_animations** **(** :ref:`Array` animations **)** +- void **set_animations** **(** :ref:`GLTFAnimation[]` animations **)** ---- .. _class_GLTFState_method_set_buffer_views: -- void **set_buffer_views** **(** :ref:`Array` buffer_views **)** +- void **set_buffer_views** **(** :ref:`GLTFBufferView[]` buffer_views **)** ---- .. _class_GLTFState_method_set_cameras: -- void **set_cameras** **(** :ref:`Array` cameras **)** +- void **set_cameras** **(** :ref:`GLTFCamera[]` cameras **)** ---- .. _class_GLTFState_method_set_images: -- void **set_images** **(** :ref:`Array` images **)** +- void **set_images** **(** :ref:`Texture2D[]` images **)** ---- .. _class_GLTFState_method_set_lights: -- void **set_lights** **(** :ref:`Array` lights **)** +- void **set_lights** **(** :ref:`GLTFLight[]` lights **)** ---- .. _class_GLTFState_method_set_materials: -- void **set_materials** **(** :ref:`Array` materials **)** +- void **set_materials** **(** :ref:`BaseMaterial3D[]` materials **)** ---- .. _class_GLTFState_method_set_meshes: -- void **set_meshes** **(** :ref:`Array` meshes **)** +- void **set_meshes** **(** :ref:`GLTFMesh[]` meshes **)** ---- .. _class_GLTFState_method_set_nodes: -- void **set_nodes** **(** :ref:`Array` nodes **)** +- void **set_nodes** **(** :ref:`GLTFNode[]` nodes **)** ---- @@ -408,31 +424,31 @@ Method Descriptions .. _class_GLTFState_method_set_skeletons: -- void **set_skeletons** **(** :ref:`Array` skeletons **)** +- void **set_skeletons** **(** :ref:`GLTFSkeleton[]` skeletons **)** ---- .. _class_GLTFState_method_set_skins: -- void **set_skins** **(** :ref:`Array` skins **)** +- void **set_skins** **(** :ref:`GLTFSkin[]` skins **)** ---- .. _class_GLTFState_method_set_textures: -- void **set_textures** **(** :ref:`Array` textures **)** +- void **set_textures** **(** :ref:`GLTFTexture[]` textures **)** ---- .. _class_GLTFState_method_set_unique_animation_names: -- void **set_unique_animation_names** **(** :ref:`Array` unique_animation_names **)** +- void **set_unique_animation_names** **(** :ref:`String[]` unique_animation_names **)** ---- .. _class_GLTFState_method_set_unique_names: -- void **set_unique_names** **(** :ref:`Array` unique_names **)** +- void **set_unique_names** **(** :ref:`String[]` unique_names **)** .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_godotsharp.rst b/classes/class_godotsharp.rst index 34938ea2c..7b0b30853 100644 --- a/classes/class_godotsharp.rst +++ b/classes/class_godotsharp.rst @@ -24,92 +24,18 @@ See also :ref:`CSharpScript`. Methods ------- -+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`attach_thread` **(** **)** | -+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`detach_thread` **(** **)** | -+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_domain_id` **(** **)** | -+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_scripts_domain_id` **(** **)** | -+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_domain_finalizing_for_unload` **(** :ref:`int` domain_id **)** | -+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_runtime_initialized` **(** **)** | -+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_runtime_shutting_down` **(** **)** | -+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_scripts_domain_loaded` **(** **)** | -+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ ++-------------------------+-------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_runtime_initialized` **(** **)** | ++-------------------------+-------------------------------------------------------------------------------------------+ Method Descriptions ------------------- -.. _class_GodotSharp_method_attach_thread: - -- void **attach_thread** **(** **)** - -Attaches the current thread to the Mono runtime. - ----- - -.. _class_GodotSharp_method_detach_thread: - -- void **detach_thread** **(** **)** - -Detaches the current thread from the Mono runtime. - ----- - -.. _class_GodotSharp_method_get_domain_id: - -- :ref:`int` **get_domain_id** **(** **)** - -Returns the current MonoDomain ID. - -\ **Note:** The Mono runtime must be initialized for this method to work (use :ref:`is_runtime_initialized` to check). If the Mono runtime isn't initialized at the time this method is called, the engine will crash. - ----- - -.. _class_GodotSharp_method_get_scripts_domain_id: - -- :ref:`int` **get_scripts_domain_id** **(** **)** - -Returns the scripts MonoDomain's ID. This will be the same MonoDomain ID as :ref:`get_domain_id`, unless the scripts domain isn't loaded. - -\ **Note:** The Mono runtime must be initialized for this method to work (use :ref:`is_runtime_initialized` to check). If the Mono runtime isn't initialized at the time this method is called, the engine will crash. - ----- - -.. _class_GodotSharp_method_is_domain_finalizing_for_unload: - -- :ref:`bool` **is_domain_finalizing_for_unload** **(** :ref:`int` domain_id **)** - -Returns ``true`` if the domain is being finalized, ``false`` otherwise. - ----- - .. _class_GodotSharp_method_is_runtime_initialized: - :ref:`bool` **is_runtime_initialized** **(** **)** -Returns ``true`` if the Mono runtime is initialized, ``false`` otherwise. - ----- - -.. _class_GodotSharp_method_is_runtime_shutting_down: - -- :ref:`bool` **is_runtime_shutting_down** **(** **)** - -Returns ``true`` if the Mono runtime is shutting down, ``false`` otherwise. - ----- - -.. _class_GodotSharp_method_is_scripts_domain_loaded: - -- :ref:`bool` **is_scripts_domain_loaded** **(** **)** - -Returns ``true`` if the scripts domain is loaded, ``false`` otherwise. +Returns ``true`` if the .NET runtime is initialized, ``false`` otherwise. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_gpuparticles2d.rst b/classes/class_gpuparticles2d.rst index 946ebcec2..4dbd12999 100644 --- a/classes/class_gpuparticles2d.rst +++ b/classes/class_gpuparticles2d.rst @@ -19,7 +19,7 @@ Description 2D particle node used to create a variety of particle systems and effects. ``GPUParticles2D`` features an emitter that generates some number of particles at a given rate. -Use the ``process_material`` property to add a :ref:`ParticlesMaterial` to configure particle appearance and behavior. Alternatively, you can add a :ref:`ShaderMaterial` which will be applied to all particles. +Use the ``process_material`` property to add a :ref:`ParticleProcessMaterial` to configure particle appearance and behavior. Alternatively, you can add a :ref:`ShaderMaterial` which will be applied to all particles. Tutorials --------- @@ -50,7 +50,7 @@ Properties +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ | :ref:`float` | :ref:`lifetime` | ``1.0`` | +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ -| :ref:`bool` | :ref:`local_coords` | ``true`` | +| :ref:`bool` | :ref:`local_coords` | ``false`` | +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ | :ref:`bool` | :ref:`one_shot` | ``false`` | +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ @@ -283,14 +283,14 @@ Amount of time each particle will exist. - :ref:`bool` **local_coords** +-----------+----------------------------------+ -| *Default* | ``true`` | +| *Default* | ``false`` | +-----------+----------------------------------+ | *Setter* | set_use_local_coordinates(value) | +-----------+----------------------------------+ | *Getter* | get_use_local_coordinates() | +-----------+----------------------------------+ -If ``true``, particles use the parent node's coordinate space. If ``false``, they use global coordinates. +If ``true``, particles use the parent node's coordinate space (known as local coordinates). This will cause particles to move and rotate along the ``GPUParticles2D`` node (and its parents) when it is moved or rotated. If ``false``, particles use global coordinates; they will not move or rotate along the ``GPUParticles2D`` node (and its parents) when it is moved or rotated. ---- @@ -336,7 +336,7 @@ Particle system starts as if it had already run for this many seconds. | *Getter* | get_process_material() | +----------+-----------------------------+ -:ref:`Material` for processing particles. Can be a :ref:`ParticlesMaterial` or a :ref:`ShaderMaterial`. +:ref:`Material` for processing particles. Can be a :ref:`ParticleProcessMaterial` or a :ref:`ShaderMaterial`. ---- diff --git a/classes/class_gpuparticles3d.rst b/classes/class_gpuparticles3d.rst index b239585b9..8efcdb9eb 100644 --- a/classes/class_gpuparticles3d.rst +++ b/classes/class_gpuparticles3d.rst @@ -19,7 +19,7 @@ Description 3D particle node used to create a variety of particle systems and effects. ``GPUParticles3D`` features an emitter that generates some number of particles at a given rate. -Use the ``process_material`` property to add a :ref:`ParticlesMaterial` to configure particle appearance and behavior. Alternatively, you can add a :ref:`ShaderMaterial` which will be applied to all particles. +Use the ``process_material`` property to add a :ref:`ParticleProcessMaterial` to configure particle appearance and behavior. Alternatively, you can add a :ref:`ShaderMaterial` which will be applied to all particles. Tutorials --------- @@ -62,7 +62,7 @@ Properties +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ | :ref:`float` | :ref:`lifetime` | ``1.0`` | +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ -| :ref:`bool` | :ref:`local_coords` | ``true`` | +| :ref:`bool` | :ref:`local_coords` | ``false`` | +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ | :ref:`bool` | :ref:`one_shot` | ``false`` | +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ @@ -412,14 +412,14 @@ Amount of time each particle will exist. - :ref:`bool` **local_coords** +-----------+----------------------------------+ -| *Default* | ``true`` | +| *Default* | ``false`` | +-----------+----------------------------------+ | *Setter* | set_use_local_coordinates(value) | +-----------+----------------------------------+ | *Getter* | get_use_local_coordinates() | +-----------+----------------------------------+ -If ``true``, particles use the parent node's coordinate space. If ``false``, they use global coordinates. +If ``true``, particles use the parent node's coordinate space (known as local coordinates). This will cause particles to move and rotate along the ``GPUParticles3D`` node (and its parents) when it is moved or rotated. If ``false``, particles use global coordinates; they will not move or rotate along the ``GPUParticles3D`` node (and its parents) when it is moved or rotated. ---- @@ -465,7 +465,7 @@ Amount of time to preprocess the particles before animation starts. Lets you sta | *Getter* | get_process_material() | +----------+-----------------------------+ -:ref:`Material` for processing particles. Can be a :ref:`ParticlesMaterial` or a :ref:`ShaderMaterial`. +:ref:`Material` for processing particles. Can be a :ref:`ParticleProcessMaterial` or a :ref:`ShaderMaterial`. ---- diff --git a/classes/class_gpuparticlesattractor3d.rst b/classes/class_gpuparticlesattractor3d.rst index 6cf9a3252..c66b6349a 100644 --- a/classes/class_gpuparticlesattractor3d.rst +++ b/classes/class_gpuparticlesattractor3d.rst @@ -75,7 +75,7 @@ The particle rendering layers (:ref:`VisualInstance3D.layers` on the :ref:`GPUParticles3D` node. +Particle attraction can also be disabled on a per-process material basis by setting :ref:`ParticleProcessMaterial.attractor_interaction_enabled` on the :ref:`GPUParticles3D` node. ---- diff --git a/classes/class_gpuparticlescollision3d.rst b/classes/class_gpuparticlescollision3d.rst index 481f0616d..7fd95081b 100644 --- a/classes/class_gpuparticlescollision3d.rst +++ b/classes/class_gpuparticlescollision3d.rst @@ -25,7 +25,7 @@ Particle collision shapes in real-time and can be moved, rotated and scaled duri Particle collision shapes can be temporarily disabled by hiding them. -\ **Note:** :ref:`ParticlesMaterial.collision_enabled` must be ``true`` on the :ref:`GPUParticles3D`'s process material for collision to work. +\ **Note:** :ref:`ParticleProcessMaterial.collision_mode` must be :ref:`ParticleProcessMaterial.COLLISION_RIGID` or :ref:`ParticleProcessMaterial.COLLISION_HIDE_ON_CONTACT` on the :ref:`GPUParticles3D`'s process material for collision to work. \ **Note:** Particle collision only affects :ref:`GPUParticles3D`, not :ref:`CPUParticles3D`. @@ -53,11 +53,11 @@ Property Descriptions | *Getter* | get_cull_mask() | +-----------+----------------------+ -The particle rendering layers (:ref:`VisualInstance3D.layers`) that will be affected by the collision shape. By default, all particles that have :ref:`ParticlesMaterial.collision_enabled` set to ``true`` will be affected by a collision shape. +The particle rendering layers (:ref:`VisualInstance3D.layers`) that will be affected by the collision shape. By default, all particles that have :ref:`ParticleProcessMaterial.collision_mode` set to :ref:`ParticleProcessMaterial.COLLISION_RIGID` or :ref:`ParticleProcessMaterial.COLLISION_HIDE_ON_CONTACT` will be affected by a collision shape. After configuring particle nodes accordingly, specific layers can be unchecked to prevent certain particles from being affected by attractors. For example, this can be used if you're using an attractor as part of a spell effect but don't want the attractor to affect unrelated weather particles at the same position. -Particle attraction can also be disabled on a per-process material basis by setting :ref:`ParticlesMaterial.attractor_interaction_enabled` on the :ref:`GPUParticles3D` node. +Particle attraction can also be disabled on a per-process material basis by setting :ref:`ParticleProcessMaterial.attractor_interaction_enabled` on the :ref:`GPUParticles3D` node. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_gpuparticlescollisionbox3d.rst b/classes/class_gpuparticlescollisionbox3d.rst index 317a9939c..e1df23ed1 100644 --- a/classes/class_gpuparticlescollisionbox3d.rst +++ b/classes/class_gpuparticlescollisionbox3d.rst @@ -19,7 +19,7 @@ Description Box-shaped 3D particle collision shape affecting :ref:`GPUParticles3D` nodes. -\ **Note:** :ref:`ParticlesMaterial.collision_enabled` must be ``true`` on the :ref:`GPUParticles3D`'s process material for collision to work. +\ **Note:** :ref:`ParticleProcessMaterial.collision_mode` must be :ref:`ParticleProcessMaterial.COLLISION_RIGID` or :ref:`ParticleProcessMaterial.COLLISION_HIDE_ON_CONTACT` on the :ref:`GPUParticles3D`'s process material for collision to work. \ **Note:** Particle collision only affects :ref:`GPUParticles3D`, not :ref:`CPUParticles3D`. diff --git a/classes/class_gpuparticlescollisionheightfield3d.rst b/classes/class_gpuparticlescollisionheightfield3d.rst index 6330ba1ba..a4d315b84 100644 --- a/classes/class_gpuparticlescollisionheightfield3d.rst +++ b/classes/class_gpuparticlescollisionheightfield3d.rst @@ -23,7 +23,7 @@ Heightmap shapes allow for efficiently representing collisions for convex and co \ ``GPUParticlesCollisionHeightField3D`` can also be regenerated in real-time when it is moved, when the camera moves, or even continuously. This makes ``GPUParticlesCollisionHeightField3D`` a good choice for weather effects such as rain and snow and games with highly dynamic geometry. However, since heightmaps cannot represent overhangs, ``GPUParticlesCollisionHeightField3D`` is not suited for indoor particle collision. -\ **Note:** :ref:`ParticlesMaterial.collision_enabled` must be ``true`` on the :ref:`GPUParticles3D`'s process material for collision to work. +\ **Note:** :ref:`ParticleProcessMaterial.collision_mode` must be ``true`` on the :ref:`GPUParticles3D`'s process material for collision to work. \ **Note:** Particle collision only affects :ref:`GPUParticles3D`, not :ref:`CPUParticles3D`. diff --git a/classes/class_gpuparticlescollisionsdf3d.rst b/classes/class_gpuparticlescollisionsdf3d.rst index a88d2ffad..d618934bf 100644 --- a/classes/class_gpuparticlescollisionsdf3d.rst +++ b/classes/class_gpuparticlescollisionsdf3d.rst @@ -25,13 +25,15 @@ Signed distance fields (SDF) allow for efficiently representing approximate coll \ **Note:** Baking a ``GPUParticlesCollisionSDF3D``'s :ref:`texture` is only possible within the editor, as there is no bake method exposed for use in exported projects. However, it's still possible to load pre-baked :ref:`Texture3D`\ s into its :ref:`texture` property in an exported project. -\ **Note:** :ref:`ParticlesMaterial.collision_enabled` must be ``true`` on the :ref:`GPUParticles3D`'s process material for collision to work. +\ **Note:** :ref:`ParticleProcessMaterial.collision_mode` must be :ref:`ParticleProcessMaterial.COLLISION_RIGID` or :ref:`ParticleProcessMaterial.COLLISION_HIDE_ON_CONTACT` on the :ref:`GPUParticles3D`'s process material for collision to work. \ **Note:** Particle collision only affects :ref:`GPUParticles3D`, not :ref:`CPUParticles3D`. Properties ---------- ++---------------------------------------------------------------+-------------------------------------------------------------------------+----------------------+ +| :ref:`int` | :ref:`bake_mask` | ``4294967295`` | +---------------------------------------------------------------+-------------------------------------------------------------------------+----------------------+ | :ref:`Vector3` | :ref:`extents` | ``Vector3(1, 1, 1)`` | +---------------------------------------------------------------+-------------------------------------------------------------------------+----------------------+ @@ -42,6 +44,15 @@ Properties | :ref:`float` | :ref:`thickness` | ``1.0`` | +---------------------------------------------------------------+-------------------------------------------------------------------------+----------------------+ +Methods +------- + ++-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_bake_mask_value` **(** :ref:`int` layer_number **)** |const| | ++-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_bake_mask_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | ++-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + Enumerations ------------ @@ -80,6 +91,22 @@ enum **Resolution**: Property Descriptions --------------------- +.. _class_GPUParticlesCollisionSDF3D_property_bake_mask: + +- :ref:`int` **bake_mask** + ++-----------+----------------------+ +| *Default* | ``4294967295`` | ++-----------+----------------------+ +| *Setter* | set_bake_mask(value) | ++-----------+----------------------+ +| *Getter* | get_bake_mask() | ++-----------+----------------------+ + +The visual layers to account for when baking the particle collision SDF. Only :ref:`MeshInstance3D`\ s whose :ref:`VisualInstance3D.layers` match with this :ref:`bake_mask` will be included in the generated particle collision SDF. By default, all objects are taken into account for the particle collision SDF baking. + +---- + .. _class_GPUParticlesCollisionSDF3D_property_extents: - :ref:`Vector3` **extents** @@ -140,6 +167,23 @@ The 3D texture representing the signed distance field. The collision shape's thickness. Unlike other particle colliders, ``GPUParticlesCollisionSDF3D`` is actually hollow on the inside. :ref:`thickness` can be increased to prevent particles from tunneling through the collision shape at high speeds, or when the ``GPUParticlesCollisionSDF3D`` is moved. +Method Descriptions +------------------- + +.. _class_GPUParticlesCollisionSDF3D_method_get_bake_mask_value: + +- :ref:`bool` **get_bake_mask_value** **(** :ref:`int` layer_number **)** |const| + +Returns whether or not the specified layer of the :ref:`bake_mask` is enabled, given a ``layer_number`` between 1 and 32. + +---- + +.. _class_GPUParticlesCollisionSDF3D_method_set_bake_mask_value: + +- void **set_bake_mask_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** + +Based on ``value``, enables or disables the specified layer in the :ref:`bake_mask`, given a ``layer_number`` between 1 and 32. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_gpuparticlescollisionsphere3d.rst b/classes/class_gpuparticlescollisionsphere3d.rst index 51f5bb30d..2d3cb2811 100644 --- a/classes/class_gpuparticlescollisionsphere3d.rst +++ b/classes/class_gpuparticlescollisionsphere3d.rst @@ -19,7 +19,7 @@ Description Sphere-shaped 3D particle collision shape affecting :ref:`GPUParticles3D` nodes. -\ **Note:** :ref:`ParticlesMaterial.collision_enabled` must be ``true`` on the :ref:`GPUParticles3D`'s process material for collision to work. +\ **Note:** :ref:`ParticleProcessMaterial.collision_mode` must be :ref:`ParticleProcessMaterial.COLLISION_RIGID` or :ref:`ParticleProcessMaterial.COLLISION_HIDE_ON_CONTACT` on the :ref:`GPUParticles3D`'s process material for collision to work. \ **Note:** Particle collision only affects :ref:`GPUParticles3D`, not :ref:`CPUParticles3D`. diff --git a/classes/class_gradient.rst b/classes/class_gradient.rst index 44971d0cd..18267650d 100644 --- a/classes/class_gradient.rst +++ b/classes/class_gradient.rst @@ -19,6 +19,8 @@ Description Given a set of colors, this resource will interpolate them in order. This means that if you have color 1, color 2 and color 3, the gradient will interpolate from color 1 to color 2 and from color 2 to color 3. The gradient will initially have 2 colors (black and white), one (black) at gradient lower offset 0 and the other (white) at the gradient higher offset 1. +See also :ref:`Curve` which supports more complex easing methods, but does not support colors. + Properties ---------- @@ -42,12 +44,12 @@ Methods +---------------------------+---------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_point_count` **(** **)** |const| | +---------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`interpolate` **(** :ref:`float` offset **)** | -+---------------------------+---------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`remove_point` **(** :ref:`int` point **)** | +---------------------------+---------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`reverse` **(** **)** | +---------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`sample` **(** :ref:`float` offset **)** | ++---------------------------+---------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_color` **(** :ref:`int` point, :ref:`Color` color **)** | +---------------------------+---------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_offset` **(** :ref:`int` point, :ref:`float` offset **)** | @@ -156,14 +158,6 @@ Returns the number of colors in the gradient. ---- -.. _class_Gradient_method_interpolate: - -- :ref:`Color` **interpolate** **(** :ref:`float` offset **)** - -Returns the interpolated color specified by ``offset``. - ----- - .. _class_Gradient_method_remove_point: - void **remove_point** **(** :ref:`int` point **)** @@ -180,6 +174,14 @@ Reverses/mirrors the gradient. ---- +.. _class_Gradient_method_sample: + +- :ref:`Color` **sample** **(** :ref:`float` offset **)** + +Returns the interpolated color specified by ``offset``. + +---- + .. _class_Gradient_method_set_color: - void **set_color** **(** :ref:`int` point, :ref:`Color` color **)** diff --git a/classes/class_graphedit.rst b/classes/class_graphedit.rst index 5595976ce..fd03a2503 100644 --- a/classes/class_graphedit.rst +++ b/classes/class_graphedit.rst @@ -24,6 +24,8 @@ It is greatly advised to enable low-processor usage mode (see :ref:`OS.low_proce Properties ---------- ++----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`arrange_nodes_button_hidden` | ``false`` | +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | clip_contents | ``true`` (overrides :ref:`Control`) | +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ @@ -72,6 +74,8 @@ Methods +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`_is_in_output_hotzone` **(** :ref:`Object` graph_node, :ref:`int` slot_index, :ref:`Vector2` mouse_position **)** |virtual| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_is_node_hover_valid` **(** :ref:`StringName` from, :ref:`int` from_slot, :ref:`StringName` to, :ref:`int` to_slot **)** |virtual| | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_valid_connection_type` **(** :ref:`int` from_type, :ref:`int` to_type **)** | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_valid_left_disconnect_type` **(** :ref:`int` type **)** | @@ -90,7 +94,7 @@ Methods +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedVector2Array` | :ref:`get_connection_line` **(** :ref:`Vector2` from, :ref:`Vector2` to **)** | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_connection_list` **(** **)** |const| | +| :ref:`Dictionary[]` | :ref:`get_connection_list` **(** **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`HBoxContainer` | :ref:`get_zoom_hbox` **(** **)** | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -163,7 +167,7 @@ Emitted at the end of a connection drag. .. _class_GraphEdit_signal_connection_drag_started: -- **connection_drag_started** **(** :ref:`String` from, :ref:`String` slot, :ref:`bool` is_output **)** +- **connection_drag_started** **(** :ref:`String` from, :ref:`int` slot, :ref:`bool` is_output **)** Emitted at the beginning of a connection drag. @@ -287,6 +291,22 @@ enum **PanningScheme**: Property Descriptions --------------------- +.. _class_GraphEdit_property_arrange_nodes_button_hidden: + +- :ref:`bool` **arrange_nodes_button_hidden** + ++-----------+----------------------------------------+ +| *Default* | ``false`` | ++-----------+----------------------------------------+ +| *Setter* | set_arrange_nodes_button_hidden(value) | ++-----------+----------------------------------------+ +| *Getter* | is_arrange_nodes_button_hidden() | ++-----------+----------------------------------------+ + +If ``true``, the Arrange Nodes button is hidden. + +---- + .. _class_GraphEdit_property_connection_lines_antialiased: - :ref:`bool` **connection_lines_antialiased** @@ -590,6 +610,34 @@ Below is a sample code to help get started: return rect.has_point(mouse_position) +---- + +.. _class_GraphEdit_method__is_node_hover_valid: + +- :ref:`bool` **_is_node_hover_valid** **(** :ref:`StringName` from, :ref:`int` from_slot, :ref:`StringName` to, :ref:`int` to_slot **)** |virtual| + +This virtual method can be used to insert additional error detection while the user is dragging a connection over a valid port. + +Return ``true`` if the connection is indeed valid or return ``false`` if the connection is impossible. If the connection is impossible, no snapping to the port and thus no connection request to that port will happen. + +In this example a connection to same node is suppressed: + + +.. tabs:: + + .. code-tab:: gdscript + + func _is_node_hover_valid(from, from_slot, to, to_slot): + return from != to + + .. code-tab:: csharp + + public override bool _IsNodeHoverValid(String from, int fromSlot, String to, int toSlot) { + return from != to; + } + + + ---- .. _class_GraphEdit_method_add_valid_connection_type: @@ -670,7 +718,7 @@ Returns the points which would make up a connection between ``from`` and ``to``. .. _class_GraphEdit_method_get_connection_list: -- :ref:`Array` **get_connection_list** **(** **)** |const| +- :ref:`Dictionary[]` **get_connection_list** **(** **)** |const| Returns an Array containing the list of connections. A connection consists in a structure of the form ``{ from_port: 0, from: "GraphNode name 0", to_port: 1, to: "GraphNode name 1" }``. diff --git a/classes/class_graphnode.rst b/classes/class_graphnode.rst index 0aa64c171..53d8f2b0f 100644 --- a/classes/class_graphnode.rst +++ b/classes/class_graphnode.rst @@ -29,6 +29,8 @@ Properties +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ | :ref:`bool` | :ref:`comment` | ``false`` | +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ +| :ref:`bool` | :ref:`draggable` | ``true`` | ++--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ | :ref:`String` | :ref:`language` | ``""`` | +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ | :ref:`MouseFilter` | mouse_filter | ``0`` (overrides :ref:`Control`) | @@ -39,6 +41,8 @@ Properties +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ | :ref:`bool` | :ref:`resizable` | ``false`` | +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ +| :ref:`bool` | :ref:`selectable` | ``true`` | ++--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ | :ref:`bool` | :ref:`selected` | ``false`` | +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ | :ref:`bool` | :ref:`show_close` | ``false`` | @@ -125,6 +129,8 @@ Theme Properties +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ | :ref:`int` | :ref:`separation` | ``2`` | +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ +| :ref:`int` | :ref:`title_h_offset` | ``0`` | ++-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ | :ref:`int` | :ref:`title_offset` | ``26`` | +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ | :ref:`Font` | :ref:`title_font` | | @@ -237,6 +243,22 @@ If ``true``, the GraphNode is a comment node. ---- +.. _class_GraphNode_property_draggable: + +- :ref:`bool` **draggable** + ++-----------+----------------------+ +| *Default* | ``true`` | ++-----------+----------------------+ +| *Setter* | set_draggable(value) | ++-----------+----------------------+ +| *Getter* | is_draggable() | ++-----------+----------------------+ + +If ``true``, the user can drag the GraphNode. + +---- + .. _class_GraphNode_property_language: - :ref:`String` **language** @@ -305,6 +327,22 @@ If ``true``, the user can resize the GraphNode. ---- +.. _class_GraphNode_property_selectable: + +- :ref:`bool` **selectable** + ++-----------+-----------------------+ +| *Default* | ``true`` | ++-----------+-----------------------+ +| *Setter* | set_selectable(value) | ++-----------+-----------------------+ +| *Getter* | is_selectable() | ++-----------+-----------------------+ + +If ``true``, the user can select the GraphNode. + +---- + .. _class_GraphNode_property_selected: - :ref:`bool` **selected** @@ -530,13 +568,13 @@ Returns ``true`` if right (output) side of the slot ``idx`` is enabled. Sets properties of the slot with ID ``idx``. -If ``enable_left``/``right``, a port will appear and the slot will be able to be connected from this side. +If ``enable_left``/``enable_right``, a port will appear and the slot will be able to be connected from this side. -\ ``type_left``/``right`` is an arbitrary type of the port. Only ports with the same type values can be connected. +``type_left``/``type_right`` is an arbitrary type of the port. Only ports with the same type values can be connected and negative values will disallow all connections to be made via user inputs. -\ ``color_left``/``right`` is the tint of the port's icon on this side. +``color_left``/``color_right`` is the tint of the port's icon on this side. -\ ``custom_left``/``right`` is a custom texture for this side's port. +``custom_left``/``custom_right`` is a custom texture for this side's port. \ **Note:** This method only sets properties of the slot. To create the slot, add a :ref:`Control`-derived child to the GraphNode. @@ -588,7 +626,7 @@ Toggles the right (output) side of the slot ``idx``. If ``enable_right`` is ``tr - void **set_slot_type_left** **(** :ref:`int` idx, :ref:`int` type_left **)** -Sets the left (input) type of the slot ``idx`` to ``type_left``. +Sets the left (input) type of the slot ``idx`` to ``type_left``. If the value is negative, all connections will be disallowed to be created via user inputs. ---- @@ -596,7 +634,7 @@ Sets the left (input) type of the slot ``idx`` to ``type_left``. - void **set_slot_type_right** **(** :ref:`int` idx, :ref:`int` type_right **)** -Sets the right (output) type of the slot ``idx`` to ``type_right``. +Sets the right (output) type of the slot ``idx`` to ``type_right``. If the value is negative, all connections will be disallowed to be created via user inputs. Theme Property Descriptions --------------------------- @@ -683,6 +721,18 @@ The vertical distance between ports. ---- +.. _class_GraphNode_theme_constant_title_h_offset: + +- :ref:`int` **title_h_offset** + ++-----------+-------+ +| *Default* | ``0`` | ++-----------+-------+ + +Horizontal offset of the title text. + +---- + .. _class_GraphNode_theme_constant_title_offset: - :ref:`int` **title_offset** diff --git a/classes/class_gridmap.rst b/classes/class_gridmap.rst index 52bd78c8e..86b8e46be 100644 --- a/classes/class_gridmap.rst +++ b/classes/class_gridmap.rst @@ -68,47 +68,53 @@ Properties Methods ------- -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_baked_meshes` **(** **)** | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_bake_mesh_instance` **(** :ref:`int` idx **)** | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_bake_meshes` **(** **)** | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_cell_item` **(** :ref:`Vector3i` position **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_cell_item_orientation` **(** :ref:`Vector3i` position **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_collision_layer_value` **(** :ref:`int` layer_number **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_collision_mask_value` **(** :ref:`int` layer_number **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_meshes` **(** **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_navigation_layer_value` **(** :ref:`int` layer_number **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_used_cells` **(** **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_used_cells_by_item` **(** :ref:`int` item **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`make_baked_meshes` **(** :ref:`bool` gen_lightmap_uv=false, :ref:`float` lightmap_uv_texel_size=0.1 **)** | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`map_to_world` **(** :ref:`Vector3i` map_position **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`resource_changed` **(** :ref:`Resource` resource **)** | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_cell_item` **(** :ref:`Vector3i` position, :ref:`int` item, :ref:`int` orientation=0 **)** | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_collision_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_collision_mask_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_navigation_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3i` | :ref:`world_to_map` **(** :ref:`Vector3` world_position **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_baked_meshes` **(** **)** | ++-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`get_bake_mesh_instance` **(** :ref:`int` idx **)** | ++-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_bake_meshes` **(** **)** | ++-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Basis` | :ref:`get_basis_with_orthogonal_index` **(** :ref:`int` index **)** |const| | ++-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_cell_item` **(** :ref:`Vector3i` position **)** |const| | ++-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Basis` | :ref:`get_cell_item_basis` **(** :ref:`Vector3i` position **)** |const| | ++-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_cell_item_orientation` **(** :ref:`Vector3i` position **)** |const| | ++-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_collision_layer_value` **(** :ref:`int` layer_number **)** |const| | ++-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_collision_mask_value` **(** :ref:`int` layer_number **)** |const| | ++-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_meshes` **(** **)** |const| | ++-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_navigation_layer_value` **(** :ref:`int` layer_number **)** |const| | ++-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_orthogonal_index_from_basis` **(** :ref:`Basis` basis **)** |const| | ++-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3i[]` | :ref:`get_used_cells` **(** **)** |const| | ++-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3i[]` | :ref:`get_used_cells_by_item` **(** :ref:`int` item **)** |const| | ++-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`make_baked_meshes` **(** :ref:`bool` gen_lightmap_uv=false, :ref:`float` lightmap_uv_texel_size=0.1 **)** | ++-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`map_to_world` **(** :ref:`Vector3i` map_position **)** |const| | ++-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`resource_changed` **(** :ref:`Resource` resource **)** | ++-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_cell_item` **(** :ref:`Vector3i` position, :ref:`int` item, :ref:`int` orientation=0 **)** | ++-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_collision_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | ++-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_collision_mask_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | ++-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_navigation_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | ++-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3i` | :ref:`world_to_map` **(** :ref:`Vector3` world_position **)** |const| | ++-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- @@ -352,6 +358,14 @@ Returns an array of :ref:`ArrayMesh`\ es and :ref:`Transform3D< ---- +.. _class_GridMap_method_get_basis_with_orthogonal_index: + +- :ref:`Basis` **get_basis_with_orthogonal_index** **(** :ref:`int` index **)** |const| + +Returns one of 24 possible rotations that lie along the vectors (x,y,z) with each component being either -1, 0, or 1. For further details, refer to the Godot source code. + +---- + .. _class_GridMap_method_get_cell_item: - :ref:`int` **get_cell_item** **(** :ref:`Vector3i` position **)** |const| @@ -360,6 +374,14 @@ The :ref:`MeshLibrary` item index located at the given grid c ---- +.. _class_GridMap_method_get_cell_item_basis: + +- :ref:`Basis` **get_cell_item_basis** **(** :ref:`Vector3i` position **)** |const| + +Returns the basis that gives the specificed cell its orientation. + +---- + .. _class_GridMap_method_get_cell_item_orientation: - :ref:`int` **get_cell_item_orientation** **(** :ref:`Vector3i` position **)** |const| @@ -400,9 +422,17 @@ Returns whether or not the specified layer of the :ref:`navigation_layers` **get_orthogonal_index_from_basis** **(** :ref:`Basis` basis **)** |const| + +This function considers a discretization of rotations into 24 points on unit sphere, lying along the vectors (x,y,z) with each component being either -1, 0, or 1, and returns the index (in the range from 0 to 23) of the point best representing the orientation of the object. For further details, refer to the Godot source code. + +---- + .. _class_GridMap_method_get_used_cells: -- :ref:`Array` **get_used_cells** **(** **)** |const| +- :ref:`Vector3i[]` **get_used_cells** **(** **)** |const| Returns an array of :ref:`Vector3` with the non-empty cell coordinates in the grid map. @@ -410,7 +440,7 @@ Returns an array of :ref:`Vector3` with the non-empty cell coordi .. _class_GridMap_method_get_used_cells_by_item: -- :ref:`Array` **get_used_cells_by_item** **(** :ref:`int` item **)** |const| +- :ref:`Vector3i[]` **get_used_cells_by_item** **(** :ref:`int` item **)** |const| Returns an array of all cells with the given item index specified in ``item``. @@ -444,7 +474,7 @@ Sets the mesh index for the cell referenced by its grid coordinates. A negative item index such as :ref:`INVALID_CELL_ITEM` will clear the cell. -Optionally, the item's orientation can be passed. For valid orientation values, see :ref:`Basis.get_orthogonal_index`. +Optionally, the item's orientation can be passed. For valid orientation values, see :ref:`get_orthogonal_index_from_basis`. ---- diff --git a/classes/class_hingejoint3d.rst b/classes/class_hingejoint3d.rst index 55c8fb4b4..dd066de93 100644 --- a/classes/class_hingejoint3d.rst +++ b/classes/class_hingejoint3d.rst @@ -22,27 +22,27 @@ A HingeJoint3D normally uses the Z axis of body A as the hinge axis, another axi Properties ---------- -+---------------------------+---------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`angular_limit/bias` | ``0.3`` | -+---------------------------+---------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`angular_limit/enable` | ``false`` | -+---------------------------+---------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`angular_limit/lower` | ``-90.0`` | -+---------------------------+---------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`angular_limit/relaxation` | ``1.0`` | -+---------------------------+---------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`angular_limit/softness` | ``0.9`` | -+---------------------------+---------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`angular_limit/upper` | ``90.0`` | -+---------------------------+---------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`motor/enable` | ``false`` | -+---------------------------+---------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`motor/max_impulse` | ``1.0`` | -+---------------------------+---------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`motor/target_velocity` | ``1.0`` | -+---------------------------+---------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`params/bias` | ``0.3`` | -+---------------------------+---------------------------------------------------------------------------------------+-----------+ ++---------------------------+---------------------------------------------------------------------------------------+-------------+ +| :ref:`float` | :ref:`angular_limit/bias` | ``0.3`` | ++---------------------------+---------------------------------------------------------------------------------------+-------------+ +| :ref:`bool` | :ref:`angular_limit/enable` | ``false`` | ++---------------------------+---------------------------------------------------------------------------------------+-------------+ +| :ref:`float` | :ref:`angular_limit/lower` | ``-1.5708`` | ++---------------------------+---------------------------------------------------------------------------------------+-------------+ +| :ref:`float` | :ref:`angular_limit/relaxation` | ``1.0`` | ++---------------------------+---------------------------------------------------------------------------------------+-------------+ +| :ref:`float` | :ref:`angular_limit/softness` | ``0.9`` | ++---------------------------+---------------------------------------------------------------------------------------+-------------+ +| :ref:`float` | :ref:`angular_limit/upper` | ``1.5708`` | ++---------------------------+---------------------------------------------------------------------------------------+-------------+ +| :ref:`bool` | :ref:`motor/enable` | ``false`` | ++---------------------------+---------------------------------------------------------------------------------------+-------------+ +| :ref:`float` | :ref:`motor/max_impulse` | ``1.0`` | ++---------------------------+---------------------------------------------------------------------------------------+-------------+ +| :ref:`float` | :ref:`motor/target_velocity` | ``1.0`` | ++---------------------------+---------------------------------------------------------------------------------------+-------------+ +| :ref:`float` | :ref:`params/bias` | ``0.3`` | ++---------------------------+---------------------------------------------------------------------------------------+-------------+ Methods ------- @@ -157,9 +157,13 @@ If ``true``, the hinges maximum and minimum rotation, defined by :ref:`angular_l - :ref:`float` **angular_limit/lower** -+-----------+-----------+ -| *Default* | ``-90.0`` | -+-----------+-----------+ ++-----------+------------------+ +| *Default* | ``-1.5708`` | ++-----------+------------------+ +| *Setter* | set_param(value) | ++-----------+------------------+ +| *Getter* | get_param() | ++-----------+------------------+ The minimum rotation. Only active if :ref:`angular_limit/enable` is ``true``. @@ -199,9 +203,13 @@ The lower this value, the more the rotation gets slowed down. - :ref:`float` **angular_limit/upper** -+-----------+----------+ -| *Default* | ``90.0`` | -+-----------+----------+ ++-----------+------------------+ +| *Default* | ``1.5708`` | ++-----------+------------------+ +| *Setter* | set_param(value) | ++-----------+------------------+ +| *Getter* | get_param() | ++-----------+------------------+ The maximum rotation. Only active if :ref:`angular_limit/enable` is ``true``. diff --git a/classes/class_httpclient.rst b/classes/class_httpclient.rst index b4bb4cb05..5380d2424 100644 --- a/classes/class_httpclient.rst +++ b/classes/class_httpclient.rst @@ -17,7 +17,9 @@ Low-level hyper-text transfer protocol client. Description ----------- -Hyper-text transfer protocol client (sometimes called "User Agent"). Used to make HTTP requests to download web content, upload files and other data or to communicate with various services, among other use cases. **See the :ref:`HTTPRequest` node for a higher-level alternative.**\ +Hyper-text transfer protocol client (sometimes called "User Agent"). Used to make HTTP requests to download web content, upload files and other data or to communicate with various services, among other use cases. + +See the :ref:`HTTPRequest` node for a higher-level alternative. \ **Note:** This client only needs to connect to a host once (see :ref:`connect_to_host`) to send multiple requests. Because of this, methods that take URLs usually take just the part after the host instead of the full URL, as the client is already connected to a host. See :ref:`request` for a full example and to get started. @@ -29,7 +31,7 @@ For more information on HTTP, see https://developer.mozilla.org/en-US/docs/Web/H \ **Note:** It's recommended to use transport encryption (SSL/TLS) and to avoid sending sensitive information (such as login credentials) in HTTP GET URL parameters. Consider using HTTP POST requests or HTTP headers for such information instead. -\ **Note:** When performing HTTP requests from a project exported to HTML5, keep in mind the remote server may not allow requests from foreign origins due to `CORS `__. If you host the server in question, you should modify its backend to allow requests from foreign origins by adding the ``Access-Control-Allow-Origin: *`` HTTP header. +\ **Note:** When performing HTTP requests from a project exported to Web, keep in mind the remote server may not allow requests from foreign origins due to `CORS `__. If you host the server in question, you should modify its backend to allow requests from foreign origins by adding the ``Access-Control-Allow-Origin: *`` HTTP header. \ **Note:** SSL/TLS support is currently limited to TLS 1.0, TLS 1.1, and TLS 1.2. Attempting to connect to a TLS 1.3-only server will return an error. @@ -501,7 +503,7 @@ The host should not have http:// prepended but will strip the protocol identifie If no ``port`` is specified (or ``-1`` is used), it is automatically set to 80 for HTTP and 443 for HTTPS (if ``use_ssl`` is enabled). -\ ``verify_host`` will check the SSL identity of the host if set to ``true``. +``verify_host`` will check the SSL identity of the host if set to ``true``. ---- @@ -663,7 +665,7 @@ To create a POST request with query strings to push to the server, do: -\ **Note:** The ``request_data`` parameter is ignored if ``method`` is :ref:`METHOD_GET`. This is because GET methods can't contain request data. As a workaround, you can pass request data as a query string in the URL. See :ref:`String.uri_encode` for an example. +\ **Note:** The ``body`` parameter is ignored if ``method`` is :ref:`METHOD_GET`. This is because GET methods can't contain request data. As a workaround, you can pass request data as a query string in the URL. See :ref:`String.uri_encode` for an example. ---- diff --git a/classes/class_httprequest.rst b/classes/class_httprequest.rst index d70e538de..142e35b9a 100644 --- a/classes/class_httprequest.rst +++ b/classes/class_httprequest.rst @@ -449,7 +449,7 @@ Returns the response body length. - :ref:`int` **get_downloaded_bytes** **(** **)** |const| -Returns the amount of bytes this HTTPRequest downloaded. +Returns the number of bytes this HTTPRequest downloaded. ---- diff --git a/classes/class_image.rst b/classes/class_image.rst index da06544c2..69b0cb4e0 100644 --- a/classes/class_image.rst +++ b/classes/class_image.rst @@ -101,7 +101,7 @@ Methods +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Image` | :ref:`get_rect` **(** :ref:`Rect2i` rect **)** |const| | +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_size` **(** **)** |const| | +| :ref:`Vector2i` | :ref:`get_size` **(** **)** |const| | +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Rect2i` | :ref:`get_used_rect` **(** **)** |const| | +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -496,7 +496,7 @@ Method Descriptions - void **blend_rect** **(** :ref:`Image` src, :ref:`Rect2i` src_rect, :ref:`Vector2i` dst **)** -Alpha-blends ``src_rect`` from ``src`` image to this image at coordinates ``dest``, clipped accordingly to both image bounds. This image and ``src`` image **must** have the same format. ``src_rect`` with not positive size is treated as empty. +Alpha-blends ``src_rect`` from ``src`` image to this image at coordinates ``dst``, clipped accordingly to both image bounds. This image and ``src`` image **must** have the same format. ``src_rect`` with not positive size is treated as empty. ---- @@ -740,7 +740,7 @@ Returns a new image that is a copy of the image's area specified with ``rect``. .. _class_Image_method_get_size: -- :ref:`Vector2` **get_size** **(** **)** |const| +- :ref:`Vector2i` **get_size** **(** **)** |const| Returns the image's size (width and height). diff --git a/classes/class_imagetexture.rst b/classes/class_imagetexture.rst index 88cfb328c..1c376702f 100644 --- a/classes/class_imagetexture.rst +++ b/classes/class_imagetexture.rst @@ -21,7 +21,7 @@ A :ref:`Texture2D` based on an :ref:`Image`. For a :: - var image = Image.load_from_file("res://icon.png") + var image = Image.load_from_file("res://icon.svg") var texture = ImageTexture.create_from_image(image) $Sprite2D.texture = texture @@ -31,7 +31,7 @@ This way, textures can be created at run-time by loading images both from within :: - var texture = load("res://icon.png") + var texture = load("res://icon.svg") $Sprite2D.texture = texture This is because images have to be imported as a :ref:`CompressedTexture2D` first to be loaded with :ref:`@GDScript.load`. If you'd still like to load an image file just like any other :ref:`Resource`, import it as an :ref:`Image` resource instead, and then load it normally using the :ref:`@GDScript.load` method. @@ -40,7 +40,7 @@ This is because images have to be imported as a :ref:`CompressedTexture2D`. diff --git a/classes/class_importermesh.rst b/classes/class_importermesh.rst index cf724b916..9b6c718de 100644 --- a/classes/class_importermesh.rst +++ b/classes/class_importermesh.rst @@ -111,7 +111,7 @@ Creates a new surface, analogous to :ref:`ArrayMesh.add_surface_from_arrays`. (As a note, when using indices, it is recommended to only use points, lines, or triangles.) :ref:`Mesh.get_surface_count` will become the ``surf_idx`` for this new surface. -The ``arrays`` argument is an array of arrays. See :ref:`ArrayType` for the values used in this array. For example, ``arrays[0]`` is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array or be empty, except for :ref:`Mesh.ARRAY_INDEX` if it is used. +The ``arrays`` argument is an array of arrays. See :ref:`ArrayType` for the values used in this array. For example, ``arrays[0]`` is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array (or be an exact multiple of the vertex array's length, when multiple elements of a sub-array correspond to a single vertex) or be empty, except for :ref:`Mesh.ARRAY_INDEX` if it is used. ---- @@ -129,7 +129,7 @@ Removes all surfaces and blend shapes from this ``ImporterMesh``. Generates all lods for this ImporterMesh. -\ ``normal_merge_angle`` and ``normal_split_angle`` are in degrees and used in the same way as the importer settings in ``lods``. As a good default, use 25 and 60 respectively. +``normal_merge_angle`` and ``normal_split_angle`` are in degrees and used in the same way as the importer settings in ``lods``. As a good default, use 25 and 60 respectively. The number of generated lods can be accessed using :ref:`get_surface_lod_count`, and each LOD is available in :ref:`get_surface_lod_size` and :ref:`get_surface_lod_indices`. @@ -199,7 +199,7 @@ Returns a single set of blend shape arrays for the requested blend shape index f - :ref:`int` **get_surface_count** **(** **)** |const| -Returns the amount of surfaces that the mesh holds. +Returns the number of surfaces that the mesh holds. ---- @@ -215,7 +215,7 @@ Returns the format of the surface that the mesh holds. - :ref:`int` **get_surface_lod_count** **(** :ref:`int` surface_idx **)** |const| -Returns the amount of lods that the mesh holds on a given surface. +Returns the number of lods that the mesh holds on a given surface. ---- diff --git a/classes/class_input.rst b/classes/class_input.rst index 61978a02f..dbd44d604 100644 --- a/classes/class_input.rst +++ b/classes/class_input.rst @@ -615,9 +615,9 @@ Sets the acceleration value of the accelerometer sensor. Can be used for debuggi Sets a custom mouse cursor image, which is only visible inside the game window. The hotspot can also be specified. Passing ``null`` to the image parameter resets to the system cursor. See :ref:`CursorShape` for the list of shapes. -\ ``image``'s size must be lower than 256×256. +``image``'s size must be lower than 256×256. -\ ``hotspot`` must be within ``image``'s size. +``hotspot`` must be within ``image``'s size. \ **Note:** :ref:`AnimatedTexture`\ s aren't supported as custom mouse cursors. If using an :ref:`AnimatedTexture`, only the first frame will be displayed. @@ -689,12 +689,16 @@ Stops the vibration of the joypad. - void **vibrate_handheld** **(** :ref:`int` duration_ms=500 **)** -Vibrate Android and iOS devices. +Vibrate handheld devices. + +\ **Note:** This method is implemented on Android, iOS, and Web. \ **Note:** For Android, it requires enabling the ``VIBRATE`` permission in the export preset. \ **Note:** For iOS, specifying the duration is supported in iOS 13 and later. +\ **Note:** Some web browsers such as Safari and Firefox for Android do not support this method. + ---- .. _class_Input_method_warp_mouse: diff --git a/classes/class_inputeventwithmodifiers.rst b/classes/class_inputeventwithmodifiers.rst index aa4eb7ab3..f1b9e3790 100644 --- a/classes/class_inputeventwithmodifiers.rst +++ b/classes/class_inputeventwithmodifiers.rst @@ -74,7 +74,9 @@ State of the :kbd:`Alt` modifier. | *Getter* | is_command_pressed() | +-----------+----------------------------+ -State of the :kbd:`Cmd` modifier. +State of the :kbd:`Cmd` modifier. On macOS, this is equivalent to :ref:`meta_pressed`. On other platforms, this is equivalent to :ref:`ctrl_pressed`. + +This modifier should be preferred to :ref:`ctrl_pressed` or :ref:`meta_pressed` for system shortcuts, as it maintains better cross-platform compatibility. ---- @@ -106,7 +108,9 @@ State of the :kbd:`Ctrl` modifier. | *Getter* | is_meta_pressed() | +-----------+-------------------------+ -State of the :kbd:`Meta` modifier. +State of the :kbd:`Meta` modifier. On Windows and Linux, this represents the Windows key (sometimes called "meta" or "super" on Linux). On macOS, this represents the Command key, and is equivalent to :ref:`command_pressed`. + +For better cross-system compatibility, use :ref:`command_pressed` instead. ---- diff --git a/classes/class_inputmap.rst b/classes/class_inputmap.rst index beb1c9c31..f955e9ed9 100644 --- a/classes/class_inputmap.rst +++ b/classes/class_inputmap.rst @@ -27,33 +27,33 @@ Tutorials Methods ------- -+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`action_add_event` **(** :ref:`StringName` action, :ref:`InputEvent` event **)** | -+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`action_erase_event` **(** :ref:`StringName` action, :ref:`InputEvent` event **)** | -+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`action_erase_events` **(** :ref:`StringName` action **)** | -+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`action_get_deadzone` **(** :ref:`StringName` action **)** | -+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`action_get_events` **(** :ref:`StringName` action **)** | -+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`action_has_event` **(** :ref:`StringName` action, :ref:`InputEvent` event **)** | -+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`action_set_deadzone` **(** :ref:`StringName` action, :ref:`float` deadzone **)** | -+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_action` **(** :ref:`StringName` action, :ref:`float` deadzone=0.5 **)** | -+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`erase_action` **(** :ref:`StringName` action **)** | -+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`event_is_action` **(** :ref:`InputEvent` event, :ref:`StringName` action, :ref:`bool` exact_match=false **)** |const| | -+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_actions` **(** **)** | -+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_action` **(** :ref:`StringName` action **)** |const| | -+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`load_from_project_settings` **(** **)** | -+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`action_add_event` **(** :ref:`StringName` action, :ref:`InputEvent` event **)** | ++---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`action_erase_event` **(** :ref:`StringName` action, :ref:`InputEvent` event **)** | ++---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`action_erase_events` **(** :ref:`StringName` action **)** | ++---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`action_get_deadzone` **(** :ref:`StringName` action **)** | ++---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`InputEvent[]` | :ref:`action_get_events` **(** :ref:`StringName` action **)** | ++---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`action_has_event` **(** :ref:`StringName` action, :ref:`InputEvent` event **)** | ++---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`action_set_deadzone` **(** :ref:`StringName` action, :ref:`float` deadzone **)** | ++---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_action` **(** :ref:`StringName` action, :ref:`float` deadzone=0.5 **)** | ++---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`erase_action` **(** :ref:`StringName` action **)** | ++---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`event_is_action` **(** :ref:`InputEvent` event, :ref:`StringName` action, :ref:`bool` exact_match=false **)** |const| | ++---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringName[]` | :ref:`get_actions` **(** **)** | ++---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_action` **(** :ref:`StringName` action **)** |const| | ++---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`load_from_project_settings` **(** **)** | ++---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Method Descriptions ------------------- @@ -92,7 +92,7 @@ Returns a deadzone value for the action. .. _class_InputMap_method_action_get_events: -- :ref:`Array` **action_get_events** **(** :ref:`StringName` action **)** +- :ref:`InputEvent[]` **action_get_events** **(** :ref:`StringName` action **)** Returns an array of :ref:`InputEvent`\ s associated with a given action. @@ -146,7 +146,7 @@ If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref: .. _class_InputMap_method_get_actions: -- :ref:`Array` **get_actions** **(** **)** +- :ref:`StringName[]` **get_actions** **(** **)** Returns an array of all actions in the ``InputMap``. diff --git a/classes/class_instanceplaceholder.rst b/classes/class_instanceplaceholder.rst index 4ec4708f8..b48d5dab0 100644 --- a/classes/class_instanceplaceholder.rst +++ b/classes/class_instanceplaceholder.rst @@ -39,7 +39,9 @@ Method Descriptions - :ref:`Node` **create_instance** **(** :ref:`bool` replace=false, :ref:`PackedScene` custom_scene=null **)** -Not thread-safe. Use :ref:`Object.call_deferred` if calling from a thread. +Call this method to actually load in the node. The created node will be placed as a sibling *above* the ``InstancePlaceholder`` in the scene tree. The :ref:`Node`'s reference is also returned for convenience. + +\ **Note:** :ref:`create_instance` is not thread-safe. Use :ref:`Object.call_deferred` if calling from a thread. ---- @@ -55,6 +57,10 @@ Gets the path to the :ref:`PackedScene` resource file that is - :ref:`Dictionary` **get_stored_values** **(** :ref:`bool` with_order=false **)** +Returns the list of properties that will be applied to the node when :ref:`create_instance` is called. + +If ``with_order`` is ``true``, a key named ``.order`` (note the leading period) is added to the dictionary. This ``.order`` key is an :ref:`Array` of :ref:`String` property names specifying the order in which properties will be applied (with index 0 being the first). + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_int.rst b/classes/class_int.rst index 2237a6dd1..8f106da5d 100644 --- a/classes/class_int.rst +++ b/classes/class_int.rst @@ -117,15 +117,15 @@ Operators +-------------------------------------+------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`operator /` **(** :ref:`int` right **)** | +-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator <` **(** :ref:`float` right **)** | +| :ref:`bool` | :ref:`operator \<` **(** :ref:`float` right **)** | +-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator <` **(** :ref:`int` right **)** | +| :ref:`bool` | :ref:`operator \<` **(** :ref:`int` right **)** | +-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`operator <<` **(** :ref:`int` right **)** | +| :ref:`int` | :ref:`operator \<\<` **(** :ref:`int` right **)** | +-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator <=` **(** :ref:`float` right **)** | +| :ref:`bool` | :ref:`operator \<=` **(** :ref:`float` right **)** | +-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator <=` **(** :ref:`int` right **)** | +| :ref:`bool` | :ref:`operator \<=` **(** :ref:`int` right **)** | +-------------------------------------+------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`float` right **)** | +-------------------------------------+------------------------------------------------------------------------------------------------------------+ diff --git a/classes/class_ip.rst b/classes/class_ip.rst index 67928524e..45d22893b 100644 --- a/classes/class_ip.rst +++ b/classes/class_ip.rst @@ -22,27 +22,27 @@ IP contains support functions for the Internet Protocol (IP). TCP/IP support is Methods ------- -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_cache` **(** :ref:`String` hostname="" **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`erase_resolve_item` **(** :ref:`int` id **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_local_addresses` **(** **)** |const| | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_local_interfaces` **(** **)** |const| | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_resolve_item_address` **(** :ref:`int` id **)** |const| | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_resolve_item_addresses` **(** :ref:`int` id **)** |const| | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`ResolverStatus` | :ref:`get_resolve_item_status` **(** :ref:`int` id **)** |const| | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`resolve_hostname` **(** :ref:`String` host, :ref:`Type` ip_type=3 **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`resolve_hostname_addresses` **(** :ref:`String` host, :ref:`Type` ip_type=3 **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`resolve_hostname_queue_item` **(** :ref:`String` host, :ref:`Type` ip_type=3 **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_cache` **(** :ref:`String` hostname="" **)** | ++---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`erase_resolve_item` **(** :ref:`int` id **)** | ++---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedStringArray` | :ref:`get_local_addresses` **(** **)** |const| | ++---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary[]` | :ref:`get_local_interfaces` **(** **)** |const| | ++---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_resolve_item_address` **(** :ref:`int` id **)** |const| | ++---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_resolve_item_addresses` **(** :ref:`int` id **)** |const| | ++---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`ResolverStatus` | :ref:`get_resolve_item_status` **(** :ref:`int` id **)** |const| | ++---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`resolve_hostname` **(** :ref:`String` host, :ref:`Type` ip_type=3 **)** | ++---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedStringArray` | :ref:`resolve_hostname_addresses` **(** :ref:`String` host, :ref:`Type` ip_type=3 **)** | ++---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`resolve_hostname_queue_item` **(** :ref:`String` host, :ref:`Type` ip_type=3 **)** | ++---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Enumerations ------------ @@ -121,7 +121,7 @@ Removes a given item ``id`` from the queue. This should be used to free a queue .. _class_IP_method_get_local_addresses: -- :ref:`Array` **get_local_addresses** **(** **)** |const| +- :ref:`PackedStringArray` **get_local_addresses** **(** **)** |const| Returns all the user's current IPv4 and IPv6 addresses as an array. @@ -129,7 +129,7 @@ Returns all the user's current IPv4 and IPv6 addresses as an array. .. _class_IP_method_get_local_interfaces: -- :ref:`Array` **get_local_interfaces** **(** **)** |const| +- :ref:`Dictionary[]` **get_local_interfaces** **(** **)** |const| Returns all network adapters as an array. @@ -180,7 +180,7 @@ Returns a given hostname's IPv4 or IPv6 address when resolved (blocking-type met .. _class_IP_method_resolve_hostname_addresses: -- :ref:`Array` **resolve_hostname_addresses** **(** :ref:`String` host, :ref:`Type` ip_type=3 **)** +- :ref:`PackedStringArray` **resolve_hostname_addresses** **(** :ref:`String` host, :ref:`Type` ip_type=3 **)** Resolves a given hostname in a blocking way. Addresses are returned as an :ref:`Array` of IPv4 or IPv6 addresses depending on ``ip_type``. diff --git a/classes/class_itemlist.rst b/classes/class_itemlist.rst index 4814129ab..dd697554d 100644 --- a/classes/class_itemlist.rst +++ b/classes/class_itemlist.rst @@ -163,7 +163,7 @@ Theme Properties +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ | :ref:`Color` | :ref:`font_selected_color` | ``Color(1, 1, 1, 1)`` | +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ -| :ref:`Color` | :ref:`guide_color` | ``Color(0, 0, 0, 0.1)`` | +| :ref:`Color` | :ref:`guide_color` | ``Color(0.7, 0.7, 0.7, 0.25)`` | +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ | :ref:`int` | :ref:`h_separation` | ``4`` | +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ @@ -887,9 +887,9 @@ Text :ref:`Color` used when the item is selected. - :ref:`Color` **guide_color** -+-----------+-------------------------+ -| *Default* | ``Color(0, 0, 0, 0.1)`` | -+-----------+-------------------------+ ++-----------+--------------------------------+ +| *Default* | ``Color(0.7, 0.7, 0.7, 0.25)`` | ++-----------+--------------------------------+ :ref:`Color` of the guideline. The guideline is a line drawn between each row of items. diff --git a/classes/class_javascript.rst b/classes/class_javascript.rst index 883ae194a..45bc6d49c 100644 --- a/classes/class_javascript.rst +++ b/classes/class_javascript.rst @@ -12,12 +12,12 @@ JavaScript **Inherits:** :ref:`Object` -Singleton that connects the engine with the browser's JavaScript context in HTML5 export. +Singleton that connects the engine with the browser's JavaScript context in Web export. Description ----------- -The JavaScript singleton is implemented only in the HTML5 export. It's used to access the browser's JavaScript context. This allows interaction with embedding pages or calling third-party JavaScript APIs. +The JavaScript singleton is implemented only in the Web export. It's used to access the browser's JavaScript context. This allows interaction with embedding pages or calling third-party JavaScript APIs. \ **Note:** This singleton can be disabled at build-time to improve security. By default, the JavaScript singleton is enabled. Official export templates also have the JavaScript singleton enabled. See :doc:`Compiling for the Web <../development/compiling/compiling_for_web>` in the documentation for more information. diff --git a/classes/class_javascriptobject.rst b/classes/class_javascriptobject.rst index 6e3ebbf9f..218ecd7d0 100644 --- a/classes/class_javascriptobject.rst +++ b/classes/class_javascriptobject.rst @@ -47,7 +47,7 @@ Example: # [0, 9, [JavaScriptObject:1180]] print(args) -\ **Note:** Only available in the HTML5 platform. +\ **Note:** Only available in the Web platform. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_joint3d.rst b/classes/class_joint3d.rst index dfba81cf3..c6a9e29e7 100644 --- a/classes/class_joint3d.rst +++ b/classes/class_joint3d.rst @@ -29,22 +29,22 @@ Tutorials Properties ---------- -+---------------------------------+--------------------------------------------------------------------------------+------------------+ -| :ref:`bool` | :ref:`collision/exclude_nodes` | ``true`` | -+---------------------------------+--------------------------------------------------------------------------------+------------------+ -| :ref:`NodePath` | :ref:`nodes/node_a` | ``NodePath("")`` | -+---------------------------------+--------------------------------------------------------------------------------+------------------+ -| :ref:`NodePath` | :ref:`nodes/node_b` | ``NodePath("")`` | -+---------------------------------+--------------------------------------------------------------------------------+------------------+ -| :ref:`int` | :ref:`solver/priority` | ``1`` | -+---------------------------------+--------------------------------------------------------------------------------+------------------+ ++---------------------------------+------------------------------------------------------------------------------------------+------------------+ +| :ref:`bool` | :ref:`exclude_nodes_from_collision` | ``true`` | ++---------------------------------+------------------------------------------------------------------------------------------+------------------+ +| :ref:`NodePath` | :ref:`node_a` | ``NodePath("")`` | ++---------------------------------+------------------------------------------------------------------------------------------+------------------+ +| :ref:`NodePath` | :ref:`node_b` | ``NodePath("")`` | ++---------------------------------+------------------------------------------------------------------------------------------+------------------+ +| :ref:`int` | :ref:`solver_priority` | ``1`` | ++---------------------------------+------------------------------------------------------------------------------------------+------------------+ Property Descriptions --------------------- -.. _class_Joint3D_property_collision/exclude_nodes: +.. _class_Joint3D_property_exclude_nodes_from_collision: -- :ref:`bool` **collision/exclude_nodes** +- :ref:`bool` **exclude_nodes_from_collision** +-----------+-----------------------------------------+ | *Default* | ``true`` | @@ -58,9 +58,9 @@ If ``true``, the two bodies of the nodes are not able to collide with each other ---- -.. _class_Joint3D_property_nodes/node_a: +.. _class_Joint3D_property_node_a: -- :ref:`NodePath` **nodes/node_a** +- :ref:`NodePath` **node_a** +-----------+-------------------+ | *Default* | ``NodePath("")`` | @@ -74,9 +74,9 @@ The node attached to the first side (A) of the joint. ---- -.. _class_Joint3D_property_nodes/node_b: +.. _class_Joint3D_property_node_b: -- :ref:`NodePath` **nodes/node_b** +- :ref:`NodePath` **node_b** +-----------+-------------------+ | *Default* | ``NodePath("")`` | @@ -90,9 +90,9 @@ The node attached to the second side (B) of the joint. ---- -.. _class_Joint3D_property_solver/priority: +.. _class_Joint3D_property_solver_priority: -- :ref:`int` **solver/priority** +- :ref:`int` **solver_priority** +-----------+----------------------------+ | *Default* | ``1`` | diff --git a/classes/class_json.rst b/classes/class_json.rst index c60e43a98..ebb90d58a 100644 --- a/classes/class_json.rst +++ b/classes/class_json.rst @@ -28,8 +28,7 @@ The ``JSON`` enables all data types to be converted to and from a JSON string. T :: var data_to_send = ["a", "b", "c"] - var json = JSON.new() - var json_string = json.stringify(data_to_send) + var json_string = JSON.stringify(data_to_send) # Save data # ... # Retrieve data @@ -43,20 +42,28 @@ The ``JSON`` enables all data types to be converted to and from a JSON string. T else: print("JSON Parse Error: ", json.get_error_message(), " in ", json_string, " at line ", json.get_error_line()) +Alternatively, you can parse string using the static :ref:`parse_string` method, but it doesn't allow to handle errors. + +:: + + var data = JSON.parse_string(json_string) # Returns null if parsing failed. + Methods ------- -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get_data` **(** **)** |const| | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_error_line` **(** **)** |const| | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_error_message` **(** **)** |const| | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`parse` **(** :ref:`String` json_string **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`stringify` **(** :ref:`Variant` data, :ref:`String` indent="", :ref:`bool` sort_keys=true, :ref:`bool` full_precision=false **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`get_data` **(** **)** |const| | ++---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_error_line` **(** **)** |const| | ++---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_error_message` **(** **)** |const| | ++---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Error` | :ref:`parse` **(** :ref:`String` json_string **)** | ++---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`parse_string` **(** :ref:`String` json_string **)** |static| | ++---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`stringify` **(** :ref:`Variant` data, :ref:`String` indent="", :ref:`bool` sort_keys=true, :ref:`bool` full_precision=false **)** |static| | ++---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Method Descriptions ------------------- @@ -95,17 +102,27 @@ Attempts to parse the ``json_string`` provided. Returns an :ref:`Error`. If the parse was successful, it returns ``OK`` and the result can be retrieved using :ref:`get_data`. If unsuccessful, use :ref:`get_error_line` and :ref:`get_error_message` for identifying the source of the failure. +Non-static variant of :ref:`parse_string`, if you want custom error handling. + +---- + +.. _class_JSON_method_parse_string: + +- :ref:`Variant` **parse_string** **(** :ref:`String` json_string **)** |static| + +Attempts to parse the ``json_string`` provided and returns the parsed data. Returns ``null`` if parse failed. + ---- .. _class_JSON_method_stringify: -- :ref:`String` **stringify** **(** :ref:`Variant` data, :ref:`String` indent="", :ref:`bool` sort_keys=true, :ref:`bool` full_precision=false **)** +- :ref:`String` **stringify** **(** :ref:`Variant` data, :ref:`String` indent="", :ref:`bool` sort_keys=true, :ref:`bool` full_precision=false **)** |static| Converts a :ref:`Variant` var to JSON text and returns the result. Useful for serializing data to store or send over the network. \ **Note:** The JSON specification does not define integer or float types, but only a *number* type. Therefore, converting a Variant to JSON text will convert all numerical values to :ref:`float` types. -\ **Note:** If ``full_precision`` is true, when stringifying floats, the unreliable digits are stringified in addition to the reliable digits to guarantee exact decoding. +\ **Note:** If ``full_precision`` is ``true``, when stringifying floats, the unreliable digits are stringified in addition to the reliable digits to guarantee exact decoding. The ``indent`` parameter controls if and how something is indented, the string used for this parameter will be used where there should be an indent in the output, even spaces like ``" "`` will work. ``\t`` and ``\n`` can also be used for a tab indent, or to make a newline for each indent respectively. diff --git a/classes/class_jsonrpc.rst b/classes/class_jsonrpc.rst index e2c37550b..fa0f2a33f 100644 --- a/classes/class_jsonrpc.rst +++ b/classes/class_jsonrpc.rst @@ -128,7 +128,7 @@ Given a Dictionary which takes the form of a JSON-RPC request: unpack the reques To add new supported methods extend the JSONRPC class and call :ref:`process_action` on your subclass. -\ ``action``: The action to be run, as a Dictionary in the form of a JSON-RPC request or notification. +``action``: The action to be run, as a Dictionary in the form of a JSON-RPC request or notification. ---- diff --git a/classes/class_kinematiccollision2d.rst b/classes/class_kinematiccollision2d.rst index 1dab8bc9b..f8166183e 100644 --- a/classes/class_kinematiccollision2d.rst +++ b/classes/class_kinematiccollision2d.rst @@ -39,6 +39,8 @@ Methods +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_collider_velocity` **(** **)** |const| | +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_depth` **(** **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Object` | :ref:`get_local_shape` **(** **)** |const| | +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_normal` **(** **)** |const| | @@ -57,7 +59,7 @@ Method Descriptions - :ref:`float` **get_angle** **(** :ref:`Vector2` up_direction=Vector2(0, -1) **)** |const| -Returns the collision angle according to ``up_direction``, which is ``Vector2.UP`` by default. This value is always positive. +Returns the collision angle according to ``up_direction``, which is :ref:`Vector2.UP` by default. This value is always positive. ---- @@ -109,6 +111,14 @@ Returns the colliding body's velocity. ---- +.. _class_KinematicCollision2D_method_get_depth: + +- :ref:`float` **get_depth** **(** **)** |const| + +Returns the colliding body's length of overlap along the collision normal. + +---- + .. _class_KinematicCollision2D_method_get_local_shape: - :ref:`Object` **get_local_shape** **(** **)** |const| diff --git a/classes/class_kinematiccollision3d.rst b/classes/class_kinematiccollision3d.rst index 9d08a1ed3..c9415d357 100644 --- a/classes/class_kinematiccollision3d.rst +++ b/classes/class_kinematiccollision3d.rst @@ -41,6 +41,8 @@ Methods +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_collision_count` **(** **)** |const| | +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_depth` **(** **)** |const| | ++-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Object` | :ref:`get_local_shape` **(** :ref:`int` collision_index=0 **)** |const| | +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`get_normal` **(** :ref:`int` collision_index=0 **)** |const| | @@ -59,7 +61,7 @@ Method Descriptions - :ref:`float` **get_angle** **(** :ref:`int` collision_index=0, :ref:`Vector3` up_direction=Vector3(0, 1, 0) **)** |const| -Returns the collision angle according to ``up_direction``, which is ``Vector3.UP`` by default. This value is always positive. +Returns the collision angle according to ``up_direction``, which is :ref:`Vector3.UP` by default. This value is always positive. ---- @@ -119,6 +121,14 @@ Returns the number of detected collisions. ---- +.. _class_KinematicCollision3D_method_get_depth: + +- :ref:`float` **get_depth** **(** **)** |const| + +Returns the colliding body's length of overlap along the collision normal. + +---- + .. _class_KinematicCollision3D_method_get_local_shape: - :ref:`Object` **get_local_shape** **(** :ref:`int` collision_index=0 **)** |const| diff --git a/classes/class_label.rst b/classes/class_label.rst index 0590865f2..8026adaa6 100644 --- a/classes/class_label.rst +++ b/classes/class_label.rst @@ -19,7 +19,7 @@ Description Label displays plain text on the screen. It gives you control over the horizontal and vertical alignment and can wrap the text inside the node's bounding rectangle. It doesn't support bold, italics, or other formatting. For that, use :ref:`RichTextLabel` instead. -\ **Note:** Contrarily to most other :ref:`Control`\ s, Label's :ref:`Control.mouse_filter` defaults to :ref:`Control.MOUSE_FILTER_IGNORE` (i.e. it doesn't react to mouse input events). This implies that a label won't display any configured :ref:`Control.hint_tooltip`, unless you change its mouse filter. +\ **Note:** Contrarily to most other :ref:`Control`\ s, Label's :ref:`Control.mouse_filter` defaults to :ref:`Control.MOUSE_FILTER_IGNORE` (i.e. it doesn't react to mouse input events). This implies that a label won't display any configured :ref:`Control.tooltip_text`, unless you change its mouse filter. Tutorials --------- @@ -46,8 +46,6 @@ Properties +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ | :ref:`MouseFilter` | mouse_filter | ``2`` (overrides :ref:`Control`) | +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`percent_visible` | ``1.0`` | -+-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ | :ref:`int` | size_flags_vertical | ``4`` (overrides :ref:`Control`) | +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ | :ref:`StructuredTextParser` | :ref:`structured_text_bidi_override` | ``0`` | @@ -68,6 +66,8 @@ Properties +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ | :ref:`VisibleCharactersBehavior` | :ref:`visible_characters_behavior` | ``0`` | +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`visible_ratio` | ``1.0`` | ++-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ Methods ------- @@ -220,24 +220,6 @@ Limits the lines of text the node shows on screen. ---- -.. _class_Label_property_percent_visible: - -- :ref:`float` **percent_visible** - -+-----------+----------------------------+ -| *Default* | ``1.0`` | -+-----------+----------------------------+ -| *Setter* | set_percent_visible(value) | -+-----------+----------------------------+ -| *Getter* | get_percent_visible() | -+-----------+----------------------------+ - -Limits the amount of visible characters. If you set ``percent_visible`` to 0.5, only up to half of the text's characters will display on screen. Useful to animate the text in a dialog box. - -\ **Note:** Setting this property updates :ref:`visible_characters` based on current :ref:`get_total_character_count`. - ----- - .. _class_Label_property_structured_text_bidi_override: - :ref:`StructuredTextParser` **structured_text_bidi_override** @@ -362,9 +344,9 @@ Controls the text's vertical alignment. Supports top, center, bottom, and fill. | *Getter* | get_visible_characters() | +-----------+-------------------------------+ -Restricts the number of characters to display. Set to -1 to disable. +The number of characters to display. If set to ``-1``, all characters are displayed. This can be useful when animating the text appearing in a dialog box. -\ **Note:** Setting this property updates :ref:`percent_visible` based on current :ref:`get_total_character_count`. +\ **Note:** Setting this property updates :ref:`visible_ratio` accordingly. ---- @@ -380,7 +362,25 @@ Restricts the number of characters to display. Set to -1 to disable. | *Getter* | get_visible_characters_behavior() | +-----------+----------------------------------------+ -Sets the clipping behavior when :ref:`visible_characters` or :ref:`percent_visible` is set. See :ref:`VisibleCharactersBehavior` for more info. +Sets the clipping behavior when :ref:`visible_characters` or :ref:`visible_ratio` is set. See :ref:`VisibleCharactersBehavior` for more info. + +---- + +.. _class_Label_property_visible_ratio: + +- :ref:`float` **visible_ratio** + ++-----------+--------------------------+ +| *Default* | ``1.0`` | ++-----------+--------------------------+ +| *Setter* | set_visible_ratio(value) | ++-----------+--------------------------+ +| *Getter* | get_visible_ratio() | ++-----------+--------------------------+ + +The fraction of characters to display, relative to the total number of characters (see :ref:`get_total_character_count`). If set to ``1.0``, all characters are displayed. If set to ``0.5``, only half of the characters will be displayed. This can be useful when animating the text appearing in a dialog box. + +\ **Note:** Setting this property updates :ref:`visible_characters` accordingly. Method Descriptions ------------------- @@ -389,7 +389,7 @@ Method Descriptions - :ref:`int` **get_line_count** **(** **)** |const| -Returns the amount of lines of text the Label has. +Returns the number of lines of text the Label has. ---- @@ -401,7 +401,7 @@ Returns the height of the line ``line``. If ``line`` is set to ``-1``, returns the biggest line height. -If there're no lines returns font size in pixels. +If there are no lines, returns font size in pixels. ---- diff --git a/classes/class_label3d.rst b/classes/class_label3d.rst index 7d2388655..651efb38b 100644 --- a/classes/class_label3d.rst +++ b/classes/class_label3d.rst @@ -37,7 +37,7 @@ Properties +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`Font` | :ref:`font` | | +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`font_size` | ``16`` | +| :ref:`int` | :ref:`font_size` | ``32`` | +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`HorizontalAlignment` | :ref:`horizontal_alignment` | ``1`` | +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+-----------------------+ @@ -55,9 +55,9 @@ Properties +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`int` | :ref:`outline_render_priority` | ``-1`` | +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`outline_size` | ``0`` | +| :ref:`int` | :ref:`outline_size` | ``12`` | +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`pixel_size` | ``0.01`` | +| :ref:`float` | :ref:`pixel_size` | ``0.005`` | +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`int` | :ref:`render_priority` | ``0`` | +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+-----------------------+ @@ -110,7 +110,7 @@ enum **DrawFlags**: - **FLAG_SHADED** = **0** --- If set, lights in the environment affect the label. -- **FLAG_DOUBLE_SIDED** = **1** --- If set, text can be seen from the back as well. If not, the texture is invisible when looking at it from behind. +- **FLAG_DOUBLE_SIDED** = **1** --- If set, text can be seen from the back as well. If not, the text is invisible when looking at it from behind. - **FLAG_DISABLE_DEPTH_TEST** = **2** --- Disables the depth test, so this object is drawn on top of all others. However, objects drawn after it in the draw order may cover it. @@ -130,7 +130,7 @@ enum **DrawFlags**: enum **AlphaCutMode**: -- **ALPHA_CUT_DISABLED** = **0** --- This mode performs standard alpha blending. It can display translucent areas, but transparency sorting issues may be visible when multiple transparent materials are overlapping. +- **ALPHA_CUT_DISABLED** = **0** --- This mode performs standard alpha blending. It can display translucent areas, but transparency sorting issues may be visible when multiple transparent materials are overlapping. :ref:`GeometryInstance3D.cast_shadow` has no effect when this transparency mode is used; the ``Label3D`` will never cast shadows. - **ALPHA_CUT_DISCARD** = **1** --- This mode only allows fully transparent or fully opaque pixels. Harsh edges will be visible unless some form of screen-space antialiasing is enabled (see :ref:`ProjectSettings.rendering/anti_aliasing/quality/screen_space_aa`). This mode is also known as *alpha testing* or *1-bit transparency*. @@ -260,14 +260,16 @@ Font configuration used to display text. - :ref:`int` **font_size** +-----------+----------------------+ -| *Default* | ``16`` | +| *Default* | ``32`` | +-----------+----------------------+ | *Setter* | set_font_size(value) | +-----------+----------------------+ | *Getter* | get_font_size() | +-----------+----------------------+ -Font size of the ``Label3D``'s text. +Font size of the ``Label3D``'s text. To make the font look more detailed when up close, increase :ref:`font_size` while decreasing :ref:`pixel_size` at the same time. + +Higher font sizes require more time to render new characters, which can cause stuttering during gameplay. ---- @@ -397,7 +399,7 @@ The tint of text outline. Sets the render priority for the text outline. Higher priority objects will be sorted in front of lower priority objects. -\ **Node:** This only applies if :ref:`alpha_cut` is set to :ref:`ALPHA_CUT_DISABLED` (default value). +\ **Note:** This only applies if :ref:`alpha_cut` is set to :ref:`ALPHA_CUT_DISABLED` (default value). \ **Note:** This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority). @@ -408,7 +410,7 @@ Sets the render priority for the text outline. Higher priority objects will be s - :ref:`int` **outline_size** +-----------+-------------------------+ -| *Default* | ``0`` | +| *Default* | ``12`` | +-----------+-------------------------+ | *Setter* | set_outline_size(value) | +-----------+-------------------------+ @@ -424,14 +426,14 @@ Text outline size. - :ref:`float` **pixel_size** +-----------+-----------------------+ -| *Default* | ``0.01`` | +| *Default* | ``0.005`` | +-----------+-----------------------+ | *Setter* | set_pixel_size(value) | +-----------+-----------------------+ | *Getter* | get_pixel_size() | +-----------+-----------------------+ -The size of one pixel's width on the label to scale it in 3D. +The size of one pixel's width on the label to scale it in 3D. To make the font look more detailed when up close, increase :ref:`font_size` while decreasing :ref:`pixel_size` at the same time. ---- @@ -449,7 +451,7 @@ The size of one pixel's width on the label to scale it in 3D. Sets the render priority for the text. Higher priority objects will be sorted in front of lower priority objects. -\ **Node:** This only applies if :ref:`alpha_cut` is set to :ref:`ALPHA_CUT_DISABLED` (default value). +\ **Note:** This only applies if :ref:`alpha_cut` is set to :ref:`ALPHA_CUT_DISABLED` (default value). \ **Note:** This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority). diff --git a/classes/class_labelsettings.rst b/classes/class_labelsettings.rst index 316086281..baf6e2c13 100644 --- a/classes/class_labelsettings.rst +++ b/classes/class_labelsettings.rst @@ -17,25 +17,25 @@ LabelSettings Properties ---------- -+-------------------------------+------------------------------------------------------------------+-----------------------------------+ -| :ref:`Font` | :ref:`font` | | -+-------------------------------+------------------------------------------------------------------+-----------------------------------+ -| :ref:`Color` | :ref:`font_color` | ``Color(0.875, 0.875, 0.875, 1)`` | -+-------------------------------+------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`font_size` | ``16`` | -+-------------------------------+------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`line_spacing` | ``0.0`` | -+-------------------------------+------------------------------------------------------------------+-----------------------------------+ -| :ref:`Color` | :ref:`outline_color` | ``Color(1, 1, 1, 1)`` | -+-------------------------------+------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`outline_size` | ``0`` | -+-------------------------------+------------------------------------------------------------------+-----------------------------------+ -| :ref:`Color` | :ref:`shadow_color` | ``Color(1, 1, 1, 1)`` | -+-------------------------------+------------------------------------------------------------------+-----------------------------------+ -| :ref:`Vector2` | :ref:`shadow_offset` | ``Vector2(1, 1)`` | -+-------------------------------+------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`shadow_size` | ``0`` | -+-------------------------------+------------------------------------------------------------------+-----------------------------------+ ++-------------------------------+------------------------------------------------------------------+-----------------------+ +| :ref:`Font` | :ref:`font` | | ++-------------------------------+------------------------------------------------------------------+-----------------------+ +| :ref:`Color` | :ref:`font_color` | ``Color(1, 1, 1, 1)`` | ++-------------------------------+------------------------------------------------------------------+-----------------------+ +| :ref:`int` | :ref:`font_size` | ``16`` | ++-------------------------------+------------------------------------------------------------------+-----------------------+ +| :ref:`float` | :ref:`line_spacing` | ``3.0`` | ++-------------------------------+------------------------------------------------------------------+-----------------------+ +| :ref:`Color` | :ref:`outline_color` | ``Color(1, 1, 1, 1)`` | ++-------------------------------+------------------------------------------------------------------+-----------------------+ +| :ref:`int` | :ref:`outline_size` | ``0`` | ++-------------------------------+------------------------------------------------------------------+-----------------------+ +| :ref:`Color` | :ref:`shadow_color` | ``Color(0, 0, 0, 0)`` | ++-------------------------------+------------------------------------------------------------------+-----------------------+ +| :ref:`Vector2` | :ref:`shadow_offset` | ``Vector2(1, 1)`` | ++-------------------------------+------------------------------------------------------------------+-----------------------+ +| :ref:`int` | :ref:`shadow_size` | ``1`` | ++-------------------------------+------------------------------------------------------------------+-----------------------+ Property Descriptions --------------------- @@ -56,13 +56,13 @@ Property Descriptions - :ref:`Color` **font_color** -+-----------+-----------------------------------+ -| *Default* | ``Color(0.875, 0.875, 0.875, 1)`` | -+-----------+-----------------------------------+ -| *Setter* | set_font_color(value) | -+-----------+-----------------------------------+ -| *Getter* | get_font_color() | -+-----------+-----------------------------------+ ++-----------+-----------------------+ +| *Default* | ``Color(1, 1, 1, 1)`` | ++-----------+-----------------------+ +| *Setter* | set_font_color(value) | ++-----------+-----------------------+ +| *Getter* | get_font_color() | ++-----------+-----------------------+ ---- @@ -85,7 +85,7 @@ Property Descriptions - :ref:`float` **line_spacing** +-----------+-------------------------+ -| *Default* | ``0.0`` | +| *Default* | ``3.0`` | +-----------+-------------------------+ | *Setter* | set_line_spacing(value) | +-----------+-------------------------+ @@ -127,7 +127,7 @@ Property Descriptions - :ref:`Color` **shadow_color** +-----------+-------------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | +| *Default* | ``Color(0, 0, 0, 0)`` | +-----------+-------------------------+ | *Setter* | set_shadow_color(value) | +-----------+-------------------------+ @@ -155,7 +155,7 @@ Property Descriptions - :ref:`int` **shadow_size** +-----------+------------------------+ -| *Default* | ``0`` | +| *Default* | ``1`` | +-----------+------------------------+ | *Setter* | set_shadow_size(value) | +-----------+------------------------+ diff --git a/classes/class_light3d.rst b/classes/class_light3d.rst index bbf057851..962918cf9 100644 --- a/classes/class_light3d.rst +++ b/classes/class_light3d.rst @@ -31,51 +31,53 @@ Tutorials Properties ---------- -+----------------------------------------+------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`distance_fade_begin` | ``40.0`` | -+----------------------------------------+------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`distance_fade_enabled` | ``false`` | -+----------------------------------------+------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`distance_fade_length` | ``10.0`` | -+----------------------------------------+------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`distance_fade_shadow` | ``50.0`` | -+----------------------------------------+------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`editor_only` | ``false`` | -+----------------------------------------+------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`light_angular_distance` | ``0.0`` | -+----------------------------------------+------------------------------------------------------------------------------------+-----------------------+ -| :ref:`BakeMode` | :ref:`light_bake_mode` | ``2`` | -+----------------------------------------+------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Color` | :ref:`light_color` | ``Color(1, 1, 1, 1)`` | -+----------------------------------------+------------------------------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`light_cull_mask` | ``4294967295`` | -+----------------------------------------+------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`light_energy` | ``1.0`` | -+----------------------------------------+------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`light_indirect_energy` | ``1.0`` | -+----------------------------------------+------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`light_negative` | ``false`` | -+----------------------------------------+------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Texture2D` | :ref:`light_projector` | | -+----------------------------------------+------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`light_size` | ``0.0`` | -+----------------------------------------+------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`light_specular` | ``0.5`` | -+----------------------------------------+------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`shadow_bias` | ``0.1`` | -+----------------------------------------+------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`shadow_blur` | ``1.0`` | -+----------------------------------------+------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`shadow_enabled` | ``false`` | -+----------------------------------------+------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`shadow_fog_fade` | ``0.1`` | -+----------------------------------------+------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`shadow_normal_bias` | ``1.0`` | -+----------------------------------------+------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`shadow_reverse_cull_face` | ``false`` | -+----------------------------------------+------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`shadow_transmittance_bias` | ``0.05`` | -+----------------------------------------+------------------------------------------------------------------------------------+-----------------------+ ++----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ +| :ref:`float` | :ref:`distance_fade_begin` | ``40.0`` | ++----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ +| :ref:`bool` | :ref:`distance_fade_enabled` | ``false`` | ++----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ +| :ref:`float` | :ref:`distance_fade_length` | ``10.0`` | ++----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ +| :ref:`float` | :ref:`distance_fade_shadow` | ``50.0`` | ++----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ +| :ref:`bool` | :ref:`editor_only` | ``false`` | ++----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ +| :ref:`float` | :ref:`light_angular_distance` | ``0.0`` | ++----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ +| :ref:`BakeMode` | :ref:`light_bake_mode` | ``2`` | ++----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ +| :ref:`Color` | :ref:`light_color` | ``Color(1, 1, 1, 1)`` | ++----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ +| :ref:`int` | :ref:`light_cull_mask` | ``4294967295`` | ++----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ +| :ref:`float` | :ref:`light_energy` | ``1.0`` | ++----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ +| :ref:`float` | :ref:`light_indirect_energy` | ``1.0`` | ++----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ +| :ref:`bool` | :ref:`light_negative` | ``false`` | ++----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ +| :ref:`Texture2D` | :ref:`light_projector` | | ++----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ +| :ref:`float` | :ref:`light_size` | ``0.0`` | ++----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ +| :ref:`float` | :ref:`light_specular` | ``0.5`` | ++----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ +| :ref:`float` | :ref:`light_volumetric_fog_energy` | ``1.0`` | ++----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ +| :ref:`float` | :ref:`shadow_bias` | ``0.1`` | ++----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ +| :ref:`float` | :ref:`shadow_blur` | ``1.0`` | ++----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ +| :ref:`bool` | :ref:`shadow_enabled` | ``false`` | ++----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ +| :ref:`float` | :ref:`shadow_normal_bias` | ``1.0`` | ++----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ +| :ref:`float` | :ref:`shadow_opacity` | ``1.0`` | ++----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ +| :ref:`bool` | :ref:`shadow_reverse_cull_face` | ``false`` | ++----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ +| :ref:`float` | :ref:`shadow_transmittance_bias` | ``0.05`` | ++----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ Methods ------- @@ -95,6 +97,8 @@ Enumerations .. _class_Light3D_constant_PARAM_INDIRECT_ENERGY: +.. _class_Light3D_constant_PARAM_VOLUMETRIC_FOG_ENERGY: + .. _class_Light3D_constant_PARAM_SPECULAR: .. _class_Light3D_constant_PARAM_RANGE: @@ -123,9 +127,9 @@ Enumerations .. _class_Light3D_constant_PARAM_SHADOW_PANCAKE_SIZE: -.. _class_Light3D_constant_PARAM_SHADOW_BLUR: +.. _class_Light3D_constant_PARAM_SHADOW_OPACITY: -.. _class_Light3D_constant_PARAM_SHADOW_VOLUMETRIC_FOG_FADE: +.. _class_Light3D_constant_PARAM_SHADOW_BLUR: .. _class_Light3D_constant_PARAM_TRANSMITTANCE_BIAS: @@ -137,41 +141,43 @@ enum **Param**: - **PARAM_INDIRECT_ENERGY** = **1** --- Constant for accessing :ref:`light_indirect_energy`. -- **PARAM_SPECULAR** = **2** --- Constant for accessing :ref:`light_specular`. +- **PARAM_VOLUMETRIC_FOG_ENERGY** = **2** --- Constant for accessing :ref:`light_volumetric_fog_energy`. -- **PARAM_RANGE** = **3** --- Constant for accessing :ref:`OmniLight3D.omni_range` or :ref:`SpotLight3D.spot_range`. +- **PARAM_SPECULAR** = **3** --- Constant for accessing :ref:`light_specular`. -- **PARAM_SIZE** = **4** --- Constant for accessing :ref:`light_size`. +- **PARAM_RANGE** = **4** --- Constant for accessing :ref:`OmniLight3D.omni_range` or :ref:`SpotLight3D.spot_range`. -- **PARAM_ATTENUATION** = **5** --- Constant for accessing :ref:`OmniLight3D.omni_attenuation` or :ref:`SpotLight3D.spot_attenuation`. +- **PARAM_SIZE** = **5** --- Constant for accessing :ref:`light_size`. -- **PARAM_SPOT_ANGLE** = **6** --- Constant for accessing :ref:`SpotLight3D.spot_angle`. +- **PARAM_ATTENUATION** = **6** --- Constant for accessing :ref:`OmniLight3D.omni_attenuation` or :ref:`SpotLight3D.spot_attenuation`. -- **PARAM_SPOT_ATTENUATION** = **7** --- Constant for accessing :ref:`SpotLight3D.spot_angle_attenuation`. +- **PARAM_SPOT_ANGLE** = **7** --- Constant for accessing :ref:`SpotLight3D.spot_angle`. -- **PARAM_SHADOW_MAX_DISTANCE** = **8** --- Constant for accessing :ref:`DirectionalLight3D.directional_shadow_max_distance`. +- **PARAM_SPOT_ATTENUATION** = **8** --- Constant for accessing :ref:`SpotLight3D.spot_angle_attenuation`. -- **PARAM_SHADOW_SPLIT_1_OFFSET** = **9** --- Constant for accessing :ref:`DirectionalLight3D.directional_shadow_split_1`. +- **PARAM_SHADOW_MAX_DISTANCE** = **9** --- Constant for accessing :ref:`DirectionalLight3D.directional_shadow_max_distance`. -- **PARAM_SHADOW_SPLIT_2_OFFSET** = **10** --- Constant for accessing :ref:`DirectionalLight3D.directional_shadow_split_2`. +- **PARAM_SHADOW_SPLIT_1_OFFSET** = **10** --- Constant for accessing :ref:`DirectionalLight3D.directional_shadow_split_1`. -- **PARAM_SHADOW_SPLIT_3_OFFSET** = **11** --- Constant for accessing :ref:`DirectionalLight3D.directional_shadow_split_3`. +- **PARAM_SHADOW_SPLIT_2_OFFSET** = **11** --- Constant for accessing :ref:`DirectionalLight3D.directional_shadow_split_2`. -- **PARAM_SHADOW_FADE_START** = **12** --- Constant for accessing :ref:`DirectionalLight3D.directional_shadow_fade_start`. +- **PARAM_SHADOW_SPLIT_3_OFFSET** = **12** --- Constant for accessing :ref:`DirectionalLight3D.directional_shadow_split_3`. -- **PARAM_SHADOW_NORMAL_BIAS** = **13** --- Constant for accessing :ref:`shadow_normal_bias`. +- **PARAM_SHADOW_FADE_START** = **13** --- Constant for accessing :ref:`DirectionalLight3D.directional_shadow_fade_start`. -- **PARAM_SHADOW_BIAS** = **14** --- Constant for accessing :ref:`shadow_bias`. +- **PARAM_SHADOW_NORMAL_BIAS** = **14** --- Constant for accessing :ref:`shadow_normal_bias`. -- **PARAM_SHADOW_PANCAKE_SIZE** = **15** --- Constant for accessing :ref:`DirectionalLight3D.directional_shadow_pancake_size`. +- **PARAM_SHADOW_BIAS** = **15** --- Constant for accessing :ref:`shadow_bias`. -- **PARAM_SHADOW_BLUR** = **16** --- Constant for accessing :ref:`shadow_blur`. +- **PARAM_SHADOW_PANCAKE_SIZE** = **16** --- Constant for accessing :ref:`DirectionalLight3D.directional_shadow_pancake_size`. -- **PARAM_SHADOW_VOLUMETRIC_FOG_FADE** = **17** +- **PARAM_SHADOW_OPACITY** = **17** --- Constant for accessing :ref:`shadow_opacity`. -- **PARAM_TRANSMITTANCE_BIAS** = **18** --- Constant for accessing :ref:`shadow_transmittance_bias`. +- **PARAM_SHADOW_BLUR** = **18** --- Constant for accessing :ref:`shadow_blur`. -- **PARAM_MAX** = **19** --- Represents the size of the :ref:`Param` enum. +- **PARAM_TRANSMITTANCE_BIAS** = **19** --- Constant for accessing :ref:`shadow_transmittance_bias`. + +- **PARAM_MAX** = **20** --- Represents the size of the :ref:`Param` enum. ---- @@ -244,7 +250,7 @@ If ``true``, the light will smoothly fade away when far from the active :ref:`Ca | *Getter* | get_distance_fade_length() | +-----------+---------------------------------+ -Distance over which the light fades. The light's energy is progressively reduced over this distance and is completely invisible at the end. +Distance over which the light and its shadow fades. The light's energy and shadow's opacity is progressively reduced over this distance and is completely invisible at the end. \ **Note:** Only effective for :ref:`OmniLight3D` and :ref:`SpotLight3D`. @@ -266,8 +272,6 @@ The distance from the camera at which the light's shadow cuts off (in 3D units). \ **Note:** Only effective for :ref:`OmniLight3D` and :ref:`SpotLight3D`, and only when :ref:`shadow_enabled` is ``true``. -\ **Note:** Due to a rendering engine limitation, shadows will be disabled instantly instead of fading smoothly according to :ref:`distance_fade_length`. This may result in visible pop-in depending on the scene topography. - ---- .. _class_Light3D_property_editor_only: @@ -450,6 +454,24 @@ The intensity of the specular blob in objects affected by the light. At ``0``, t ---- +.. _class_Light3D_property_light_volumetric_fog_energy: + +- :ref:`float` **light_volumetric_fog_energy** + ++-----------+------------------+ +| *Default* | ``1.0`` | ++-----------+------------------+ +| *Setter* | set_param(value) | ++-----------+------------------+ +| *Getter* | get_param() | ++-----------+------------------+ + +Secondary multiplier multiplied with :ref:`light_energy` then used with the :ref:`Environment`'s volumetric fog (if enabled). If set to ``0.0``, computing volumetric fog will be skipped for this light, which can improve performance for large amounts of lights when volumetric fog is enabled. + +\ **Note:** To prevent short-lived dynamic light effects from poorly interacting with volumetric fog, lights used in those effects should have :ref:`light_volumetric_fog_energy` set to ``0.0`` unless :ref:`Environment.volumetric_fog_temporal_reprojection_enabled` is disabled (or unless the reprojection amount is significantly lowered). + +---- + .. _class_Light3D_property_shadow_bias: - :ref:`float` **shadow_bias** @@ -498,20 +520,6 @@ If ``true``, the light will cast real-time shadows. This has a significant perfo ---- -.. _class_Light3D_property_shadow_fog_fade: - -- :ref:`float` **shadow_fog_fade** - -+-----------+------------------+ -| *Default* | ``0.1`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ - ----- - .. _class_Light3D_property_shadow_normal_bias: - :ref:`float` **shadow_normal_bias** @@ -528,6 +536,22 @@ Offsets the lookup into the shadow map by the object's normal. This can be used ---- +.. _class_Light3D_property_shadow_opacity: + +- :ref:`float` **shadow_opacity** + ++-----------+------------------+ +| *Default* | ``1.0`` | ++-----------+------------------+ +| *Setter* | set_param(value) | ++-----------+------------------+ +| *Getter* | get_param() | ++-----------+------------------+ + +The opacity to use when rendering the light's shadow map. Values lower than ``1.0`` make the light appear through shadows. This can be used to fake global illumination at a low performance cost. + +---- + .. _class_Light3D_property_shadow_reverse_cull_face: - :ref:`bool` **shadow_reverse_cull_face** diff --git a/classes/class_line2d.rst b/classes/class_line2d.rst index 1f65aeeb8..8ad0c4031 100644 --- a/classes/class_line2d.rst +++ b/classes/class_line2d.rst @@ -60,19 +60,19 @@ Properties Methods ------- -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_point` **(** :ref:`Vector2` position, :ref:`int` at_position=-1 **)** | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_points` **(** **)** | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_point_count` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_point_position` **(** :ref:`int` i **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_point` **(** :ref:`int` i **)** | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_point_position` **(** :ref:`int` i, :ref:`Vector2` position **)** | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_point` **(** :ref:`Vector2` position, :ref:`int` index=-1 **)** | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_points` **(** **)** | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_point_count` **(** **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_point_position` **(** :ref:`int` index **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_point` **(** :ref:`int` index **)** | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_point_position` **(** :ref:`int` index, :ref:`Vector2` position **)** | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ Enumerations ------------ @@ -341,11 +341,11 @@ Method Descriptions .. _class_Line2D_method_add_point: -- void **add_point** **(** :ref:`Vector2` position, :ref:`int` at_position=-1 **)** +- void **add_point** **(** :ref:`Vector2` position, :ref:`int` index=-1 **)** -Adds a point at the ``position``. Appends the point at the end of the line. +Adds a point with the specified ``position`` relative to the line's own position. Appends the new point at the end of the point list. -If ``at_position`` is given, the point is inserted before the point number ``at_position``, moving that point (and every point after) after the inserted point. If ``at_position`` is not given, or is an illegal value (``at_position < 0`` or ``at_position >= [method get_point_count]``), the point will be appended at the end of the point list. +If ``index`` is given, the new point is inserted before the existing point identified by index ``index``. Every existing point starting from ``index`` is shifted further down the list of points. The index must be greater than or equal to ``0`` and must not exceed the number of existing points in the line. See :ref:`get_point_count`. ---- @@ -361,31 +361,31 @@ Removes all points from the line. - :ref:`int` **get_point_count** **(** **)** |const| -Returns the Line2D's amount of points. +Returns the number of points in the line. ---- .. _class_Line2D_method_get_point_position: -- :ref:`Vector2` **get_point_position** **(** :ref:`int` i **)** |const| +- :ref:`Vector2` **get_point_position** **(** :ref:`int` index **)** |const| -Returns point ``i``'s position. +Returns the position of the point at index ``index``. ---- .. _class_Line2D_method_remove_point: -- void **remove_point** **(** :ref:`int` i **)** +- void **remove_point** **(** :ref:`int` index **)** -Removes the point at index ``i`` from the line. +Removes the point at index ``index`` from the line. ---- .. _class_Line2D_method_set_point_position: -- void **set_point_position** **(** :ref:`int` i, :ref:`Vector2` position **)** +- void **set_point_position** **(** :ref:`int` index, :ref:`Vector2` position **)** -Overwrites the position in point ``i`` with the supplied ``position``. +Overwrites the position of the point at index ``index`` with the supplied ``position``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_lineedit.rst b/classes/class_lineedit.rst index 32b174af6..4b167d70a 100644 --- a/classes/class_lineedit.rst +++ b/classes/class_lineedit.rst @@ -109,7 +109,7 @@ Properties +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`secret` | ``false`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`secret_character` | ``"*"`` | +| :ref:`String` | :ref:`secret_character` | ``"•"`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`selecting_enabled` | ``true`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ @@ -125,6 +125,8 @@ Properties +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`virtual_keyboard_enabled` | ``true`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ +| :ref:`VirtualKeyboardType` | :ref:`virtual_keyboard_type` | ``0`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ Methods ------- @@ -140,7 +142,7 @@ Methods +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PopupMenu` | :ref:`get_menu` **(** **)** |const| | +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_scroll_offset` **(** **)** |const| | +| :ref:`float` | :ref:`get_scroll_offset` **(** **)** |const| | +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_selection_from_column` **(** **)** |const| | +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ @@ -350,6 +352,46 @@ Non-printable escape characters are automatically stripped from the OS clipboard - **MENU_MAX** = **28** --- Represents the size of the :ref:`MenuItems` enum. +---- + +.. _enum_LineEdit_VirtualKeyboardType: + +.. _class_LineEdit_constant_KEYBOARD_TYPE_DEFAULT: + +.. _class_LineEdit_constant_KEYBOARD_TYPE_MULTILINE: + +.. _class_LineEdit_constant_KEYBOARD_TYPE_NUMBER: + +.. _class_LineEdit_constant_KEYBOARD_TYPE_NUMBER_DECIMAL: + +.. _class_LineEdit_constant_KEYBOARD_TYPE_PHONE: + +.. _class_LineEdit_constant_KEYBOARD_TYPE_EMAIL_ADDRESS: + +.. _class_LineEdit_constant_KEYBOARD_TYPE_PASSWORD: + +.. _class_LineEdit_constant_KEYBOARD_TYPE_URL: + +enum **VirtualKeyboardType**: + +- **KEYBOARD_TYPE_DEFAULT** = **0** --- Default text virtual keyboard. + +- **KEYBOARD_TYPE_MULTILINE** = **1** --- Multiline virtual keyboard. + +- **KEYBOARD_TYPE_NUMBER** = **2** --- Virtual number keypad, useful for PIN entry. + +- **KEYBOARD_TYPE_NUMBER_DECIMAL** = **3** --- Virtual number keypad, useful for entering fractional numbers. + +- **KEYBOARD_TYPE_PHONE** = **4** --- Virtual phone number keypad. + +- **KEYBOARD_TYPE_EMAIL_ADDRESS** = **5** --- Virtual keyboard with additional keys to assist with typing email addresses. + +- **KEYBOARD_TYPE_PASSWORD** = **6** --- Virtual keyboard for entering a password. On most platforms, this should disable autocomplete and autocapitalization. + +\ **Note:** This is not supported on Web. Instead, this behaves identically to :ref:`KEYBOARD_TYPE_DEFAULT`. + +- **KEYBOARD_TYPE_URL** = **7** --- Virtual keyboard with additional keys to assist with typing URLs. + Property Descriptions --------------------- @@ -591,7 +633,7 @@ Language code used for line-breaking and text shaping algorithms, if left empty | *Getter* | get_max_length() | +-----------+-----------------------+ -Maximum amount of characters that can be entered inside the ``LineEdit``. If ``0``, there is no limit. +Maximum number of characters that can be entered inside the ``LineEdit``. If ``0``, there is no limit. When a limit is defined, characters that would exceed :ref:`max_length` are truncated. This happens both for existing :ref:`text` contents when setting the max length, or for new text inserted in the ``LineEdit``, including pasting. If any input text is truncated, the :ref:`text_change_rejected` signal is emitted with the truncated substring as parameter. @@ -693,14 +735,14 @@ If ``true``, every character is replaced with the secret character (see :ref:`se - :ref:`String` **secret_character** +-----------+-----------------------------+ -| *Default* | ``"*"`` | +| *Default* | ``"•"`` | +-----------+-----------------------------+ | *Setter* | set_secret_character(value) | +-----------+-----------------------------+ | *Getter* | get_secret_character() | +-----------+-----------------------------+ -The character to use to mask secret input (defaults to "\*"). Only a single character can be used as the secret character. +The character to use to mask secret input (defaults to "•"). Only a single character can be used as the secret character. ---- @@ -816,6 +858,22 @@ Base text writing direction. If ``true``, the native virtual keyboard is shown when focused on platforms that support it. +---- + +.. _class_LineEdit_property_virtual_keyboard_type: + +- :ref:`VirtualKeyboardType` **virtual_keyboard_type** + ++-----------+----------------------------------+ +| *Default* | ``0`` | ++-----------+----------------------------------+ +| *Setter* | set_virtual_keyboard_type(value) | ++-----------+----------------------------------+ +| *Getter* | get_virtual_keyboard_type() | ++-----------+----------------------------------+ + +Specifies the type of virtual keyboard to show. + Method Descriptions ------------------- @@ -863,7 +921,7 @@ Returns the :ref:`PopupMenu` of this ``LineEdit``. By default, .. _class_LineEdit_method_get_scroll_offset: -- :ref:`int` **get_scroll_offset** **(** **)** |const| +- :ref:`float` **get_scroll_offset** **(** **)** |const| Returns the scroll offset due to :ref:`caret_column`, as a number of characters. @@ -1081,7 +1139,7 @@ The caret's width in pixels. Greater values can be used to improve accessibility | *Default* | ``4`` | +-----------+-------+ -Minimum horizontal space for the text (not counting the clear button and content margins). This value is measured in count of 'M' characters (i.e. this amount of 'M' characters can be displayed without scrolling). +Minimum horizontal space for the text (not counting the clear button and content margins). This value is measured in count of 'M' characters (i.e. this number of 'M' characters can be displayed without scrolling). ---- diff --git a/classes/class_position2d.rst b/classes/class_marker2d.rst similarity index 86% rename from classes/class_position2d.rst rename to classes/class_marker2d.rst index 9243be6ae..4894abece 100644 --- a/classes/class_position2d.rst +++ b/classes/class_marker2d.rst @@ -3,12 +3,12 @@ .. 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/Position2D.xml. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/Marker2D.xml. -.. _class_Position2D: +.. _class_Marker2D: -Position2D -========== +Marker2D +======== **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` @@ -22,14 +22,14 @@ Generic 2D position hint for editing. It's just like a plain :ref:`Node2D` | :ref:`gizmo_extents` | ``10.0`` | -+---------------------------+---------------------------------------------------------------+----------+ ++---------------------------+-------------------------------------------------------------+----------+ +| :ref:`float` | :ref:`gizmo_extents` | ``10.0`` | ++---------------------------+-------------------------------------------------------------+----------+ Property Descriptions --------------------- -.. _class_Position2D_property_gizmo_extents: +.. _class_Marker2D_property_gizmo_extents: - :ref:`float` **gizmo_extents** diff --git a/classes/class_position3d.rst b/classes/class_marker3d.rst similarity index 94% rename from classes/class_position3d.rst rename to classes/class_marker3d.rst index f70d0a4de..28dc771e6 100644 --- a/classes/class_position3d.rst +++ b/classes/class_marker3d.rst @@ -3,12 +3,12 @@ .. 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/Position3D.xml. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/Marker3D.xml. -.. _class_Position3D: +.. _class_Marker3D: -Position3D -========== +Marker3D +======== **Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` diff --git a/classes/class_material.rst b/classes/class_material.rst index 802d22b27..5dcafb204 100644 --- a/classes/class_material.rst +++ b/classes/class_material.rst @@ -12,7 +12,7 @@ Material **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`BaseMaterial3D`, :ref:`CanvasItemMaterial`, :ref:`FogMaterial`, :ref:`PanoramaSkyMaterial`, :ref:`ParticlesMaterial`, :ref:`PhysicalSkyMaterial`, :ref:`PlaceholderMaterial`, :ref:`ProceduralSkyMaterial`, :ref:`ShaderMaterial` +**Inherited By:** :ref:`BaseMaterial3D`, :ref:`CanvasItemMaterial`, :ref:`FogMaterial`, :ref:`PanoramaSkyMaterial`, :ref:`ParticleProcessMaterial`, :ref:`PhysicalSkyMaterial`, :ref:`PlaceholderMaterial`, :ref:`ProceduralSkyMaterial`, :ref:`ShaderMaterial` Abstract base :ref:`Resource` for coloring and shading geometry. diff --git a/classes/class_menubar.rst b/classes/class_menubar.rst new file mode 100644 index 000000000..868e94621 --- /dev/null +++ b/classes/class_menubar.rst @@ -0,0 +1,485 @@ +: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/MenuBar.xml. + +.. _class_MenuBar: + +MenuBar +======= + +**Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` + +A horizontal menu bar, which displays :ref:`PopupMenu`\ s or system global menu. + +Description +----------- + +New items can be created by adding :ref:`PopupMenu` nodes to his node. + +Properties +---------- + ++--------------------------------------------------+----------------------------------------------------------------------+-----------+ +| :ref:`bool` | :ref:`flat` | ``false`` | ++--------------------------------------------------+----------------------------------------------------------------------+-----------+ +| :ref:`String` | :ref:`language` | ``""`` | ++--------------------------------------------------+----------------------------------------------------------------------+-----------+ +| :ref:`bool` | :ref:`prefer_global_menu` | ``true`` | ++--------------------------------------------------+----------------------------------------------------------------------+-----------+ +| :ref:`Node` | :ref:`shortcut_context` | | ++--------------------------------------------------+----------------------------------------------------------------------+-----------+ +| :ref:`int` | :ref:`start_index` | ``-1`` | ++--------------------------------------------------+----------------------------------------------------------------------+-----------+ +| :ref:`bool` | :ref:`switch_on_hover` | ``true`` | ++--------------------------------------------------+----------------------------------------------------------------------+-----------+ +| :ref:`TextDirection` | :ref:`text_direction` | ``0`` | ++--------------------------------------------------+----------------------------------------------------------------------+-----------+ + +Methods +------- + ++-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_menu_count` **(** **)** |const| | ++-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PopupMenu` | :ref:`get_menu_popup` **(** :ref:`int` menu **)** |const| | ++-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_menu_title` **(** :ref:`int` menu **)** |const| | ++-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_menu_tooltip` **(** :ref:`int` menu **)** |const| | ++-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_menu_disabled` **(** :ref:`int` menu **)** |const| | ++-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_menu_hidden` **(** :ref:`int` menu **)** |const| | ++-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_native_menu` **(** **)** |const| | ++-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_disable_shortcuts` **(** :ref:`bool` disabled **)** | ++-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_menu_disabled` **(** :ref:`int` menu, :ref:`bool` disabled **)** | ++-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_menu_hidden` **(** :ref:`int` menu, :ref:`bool` hidden **)** | ++-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_menu_title` **(** :ref:`int` menu, :ref:`String` title **)** | ++-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_menu_tooltip` **(** :ref:`int` menu, :ref:`String` tooltip **)** | ++-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + +Theme Properties +---------------- + ++---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ +| :ref:`Color` | :ref:`font_color` | ``Color(0.875, 0.875, 0.875, 1)`` | ++---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ +| :ref:`Color` | :ref:`font_disabled_color` | ``Color(0.875, 0.875, 0.875, 0.5)`` | ++---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ +| :ref:`Color` | :ref:`font_focus_color` | ``Color(0.95, 0.95, 0.95, 1)`` | ++---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ +| :ref:`Color` | :ref:`font_hover_color` | ``Color(0.95, 0.95, 0.95, 1)`` | ++---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ +| :ref:`Color` | :ref:`font_hover_pressed_color` | ``Color(1, 1, 1, 1)`` | ++---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ +| :ref:`Color` | :ref:`font_outline_color` | ``Color(1, 1, 1, 1)`` | ++---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ +| :ref:`Color` | :ref:`font_pressed_color` | ``Color(1, 1, 1, 1)`` | ++---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ +| :ref:`int` | :ref:`h_separation` | ``4`` | ++---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ +| :ref:`int` | :ref:`outline_size` | ``0`` | ++---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ +| :ref:`Font` | :ref:`font` | | ++---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ +| :ref:`int` | :ref:`font_size` | | ++---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ +| :ref:`StyleBox` | :ref:`disabled` | | ++---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ +| :ref:`StyleBox` | :ref:`focus` | | ++---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ +| :ref:`StyleBox` | :ref:`hover` | | ++---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ +| :ref:`StyleBox` | :ref:`normal` | | ++---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ +| :ref:`StyleBox` | :ref:`pressed` | | ++---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ + +Property Descriptions +--------------------- + +.. _class_MenuBar_property_flat: + +- :ref:`bool` **flat** + ++-----------+-----------------+ +| *Default* | ``false`` | ++-----------+-----------------+ +| *Setter* | set_flat(value) | ++-----------+-----------------+ +| *Getter* | is_flat() | ++-----------+-----------------+ + +Flat ``MenuBar`` don't display item decoration. + +---- + +.. _class_MenuBar_property_language: + +- :ref:`String` **language** + ++-----------+---------------------+ +| *Default* | ``""`` | ++-----------+---------------------+ +| *Setter* | set_language(value) | ++-----------+---------------------+ +| *Getter* | get_language() | ++-----------+---------------------+ + +Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead. + +---- + +.. _class_MenuBar_property_prefer_global_menu: + +- :ref:`bool` **prefer_global_menu** + ++-----------+-------------------------------+ +| *Default* | ``true`` | ++-----------+-------------------------------+ +| *Setter* | set_prefer_global_menu(value) | ++-----------+-------------------------------+ +| *Getter* | is_prefer_global_menu() | ++-----------+-------------------------------+ + +If ``true``, ``MenuBar`` will use system global menu when supported. + +---- + +.. _class_MenuBar_property_shortcut_context: + +- :ref:`Node` **shortcut_context** + ++----------+-----------------------------+ +| *Setter* | set_shortcut_context(value) | ++----------+-----------------------------+ +| *Getter* | get_shortcut_context() | ++----------+-----------------------------+ + +The :ref:`Node` which must be a parent of the focused GUI :ref:`Control` for the shortcut to be activated. If ``null``, the shortcut can be activated when any control is focused (a global shortcut). This allows shortcuts to be accepted only when the user has a certain area of the GUI focused. + +---- + +.. _class_MenuBar_property_start_index: + +- :ref:`int` **start_index** + ++-----------+------------------------+ +| *Default* | ``-1`` | ++-----------+------------------------+ +| *Setter* | set_start_index(value) | ++-----------+------------------------+ +| *Getter* | get_start_index() | ++-----------+------------------------+ + +Position in the global menu to insert first ``MenuBar`` item at. + +---- + +.. _class_MenuBar_property_switch_on_hover: + +- :ref:`bool` **switch_on_hover** + ++-----------+----------------------------+ +| *Default* | ``true`` | ++-----------+----------------------------+ +| *Setter* | set_switch_on_hover(value) | ++-----------+----------------------------+ +| *Getter* | is_switch_on_hover() | ++-----------+----------------------------+ + +If ``true``, when the cursor hovers above menu item, it will close the current :ref:`PopupMenu` and open the other one. + +---- + +.. _class_MenuBar_property_text_direction: + +- :ref:`TextDirection` **text_direction** + ++-----------+---------------------------+ +| *Default* | ``0`` | ++-----------+---------------------------+ +| *Setter* | set_text_direction(value) | ++-----------+---------------------------+ +| *Getter* | get_text_direction() | ++-----------+---------------------------+ + +Base text writing direction. + +Method Descriptions +------------------- + +.. _class_MenuBar_method_get_menu_count: + +- :ref:`int` **get_menu_count** **(** **)** |const| + +Returns number of menu items. + +---- + +.. _class_MenuBar_method_get_menu_popup: + +- :ref:`PopupMenu` **get_menu_popup** **(** :ref:`int` menu **)** |const| + +Returns :ref:`PopupMenu` associated with menu item. + +---- + +.. _class_MenuBar_method_get_menu_title: + +- :ref:`String` **get_menu_title** **(** :ref:`int` menu **)** |const| + +Returns menu item title. + +---- + +.. _class_MenuBar_method_get_menu_tooltip: + +- :ref:`String` **get_menu_tooltip** **(** :ref:`int` menu **)** |const| + +Returns menu item tooltip. + +---- + +.. _class_MenuBar_method_is_menu_disabled: + +- :ref:`bool` **is_menu_disabled** **(** :ref:`int` menu **)** |const| + +Returns ``true``, if menu item is disabled. + +---- + +.. _class_MenuBar_method_is_menu_hidden: + +- :ref:`bool` **is_menu_hidden** **(** :ref:`int` menu **)** |const| + +Returns ``true``, if menu item is hidden. + +---- + +.. _class_MenuBar_method_is_native_menu: + +- :ref:`bool` **is_native_menu** **(** **)** |const| + +Returns ``true``, if system global menu is supported and used by this ``MenuBar``. + +---- + +.. _class_MenuBar_method_set_disable_shortcuts: + +- void **set_disable_shortcuts** **(** :ref:`bool` disabled **)** + +If ``true``, shortcuts are disabled and cannot be used to trigger the button. + +---- + +.. _class_MenuBar_method_set_menu_disabled: + +- void **set_menu_disabled** **(** :ref:`int` menu, :ref:`bool` disabled **)** + +If ``true``, menu item is disabled. + +---- + +.. _class_MenuBar_method_set_menu_hidden: + +- void **set_menu_hidden** **(** :ref:`int` menu, :ref:`bool` hidden **)** + +If ``true``, menu item is hidden. + +---- + +.. _class_MenuBar_method_set_menu_title: + +- void **set_menu_title** **(** :ref:`int` menu, :ref:`String` title **)** + +Sets menu item title. + +---- + +.. _class_MenuBar_method_set_menu_tooltip: + +- void **set_menu_tooltip** **(** :ref:`int` menu, :ref:`String` tooltip **)** + +Sets menu item tooltip. + +Theme Property Descriptions +--------------------------- + +.. _class_MenuBar_theme_color_font_color: + +- :ref:`Color` **font_color** + ++-----------+-----------------------------------+ +| *Default* | ``Color(0.875, 0.875, 0.875, 1)`` | ++-----------+-----------------------------------+ + +Default text :ref:`Color` of the menu item. + +---- + +.. _class_MenuBar_theme_color_font_disabled_color: + +- :ref:`Color` **font_disabled_color** + ++-----------+-------------------------------------+ +| *Default* | ``Color(0.875, 0.875, 0.875, 0.5)`` | ++-----------+-------------------------------------+ + +Text :ref:`Color` used when the menu item is disabled. + +---- + +.. _class_MenuBar_theme_color_font_focus_color: + +- :ref:`Color` **font_focus_color** + ++-----------+--------------------------------+ +| *Default* | ``Color(0.95, 0.95, 0.95, 1)`` | ++-----------+--------------------------------+ + +Text :ref:`Color` used when the menu item is focused. Only replaces the normal text color of the menu item. Disabled, hovered, and pressed states take precedence over this color. + +---- + +.. _class_MenuBar_theme_color_font_hover_color: + +- :ref:`Color` **font_hover_color** + ++-----------+--------------------------------+ +| *Default* | ``Color(0.95, 0.95, 0.95, 1)`` | ++-----------+--------------------------------+ + +Text :ref:`Color` used when the menu item is being hovered. + +---- + +.. _class_MenuBar_theme_color_font_hover_pressed_color: + +- :ref:`Color` **font_hover_pressed_color** + ++-----------+-----------------------+ +| *Default* | ``Color(1, 1, 1, 1)`` | ++-----------+-----------------------+ + +Text :ref:`Color` used when the menu item is being hovered and pressed. + +---- + +.. _class_MenuBar_theme_color_font_outline_color: + +- :ref:`Color` **font_outline_color** + ++-----------+-----------------------+ +| *Default* | ``Color(1, 1, 1, 1)`` | ++-----------+-----------------------+ + +The tint of text outline of the menu item. + +---- + +.. _class_MenuBar_theme_color_font_pressed_color: + +- :ref:`Color` **font_pressed_color** + ++-----------+-----------------------+ +| *Default* | ``Color(1, 1, 1, 1)`` | ++-----------+-----------------------+ + +Text :ref:`Color` used when the menu item is being pressed. + +---- + +.. _class_MenuBar_theme_constant_h_separation: + +- :ref:`int` **h_separation** + ++-----------+-------+ +| *Default* | ``4`` | ++-----------+-------+ + +The horizontal space between menu items. + +---- + +.. _class_MenuBar_theme_constant_outline_size: + +- :ref:`int` **outline_size** + ++-----------+-------+ +| *Default* | ``0`` | ++-----------+-------+ + +The size of the text outline. + +---- + +.. _class_MenuBar_theme_font_font: + +- :ref:`Font` **font** + +:ref:`Font` of the menu item's text. + +---- + +.. _class_MenuBar_theme_font_size_font_size: + +- :ref:`int` **font_size** + +Font size of the menu item's text. + +---- + +.. _class_MenuBar_theme_style_disabled: + +- :ref:`StyleBox` **disabled** + +:ref:`StyleBox` used when the menu item is disabled. + +---- + +.. _class_MenuBar_theme_style_focus: + +- :ref:`StyleBox` **focus** + +:ref:`StyleBox` used when the menu item is focused. The ``focus`` :ref:`StyleBox` is displayed *over* the base :ref:`StyleBox`, so a partially transparent :ref:`StyleBox` should be used to ensure the base :ref:`StyleBox` remains visible. A :ref:`StyleBox` that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a :ref:`StyleBoxEmpty` resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons. + +---- + +.. _class_MenuBar_theme_style_hover: + +- :ref:`StyleBox` **hover** + +:ref:`StyleBox` used when the menu item is being hovered. + +---- + +.. _class_MenuBar_theme_style_normal: + +- :ref:`StyleBox` **normal** + +Default :ref:`StyleBox` for the menu item. + +---- + +.. _class_MenuBar_theme_style_pressed: + +- :ref:`StyleBox` **pressed** + +:ref:`StyleBox` used when the menu item is being pressed. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_menubutton.rst b/classes/class_menubutton.rst index aa2fd8723..cd25f65f0 100644 --- a/classes/class_menubutton.rst +++ b/classes/class_menubutton.rst @@ -228,7 +228,7 @@ Text :ref:`Color` used when the ``MenuButton`` is being pressed. | *Default* | ``3`` | +-----------+-------+ -The horizontal space between ``MenuButton``'s icon and text. +The horizontal space between ``MenuButton``'s icon and text. Negative values will be treated as ``0`` when used. ---- diff --git a/classes/class_mesh.rst b/classes/class_mesh.rst index 0808b62ce..8b3e9a14f 100644 --- a/classes/class_mesh.rst +++ b/classes/class_mesh.rst @@ -59,7 +59,7 @@ Methods +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`_surface_get_arrays` **(** :ref:`int` index **)** |virtual| |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`_surface_get_blend_shape_arrays` **(** :ref:`int` index **)** |virtual| |const| | +| :ref:`Array[]` | :ref:`_surface_get_blend_shape_arrays` **(** :ref:`int` index **)** |virtual| |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`_surface_get_format` **(** :ref:`int` index **)** |virtual| |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -87,7 +87,7 @@ Methods +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`surface_get_arrays` **(** :ref:`int` surf_idx **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`surface_get_blend_shape_arrays` **(** :ref:`int` surf_idx **)** |const| | +| :ref:`Array[]` | :ref:`surface_get_blend_shape_arrays` **(** :ref:`int` surf_idx **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Material` | :ref:`surface_get_material` **(** :ref:`int` surf_idx **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -415,7 +415,7 @@ Method Descriptions .. _class_Mesh_method__surface_get_blend_shape_arrays: -- :ref:`Array` **_surface_get_blend_shape_arrays** **(** :ref:`int` index **)** |virtual| |const| +- :ref:`Array[]` **_surface_get_blend_shape_arrays** **(** :ref:`int` index **)** |virtual| |const| ---- @@ -457,7 +457,7 @@ Calculate a :ref:`ConvexPolygonShape3D` from the mes If ``clean`` is ``true`` (default), duplicate and interior vertices are removed automatically. You can set it to ``false`` to make the process faster if not needed. -If ``simplify`` is ``true``, the geometry can be further simplified to reduce the amount of vertices. Disabled by default. +If ``simplify`` is ``true``, the geometry can be further simplified to reduce the number of vertices. Disabled by default. ---- @@ -509,7 +509,7 @@ Returns all the vertices that make up the faces of the mesh. Each three vertices - :ref:`int` **get_surface_count** **(** **)** |const| -Returns the amount of surfaces that the ``Mesh`` holds. +Returns the number of surfaces that the ``Mesh`` holds. ---- @@ -523,7 +523,7 @@ Returns the arrays for the vertices, normals, uvs, etc. that make up the request .. _class_Mesh_method_surface_get_blend_shape_arrays: -- :ref:`Array` **surface_get_blend_shape_arrays** **(** :ref:`int` surf_idx **)** |const| +- :ref:`Array[]` **surface_get_blend_shape_arrays** **(** :ref:`int` surf_idx **)** |const| Returns the blend shape arrays for the requested surface. diff --git a/classes/class_meshinstance3d.rst b/classes/class_meshinstance3d.rst index c2f54e267..54e12efb7 100644 --- a/classes/class_meshinstance3d.rst +++ b/classes/class_meshinstance3d.rst @@ -12,14 +12,14 @@ MeshInstance3D **Inherits:** :ref:`GeometryInstance3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`SoftDynamicBody3D` +**Inherited By:** :ref:`SoftBody3D` Node that instances meshes into a scenario. Description ----------- -MeshInstance3D is a node that takes a :ref:`Mesh` resource and adds it to the current scenario by creating an instance of it. This is the class most often used render 3D geometry and can be used to instance a single :ref:`Mesh` in many places. This allows reuse of geometry which can save on resources. When a :ref:`Mesh` has to be instantiated more than thousands of times at close proximity, consider using a :ref:`MultiMesh` in a :ref:`MultiMeshInstance3D` instead. +MeshInstance3D is a node that takes a :ref:`Mesh` resource and adds it to the current scenario by creating an instance of it. This is the class most often used render 3D geometry and can be used to instance a single :ref:`Mesh` in many places. This allows reusing geometry, which can save on resources. When a :ref:`Mesh` has to be instantiated more than thousands of times at close proximity, consider using a :ref:`MultiMesh` in a :ref:`MultiMeshInstance3D` instead. Tutorials --------- @@ -128,7 +128,7 @@ This helper creates a :ref:`StaticBody3D` child node with a If ``clean`` is ``true`` (default), duplicate and interior vertices are removed automatically. You can set it to ``false`` to make the process faster if not needed. -If ``simplify`` is ``true``, the geometry can be further simplified to reduce the amount of vertices. Disabled by default. +If ``simplify`` is ``true``, the geometry can be further simplified to reduce the number of vertices. Disabled by default. ---- diff --git a/classes/class_multimesh.rst b/classes/class_multimesh.rst index 8de050ffd..0cfad9c59 100644 --- a/classes/class_multimesh.rst +++ b/classes/class_multimesh.rst @@ -281,7 +281,7 @@ Returns the :ref:`Transform2D` of a specific instance. Sets the color of a specific instance by *multiplying* the mesh's existing vertex colors. -For the color to take effect, ensure that :ref:`use_colors` is ``true`` on the ``MultiMesh`` and :ref:`BaseMaterial3D.vertex_color_use_as_albedo` is ``true`` on the material. +For the color to take effect, ensure that :ref:`use_colors` is ``true`` on the ``MultiMesh`` and :ref:`BaseMaterial3D.vertex_color_use_as_albedo` is ``true`` on the material. If the color doesn't look as expected, make sure the material's albedo color is set to pure white (``Color(1, 1, 1)``). ---- diff --git a/classes/class_multimeshinstance3d.rst b/classes/class_multimeshinstance3d.rst index 25562570f..534e6b378 100644 --- a/classes/class_multimeshinstance3d.rst +++ b/classes/class_multimeshinstance3d.rst @@ -19,7 +19,7 @@ Description ``MultiMeshInstance3D`` is a specialized node to instance :ref:`GeometryInstance3D`\ s based on a :ref:`MultiMesh` resource. -This is useful to optimize the rendering of a high amount of instances of a given mesh (for example trees in a forest or grass strands). +This is useful to optimize the rendering of a high number of instances of a given mesh (for example trees in a forest or grass strands). Tutorials --------- diff --git a/classes/class_multiplayerapi.rst b/classes/class_multiplayerapi.rst index 77c01094a..fb0b3066b 100644 --- a/classes/class_multiplayerapi.rst +++ b/classes/class_multiplayerapi.rst @@ -12,54 +12,56 @@ MultiplayerAPI **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -High-level multiplayer API. +**Inherited By:** :ref:`MultiplayerAPIExtension`, :ref:`SceneMultiplayer` + +High-level multiplayer API interface. Description ----------- -This class implements the high-level multiplayer API. See also :ref:`MultiplayerPeer`. +Base class for high-level multiplayer API implementations. See also :ref:`MultiplayerPeer`. -By default, :ref:`SceneTree` has a reference to this class that is used to provide multiplayer capabilities (i.e. RPCs) across the whole scene. +By default, :ref:`SceneTree` has a reference to an implementation of this class and uses it to provide multiplayer capabilities (i.e. RPCs) across the whole scene. It is possible to override the MultiplayerAPI instance used by specific tree branches by calling the :ref:`SceneTree.set_multiplayer` method, effectively allowing to run both client and server in the same scene. -\ **Note:** The high-level multiplayer API protocol is an implementation detail and isn't meant to be used by non-Godot servers. It may change without notice. - -\ **Note:** When exporting to Android, make sure to enable the ``INTERNET`` permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android. +It is also possible to extend or replace the default implementation via scripting or native extensions. See :ref:`MultiplayerAPIExtension` for details about extensions, :ref:`SceneMultiplayer` for the details about the default implementation. Properties ---------- -+-----------------------------------------------+-------------------------------------------------------------------------------------+------------------+ -| :ref:`bool` | :ref:`allow_object_decoding` | ``false`` | -+-----------------------------------------------+-------------------------------------------------------------------------------------+------------------+ -| :ref:`MultiplayerPeer` | :ref:`multiplayer_peer` | | -+-----------------------------------------------+-------------------------------------------------------------------------------------+------------------+ -| :ref:`bool` | :ref:`refuse_new_connections` | ``false`` | -+-----------------------------------------------+-------------------------------------------------------------------------------------+------------------+ -| :ref:`NodePath` | :ref:`root_path` | ``NodePath("")`` | -+-----------------------------------------------+-------------------------------------------------------------------------------------+------------------+ ++-----------------------------------------------+-------------------------------------------------------------------------+ +| :ref:`MultiplayerPeer` | :ref:`multiplayer_peer` | ++-----------------------------------------------+-------------------------------------------------------------------------+ Methods ------- -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`get_peers` **(** **)** |const| | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_remote_sender_id` **(** **)** |const| | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_unique_id` **(** **)** |const| | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_multiplayer_peer` **(** **)** |const| | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_server` **(** **)** |const| | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`poll` **(** **)** | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`send_bytes` **(** :ref:`PackedByteArray` bytes, :ref:`int` id=0, :ref:`TransferMode` mode=2, :ref:`int` channel=0 **)** | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`MultiplayerAPI` | :ref:`create_default_interface` **(** **)** |static| | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringName` | :ref:`get_default_interface` **(** **)** |static| | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedInt32Array` | :ref:`get_peers` **(** **)** | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_remote_sender_id` **(** **)** | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_unique_id` **(** **)** | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_multiplayer_peer` **(** **)** | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_server` **(** **)** | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Error` | :ref:`object_configuration_add` **(** :ref:`Object` object, :ref:`Variant` configuration **)** | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Error` | :ref:`object_configuration_remove` **(** :ref:`Object` object, :ref:`Variant` configuration **)** | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Error` | :ref:`poll` **(** **)** | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Error` | :ref:`rpc` **(** :ref:`int` peer, :ref:`Object` object, :ref:`StringName` method, :ref:`Array` arguments=[] **)** | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_default_interface` **(** :ref:`StringName` interface_name **)** |static| | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- @@ -96,41 +98,34 @@ Emitted when this MultiplayerAPI's :ref:`multiplayer_peer` id, :ref:`PackedByteArray` packet **)** - -Emitted when this MultiplayerAPI's :ref:`multiplayer_peer` receives a ``packet`` with custom data (see :ref:`send_bytes`). ID is the peer ID of the peer that sent the packet. - ----- - .. _class_MultiplayerAPI_signal_server_disconnected: - **server_disconnected** **(** **)** Emitted when this MultiplayerAPI's :ref:`multiplayer_peer` disconnects from server. Only emitted on clients. +Enumerations +------------ + +.. _enum_MultiplayerAPI_RPCMode: + +.. _class_MultiplayerAPI_constant_RPC_MODE_DISABLED: + +.. _class_MultiplayerAPI_constant_RPC_MODE_ANY_PEER: + +.. _class_MultiplayerAPI_constant_RPC_MODE_AUTHORITY: + +enum **RPCMode**: + +- **RPC_MODE_DISABLED** = **0** --- Used with :ref:`Node.rpc_config` to disable a method or property for all RPC calls, making it unavailable. Default for all methods. + +- **RPC_MODE_ANY_PEER** = **1** --- Used with :ref:`Node.rpc_config` to set a method to be callable remotely by any peer. Analogous to the ``@rpc(any)`` annotation. Calls are accepted from all remote peers, no matter if they are node's authority or not. + +- **RPC_MODE_AUTHORITY** = **2** --- Used with :ref:`Node.rpc_config` to set a method to be callable remotely only by the current multiplayer authority (which is the server by default). Analogous to the ``@rpc(authority)`` annotation. See :ref:`Node.set_multiplayer_authority`. + Property Descriptions --------------------- -.. _class_MultiplayerAPI_property_allow_object_decoding: - -- :ref:`bool` **allow_object_decoding** - -+-----------+----------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------+ -| *Setter* | set_allow_object_decoding(value) | -+-----------+----------------------------------+ -| *Getter* | is_object_decoding_allowed() | -+-----------+----------------------------------+ - -If ``true``, the MultiplayerAPI will allow encoding and decoding of object during RPCs. - -\ **Warning:** Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution. - ----- - .. _class_MultiplayerAPI_property_multiplayer_peer: - :ref:`MultiplayerPeer` **multiplayer_peer** @@ -143,54 +138,28 @@ If ``true``, the MultiplayerAPI will allow encoding and decoding of object durin The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the MultiplayerAPI will become a network server (check with :ref:`is_server`) and will set root node's network mode to authority, or it will become a regular client peer. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to MultiplayerAPI's signals. ----- - -.. _class_MultiplayerAPI_property_refuse_new_connections: - -- :ref:`bool` **refuse_new_connections** - -+-----------+-----------------------------------+ -| *Default* | ``false`` | -+-----------+-----------------------------------+ -| *Setter* | set_refuse_new_connections(value) | -+-----------+-----------------------------------+ -| *Getter* | is_refusing_new_connections() | -+-----------+-----------------------------------+ - -If ``true``, the MultiplayerAPI's :ref:`multiplayer_peer` refuses new incoming connections. - ----- - -.. _class_MultiplayerAPI_property_root_path: - -- :ref:`NodePath` **root_path** - -+-----------+----------------------+ -| *Default* | ``NodePath("")`` | -+-----------+----------------------+ -| *Setter* | set_root_path(value) | -+-----------+----------------------+ -| *Getter* | get_root_path() | -+-----------+----------------------+ - -The root path to use for RPCs and replication. Instead of an absolute path, a relative path will be used to find the node upon which the RPC should be executed. - -This effectively allows to have different branches of the scene tree to be managed by different MultiplayerAPI, allowing for example to run both client and server in the same scene. - Method Descriptions ------------------- -.. _class_MultiplayerAPI_method_clear: +.. _class_MultiplayerAPI_method_create_default_interface: -- void **clear** **(** **)** +- :ref:`MultiplayerAPI` **create_default_interface** **(** **)** |static| -Clears the current MultiplayerAPI network state (you shouldn't call this unless you know what you are doing). +Returns a new instance of the default MultiplayerAPI. + +---- + +.. _class_MultiplayerAPI_method_get_default_interface: + +- :ref:`StringName` **get_default_interface** **(** **)** |static| + +Returns the default MultiplayerAPI implementation class name. This is usually ``"SceneMultiplayer"`` when :ref:`SceneMultiplayer` is available. See :ref:`set_default_interface`. ---- .. _class_MultiplayerAPI_method_get_peers: -- :ref:`PackedInt32Array` **get_peers** **(** **)** |const| +- :ref:`PackedInt32Array` **get_peers** **(** **)** Returns the peer IDs of all connected peers of this MultiplayerAPI's :ref:`multiplayer_peer`. @@ -198,7 +167,7 @@ Returns the peer IDs of all connected peers of this MultiplayerAPI's :ref:`multi .. _class_MultiplayerAPI_method_get_remote_sender_id: -- :ref:`int` **get_remote_sender_id** **(** **)** |const| +- :ref:`int` **get_remote_sender_id** **(** **)** Returns the sender's peer ID for the RPC currently being executed. @@ -208,7 +177,7 @@ Returns the sender's peer ID for the RPC currently being executed. .. _class_MultiplayerAPI_method_get_unique_id: -- :ref:`int` **get_unique_id** **(** **)** |const| +- :ref:`int` **get_unique_id** **(** **)** Returns the unique peer ID of this MultiplayerAPI's :ref:`multiplayer_peer`. @@ -216,7 +185,7 @@ Returns the unique peer ID of this MultiplayerAPI's :ref:`multiplayer_peer` **has_multiplayer_peer** **(** **)** |const| +- :ref:`bool` **has_multiplayer_peer** **(** **)** Returns ``true`` if there is a :ref:`multiplayer_peer` set. @@ -224,15 +193,35 @@ Returns ``true`` if there is a :ref:`multiplayer_peer` **is_server** **(** **)** |const| +- :ref:`bool` **is_server** **(** **)** Returns ``true`` if this MultiplayerAPI's :ref:`multiplayer_peer` is valid and in server mode (listening for connections). ---- +.. _class_MultiplayerAPI_method_object_configuration_add: + +- :ref:`Error` **object_configuration_add** **(** :ref:`Object` object, :ref:`Variant` configuration **)** + +Notifies the MultiplayerAPI of a new ``configuration`` for the given ``object``. This method is used internally by :ref:`SceneTree` to configure the root path for this MultiplayerAPI (passing ``null`` and a valid :ref:`NodePath` as ``configuration``). This method can be further used by MultiplayerAPI implementations to provide additional features, refer to specific implementation (e.g. :ref:`SceneMultiplayer`) for details on how they use it. + +\ **Note:** This method is mostly relevant when extending or overriding the MultiplayerAPI behavior via :ref:`MultiplayerAPIExtension`. + +---- + +.. _class_MultiplayerAPI_method_object_configuration_remove: + +- :ref:`Error` **object_configuration_remove** **(** :ref:`Object` object, :ref:`Variant` configuration **)** + +Notifies the MultiplayerAPI to remove a ``configuration`` for the given ``object``. This method is used internally by :ref:`SceneTree` to configure the root path for this MultiplayerAPI (passing ``null`` and an empty :ref:`NodePath` as ``configuration``). This method can be further used by MultiplayerAPI implementations to provide additional features, refer to specific implementation (e.g. :ref:`SceneMultiplayer`) for details on how they use it. + +\ **Note:** This method is mostly relevant when extending or overriding the MultiplayerAPI behavior via :ref:`MultiplayerAPIExtension`. + +---- + .. _class_MultiplayerAPI_method_poll: -- void **poll** **(** **)** +- :ref:`Error` **poll** **(** **)** Method used for polling the MultiplayerAPI. You only need to worry about this if you set :ref:`SceneTree.multiplayer_poll` to ``false``. By default, :ref:`SceneTree` will poll its MultiplayerAPI(s) for you. @@ -240,11 +229,21 @@ Method used for polling the MultiplayerAPI. You only need to worry about this if ---- -.. _class_MultiplayerAPI_method_send_bytes: +.. _class_MultiplayerAPI_method_rpc: -- :ref:`Error` **send_bytes** **(** :ref:`PackedByteArray` bytes, :ref:`int` id=0, :ref:`TransferMode` mode=2, :ref:`int` channel=0 **)** +- :ref:`Error` **rpc** **(** :ref:`int` peer, :ref:`Object` object, :ref:`StringName` method, :ref:`Array` arguments=[] **)** -Sends the given raw ``bytes`` to a specific peer identified by ``id`` (see :ref:`MultiplayerPeer.set_target_peer`). Default ID is ``0``, i.e. broadcast to all peers. +Sends an RPC to the target ``peer``. The given ``method`` will be called on the remote ``object`` with the provided ``arguments``. The RPC may also be called locally depending on the implementation and RPC configuration. See :ref:`Node.rpc` and :ref:`Node.rpc_config`. + +\ **Note:** Prefer using :ref:`Node.rpc`, :ref:`Node.rpc_id`, or ``my_method.rpc(peer, arg1, arg2, ...)`` (in GDScript), since they are faster. This method is mostly useful in conjunction with :ref:`MultiplayerAPIExtension` when augmenting or replacing the multiplayer capabilities. + +---- + +.. _class_MultiplayerAPI_method_set_default_interface: + +- void **set_default_interface** **(** :ref:`StringName` interface_name **)** |static| + +Sets the default MultiplayerAPI implementation class. This method can be used by modules and extensions to configure which implementation will be used by :ref:`SceneTree` when the engine starts. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_multiplayerapiextension.rst b/classes/class_multiplayerapiextension.rst new file mode 100644 index 000000000..884bb36c1 --- /dev/null +++ b/classes/class_multiplayerapiextension.rst @@ -0,0 +1,199 @@ +: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/MultiplayerAPIExtension.xml. + +.. _class_MultiplayerAPIExtension: + +MultiplayerAPIExtension +======================= + +**Inherits:** :ref:`MultiplayerAPI` **<** :ref:`RefCounted` **<** :ref:`Object` + +Base class used for extending the :ref:`MultiplayerAPI`. + +Description +----------- + +This class can be used to augment or replace the default :ref:`MultiplayerAPI` implementation via script or extensions. + +The following example augment the default implemenation (:ref:`SceneMultiplayer`) by logging every RPC being made, and every object being configured for replication. + + +.. tabs:: + + .. code-tab:: gdscript + + extends MultiplayerAPIExtension + class_name LogMultiplayer + + # We want to augment the default SceneMultiplayer. + var base_multiplayer = SceneMultiplayer.new() + + func _init(): + # Just passthourgh base signals (copied to var to avoid cyclic reference) + var cts = connected_to_server + var cf = connection_failed + var pc = peer_connected + var pd = peer_disconnected + base_multiplayer.connected_to_server.connect(func(): cts.emit()) + base_multiplayer.connection_failed.connect(func(): cf.emit()) + base_multiplayer.peer_connected.connect(func(id): pc.emit(id)) + base_multiplayer.peer_disconnected.connect(func(id): pd.emit(id)) + + # Log RPC being made and forward it to the default multiplayer. + func _rpc(peer: int, object: Object, method: StringName, args: Array) -> int: # Error + print("Got RPC for %d: %s::%s(%s)" % [peer, object, method, args]) + return base_multiplayer.rpc(peer, object, method, args) + + # Log configuration add. E.g. root path (nullptr, NodePath), replication (Node, Spawner|Synchronizer), custom. + func _object_configuration_add(object, config: Variant) -> int: # Error + if config is MultiplayerSynchronizer: + print("Adding synchronization configuration for %s. Synchronizer: %s" % [object, config]) + elif config is MultiplayerSpawner: + print("Adding node %s to the spawn list. Spawner: %s" % [object, config]) + return base_multiplayer.object_configuration_add(object, config) + + # Log configuration remove. E.g. root path (nullptr, NodePath), replication (Node, Spawner|Synchronizer), custom. + func _object_configuration_remove(object, config: Variant) -> int: # Error + if config is MultiplayerSynchronizer: + print("Removing synchronization configuration for %s. Synchronizer: %s" % [object, config]) + elif config is MultiplayerSpawner: + print("Removing node %s from the spawn list. Spawner: %s" % [object, config]) + return base_multiplayer.object_configuration_remove(object, config) + + # These can be optional, but in our case we want to augment SceneMultiplayer, so forward everything. + func _set_multiplayer_peer(p_peer: MultiplayerPeer): + base_multiplayer.multiplayer_peer = p_peer + + func _get_multiplayer_peer() -> MultiplayerPeer: + return base_multiplayer.multiplayer_peer + + func _get_unique_id() -> int: + return base_multiplayer.get_unique_id() + + func _get_peer_ids() -> PackedInt32Array: + return base_multiplayer.get_peers() + + + +Then in your main scene or in an autoload call :ref:`SceneTree.set_multiplayer` to start using your custom :ref:`MultiplayerAPI`: + + +.. tabs:: + + .. code-tab:: gdscript + + # autoload.gd + func _enter_tree(): + # Sets our custom multiplayer as the main one in SceneTree. + get_tree().set_multiplayer(LogMultiplayer.new()) + + + +Native extensions can alternatively use the :ref:`MultiplayerAPI.set_default_interface` method during initialization to configure themselves as the default implementation. + +Methods +------- + ++-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`MultiplayerPeer` | :ref:`_get_multiplayer_peer` **(** **)** |virtual| | ++-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedInt32Array` | :ref:`_get_peer_ids` **(** **)** |virtual| |const| | ++-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_get_remote_sender_id` **(** **)** |virtual| |const| | ++-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_get_unique_id` **(** **)** |virtual| |const| | ++-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_object_configuration_add` **(** :ref:`Object` object, :ref:`Variant` configuration **)** |virtual| | ++-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_object_configuration_remove` **(** :ref:`Object` object, :ref:`Variant` configuration **)** |virtual| | ++-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_poll` **(** **)** |virtual| | ++-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_rpc` **(** :ref:`int` peer, :ref:`Object` object, :ref:`StringName` method, :ref:`Array` args **)** |virtual| | ++-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_set_multiplayer_peer` **(** :ref:`MultiplayerPeer` multiplayer_peer **)** |virtual| | ++-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Method Descriptions +------------------- + +.. _class_MultiplayerAPIExtension_method__get_multiplayer_peer: + +- :ref:`MultiplayerPeer` **_get_multiplayer_peer** **(** **)** |virtual| + +Called when the :ref:`MultiplayerAPI.multiplayer_peer` is retrieved. + +---- + +.. _class_MultiplayerAPIExtension_method__get_peer_ids: + +- :ref:`PackedInt32Array` **_get_peer_ids** **(** **)** |virtual| |const| + +Callback for :ref:`MultiplayerAPI.get_peers`. + +---- + +.. _class_MultiplayerAPIExtension_method__get_remote_sender_id: + +- :ref:`int` **_get_remote_sender_id** **(** **)** |virtual| |const| + +Callback for :ref:`MultiplayerAPI.get_remote_sender_id`. + +---- + +.. _class_MultiplayerAPIExtension_method__get_unique_id: + +- :ref:`int` **_get_unique_id** **(** **)** |virtual| |const| + +Callback for :ref:`MultiplayerAPI.get_unique_id`. + +---- + +.. _class_MultiplayerAPIExtension_method__object_configuration_add: + +- :ref:`int` **_object_configuration_add** **(** :ref:`Object` object, :ref:`Variant` configuration **)** |virtual| + +Callback for :ref:`MultiplayerAPI.object_configuration_add`. + +---- + +.. _class_MultiplayerAPIExtension_method__object_configuration_remove: + +- :ref:`int` **_object_configuration_remove** **(** :ref:`Object` object, :ref:`Variant` configuration **)** |virtual| + +Callback for :ref:`MultiplayerAPI.object_configuration_remove`. + +---- + +.. _class_MultiplayerAPIExtension_method__poll: + +- :ref:`int` **_poll** **(** **)** |virtual| + +Callback for :ref:`MultiplayerAPI.poll`. + +---- + +.. _class_MultiplayerAPIExtension_method__rpc: + +- :ref:`int` **_rpc** **(** :ref:`int` peer, :ref:`Object` object, :ref:`StringName` method, :ref:`Array` args **)** |virtual| + +Callback for :ref:`MultiplayerAPI.rpc`. + +---- + +.. _class_MultiplayerAPIExtension_method__set_multiplayer_peer: + +- void **_set_multiplayer_peer** **(** :ref:`MultiplayerPeer` multiplayer_peer **)** |virtual| + +Called when the :ref:`MultiplayerAPI.multiplayer_peer` is set. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_multiplayerpeer.rst b/classes/class_multiplayerpeer.rst index b52ade637..cce6f3096 100644 --- a/classes/class_multiplayerpeer.rst +++ b/classes/class_multiplayerpeer.rst @@ -35,13 +35,13 @@ Tutorials Properties ---------- -+-----------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`refuse_new_connections` | ``false`` | -+-----------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`transfer_channel` | ``0`` | -+-----------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ -| :ref:`TransferMode` | :ref:`transfer_mode` | ``2`` | -+-----------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ ++--------------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ +| :ref:`bool` | :ref:`refuse_new_connections` | ``false`` | ++--------------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ +| :ref:`int` | :ref:`transfer_channel` | ``0`` | ++--------------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ +| :ref:`TransferMode` | :ref:`transfer_mode` | ``2`` | ++--------------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ Methods ------- @@ -120,6 +120,24 @@ enum **ConnectionStatus**: - **CONNECTION_CONNECTED** = **2** --- The connection attempt succeeded. +---- + +.. _enum_MultiplayerPeer_TransferMode: + +.. _class_MultiplayerPeer_constant_TRANSFER_MODE_UNRELIABLE: + +.. _class_MultiplayerPeer_constant_TRANSFER_MODE_UNRELIABLE_ORDERED: + +.. _class_MultiplayerPeer_constant_TRANSFER_MODE_RELIABLE: + +enum **TransferMode**: + +- **TRANSFER_MODE_UNRELIABLE** = **0** --- Packets are not acknowledged, no resend attempts are made for lost packets. Packets may arrive in any order. Potentially faster than :ref:`TRANSFER_MODE_UNRELIABLE_ORDERED`. Use for non-critical data, and always consider whether the order matters. + +- **TRANSFER_MODE_UNRELIABLE_ORDERED** = **1** --- Packets are not acknowledged, no resend attempts are made for lost packets. Packets are received in the order they were sent in. Potentially faster than :ref:`TRANSFER_MODE_RELIABLE`. Use for non-critical data or data that would be outdated if received late due to resend attempt(s) anyway, for example movement and positional data. + +- **TRANSFER_MODE_RELIABLE** = **2** --- Packets must be received and resend attempts should be made until the packets are acknowledged. Packets must be received in the order they were sent in. Most reliable transfer mode, but potentially the slowest due to the overhead. Use for critical data that must be transmitted and arrive in order, for example an ability being triggered or a chat message. Consider carefully if the information really is critical, and use sparingly. + Constants --------- @@ -164,13 +182,13 @@ If ``true``, this ``MultiplayerPeer`` refuses new connections. The channel to use to send packets. Many network APIs such as ENet and WebRTC allow the creation of multiple independent channels which behaves, in a way, like separate connections. This means that reliable data will only block delivery of other packets on that channel, and ordering will only be in respect to the channel the packet is being sent on. Using different channels to send **different and independent** state updates is a common way to optimize network usage and decrease latency in fast-paced games. -\ **Note:** The default channel (``0``) actually works as 3 separate channels (one for each :ref:`TransferMode`) so that :ref:`@GlobalScope.TRANSFER_MODE_RELIABLE` and :ref:`@GlobalScope.TRANSFER_MODE_UNRELIABLE_ORDERED` does not interact with each other by default. Refer to the specific network API documentation (e.g. ENet or WebRTC) to learn how to set up channels correctly. +\ **Note:** The default channel (``0``) actually works as 3 separate channels (one for each :ref:`TransferMode`) so that :ref:`TRANSFER_MODE_RELIABLE` and :ref:`TRANSFER_MODE_UNRELIABLE_ORDERED` does not interact with each other by default. Refer to the specific network API documentation (e.g. ENet or WebRTC) to learn how to set up channels correctly. ---- .. _class_MultiplayerPeer_property_transfer_mode: -- :ref:`TransferMode` **transfer_mode** +- :ref:`TransferMode` **transfer_mode** +-----------+--------------------------+ | *Default* | ``2`` | @@ -180,7 +198,7 @@ The channel to use to send packets. Many network APIs such as ENet and WebRTC al | *Getter* | get_transfer_mode() | +-----------+--------------------------+ -The manner in which to send packets to the ``target_peer``. See :ref:`TransferMode`. +The manner in which to send packets to the ``target_peer``. See :ref:`TransferMode`. Method Descriptions ------------------- diff --git a/classes/class_multiplayerpeerextension.rst b/classes/class_multiplayerpeerextension.rst index 6551be406..8ec3f64fa 100644 --- a/classes/class_multiplayerpeerextension.rst +++ b/classes/class_multiplayerpeerextension.rst @@ -91,7 +91,7 @@ Called when the maximum allowed packet size (in bytes) is requested by the :ref: - :ref:`int` **_get_packet** **(** const uint8_t ** r_buffer, int32_t* r_buffer_size **)** |virtual| -Called when a packet needs to be received by the :ref:`MultiplayerAPI`, with ``p_buffer_size`` being the size of the binary ``p_buffer`` in bytes. +Called when a packet needs to be received by the :ref:`MultiplayerAPI`, with ``r_buffer_size`` being the size of the binary ``r_buffer`` in bytes. ---- diff --git a/classes/class_multiplayerspawner.rst b/classes/class_multiplayerspawner.rst index f18d7c877..8134cc630 100644 --- a/classes/class_multiplayerspawner.rst +++ b/classes/class_multiplayerspawner.rst @@ -3,7 +3,7 @@ .. 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/MultiplayerSpawner.xml. +.. XML source: https://github.com/godotengine/godot/tree/master/modules/multiplayer/doc_classes/MultiplayerSpawner.xml. .. _class_MultiplayerSpawner: @@ -12,7 +12,18 @@ MultiplayerSpawner **Inherits:** :ref:`Node` **<** :ref:`Object` +Automatically replicates spawnable nodes from the authority to other multiplayer peers. +Description +----------- + +Spawnable scenes can be configured in the editor or through code (see :ref:`add_spawnable_scene`). + +Also supports custom node spawns through :ref:`spawn`, calling :ref:`_spawn_custom` on all peers. + + + +Internally, ``MultiplayerSpawner`` uses :ref:`MultiplayerAPI.object_configuration_add` to notify spawns passing the spawned node as the ``object`` and itself as the ``configuration``, and :ref:`MultiplayerAPI.object_configuration_remove` to notify despawns in a similar way. Properties ---------- @@ -26,32 +37,36 @@ Properties Methods ------- -+-----------------------------+--------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`_spawn_custom` **(** :ref:`Variant` data **)** |virtual| | -+-----------------------------+--------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_spawnable_scene` **(** :ref:`String` path **)** | -+-----------------------------+--------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_spawnable_scenes` **(** **)** | -+-----------------------------+--------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_spawnable_scene` **(** :ref:`int` path **)** |const| | -+-----------------------------+--------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_spawnable_scene_count` **(** **)** |const| | -+-----------------------------+--------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Node` | :ref:`spawn` **(** :ref:`Variant` data=null **)** | -+-----------------------------+--------------------------------------------------------------------------------------------------------------------------------+ ++-----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Node` | :ref:`_spawn_custom` **(** :ref:`Variant` data **)** |virtual| | ++-----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_spawnable_scene` **(** :ref:`String` path **)** | ++-----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_spawnable_scenes` **(** **)** | ++-----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_spawnable_scene` **(** :ref:`int` index **)** |const| | ++-----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_spawnable_scene_count` **(** **)** |const| | ++-----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Node` | :ref:`spawn` **(** :ref:`Variant` data=null **)** | ++-----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ Signals ------- .. _class_MultiplayerSpawner_signal_despawned: -- **despawned** **(** :ref:`int` scene_id, :ref:`Node` node **)** +- **despawned** **(** :ref:`Node` node **)** + +Emitted when a spawnable scene or custom spawn was despawned by the multiplayer authority. Only called on puppets. ---- .. _class_MultiplayerSpawner_signal_spawned: -- **spawned** **(** :ref:`int` scene_id, :ref:`Node` node **)** +- **spawned** **(** :ref:`Node` node **)** + +Emitted when a spawnable scene or custom spawn was spawned by the multiplayer authority. Only called on puppets. Property Descriptions --------------------- @@ -68,6 +83,12 @@ Property Descriptions | *Getter* | get_spawn_limit() | +-----------+------------------------+ +Maximum nodes that is allowed to be spawned by this spawner. Includes both spawnable scenes and custom spawns. + + + +When set to ``0`` (the default), there is no limit. + ---- .. _class_MultiplayerSpawner_property_spawn_path: @@ -82,12 +103,20 @@ Property Descriptions | *Getter* | get_spawn_path() | +-----------+-----------------------+ +Path to the spawn root. Spawnable scenes that are added as direct children are replicated to other peers. + Method Descriptions ------------------- .. _class_MultiplayerSpawner_method__spawn_custom: -- :ref:`Object` **_spawn_custom** **(** :ref:`Variant` data **)** |virtual| +- :ref:`Node` **_spawn_custom** **(** :ref:`Variant` data **)** |virtual| + +Method called on all peers when a custom spawn was requested by the authority using :ref:`spawn`. Should return a :ref:`Node` that is not in the scene tree. + + + +\ **Note:** Spawned nodes should **not** be added to the scene with `add_child`. This is done automatically. ---- @@ -95,17 +124,23 @@ Method Descriptions - void **add_spawnable_scene** **(** :ref:`String` path **)** +Adds a scene path to spawnable scenes, making it automatically replicated from the multiplayer authority to other peers when added as children of the node pointed by :ref:`spawn_path`. + ---- .. _class_MultiplayerSpawner_method_clear_spawnable_scenes: - void **clear_spawnable_scenes** **(** **)** +Clears all spawnable scenes. Does not despawn existing instances on remote peers. + ---- .. _class_MultiplayerSpawner_method_get_spawnable_scene: -- :ref:`String` **get_spawnable_scene** **(** :ref:`int` path **)** |const| +- :ref:`String` **get_spawnable_scene** **(** :ref:`int` index **)** |const| + +Returns the spawnable scene path by index. ---- @@ -113,12 +148,20 @@ Method Descriptions - :ref:`int` **get_spawnable_scene_count** **(** **)** |const| +Returns the count of spawnable scene paths. + ---- .. _class_MultiplayerSpawner_method_spawn: - :ref:`Node` **spawn** **(** :ref:`Variant` data=null **)** +Requests a custom spawn, with ``data`` passed to :ref:`_spawn_custom` on all peers. Returns the locally spawned node instance already inside the scene tree, and added as a child of the node pointed by :ref:`spawn_path`. + + + +\ **Note:** Spawnable scenes are spawned automatically. :ref:`spawn` is only needed for custom spawns. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_multiplayersynchronizer.rst b/classes/class_multiplayersynchronizer.rst index ce357c85d..385c8d0e1 100644 --- a/classes/class_multiplayersynchronizer.rst +++ b/classes/class_multiplayersynchronizer.rst @@ -3,7 +3,7 @@ .. 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/MultiplayerSynchronizer.xml. +.. XML source: https://github.com/godotengine/godot/tree/master/modules/multiplayer/doc_classes/MultiplayerSynchronizer.xml. .. _class_MultiplayerSynchronizer: @@ -12,7 +12,22 @@ MultiplayerSynchronizer **Inherits:** :ref:`Node` **<** :ref:`Object` +Synchronizes properties from the multiplayer authority to the remote peers. +Description +----------- + +By default, ``MultiplayerSynchronizer`` synchronizes configured properties to all peers. + +Visiblity can be handled directly with :ref:`set_visibility_for` or as-needed with :ref:`add_visibility_filter` and :ref:`update_visibility`. + + + +\ :ref:`MultiplayerSpawner`\ s will handle nodes according to visibility of synchronizers as long as the node at :ref:`root_path` was spawned by one. + + + +Internally, ``MultiplayerSynchronizer`` uses :ref:`MultiplayerAPI.object_configuration_add` to notify synchronization start passing the :ref:`Node` at :ref:`root_path` as the ``object`` and itself as the ``configuration``, and uses :ref:`MultiplayerAPI.object_configuration_remove` to notify synchronization end in a similar way. Properties ---------- @@ -51,6 +66,8 @@ Signals - **visibility_changed** **(** :ref:`int` for_peer **)** +Emitted when visibility of ``for_peer`` is updated. See :ref:`update_visibility`. + Enumerations ------------ @@ -64,11 +81,11 @@ Enumerations enum **VisibilityUpdateMode**: -- **VISIBILITY_PROCESS_IDLE** = **0** +- **VISIBILITY_PROCESS_IDLE** = **0** --- Visibility filters are updated every idle process frame. -- **VISIBILITY_PROCESS_PHYSICS** = **1** +- **VISIBILITY_PROCESS_PHYSICS** = **1** --- Visibility filters are updated every physics process frame. -- **VISIBILITY_PROCESS_NONE** = **2** +- **VISIBILITY_PROCESS_NONE** = **2** --- Visibility filters are not updated automatically, and must be updated manually by calling :ref:`update_visibility`. Property Descriptions --------------------- @@ -85,6 +102,8 @@ Property Descriptions | *Getter* | is_visibility_public() | +-----------+------------------------------+ +Whether synchronization should be visible to all peers by default. See :ref:`set_visibility_for` and :ref:`add_visibility_filter` for ways of configuring fine-grained visibility options. + ---- .. _class_MultiplayerSynchronizer_property_replication_config: @@ -97,6 +116,8 @@ Property Descriptions | *Getter* | get_replication_config() | +----------+-------------------------------+ +Resource containing which properties to synchronize. + ---- .. _class_MultiplayerSynchronizer_property_replication_interval: @@ -111,6 +132,8 @@ Property Descriptions | *Getter* | get_replication_interval() | +-----------+---------------------------------+ +Time interval between synchronizes. When set to ``0.0`` (the default), synchronizes happen every network process frame. + ---- .. _class_MultiplayerSynchronizer_property_root_path: @@ -125,6 +148,10 @@ Property Descriptions | *Getter* | get_root_path() | +-----------+----------------------+ +Node path that replicated properties are relative to. + +If :ref:`root_path` was spawned by a :ref:`MultiplayerSpawner`, the node will be also be spawned and despawned based on this synchronizer visibility options. + ---- .. _class_MultiplayerSynchronizer_property_visibility_update_mode: @@ -139,6 +166,8 @@ Property Descriptions | *Getter* | get_visibility_update_mode() | +-----------+-----------------------------------+ +Specifies when visibility filters are updated (see :ref:`VisibilityUpdateMode` for options). + Method Descriptions ------------------- @@ -146,30 +175,44 @@ Method Descriptions - void **add_visibility_filter** **(** :ref:`Callable` filter **)** +Adds a peer visibility filter for this synchronizer. + + + +\ ``filter`` should take a peer id :ref:`int` and return a :ref:`bool`. + ---- .. _class_MultiplayerSynchronizer_method_get_visibility_for: - :ref:`bool` **get_visibility_for** **(** :ref:`int` peer **)** |const| +Queries the current visibility for peer ``peer``. + ---- .. _class_MultiplayerSynchronizer_method_remove_visibility_filter: - void **remove_visibility_filter** **(** :ref:`Callable` filter **)** +Removes a peer visiblity filter from this synchronizer. + ---- .. _class_MultiplayerSynchronizer_method_set_visibility_for: - void **set_visibility_for** **(** :ref:`int` peer, :ref:`bool` visible **)** +Sets the visibility of ``peer`` to ``visible``. If ``peer`` is ``0``, the value of :ref:`public_visibility` will be updated instead. + ---- .. _class_MultiplayerSynchronizer_method_update_visibility: - void **update_visibility** **(** :ref:`int` for_peer=0 **)** +Updates the visibility of ``peer`` according to visibility filters. If ``peer`` is ``0`` (the default), all peers' visibilties are updated. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_navigationagent2d.rst b/classes/class_navigationagent2d.rst index 250644d8d..7cc0a9f3a 100644 --- a/classes/class_navigationagent2d.rst +++ b/classes/class_navigationagent2d.rst @@ -33,7 +33,7 @@ Properties +---------------------------+------------------------------------------------------------------------------------------+-----------+ | :ref:`int` | :ref:`navigation_layers` | ``1`` | +---------------------------+------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`neighbor_dist` | ``500.0`` | +| :ref:`float` | :ref:`neighbor_distance` | ``500.0`` | +---------------------------+------------------------------------------------------------------------------------------+-----------+ | :ref:`float` | :ref:`path_desired_distance` | ``1.0`` | +---------------------------+------------------------------------------------------------------------------------------+-----------+ @@ -183,17 +183,17 @@ A bitfield determining what navigation layers of navigation regions this agent w ---- -.. _class_NavigationAgent2D_property_neighbor_dist: +.. _class_NavigationAgent2D_property_neighbor_distance: -- :ref:`float` **neighbor_dist** +- :ref:`float` **neighbor_distance** -+-----------+--------------------------+ -| *Default* | ``500.0`` | -+-----------+--------------------------+ -| *Setter* | set_neighbor_dist(value) | -+-----------+--------------------------+ -| *Getter* | get_neighbor_dist() | -+-----------+--------------------------+ ++-----------+------------------------------+ +| *Default* | ``500.0`` | ++-----------+------------------------------+ +| *Setter* | set_neighbor_distance(value) | ++-----------+------------------------------+ +| *Getter* | get_neighbor_distance() | ++-----------+------------------------------+ The distance to search for other agents. @@ -243,7 +243,7 @@ The maximum distance the agent is allowed away from the ideal path to the final | *Getter* | get_radius() | +-----------+-------------------+ -The radius of the avoidance agent. This is the "body" of the avoidance agent and not the avoidance maneuver starting radius (which is controlled by :ref:`neighbor_dist`). +The radius of the avoidance agent. This is the "body" of the avoidance agent and not the avoidance maneuver starting radius (which is controlled by :ref:`neighbor_distance`). Does not affect normal pathfinding. To change an actor's pathfinding radius bake :ref:`NavigationMesh` resources with a different :ref:`NavigationMesh.agent_radius` property and use different navigation maps for each actor size. diff --git a/classes/class_navigationagent3d.rst b/classes/class_navigationagent3d.rst index 7d3ad8b17..f1b70ca52 100644 --- a/classes/class_navigationagent3d.rst +++ b/classes/class_navigationagent3d.rst @@ -37,7 +37,7 @@ Properties +---------------------------+------------------------------------------------------------------------------------------+-----------+ | :ref:`int` | :ref:`navigation_layers` | ``1`` | +---------------------------+------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`neighbor_dist` | ``50.0`` | +| :ref:`float` | :ref:`neighbor_distance` | ``50.0`` | +---------------------------+------------------------------------------------------------------------------------------+-----------+ | :ref:`float` | :ref:`path_desired_distance` | ``1.0`` | +---------------------------+------------------------------------------------------------------------------------------+-----------+ @@ -219,17 +219,17 @@ A bitfield determining what navigation layers of navigation regions this Navigat ---- -.. _class_NavigationAgent3D_property_neighbor_dist: +.. _class_NavigationAgent3D_property_neighbor_distance: -- :ref:`float` **neighbor_dist** +- :ref:`float` **neighbor_distance** -+-----------+--------------------------+ -| *Default* | ``50.0`` | -+-----------+--------------------------+ -| *Setter* | set_neighbor_dist(value) | -+-----------+--------------------------+ -| *Getter* | get_neighbor_dist() | -+-----------+--------------------------+ ++-----------+------------------------------+ +| *Default* | ``50.0`` | ++-----------+------------------------------+ +| *Setter* | set_neighbor_distance(value) | ++-----------+------------------------------+ +| *Getter* | get_neighbor_distance() | ++-----------+------------------------------+ The distance to search for other agents. @@ -279,7 +279,7 @@ The maximum distance the agent is allowed away from the ideal path to the final | *Getter* | get_radius() | +-----------+-------------------+ -The radius of the avoidance agent. This is the "body" of the avoidance agent and not the avoidance maneuver starting radius (which is controlled by :ref:`neighbor_dist`). +The radius of the avoidance agent. This is the "body" of the avoidance agent and not the avoidance maneuver starting radius (which is controlled by :ref:`neighbor_distance`). Does not affect normal pathfinding. To change an actor's pathfinding radius bake :ref:`NavigationMesh` resources with a different :ref:`NavigationMesh.agent_radius` property and use different navigation maps for each actor size. diff --git a/classes/class_navigationmesh.rst b/classes/class_navigationmesh.rst index 0aacb0b80..ab42c56f5 100644 --- a/classes/class_navigationmesh.rst +++ b/classes/class_navigationmesh.rst @@ -575,6 +575,8 @@ Clears the array of polygons, but it doesn't clear the array of vertices. Initializes the navigation mesh by setting the vertices and indices according to a :ref:`Mesh`. +\ **Note:** The given ``mesh`` must be of type :ref:`Mesh.PRIMITIVE_TRIANGLES` and have an index array. + ---- .. _class_NavigationMesh_method_get_collision_mask_value: diff --git a/classes/class_navigationmeshgenerator.rst b/classes/class_navigationmeshgenerator.rst index 85c19c4b6..b85445f1e 100644 --- a/classes/class_navigationmeshgenerator.rst +++ b/classes/class_navigationmeshgenerator.rst @@ -21,7 +21,7 @@ This class is responsible for creating and clearing 3D navigation meshes used as The entire navigation mesh baking is best done in a separate thread as the voxelization, collision tests and mesh optimization steps involved are very performance and time hungry operations. -Navigation mesh baking happens in multiple steps and the result depends on 3D source geometry and properties of the :ref:`NavigationMesh` resource. In the first step, starting from a root node and depending on :ref:`NavigationMesh` properties all valid 3D source geometry nodes are collected from the :ref:`SceneTree`. Second, all collected nodes are parsed for their relevant 3D geometry data and a combined 3D mesh is build. Due to the many different types of parsable objects, from normal :ref:`MeshInstance3D`\ s to :ref:`CSGShape3D`\ s or various :ref:`CollisionObject3D`\ s, some operations to collect geometry data can trigger :ref:`RenderingServer` and :ref:`PhysicsServer3D` synchronizations. Server synchronization can have a negative effect on baking time or framerate as it often involves :ref:`Mutex` locking for thread security. Many parsable objects and the continuous synchronization with other threaded Servers can increase the baking time significantly. On the other hand only a few but very large and complex objects will take some time to prepare for the Servers which can noticeably stall the next frame render. As a general rule the total amount of parsable objects and their individual size and complexity should be balanced to avoid framerate issues or very long baking times. The combined mesh is then passed to the Recast Navigation Object to test the source geometry for walkable terrain suitable to :ref:`NavigationMesh` agent properties by creating a voxel world around the meshes bounding area. +Navigation mesh baking happens in multiple steps and the result depends on 3D source geometry and properties of the :ref:`NavigationMesh` resource. In the first step, starting from a root node and depending on :ref:`NavigationMesh` properties all valid 3D source geometry nodes are collected from the :ref:`SceneTree`. Second, all collected nodes are parsed for their relevant 3D geometry data and a combined 3D mesh is build. Due to the many different types of parsable objects, from normal :ref:`MeshInstance3D`\ s to :ref:`CSGShape3D`\ s or various :ref:`CollisionObject3D`\ s, some operations to collect geometry data can trigger :ref:`RenderingServer` and :ref:`PhysicsServer3D` synchronizations. Server synchronization can have a negative effect on baking time or framerate as it often involves :ref:`Mutex` locking for thread security. Many parsable objects and the continuous synchronization with other threaded Servers can increase the baking time significantly. On the other hand only a few but very large and complex objects will take some time to prepare for the Servers which can noticeably stall the next frame render. As a general rule the total number of parsable objects and their individual size and complexity should be balanced to avoid framerate issues or very long baking times. The combined mesh is then passed to the Recast Navigation Object to test the source geometry for walkable terrain suitable to :ref:`NavigationMesh` agent properties by creating a voxel world around the meshes bounding area. The finalized navigation mesh is then returned and stored inside the :ref:`NavigationMesh` for use as a resource inside :ref:`NavigationRegion3D` nodes. diff --git a/classes/class_navigationregion2d.rst b/classes/class_navigationregion2d.rst index 25c47c653..8828b5255 100644 --- a/classes/class_navigationregion2d.rst +++ b/classes/class_navigationregion2d.rst @@ -25,7 +25,7 @@ Two regions can be connected to each other if they share a similar edge. You can The pathfinding cost of entering this region from another region can be controlled with the :ref:`enter_cost` value. -\ **Note**: This value is not added to the path cost when the start position is already inside this region. +\ **Note:** This value is not added to the path cost when the start position is already inside this region. The pathfinding cost of traveling distances inside this region can be controlled with the :ref:`travel_cost` multiplier. diff --git a/classes/class_navigationregion3d.rst b/classes/class_navigationregion3d.rst index 250968aac..3b0a193d0 100644 --- a/classes/class_navigationregion3d.rst +++ b/classes/class_navigationregion3d.rst @@ -25,7 +25,7 @@ Two regions can be connected to each other if they share a similar edge. You can The cost of entering this region from another region can be controlled with the :ref:`enter_cost` value. -\ **Note**: This value is not added to the path cost when the start position is already inside this region. +\ **Note:** This value is not added to the path cost when the start position is already inside this region. The cost of traveling distances inside this region can be controlled with the :ref:`travel_cost` multiplier. @@ -160,7 +160,7 @@ Method Descriptions - void **bake_navigation_mesh** **(** :ref:`bool` on_thread=true **)** -Bakes the :ref:`NavigationMesh`. If ``on_thread`` is set to ``true`` (default), the baking is done on a separate thread. Baking on separate thread is useful because navigation baking is not a cheap operation. When it is completed, it automatically sets the new :ref:`NavigationMesh`. Please note that baking on separate thread may be very slow if geometry is parsed from meshes as async access to each mesh involves heavy synchronization. Also, please note that baking on a separate thread is automatically disabled on operating systems that cannot use threads (such as HTML5 with threads disabled). +Bakes the :ref:`NavigationMesh`. If ``on_thread`` is set to ``true`` (default), the baking is done on a separate thread. Baking on separate thread is useful because navigation baking is not a cheap operation. When it is completed, it automatically sets the new :ref:`NavigationMesh`. Please note that baking on separate thread may be very slow if geometry is parsed from meshes as async access to each mesh involves heavy synchronization. Also, please note that baking on a separate thread is automatically disabled on operating systems that cannot use threads (such as Web with threads disabled). ---- diff --git a/classes/class_navigationserver2d.rst b/classes/class_navigationserver2d.rst index de53cc76f..161d46c7b 100644 --- a/classes/class_navigationserver2d.rst +++ b/classes/class_navigationserver2d.rst @@ -56,7 +56,7 @@ Methods +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`agent_set_max_speed` **(** :ref:`RID` agent, :ref:`float` max_speed **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`agent_set_neighbor_dist` **(** :ref:`RID` agent, :ref:`float` dist **)** |const| | +| void | :ref:`agent_set_neighbor_distance` **(** :ref:`RID` agent, :ref:`float` distance **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`agent_set_position` **(** :ref:`RID` agent, :ref:`Vector2` position **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -70,13 +70,13 @@ Methods +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`free_rid` **(** :ref:`RID` rid **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_maps` **(** **)** |const| | +| :ref:`RID[]` | :ref:`get_maps` **(** **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`map_create` **(** **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`map_force_update` **(** :ref:`RID` map **)** | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`map_get_agents` **(** :ref:`RID` map **)** |const| | +| :ref:`RID[]` | :ref:`map_get_agents` **(** :ref:`RID` map **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`map_get_cell_size` **(** :ref:`RID` map **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -88,9 +88,9 @@ Methods +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedVector2Array` | :ref:`map_get_path` **(** :ref:`RID` map, :ref:`Vector2` origin, :ref:`Vector2` destination, :ref:`bool` optimize, :ref:`int` navigation_layers=1 **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`map_get_regions` **(** :ref:`RID` map **)** |const| | +| :ref:`RID[]` | :ref:`map_get_regions` **(** :ref:`RID` map **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`map_is_active` **(** :ref:`RID` nap **)** |const| | +| :ref:`bool` | :ref:`map_is_active` **(** :ref:`RID` map **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`map_set_active` **(** :ref:`RID` map, :ref:`bool` active **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -199,9 +199,9 @@ Sets the maximum speed of the agent. Must be positive. ---- -.. _class_NavigationServer2D_method_agent_set_neighbor_dist: +.. _class_NavigationServer2D_method_agent_set_neighbor_distance: -- void **agent_set_neighbor_dist** **(** :ref:`RID` agent, :ref:`float` dist **)** |const| +- void **agent_set_neighbor_distance** **(** :ref:`RID` agent, :ref:`float` distance **)** |const| Sets the maximum distance to other agents this agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe. @@ -257,7 +257,7 @@ Destroys the given RID. .. _class_NavigationServer2D_method_get_maps: -- :ref:`Array` **get_maps** **(** **)** |const| +- :ref:`RID[]` **get_maps** **(** **)** |const| Returns all created navigation map :ref:`RID`\ s on the NavigationServer. This returns both 2D and 3D created navigation maps as there is technically no distinction between them. @@ -287,7 +287,7 @@ Avoidance processing and dispatch of the ``safe_velocity`` signals is untouched .. _class_NavigationServer2D_method_map_get_agents: -- :ref:`Array` **map_get_agents** **(** :ref:`RID` map **)** |const| +- :ref:`RID[]` **map_get_agents** **(** :ref:`RID` map **)** |const| Returns all navigation agents :ref:`RID`\ s that are currently assigned to the requested navigation ``map``. @@ -335,7 +335,7 @@ Returns the navigation path to reach the destination from the origin. ``navigati .. _class_NavigationServer2D_method_map_get_regions: -- :ref:`Array` **map_get_regions** **(** :ref:`RID` map **)** |const| +- :ref:`RID[]` **map_get_regions** **(** :ref:`RID` map **)** |const| Returns all navigation regions :ref:`RID`\ s that are currently assigned to the requested navigation ``map``. @@ -343,7 +343,7 @@ Returns all navigation regions :ref:`RID`\ s that are currently assig .. _class_NavigationServer2D_method_map_is_active: -- :ref:`bool` **map_is_active** **(** :ref:`RID` nap **)** |const| +- :ref:`bool` **map_is_active** **(** :ref:`RID` map **)** |const| Returns true if the map is active. diff --git a/classes/class_navigationserver3d.rst b/classes/class_navigationserver3d.rst index accc128c2..d55dd4e7e 100644 --- a/classes/class_navigationserver3d.rst +++ b/classes/class_navigationserver3d.rst @@ -56,7 +56,7 @@ Methods +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`agent_set_max_speed` **(** :ref:`RID` agent, :ref:`float` max_speed **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`agent_set_neighbor_dist` **(** :ref:`RID` agent, :ref:`float` dist **)** |const| | +| void | :ref:`agent_set_neighbor_distance` **(** :ref:`RID` agent, :ref:`float` distance **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`agent_set_position` **(** :ref:`RID` agent, :ref:`Vector3` position **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -70,13 +70,13 @@ Methods +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`free_rid` **(** :ref:`RID` rid **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_maps` **(** **)** |const| | +| :ref:`RID[]` | :ref:`get_maps` **(** **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`map_create` **(** **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`map_force_update` **(** :ref:`RID` map **)** | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`map_get_agents` **(** :ref:`RID` map **)** |const| | +| :ref:`RID[]` | :ref:`map_get_agents` **(** :ref:`RID` map **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`map_get_cell_size` **(** :ref:`RID` map **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -92,11 +92,11 @@ Methods +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedVector3Array` | :ref:`map_get_path` **(** :ref:`RID` map, :ref:`Vector3` origin, :ref:`Vector3` destination, :ref:`bool` optimize, :ref:`int` navigation_layers=1 **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`map_get_regions` **(** :ref:`RID` map **)** |const| | +| :ref:`RID[]` | :ref:`map_get_regions` **(** :ref:`RID` map **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`map_get_up` **(** :ref:`RID` map **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`map_is_active` **(** :ref:`RID` nap **)** |const| | +| :ref:`bool` | :ref:`map_is_active` **(** :ref:`RID` map **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`map_set_active` **(** :ref:`RID` map, :ref:`bool` active **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -152,6 +152,14 @@ Signals Emitted when a navigation map is updated, when a region moves or is modified. +---- + +.. _class_NavigationServer3D_signal_navigation_debug_changed: + +- **navigation_debug_changed** **(** **)** + +Emitted when navigation debug settings are changed. Only available in debug builds. + Method Descriptions ------------------- @@ -213,9 +221,9 @@ Sets the maximum speed of the agent. Must be positive. ---- -.. _class_NavigationServer3D_method_agent_set_neighbor_dist: +.. _class_NavigationServer3D_method_agent_set_neighbor_distance: -- void **agent_set_neighbor_dist** **(** :ref:`RID` agent, :ref:`float` dist **)** |const| +- void **agent_set_neighbor_distance** **(** :ref:`RID` agent, :ref:`float` distance **)** |const| Sets the maximum distance to other agents this agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe. @@ -271,7 +279,7 @@ Destroys the given RID. .. _class_NavigationServer3D_method_get_maps: -- :ref:`Array` **get_maps** **(** **)** |const| +- :ref:`RID[]` **get_maps** **(** **)** |const| Returns all created navigation map :ref:`RID`\ s on the NavigationServer. This returns both 2D and 3D created navigation maps as there is technically no distinction between them. @@ -301,7 +309,7 @@ Avoidance processing and dispatch of the ``safe_velocity`` signals is untouched .. _class_NavigationServer3D_method_map_get_agents: -- :ref:`Array` **map_get_agents** **(** :ref:`RID` map **)** |const| +- :ref:`RID[]` **map_get_agents** **(** :ref:`RID` map **)** |const| Returns all navigation agents :ref:`RID`\ s that are currently assigned to the requested navigation ``map``. @@ -319,7 +327,7 @@ Returns the map cell size. - :ref:`Vector3` **map_get_closest_point** **(** :ref:`RID` map, :ref:`Vector3` to_point **)** |const| -Returns the point closest to the provided ``point`` on the navigation mesh surface. +Returns the point closest to the provided ``to_point`` on the navigation mesh surface. ---- @@ -365,7 +373,7 @@ Returns the navigation path to reach the destination from the origin. ``navigati .. _class_NavigationServer3D_method_map_get_regions: -- :ref:`Array` **map_get_regions** **(** :ref:`RID` map **)** |const| +- :ref:`RID[]` **map_get_regions** **(** :ref:`RID` map **)** |const| Returns all navigation regions :ref:`RID`\ s that are currently assigned to the requested navigation ``map``. @@ -381,7 +389,7 @@ Returns the map's up direction. .. _class_NavigationServer3D_method_map_is_active: -- :ref:`bool` **map_is_active** **(** :ref:`RID` nap **)** |const| +- :ref:`bool` **map_is_active** **(** :ref:`RID` map **)** |const| Returns true if the map is active. diff --git a/classes/class_node.rst b/classes/class_node.rst index 18ddd4ed7..c1d68c663 100644 --- a/classes/class_node.rst +++ b/classes/class_node.rst @@ -74,171 +74,171 @@ Properties Methods ------- -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_enter_tree` **(** **)** |virtual| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_exit_tree` **(** **)** |virtual| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`_get_configuration_warnings` **(** **)** |virtual| |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_input` **(** :ref:`InputEvent` event **)** |virtual| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_physics_process` **(** :ref:`float` delta **)** |virtual| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_process` **(** :ref:`float` delta **)** |virtual| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_ready` **(** **)** |virtual| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_shortcut_input` **(** :ref:`InputEvent` event **)** |virtual| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_unhandled_input` **(** :ref:`InputEvent` event **)** |virtual| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_unhandled_key_input` **(** :ref:`InputEvent` event **)** |virtual| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_child` **(** :ref:`Node` node, :ref:`bool` legible_unique_name=false, :ref:`InternalMode` internal=0 **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_sibling` **(** :ref:`Node` sibling, :ref:`bool` legible_unique_name=false **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_to_group` **(** :ref:`StringName` group, :ref:`bool` persistent=false **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`can_process` **(** **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Tween` | :ref:`create_tween` **(** **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Node` | :ref:`duplicate` **(** :ref:`int` flags=15 **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Node` | :ref:`find_child` **(** :ref:`String` pattern, :ref:`bool` recursive=true, :ref:`bool` owned=true **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Node[]` | :ref:`find_children` **(** :ref:`String` pattern, :ref:`String` type="", :ref:`bool` recursive=true, :ref:`bool` owned=true **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Node` | :ref:`find_parent` **(** :ref:`String` pattern **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Node` | :ref:`get_child` **(** :ref:`int` idx, :ref:`bool` include_internal=false **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_child_count` **(** :ref:`bool` include_internal=false **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Node[]` | :ref:`get_children` **(** :ref:`bool` include_internal=false **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_groups` **(** **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_index` **(** :ref:`bool` include_internal=false **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_multiplayer_authority` **(** **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Node` | :ref:`get_node` **(** :ref:`NodePath` path **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_node_and_resource` **(** :ref:`NodePath` path **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Node` | :ref:`get_node_or_null` **(** :ref:`NodePath` path **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Node` | :ref:`get_parent` **(** **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`NodePath` | :ref:`get_path` **(** **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`NodePath` | :ref:`get_path_to` **(** :ref:`Node` node **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_physics_process_delta_time` **(** **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_process_delta_time` **(** **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_scene_instance_load_placeholder` **(** **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`SceneTree` | :ref:`get_tree` **(** **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Viewport` | :ref:`get_viewport` **(** **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_node` **(** :ref:`NodePath` path **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_node_and_resource` **(** :ref:`NodePath` path **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_ancestor_of` **(** :ref:`Node` node **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_displayed_folded` **(** **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_editable_instance` **(** :ref:`Node` node **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_greater_than` **(** :ref:`Node` node **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_in_group` **(** :ref:`StringName` group **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_inside_tree` **(** **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_multiplayer_authority` **(** **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_physics_processing` **(** **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_physics_processing_internal` **(** **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_processing` **(** **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_processing_input` **(** **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_processing_internal` **(** **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_processing_shortcut_input` **(** **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_processing_unhandled_input` **(** **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_processing_unhandled_key_input` **(** **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`move_child` **(** :ref:`Node` child_node, :ref:`int` to_position **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`print_orphan_nodes` **(** **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`print_tree` **(** **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`print_tree_pretty` **(** **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`propagate_call` **(** :ref:`StringName` method, :ref:`Array` args=[], :ref:`bool` parent_first=false **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`propagate_notification` **(** :ref:`int` what **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`queue_free` **(** **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`raise` **(** **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_and_skip` **(** **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_child` **(** :ref:`Node` node **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_from_group` **(** :ref:`StringName` group **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`replace_by` **(** :ref:`Node` node, :ref:`bool` keep_groups=false **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`request_ready` **(** **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`rpc` **(** :ref:`StringName` method, ... **)** |vararg| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rpc_config` **(** :ref:`StringName` method, :ref:`RPCMode` rpc_mode, :ref:`bool` call_local=false, :ref:`TransferMode` transfer_mode=2, :ref:`int` channel=0 **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`rpc_id` **(** :ref:`int` peer_id, :ref:`StringName` method, ... **)** |vararg| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_display_folded` **(** :ref:`bool` fold **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_editable_instance` **(** :ref:`Node` node, :ref:`bool` is_editable **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_multiplayer_authority` **(** :ref:`int` id, :ref:`bool` recursive=true **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_physics_process` **(** :ref:`bool` enable **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_physics_process_internal` **(** :ref:`bool` enable **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_process` **(** :ref:`bool` enable **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_process_input` **(** :ref:`bool` enable **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_process_internal` **(** :ref:`bool` enable **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_process_shortcut_input` **(** :ref:`bool` enable **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_process_unhandled_input` **(** :ref:`bool` enable **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_process_unhandled_key_input` **(** :ref:`bool` enable **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_scene_instance_load_placeholder` **(** :ref:`bool` load_placeholder **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`update_configuration_warnings` **(** **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_enter_tree` **(** **)** |virtual| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_exit_tree` **(** **)** |virtual| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedStringArray` | :ref:`_get_configuration_warnings` **(** **)** |virtual| |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_input` **(** :ref:`InputEvent` event **)** |virtual| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_physics_process` **(** :ref:`float` delta **)** |virtual| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_process` **(** :ref:`float` delta **)** |virtual| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_ready` **(** **)** |virtual| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_shortcut_input` **(** :ref:`InputEvent` event **)** |virtual| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_unhandled_input` **(** :ref:`InputEvent` event **)** |virtual| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_unhandled_key_input` **(** :ref:`InputEvent` event **)** |virtual| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_child` **(** :ref:`Node` node, :ref:`bool` legible_unique_name=false, :ref:`InternalMode` internal=0 **)** | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_sibling` **(** :ref:`Node` sibling, :ref:`bool` legible_unique_name=false **)** | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_to_group` **(** :ref:`StringName` group, :ref:`bool` persistent=false **)** | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`can_process` **(** **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Tween` | :ref:`create_tween` **(** **)** | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Node` | :ref:`duplicate` **(** :ref:`int` flags=15 **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Node` | :ref:`find_child` **(** :ref:`String` pattern, :ref:`bool` recursive=true, :ref:`bool` owned=true **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Node[]` | :ref:`find_children` **(** :ref:`String` pattern, :ref:`String` type="", :ref:`bool` recursive=true, :ref:`bool` owned=true **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Node` | :ref:`find_parent` **(** :ref:`String` pattern **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Node` | :ref:`get_child` **(** :ref:`int` idx, :ref:`bool` include_internal=false **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_child_count` **(** :ref:`bool` include_internal=false **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Node[]` | :ref:`get_children` **(** :ref:`bool` include_internal=false **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringName[]` | :ref:`get_groups` **(** **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_index` **(** :ref:`bool` include_internal=false **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_multiplayer_authority` **(** **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Node` | :ref:`get_node` **(** :ref:`NodePath` path **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_node_and_resource` **(** :ref:`NodePath` path **)** | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Node` | :ref:`get_node_or_null` **(** :ref:`NodePath` path **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Node` | :ref:`get_parent` **(** **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`NodePath` | :ref:`get_path` **(** **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`NodePath` | :ref:`get_path_to` **(** :ref:`Node` node **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_physics_process_delta_time` **(** **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_process_delta_time` **(** **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_scene_instance_load_placeholder` **(** **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`SceneTree` | :ref:`get_tree` **(** **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Viewport` | :ref:`get_viewport` **(** **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_node` **(** :ref:`NodePath` path **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_node_and_resource` **(** :ref:`NodePath` path **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_ancestor_of` **(** :ref:`Node` node **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_displayed_folded` **(** **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_editable_instance` **(** :ref:`Node` node **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_greater_than` **(** :ref:`Node` node **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_in_group` **(** :ref:`StringName` group **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_inside_tree` **(** **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_multiplayer_authority` **(** **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_physics_processing` **(** **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_physics_processing_internal` **(** **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_processing` **(** **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_processing_input` **(** **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_processing_internal` **(** **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_processing_shortcut_input` **(** **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_processing_unhandled_input` **(** **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_processing_unhandled_key_input` **(** **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`move_child` **(** :ref:`Node` child_node, :ref:`int` to_position **)** | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`print_orphan_nodes` **(** **)** | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`print_tree` **(** **)** | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`print_tree_pretty` **(** **)** | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`propagate_call` **(** :ref:`StringName` method, :ref:`Array` args=[], :ref:`bool` parent_first=false **)** | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`propagate_notification` **(** :ref:`int` what **)** | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`queue_free` **(** **)** | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`raise` **(** **)** | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_and_skip` **(** **)** | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_child` **(** :ref:`Node` node **)** | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_from_group` **(** :ref:`StringName` group **)** | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`replace_by` **(** :ref:`Node` node, :ref:`bool` keep_groups=false **)** | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`request_ready` **(** **)** | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Error` | :ref:`rpc` **(** :ref:`StringName` method, ... **)** |vararg| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`rpc_config` **(** :ref:`StringName` method, :ref:`Variant` config **)** | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Error` | :ref:`rpc_id` **(** :ref:`int` peer_id, :ref:`StringName` method, ... **)** |vararg| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_display_folded` **(** :ref:`bool` fold **)** | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_editable_instance` **(** :ref:`Node` node, :ref:`bool` is_editable **)** | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_multiplayer_authority` **(** :ref:`int` id, :ref:`bool` recursive=true **)** | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_physics_process` **(** :ref:`bool` enable **)** | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_physics_process_internal` **(** :ref:`bool` enable **)** | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_process` **(** :ref:`bool` enable **)** | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_process_input` **(** :ref:`bool` enable **)** | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_process_internal` **(** :ref:`bool` enable **)** | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_process_shortcut_input` **(** :ref:`bool` enable **)** | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_process_unhandled_input` **(** :ref:`bool` enable **)** | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_process_unhandled_key_input` **(** :ref:`bool` enable **)** | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_scene_instance_load_placeholder` **(** :ref:`bool` load_placeholder **)** | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`update_configuration_warnings` **(** **)** | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- @@ -397,7 +397,7 @@ Constants .. _class_Node_constant_NOTIFICATION_UNPARENTED: -.. _class_Node_constant_NOTIFICATION_INSTANCED: +.. _class_Node_constant_NOTIFICATION_SCENE_INSTANTIATED: .. _class_Node_constant_NOTIFICATION_DRAG_BEGIN: @@ -485,7 +485,7 @@ This notification is emitted *after* the related :ref:`tree_exiting`. -\ ``pattern`` does not match against the full path, just against individual node names. It is case-sensitive, with ``"*"`` matching zero or more characters and ``"?"`` matching any single character except ``"."``). +``pattern`` does not match against the full path, just against individual node names. It is case-sensitive, with ``"*"`` matching zero or more characters and ``"?"`` matching any single character except ``"."``). If ``recursive`` is ``true``, all child nodes are included, even if deeply nested. Nodes are checked in tree order, so this node's first direct child is checked first, then its own direct children, etc., before moving to the second direct child, and so on. If ``recursive`` is ``false``, only this node's direct children are matched. @@ -968,9 +968,9 @@ Returns ``null`` if no matching ``Node`` is found. Finds descendants of this node whose name matches ``pattern`` as in :ref:`String.match`, and/or type matches ``type`` as in :ref:`Object.is_class`. -\ ``pattern`` does not match against the full path, just against individual node names. It is case-sensitive, with ``"*"`` matching zero or more characters and ``"?"`` matching any single character except ``"."``). +``pattern`` does not match against the full path, just against individual node names. It is case-sensitive, with ``"*"`` matching zero or more characters and ``"?"`` matching any single character except ``"."``). -\ ``type`` will check equality or inheritance, and is case-sensitive. ``"Object"`` will match a node whose type is ``"Node"`` but not the other way around. +``type`` will check equality or inheritance, and is case-sensitive. ``"Object"`` will match a node whose type is ``"Node"`` but not the other way around. If ``recursive`` is ``true``, all child nodes are included, even if deeply nested. Nodes are checked in tree order, so this node's first direct child is checked first, then its own direct children, etc., before moving to the second direct child, and so on. If ``recursive`` is ``false``, only this node's direct children are matched. @@ -990,7 +990,7 @@ Returns an empty array if no matching nodes are found. Finds the first parent of the current node whose name matches ``pattern`` as in :ref:`String.match`. -\ ``pattern`` does not match against the full path, just against individual node names. It is case-sensitive, with ``"*"`` matching zero or more characters and ``"?"`` matching any single character except ``"."``). +``pattern`` does not match against the full path, just against individual node names. It is case-sensitive, with ``"*"`` matching zero or more characters and ``"?"`` matching any single character except ``"."``). \ **Note:** As this method walks upwards in the scene tree, it can be slow in large, deeply nested scene trees. Whenever possible, consider using :ref:`get_node` with unique names instead (see :ref:`unique_name_in_owner`), or caching the node references into variable. @@ -1004,7 +1004,7 @@ Returns a child node by its index (see :ref:`get_child_count`). +If ``include_internal`` is ``false``, internal children are skipped (see ``internal`` parameter in :ref:`add_child`). To access a child node via its name, use :ref:`get_node`. @@ -1032,7 +1032,7 @@ If ``include_internal`` is ``false``, the returned array won't include internal .. _class_Node_method_get_groups: -- :ref:`Array` **get_groups** **(** **)** |const| +- :ref:`StringName[]` **get_groups** **(** **)** |const| Returns an array listing the groups that the node is a member of. @@ -1489,7 +1489,7 @@ Requests that ``_ready`` be called again. Note that the method won't be called i .. _class_Node_method_rpc: -- void **rpc** **(** :ref:`StringName` method, ... **)** |vararg| +- :ref:`Error` **rpc** **(** :ref:`StringName` method, ... **)** |vararg| Sends a remote procedure call request for the given ``method`` to peers on the network (and locally), optionally sending all additional arguments as arguments to the method called by the RPC. The call request will only be received by nodes with the same :ref:`NodePath`, including the exact same node name. Behaviour depends on the RPC configuration for the given method, see :ref:`rpc_config`. Methods are not exposed to RPCs by default. Returns ``null``. @@ -1499,15 +1499,26 @@ Sends a remote procedure call request for the given ``method`` to peers on the n .. _class_Node_method_rpc_config: -- :ref:`int` **rpc_config** **(** :ref:`StringName` method, :ref:`RPCMode` rpc_mode, :ref:`bool` call_local=false, :ref:`TransferMode` transfer_mode=2, :ref:`int` channel=0 **)** +- void **rpc_config** **(** :ref:`StringName` method, :ref:`Variant` config **)** -Changes the RPC mode for the given ``method`` to the given ``rpc_mode``, optionally specifying the ``transfer_mode`` and ``channel`` (on supported peers). See :ref:`RPCMode` and :ref:`TransferMode`. An alternative is annotating methods and properties with the corresponding annotation (``@rpc(any)``, ``@rpc(authority)``). By default, methods are not exposed to networking (and RPCs). +Changes the RPC mode for the given ``method`` with the given ``config`` which should be ``null`` (to disable) or a :ref:`Dictionary` in the form: + +:: + + { + rpc_mode = MultiplayerAPI.RPCMode, + transfer_mode = MultiplayerPeer.TranferMode, + call_local = false, + channel = 0, + } + +See :ref:`RPCMode` and :ref:`TransferMode`. An alternative is annotating methods and properties with the corresponding annotation (``@rpc(any)``, ``@rpc(authority)``). By default, methods are not exposed to networking (and RPCs). ---- .. _class_Node_method_rpc_id: -- void **rpc_id** **(** :ref:`int` peer_id, :ref:`StringName` method, ... **)** |vararg| +- :ref:`Error` **rpc_id** **(** :ref:`int` peer_id, :ref:`StringName` method, ... **)** |vararg| Sends a :ref:`rpc` to a specific peer identified by ``peer_id`` (see :ref:`MultiplayerPeer.set_target_peer`). Returns ``null``. diff --git a/classes/class_node2d.rst b/classes/class_node2d.rst index d7acb424b..cb69f01ad 100644 --- a/classes/class_node2d.rst +++ b/classes/class_node2d.rst @@ -12,7 +12,7 @@ Node2D **Inherits:** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`AnimatedSprite2D`, :ref:`AudioListener2D`, :ref:`AudioStreamPlayer2D`, :ref:`BackBufferCopy`, :ref:`Bone2D`, :ref:`CPUParticles2D`, :ref:`Camera2D`, :ref:`CanvasGroup`, :ref:`CanvasModulate`, :ref:`CollisionObject2D`, :ref:`CollisionPolygon2D`, :ref:`CollisionShape2D`, :ref:`GPUParticles2D`, :ref:`Joint2D`, :ref:`Light2D`, :ref:`LightOccluder2D`, :ref:`Line2D`, :ref:`MeshInstance2D`, :ref:`MultiMeshInstance2D`, :ref:`NavigationRegion2D`, :ref:`ParallaxLayer`, :ref:`Path2D`, :ref:`PathFollow2D`, :ref:`Polygon2D`, :ref:`Position2D`, :ref:`RayCast2D`, :ref:`RemoteTransform2D`, :ref:`ShapeCast2D`, :ref:`Skeleton2D`, :ref:`Sprite2D`, :ref:`TileMap`, :ref:`TouchScreenButton`, :ref:`VisibleOnScreenNotifier2D` +**Inherited By:** :ref:`AnimatedSprite2D`, :ref:`AudioListener2D`, :ref:`AudioStreamPlayer2D`, :ref:`BackBufferCopy`, :ref:`Bone2D`, :ref:`CPUParticles2D`, :ref:`Camera2D`, :ref:`CanvasGroup`, :ref:`CanvasModulate`, :ref:`CollisionObject2D`, :ref:`CollisionPolygon2D`, :ref:`CollisionShape2D`, :ref:`GPUParticles2D`, :ref:`Joint2D`, :ref:`Light2D`, :ref:`LightOccluder2D`, :ref:`Line2D`, :ref:`Marker2D`, :ref:`MeshInstance2D`, :ref:`MultiMeshInstance2D`, :ref:`NavigationRegion2D`, :ref:`ParallaxLayer`, :ref:`Path2D`, :ref:`PathFollow2D`, :ref:`Polygon2D`, :ref:`RayCast2D`, :ref:`RemoteTransform2D`, :ref:`ShapeCast2D`, :ref:`Skeleton2D`, :ref:`Sprite2D`, :ref:`TileMap`, :ref:`TouchScreenButton`, :ref:`VisibleOnScreenNotifier2D` A 2D game object, inherited by all 2D-related nodes. Has a position, rotation, scale, and Z index. diff --git a/classes/class_node3d.rst b/classes/class_node3d.rst index 01a0fa329..a0b4eb629 100644 --- a/classes/class_node3d.rst +++ b/classes/class_node3d.rst @@ -12,7 +12,7 @@ Node3D **Inherits:** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`AudioListener3D`, :ref:`AudioStreamPlayer3D`, :ref:`BoneAttachment3D`, :ref:`Camera3D`, :ref:`CollisionObject3D`, :ref:`CollisionPolygon3D`, :ref:`CollisionShape3D`, :ref:`GridMap`, :ref:`ImporterMeshInstance3D`, :ref:`Joint3D`, :ref:`LightmapProbe`, :ref:`NavigationRegion3D`, :ref:`OccluderInstance3D`, :ref:`Path3D`, :ref:`PathFollow3D`, :ref:`Position3D`, :ref:`RayCast3D`, :ref:`RemoteTransform3D`, :ref:`Skeleton3D`, :ref:`SpringArm3D`, :ref:`VehicleWheel3D`, :ref:`VisualInstance3D`, :ref:`XRNode3D`, :ref:`XROrigin3D` +**Inherited By:** :ref:`AudioListener3D`, :ref:`AudioStreamPlayer3D`, :ref:`BoneAttachment3D`, :ref:`Camera3D`, :ref:`CollisionObject3D`, :ref:`CollisionPolygon3D`, :ref:`CollisionShape3D`, :ref:`GridMap`, :ref:`ImporterMeshInstance3D`, :ref:`Joint3D`, :ref:`LightmapProbe`, :ref:`Marker3D`, :ref:`NavigationRegion3D`, :ref:`OccluderInstance3D`, :ref:`Path3D`, :ref:`PathFollow3D`, :ref:`RayCast3D`, :ref:`RemoteTransform3D`, :ref:`ShapeCast3D`, :ref:`Skeleton3D`, :ref:`SpringArm3D`, :ref:`VehicleWheel3D`, :ref:`VisualInstance3D`, :ref:`XRNode3D`, :ref:`XROrigin3D` Most basic 3D game object, parent of all 3D-related nodes. @@ -23,7 +23,7 @@ Most basic 3D game object, with a 3D :ref:`Transform3D` and v Affine operations (rotate, scale, translate) happen in parent's local coordinate system, unless the ``Node3D`` object is set as top-level. Affine operations in this coordinate system correspond to direct affine operations on the ``Node3D``'s transform. The word local below refers to this coordinate system. The coordinate system that is attached to the ``Node3D`` object itself is referred to as object-local coordinate system. -\ **Note:** Unless otherwise specified, all methods that have angle parameters must have angles specified as *radians*. To convert degrees to radians, use :ref:`@GlobalScope.deg2rad`. +\ **Note:** Unless otherwise specified, all methods that have angle parameters must have angles specified as *radians*. To convert degrees to radians, use :ref:`@GlobalScope.deg_to_rad`. Tutorials --------- @@ -68,83 +68,79 @@ Properties Methods ------- -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_gizmo` **(** :ref:`Node3DGizmo` gizmo **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_gizmos` **(** **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_subgizmo_selection` **(** **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`force_update_transform` **(** **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_gizmos` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Node3D` | :ref:`get_parent_node_3d` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`World3D` | :ref:`get_world_3d` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`global_rotate` **(** :ref:`Vector3` axis, :ref:`float` angle **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`global_scale` **(** :ref:`Vector3` scale **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`global_translate` **(** :ref:`Vector3` offset **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`hide` **(** **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_local_transform_notification_enabled` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_scale_disabled` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_transform_notification_enabled` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_visible_in_tree` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`look_at` **(** :ref:`Vector3` target, :ref:`Vector3` up=Vector3(0, 1, 0) **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`look_at_from_position` **(** :ref:`Vector3` position, :ref:`Vector3` target, :ref:`Vector3` up=Vector3(0, 1, 0) **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`orthonormalize` **(** **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`property_can_revert` **(** :ref:`String` name **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`property_get_revert` **(** :ref:`String` name **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`rotate` **(** :ref:`Vector3` axis, :ref:`float` angle **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`rotate_object_local` **(** :ref:`Vector3` axis, :ref:`float` angle **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`rotate_x` **(** :ref:`float` angle **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`rotate_y` **(** :ref:`float` angle **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`rotate_z` **(** :ref:`float` angle **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`scale_object_local` **(** :ref:`Vector3` scale **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_disable_scale` **(** :ref:`bool` disable **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_identity` **(** **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_ignore_transform_notification` **(** :ref:`bool` enabled **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_notify_local_transform` **(** :ref:`bool` enable **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_notify_transform` **(** :ref:`bool` enable **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_subgizmo_selection` **(** :ref:`Node3DGizmo` gizmo, :ref:`int` id, :ref:`Transform3D` transform **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`show` **(** **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`to_global` **(** :ref:`Vector3` local_point **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`to_local` **(** :ref:`Vector3` global_point **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`translate` **(** :ref:`Vector3` offset **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`translate_object_local` **(** :ref:`Vector3` offset **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`update_gizmos` **(** **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_gizmo` **(** :ref:`Node3DGizmo` gizmo **)** | ++-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_gizmos` **(** **)** | ++-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_subgizmo_selection` **(** **)** | ++-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`force_update_transform` **(** **)** | ++-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Node3DGizmo[]` | :ref:`get_gizmos` **(** **)** |const| | ++-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Node3D` | :ref:`get_parent_node_3d` **(** **)** |const| | ++-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`World3D` | :ref:`get_world_3d` **(** **)** |const| | ++-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`global_rotate` **(** :ref:`Vector3` axis, :ref:`float` angle **)** | ++-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`global_scale` **(** :ref:`Vector3` scale **)** | ++-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`global_translate` **(** :ref:`Vector3` offset **)** | ++-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`hide` **(** **)** | ++-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_local_transform_notification_enabled` **(** **)** |const| | ++-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_scale_disabled` **(** **)** |const| | ++-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_transform_notification_enabled` **(** **)** |const| | ++-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_visible_in_tree` **(** **)** |const| | ++-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`look_at` **(** :ref:`Vector3` target, :ref:`Vector3` up=Vector3(0, 1, 0) **)** | ++-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`look_at_from_position` **(** :ref:`Vector3` position, :ref:`Vector3` target, :ref:`Vector3` up=Vector3(0, 1, 0) **)** | ++-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`orthonormalize` **(** **)** | ++-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`rotate` **(** :ref:`Vector3` axis, :ref:`float` angle **)** | ++-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`rotate_object_local` **(** :ref:`Vector3` axis, :ref:`float` angle **)** | ++-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`rotate_x` **(** :ref:`float` angle **)** | ++-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`rotate_y` **(** :ref:`float` angle **)** | ++-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`rotate_z` **(** :ref:`float` angle **)** | ++-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`scale_object_local` **(** :ref:`Vector3` scale **)** | ++-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_disable_scale` **(** :ref:`bool` disable **)** | ++-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_identity` **(** **)** | ++-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_ignore_transform_notification` **(** :ref:`bool` enabled **)** | ++-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_notify_local_transform` **(** :ref:`bool` enable **)** | ++-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_notify_transform` **(** :ref:`bool` enable **)** | ++-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_subgizmo_selection` **(** :ref:`Node3DGizmo` gizmo, :ref:`int` id, :ref:`Transform3D` transform **)** | ++-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`show` **(** **)** | ++-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`to_global` **(** :ref:`Vector3` local_point **)** |const| | ++-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`to_local` **(** :ref:`Vector3` global_point **)** |const| | ++-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`translate` **(** :ref:`Vector3` offset **)** | ++-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`translate_object_local` **(** :ref:`Vector3` offset **)** | ++-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`update_gizmos` **(** **)** | ++-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- @@ -483,7 +479,7 @@ Forces the transform to update. Transform changes in physics are not instant for .. _class_Node3D_method_get_gizmos: -- :ref:`Array` **get_gizmos** **(** **)** |const| +- :ref:`Node3DGizmo[]` **get_gizmos** **(** **)** |const| Returns all the gizmos attached to this ``Node3D``. @@ -599,22 +595,6 @@ Resets this node's transformations (like scale, skew and taper) preserving its r ---- -.. _class_Node3D_method_property_can_revert: - -- :ref:`bool` **property_can_revert** **(** :ref:`String` name **)** - -Returns ``true`` if the property identified by ``name`` can be reverted to a default value. - ----- - -.. _class_Node3D_method_property_get_revert: - -- :ref:`Variant` **property_get_revert** **(** :ref:`String` name **)** - -Returns the default value of the Node3D property with given ``name``. - ----- - .. _class_Node3D_method_rotate: - void **rotate** **(** :ref:`Vector3` axis, :ref:`float` angle **)** diff --git a/classes/class_noisetexture.rst b/classes/class_noisetexture2d.rst similarity index 78% rename from classes/class_noisetexture.rst rename to classes/class_noisetexture2d.rst index 509115313..57c1c6ebc 100644 --- a/classes/class_noisetexture.rst +++ b/classes/class_noisetexture2d.rst @@ -3,12 +3,12 @@ .. 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/modules/noise/doc_classes/NoiseTexture.xml. +.. XML source: https://github.com/godotengine/godot/tree/master/modules/noise/doc_classes/NoiseTexture2D.xml. -.. _class_NoiseTexture: +.. _class_NoiseTexture2D: -NoiseTexture -============ +NoiseTexture2D +============== **Inherits:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` @@ -19,13 +19,13 @@ Description Uses :ref:`FastNoiseLite` or other libraries to fill the texture data of your desired size. -NoiseTexture can also generate normalmap textures. +NoiseTexture2D can also generate normalmap textures. The class uses :ref:`Thread`\ s to generate the texture data internally, so :ref:`Texture2D.get_image` may return ``null`` if the generation process has not completed yet. In that case, you need to wait for the texture to be generated before accessing the image and the generated byte data: :: - var texture = NoiseTexture.new() + var texture = NoiseTexture2D.new() texture.noise = FastNoiseLite.new() await texture.changed var image = texture.get_image() @@ -34,34 +34,34 @@ The class uses :ref:`Thread`\ s to generate the texture data inter Properties ---------- -+---------------------------------+-------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`as_normal_map` | ``false`` | -+---------------------------------+-------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`bump_strength` | ``8.0`` | -+---------------------------------+-------------------------------------------------------------------------------+-----------+ -| :ref:`Gradient` | :ref:`color_ramp` | | -+---------------------------------+-------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`generate_mipmaps` | ``true`` | -+---------------------------------+-------------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`height` | ``512`` | -+---------------------------------+-------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`in_3d_space` | ``false`` | -+---------------------------------+-------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`invert` | ``false`` | -+---------------------------------+-------------------------------------------------------------------------------+-----------+ -| :ref:`Noise` | :ref:`noise` | | -+---------------------------------+-------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`seamless` | ``false`` | -+---------------------------------+-------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`seamless_blend_skirt` | ``0.1`` | -+---------------------------------+-------------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`width` | ``512`` | -+---------------------------------+-------------------------------------------------------------------------------+-----------+ ++---------------------------------+---------------------------------------------------------------------------------+-----------+ +| :ref:`bool` | :ref:`as_normal_map` | ``false`` | ++---------------------------------+---------------------------------------------------------------------------------+-----------+ +| :ref:`float` | :ref:`bump_strength` | ``8.0`` | ++---------------------------------+---------------------------------------------------------------------------------+-----------+ +| :ref:`Gradient` | :ref:`color_ramp` | | ++---------------------------------+---------------------------------------------------------------------------------+-----------+ +| :ref:`bool` | :ref:`generate_mipmaps` | ``true`` | ++---------------------------------+---------------------------------------------------------------------------------+-----------+ +| :ref:`int` | :ref:`height` | ``512`` | ++---------------------------------+---------------------------------------------------------------------------------+-----------+ +| :ref:`bool` | :ref:`in_3d_space` | ``false`` | ++---------------------------------+---------------------------------------------------------------------------------+-----------+ +| :ref:`bool` | :ref:`invert` | ``false`` | ++---------------------------------+---------------------------------------------------------------------------------+-----------+ +| :ref:`Noise` | :ref:`noise` | | ++---------------------------------+---------------------------------------------------------------------------------+-----------+ +| :ref:`bool` | :ref:`seamless` | ``false`` | ++---------------------------------+---------------------------------------------------------------------------------+-----------+ +| :ref:`float` | :ref:`seamless_blend_skirt` | ``0.1`` | ++---------------------------------+---------------------------------------------------------------------------------+-----------+ +| :ref:`int` | :ref:`width` | ``512`` | ++---------------------------------+---------------------------------------------------------------------------------+-----------+ Property Descriptions --------------------- -.. _class_NoiseTexture_property_as_normal_map: +.. _class_NoiseTexture2D_property_as_normal_map: - :ref:`bool` **as_normal_map** @@ -77,7 +77,7 @@ If ``true``, the resulting texture contains a normal map created from the origin ---- -.. _class_NoiseTexture_property_bump_strength: +.. _class_NoiseTexture2D_property_bump_strength: - :ref:`float` **bump_strength** @@ -93,7 +93,7 @@ Strength of the bump maps used in this texture. A higher value will make the bum ---- -.. _class_NoiseTexture_property_color_ramp: +.. _class_NoiseTexture2D_property_color_ramp: - :ref:`Gradient` **color_ramp** @@ -107,7 +107,7 @@ A :ref:`Gradient` which is used to map the luminance of each pix ---- -.. _class_NoiseTexture_property_generate_mipmaps: +.. _class_NoiseTexture2D_property_generate_mipmaps: - :ref:`bool` **generate_mipmaps** @@ -127,7 +127,7 @@ Requires (anisotropic) mipmap filtering to be enabled for a material to have an ---- -.. _class_NoiseTexture_property_height: +.. _class_NoiseTexture2D_property_height: - :ref:`int` **height** @@ -143,7 +143,7 @@ Height of the generated texture. ---- -.. _class_NoiseTexture_property_in_3d_space: +.. _class_NoiseTexture2D_property_in_3d_space: - :ref:`bool` **in_3d_space** @@ -159,7 +159,7 @@ Determines whether the noise image is calculated in 3D space. May result in redu ---- -.. _class_NoiseTexture_property_invert: +.. _class_NoiseTexture2D_property_invert: - :ref:`bool` **invert** @@ -175,7 +175,7 @@ If ``true``, inverts the noise texture. White becomes black, black becomes white ---- -.. _class_NoiseTexture_property_noise: +.. _class_NoiseTexture2D_property_noise: - :ref:`Noise` **noise** @@ -189,7 +189,7 @@ The instance of the :ref:`Noise` object. ---- -.. _class_NoiseTexture_property_seamless: +.. _class_NoiseTexture2D_property_seamless: - :ref:`bool` **seamless** @@ -207,7 +207,7 @@ If ``true``, a seamless texture is requested from the :ref:`Noise` ---- -.. _class_NoiseTexture_property_seamless_blend_skirt: +.. _class_NoiseTexture2D_property_seamless_blend_skirt: - :ref:`float` **seamless_blend_skirt** @@ -223,7 +223,7 @@ Used for the default/fallback implementation of the seamless texture generation. ---- -.. _class_NoiseTexture_property_width: +.. _class_NoiseTexture2D_property_width: - :ref:`int` **width** diff --git a/classes/class_object.rst b/classes/class_object.rst index d5efc5c80..1b23885eb 100644 --- a/classes/class_object.rst +++ b/classes/class_object.rst @@ -10,7 +10,7 @@ Object ====== -**Inherited By:** :ref:`AudioServer`, :ref:`CameraServer`, :ref:`ClassDB`, :ref:`DisplayServer`, :ref:`EditorFileSystemDirectory`, :ref:`EditorPaths`, :ref:`EditorSelection`, :ref:`EditorVCSInterface`, :ref:`Engine`, :ref:`EngineDebugger`, :ref:`Geometry2D`, :ref:`Geometry3D`, :ref:`GodotSharp`, :ref:`IP`, :ref:`Input`, :ref:`InputMap`, :ref:`JNISingleton`, :ref:`JSONRPC`, :ref:`JavaClassWrapper`, :ref:`JavaScript`, :ref:`MainLoop`, :ref:`Marshalls`, :ref:`MovieWriter`, :ref:`NativeExtensionManager`, :ref:`NavigationMeshGenerator`, :ref:`NavigationServer2D`, :ref:`NavigationServer3D`, :ref:`Node`, :ref:`OS`, :ref:`Performance`, :ref:`PhysicsDirectBodyState2D`, :ref:`PhysicsDirectBodyState3D`, :ref:`PhysicsDirectSpaceState2D`, :ref:`PhysicsDirectSpaceState3D`, :ref:`PhysicsServer2D`, :ref:`PhysicsServer3D`, :ref:`PhysicsServer3DRenderingServerHandler`, :ref:`ProjectSettings`, :ref:`RefCounted`, :ref:`RenderingDevice`, :ref:`RenderingServer`, :ref:`ResourceLoader`, :ref:`ResourceSaver`, :ref:`ResourceUID`, :ref:`ScriptLanguage`, :ref:`TextServerManager`, :ref:`TileData`, :ref:`Time`, :ref:`TranslationServer`, :ref:`TreeItem`, :ref:`UndoRedo`, :ref:`VisualScriptCustomNodes`, :ref:`WorkerThreadPool`, :ref:`XRServer` +**Inherited By:** :ref:`AudioServer`, :ref:`CameraServer`, :ref:`ClassDB`, :ref:`DisplayServer`, :ref:`EditorFileSystemDirectory`, :ref:`EditorPaths`, :ref:`EditorSelection`, :ref:`EditorVCSInterface`, :ref:`Engine`, :ref:`EngineDebugger`, :ref:`Geometry2D`, :ref:`Geometry3D`, :ref:`GodotSharp`, :ref:`IP`, :ref:`Input`, :ref:`InputMap`, :ref:`JNISingleton`, :ref:`JSONRPC`, :ref:`JavaClassWrapper`, :ref:`JavaScript`, :ref:`MainLoop`, :ref:`Marshalls`, :ref:`MovieWriter`, :ref:`NativeExtensionManager`, :ref:`NavigationMeshGenerator`, :ref:`NavigationServer2D`, :ref:`NavigationServer3D`, :ref:`Node`, :ref:`OS`, :ref:`Performance`, :ref:`PhysicsDirectBodyState2D`, :ref:`PhysicsDirectBodyState3D`, :ref:`PhysicsDirectSpaceState2D`, :ref:`PhysicsDirectSpaceState3D`, :ref:`PhysicsServer2D`, :ref:`PhysicsServer3D`, :ref:`PhysicsServer3DRenderingServerHandler`, :ref:`ProjectSettings`, :ref:`RefCounted`, :ref:`RenderingDevice`, :ref:`RenderingServer`, :ref:`ResourceLoader`, :ref:`ResourceSaver`, :ref:`ResourceUID`, :ref:`ScriptLanguage`, :ref:`TextServerManager`, :ref:`ThemeDB`, :ref:`TileData`, :ref:`Time`, :ref:`TranslationServer`, :ref:`TreeItem`, :ref:`UndoRedo`, :ref:`WorkerThreadPool`, :ref:`XRServer` Base class for all non-built-in types. @@ -19,7 +19,7 @@ Description Every class which is not a built-in type inherits from this class. -You can construct Objects from scripting languages, using ``Object.new()`` in GDScript, ``new Object`` in C#, or the "Construct Object" node in VisualScript. +You can construct Objects from scripting languages, using ``Object.new()`` in GDScript, or ``new Object`` in C#. Objects do not manage memory. If a class inherits from Object, you will have to delete instances of it manually. To do so, call the :ref:`free` method from your script or delete the instance from C++. @@ -69,12 +69,16 @@ Methods +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`_get` **(** :ref:`StringName` property **)** |virtual| | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`_get_property_list` **(** **)** |virtual| | +| :ref:`Dictionary[]` | :ref:`_get_property_list` **(** **)** |virtual| | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_init` **(** **)** |virtual| | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_notification` **(** :ref:`int` what **)** |virtual| | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_property_can_revert` **(** :ref:`StringName` property **)** |virtual| | ++---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`_property_get_revert` **(** :ref:`StringName` property **)** |virtual| | ++---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`_set` **(** :ref:`StringName` property, :ref:`Variant` value **)** |virtual| | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`_to_string` **(** **)** |virtual| | @@ -89,7 +93,7 @@ Methods +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`can_translate_messages` **(** **)** |const| | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`connect` **(** :ref:`StringName` signal, :ref:`Callable` callable, :ref:`Array` binds=[], :ref:`int` flags=0 **)** | +| :ref:`Error` | :ref:`connect` **(** :ref:`StringName` signal, :ref:`Callable` callable, :ref:`int` flags=0 **)** | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`disconnect` **(** :ref:`StringName` signal, :ref:`Callable` callable **)** | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -101,7 +105,7 @@ Methods +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_class` **(** **)** |const| | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_incoming_connections` **(** **)** |const| | +| :ref:`Dictionary[]` | :ref:`get_incoming_connections` **(** **)** |const| | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`get_indexed` **(** :ref:`NodePath` property **)** |const| | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -111,15 +115,15 @@ Methods +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`get_meta_list` **(** **)** |const| | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_method_list` **(** **)** |const| | +| :ref:`Dictionary[]` | :ref:`get_method_list` **(** **)** |const| | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_property_list` **(** **)** |const| | +| :ref:`Dictionary[]` | :ref:`get_property_list` **(** **)** |const| | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`get_script` **(** **)** |const| | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_signal_connection_list` **(** :ref:`StringName` signal **)** |const| | +| :ref:`Dictionary[]` | :ref:`get_signal_connection_list` **(** :ref:`StringName` signal **)** |const| | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_signal_list` **(** **)** |const| | +| :ref:`Dictionary[]` | :ref:`get_signal_list` **(** **)** |const| | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_meta` **(** :ref:`StringName` name **)** |const| | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -228,7 +232,7 @@ Returns the given property. Returns ``null`` if the ``property`` does not exist. .. _class_Object_method__get_property_list: -- :ref:`Array` **_get_property_list** **(** **)** |virtual| +- :ref:`Dictionary[]` **_get_property_list** **(** **)** |virtual| Virtual method which can be overridden to customize the return value of :ref:`get_property_list`. @@ -256,6 +260,26 @@ Called whenever the object receives a notification, which is identified in ``wha ---- +.. _class_Object_method__property_can_revert: + +- :ref:`bool` **_property_can_revert** **(** :ref:`StringName` property **)** |virtual| + +Virtual methods that can be overridden to customize the property revert behavior in the editor. + +Returns ``true`` if the property identified by ``name`` can be reverted to a default value. Override :ref:`_property_get_revert` to return the actual value. + +---- + +.. _class_Object_method__property_get_revert: + +- :ref:`Variant` **_property_get_revert** **(** :ref:`StringName` property **)** |virtual| + +Virtual methods that can be overridden to customize the property revert behavior in the editor. + +Returns the default value of the property identified by ``name``. :ref:`_property_can_revert` must be overridden as well for this method to be called. + +---- + .. _class_Object_method__set: - :ref:`bool` **_set** **(** :ref:`StringName` property, :ref:`Variant` value **)** |virtual| @@ -367,11 +391,9 @@ Returns ``true`` if the object can translate strings. See :ref:`set_message_tran .. _class_Object_method_connect: -- :ref:`Error` **connect** **(** :ref:`StringName` signal, :ref:`Callable` callable, :ref:`Array` binds=[], :ref:`int` flags=0 **)** +- :ref:`Error` **connect** **(** :ref:`StringName` signal, :ref:`Callable` callable, :ref:`int` flags=0 **)** -Connects a ``signal`` to a ``callable``. Pass optional ``binds`` to the call as an :ref:`Array` of parameters. These parameters will be passed to the :ref:`Callable`'s method after any parameter used in the call to :ref:`emit_signal`. Use ``flags`` to set deferred or one-shot connections. See :ref:`ConnectFlags` constants. - -\ **Note:** This method is the legacy implementation for connecting signals. The recommended modern approach is to use :ref:`Signal.connect` and to use :ref:`Callable.bind` to add and validate parameter binds. Both syntaxes are shown below. +Connects a ``signal`` to a ``callable``. Use ``flags`` to set deferred or one-shot connections. See :ref:`ConnectFlags` constants. A signal can only be connected once to a :ref:`Callable`. It will print an error if already connected, unless the signal was connected with :ref:`CONNECT_REFERENCE_COUNTED`. To avoid this, first, use :ref:`is_connected` to check for existing connections. @@ -595,7 +617,7 @@ Returns the object's class as a :ref:`String`. See also :ref:`is_c .. _class_Object_method_get_incoming_connections: -- :ref:`Array` **get_incoming_connections** **(** **)** |const| +- :ref:`Dictionary[]` **get_incoming_connections** **(** **)** |const| Returns an :ref:`Array` of dictionaries with information about signals that are connected to the object. @@ -635,7 +657,9 @@ This ID can be saved in :ref:`EncodedObjectAsID`, and c Returns the object's metadata entry for the given ``name``. -Throws error if the entry does not exist, unless ``default`` is not ``null`` (in which case the default value will be returned). +Throws error if the entry does not exist, unless ``default`` is not ``null`` (in which case the default value will be returned). See also :ref:`has_meta`, :ref:`set_meta` and :ref:`remove_meta`. + +\ **Note:** Metadata that has a ``name`` starting with an underscore (``_``) is considered editor-only. Editor-only metadata is not displayed in the inspector and should not be edited. ---- @@ -649,7 +673,7 @@ Returns the object's metadata as a :ref:`PackedStringArray` **get_method_list** **(** **)** |const| +- :ref:`Dictionary[]` **get_method_list** **(** **)** |const| Returns the object's methods and their signatures as an :ref:`Array`. @@ -657,7 +681,7 @@ Returns the object's methods and their signatures as an :ref:`Array .. _class_Object_method_get_property_list: -- :ref:`Array` **get_property_list** **(** **)** |const| +- :ref:`Dictionary[]` **get_property_list** **(** **)** |const| Returns the object's property list as an :ref:`Array` of dictionaries. @@ -675,7 +699,7 @@ Returns the object's :ref:`Script` instance, or ``null`` if none i .. _class_Object_method_get_signal_connection_list: -- :ref:`Array` **get_signal_connection_list** **(** :ref:`StringName` signal **)** |const| +- :ref:`Dictionary[]` **get_signal_connection_list** **(** :ref:`StringName` signal **)** |const| Returns an :ref:`Array` of connections for the given ``signal``. @@ -683,7 +707,7 @@ Returns an :ref:`Array` of connections for the given ``signal``. .. _class_Object_method_get_signal_list: -- :ref:`Array` **get_signal_list** **(** **)** |const| +- :ref:`Dictionary[]` **get_signal_list** **(** **)** |const| Returns the list of signals as an :ref:`Array` of dictionaries. @@ -693,7 +717,9 @@ Returns the list of signals as an :ref:`Array` of dictionaries. - :ref:`bool` **has_meta** **(** :ref:`StringName` name **)** |const| -Returns ``true`` if a metadata entry is found with the given ``name``. +Returns ``true`` if a metadata entry is found with the given ``name``. See also :ref:`get_meta`, :ref:`set_meta` and :ref:`remove_meta`. + +\ **Note:** Metadata that has a ``name`` starting with an underscore (``_``) is considered editor-only. Editor-only metadata is not displayed in the inspector and should not be edited. ---- @@ -777,7 +803,9 @@ Notify the editor that the property list has changed by emitting the :ref:`prope - void **remove_meta** **(** :ref:`StringName` name **)** -Removes a given entry from the object's metadata. See also :ref:`set_meta`. +Removes a given entry from the object's metadata. See also :ref:`has_meta`, :ref:`get_meta` and :ref:`set_meta`. + +\ **Note:** Metadata that has a ``name`` starting with an underscore (``_``) is considered editor-only. Editor-only metadata is not displayed in the inspector and should not be edited. ---- @@ -850,7 +878,9 @@ Defines whether the object can translate strings (with calls to :ref:`tr` value. -To remove a given entry from the object's metadata, use :ref:`remove_meta`. Metadata is also removed if its value is set to ``null``. This means you can also use ``set_meta("name", null)`` to remove metadata for ``"name"``. +To remove a given entry from the object's metadata, use :ref:`remove_meta`. Metadata is also removed if its value is set to ``null``. This means you can also use ``set_meta("name", null)`` to remove metadata for ``"name"``. See also :ref:`has_meta` and :ref:`get_meta`. + +\ **Note:** Metadata that has a ``name`` starting with an underscore (``_``) is considered editor-only. Editor-only metadata is not displayed in the inspector and should not be edited. ---- diff --git a/classes/class_occluderinstance3d.rst b/classes/class_occluderinstance3d.rst index 4052fc05c..230d6429d 100644 --- a/classes/class_occluderinstance3d.rst +++ b/classes/class_occluderinstance3d.rst @@ -62,7 +62,7 @@ Property Descriptions | *Getter* | get_bake_mask() | +-----------+----------------------+ -The visual layers to account for when baking for occluders. Only :ref:`MeshInstance3D`\ s whose :ref:`VisualInstance3D.layers` match with this :ref:`bake_mask` will be included in the generated occluder mesh. By default, all objects are taken into account for the occluder baking. +The visual layers to account for when baking for occluders. Only :ref:`MeshInstance3D`\ s whose :ref:`VisualInstance3D.layers` match with this :ref:`bake_mask` will be included in the generated occluder mesh. By default, all objects with *opaque* materials are taken into account for the occluder baking. To improve performance and avoid artifacts, it is recommended to exclude dynamic objects, small objects and fixtures from the baking process by moving them to a separate visual layer and excluding this layer in :ref:`bake_mask`. diff --git a/classes/class_oggpacketsequence.rst b/classes/class_oggpacketsequence.rst index fbcd69208..3efdb7887 100644 --- a/classes/class_oggpacketsequence.rst +++ b/classes/class_oggpacketsequence.rst @@ -3,44 +3,44 @@ .. 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/modules/ogg/doc_classes/OGGPacketSequence.xml. +.. XML source: https://github.com/godotengine/godot/tree/master/modules/ogg/doc_classes/OggPacketSequence.xml. -.. _class_OGGPacketSequence: +.. _class_OggPacketSequence: -OGGPacketSequence +OggPacketSequence ================= **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -A sequence of OGG packets. +A sequence of Ogg packets. Description ----------- -A sequence of OGG packets. +A sequence of Ogg packets. Properties ---------- +---------------------------+------------------------------------------------------------------------------+---------+ -| :ref:`Array` | :ref:`granule_positions` | ``[]`` | +| :ref:`Array` | :ref:`granule_positions` | ``[]`` | +---------------------------+------------------------------------------------------------------------------+---------+ -| :ref:`Array` | :ref:`packet_data` | ``[]`` | +| :ref:`Array` | :ref:`packet_data` | ``[]`` | +---------------------------+------------------------------------------------------------------------------+---------+ -| :ref:`float` | :ref:`sampling_rate` | ``0.0`` | +| :ref:`float` | :ref:`sampling_rate` | ``0.0`` | +---------------------------+------------------------------------------------------------------------------+---------+ Methods ------- +---------------------------+----------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_length` **(** **)** |const| | +| :ref:`float` | :ref:`get_length` **(** **)** |const| | +---------------------------+----------------------------------------------------------------------------------+ Property Descriptions --------------------- -.. _class_OGGPacketSequence_property_granule_positions: +.. _class_OggPacketSequence_property_granule_positions: - :ref:`Array` **granule_positions** @@ -56,7 +56,7 @@ Contains the granule positions for each page in this packet sequence. ---- -.. _class_OGGPacketSequence_property_packet_data: +.. _class_OggPacketSequence_property_packet_data: - :ref:`Array` **packet_data** @@ -68,11 +68,11 @@ Contains the granule positions for each page in this packet sequence. | *Getter* | get_packet_data() | +-----------+------------------------+ -Contains the raw packets that make up this OGGPacketSequence. +Contains the raw packets that make up this OggPacketSequence. ---- -.. _class_OGGPacketSequence_property_sampling_rate: +.. _class_OggPacketSequence_property_sampling_rate: - :ref:`float` **sampling_rate** @@ -89,7 +89,7 @@ Holds sample rate information about this sequence. Must be set by another class Method Descriptions ------------------- -.. _class_OGGPacketSequence_method_get_length: +.. _class_OggPacketSequence_method_get_length: - :ref:`float` **get_length** **(** **)** |const| diff --git a/classes/class_oggpacketsequenceplayback.rst b/classes/class_oggpacketsequenceplayback.rst index 76297c46a..dedb1681c 100644 --- a/classes/class_oggpacketsequenceplayback.rst +++ b/classes/class_oggpacketsequenceplayback.rst @@ -3,11 +3,11 @@ .. 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/modules/ogg/doc_classes/OGGPacketSequencePlayback.xml. +.. XML source: https://github.com/godotengine/godot/tree/master/modules/ogg/doc_classes/OggPacketSequencePlayback.xml. -.. _class_OGGPacketSequencePlayback: +.. _class_OggPacketSequencePlayback: -OGGPacketSequencePlayback +OggPacketSequencePlayback ========================= **Inherits:** :ref:`RefCounted` **<** :ref:`Object` diff --git a/classes/class_openxraction.rst b/classes/class_openxraction.rst index 4df263508..ab79c3911 100644 --- a/classes/class_openxraction.rst +++ b/classes/class_openxraction.rst @@ -19,7 +19,7 @@ Description This resource defines an OpenXR action. Actions can be used both for inputs (buttons/joystick/trigger/etc) and outputs (haptics). -OpenXR performs automatic conversion between action type and input type whenever possible. An analogue trigger bound to a boolean action will thus return ``false[/core] if the trigger is depressed and [code]true`` if pressed fully. +OpenXR performs automatic conversion between action type and input type whenever possible. An analogue trigger bound to a boolean action will thus return ``false`` if the trigger is depressed and ``true`` if pressed fully. Actions are not directly bound to specific devices, instead OpenXR recognises a limited number of top level paths that identify devices by usage. We can restrict which devices an action can be bound to by these top level paths. For instance an action that should only be used for hand held controllers can have the top level paths "/user/hand/left" and "/user/hand/right" associated with them. See the `reserved path section in the OpenXR specification `__ for more info on the top level paths. diff --git a/classes/class_optionbutton.rst b/classes/class_optionbutton.rst index 15bd22437..bbe08e673 100644 --- a/classes/class_optionbutton.rst +++ b/classes/class_optionbutton.rst @@ -26,17 +26,19 @@ See also :ref:`BaseButton` which contains common properties an Properties ---------- -+-------------------------------------------------------------------+-----------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`ActionMode` | action_mode | ``0`` (overrides :ref:`BaseButton`) | -+-------------------------------------------------------------------+-----------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`HorizontalAlignment` | alignment | ``0`` (overrides :ref:`Button`) | -+-------------------------------------------------------------------+-----------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`item_count` | ``0`` | -+-------------------------------------------------------------------+-----------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`selected` | ``-1`` | -+-------------------------------------------------------------------+-----------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`bool` | toggle_mode | ``true`` (overrides :ref:`BaseButton`) | -+-------------------------------------------------------------------+-----------------------------------------------------------+-------------------------------------------------------------------------------+ ++-------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ +| :ref:`ActionMode` | action_mode | ``0`` (overrides :ref:`BaseButton`) | ++-------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ +| :ref:`HorizontalAlignment` | alignment | ``0`` (overrides :ref:`Button`) | ++-------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`fit_to_longest_item` | ``true`` | ++-------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`item_count` | ``0`` | ++-------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`selected` | ``-1`` | ++-------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ +| :ref:`bool` | toggle_mode | ``true`` (overrides :ref:`BaseButton`) | ++-------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ Methods ------- @@ -96,49 +98,53 @@ Methods Theme Properties ---------------- -+-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Color` | :ref:`font_color` | ``Color(0.875, 0.875, 0.875, 1)`` | -+-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Color` | :ref:`font_disabled_color` | ``Color(0.875, 0.875, 0.875, 0.5)`` | -+-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Color` | :ref:`font_focus_color` | ``Color(0.95, 0.95, 0.95, 1)`` | -+-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Color` | :ref:`font_hover_color` | ``Color(0.95, 0.95, 0.95, 1)`` | -+-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Color` | :ref:`font_outline_color` | ``Color(1, 1, 1, 1)`` | -+-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Color` | :ref:`font_pressed_color` | ``Color(1, 1, 1, 1)`` | -+-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`int` | :ref:`arrow_margin` | ``4`` | -+-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`int` | :ref:`h_separation` | ``2`` | -+-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`int` | :ref:`outline_size` | ``0`` | -+-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Font` | :ref:`font` | | -+-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`int` | :ref:`font_size` | | -+-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Texture2D` | :ref:`arrow` | | -+-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`StyleBox` | :ref:`disabled` | | -+-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`StyleBox` | :ref:`disabled_mirrored` | | -+-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`StyleBox` | :ref:`focus` | | -+-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`StyleBox` | :ref:`hover` | | -+-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`StyleBox` | :ref:`hover_mirrored` | | -+-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`StyleBox` | :ref:`normal` | | -+-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`StyleBox` | :ref:`normal_mirrored` | | -+-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`StyleBox` | :ref:`pressed` | | -+-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`StyleBox` | :ref:`pressed_mirrored` | | -+-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+ ++-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ +| :ref:`Color` | :ref:`font_color` | ``Color(0.875, 0.875, 0.875, 1)`` | ++-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ +| :ref:`Color` | :ref:`font_disabled_color` | ``Color(0.875, 0.875, 0.875, 0.5)`` | ++-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ +| :ref:`Color` | :ref:`font_focus_color` | ``Color(0.95, 0.95, 0.95, 1)`` | ++-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ +| :ref:`Color` | :ref:`font_hover_color` | ``Color(0.95, 0.95, 0.95, 1)`` | ++-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ +| :ref:`Color` | :ref:`font_hover_pressed_color` | ``Color(1, 1, 1, 1)`` | ++-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ +| :ref:`Color` | :ref:`font_outline_color` | ``Color(1, 1, 1, 1)`` | ++-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ +| :ref:`Color` | :ref:`font_pressed_color` | ``Color(1, 1, 1, 1)`` | ++-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ +| :ref:`int` | :ref:`arrow_margin` | ``4`` | ++-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ +| :ref:`int` | :ref:`h_separation` | ``2`` | ++-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ +| :ref:`int` | :ref:`modulate_arrow` | ``0`` | ++-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ +| :ref:`int` | :ref:`outline_size` | ``0`` | ++-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ +| :ref:`Font` | :ref:`font` | | ++-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ +| :ref:`int` | :ref:`font_size` | | ++-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ +| :ref:`Texture2D` | :ref:`arrow` | | ++-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ +| :ref:`StyleBox` | :ref:`disabled` | | ++-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ +| :ref:`StyleBox` | :ref:`disabled_mirrored` | | ++-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ +| :ref:`StyleBox` | :ref:`focus` | | ++-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ +| :ref:`StyleBox` | :ref:`hover` | | ++-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ +| :ref:`StyleBox` | :ref:`hover_mirrored` | | ++-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ +| :ref:`StyleBox` | :ref:`normal` | | ++-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ +| :ref:`StyleBox` | :ref:`normal_mirrored` | | ++-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ +| :ref:`StyleBox` | :ref:`pressed` | | ++-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ +| :ref:`StyleBox` | :ref:`pressed_mirrored` | | ++-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ Signals ------- @@ -160,6 +166,24 @@ Emitted when the current item has been changed by the user. The index of the ite Property Descriptions --------------------- +.. _class_OptionButton_property_fit_to_longest_item: + +- :ref:`bool` **fit_to_longest_item** + ++-----------+--------------------------------+ +| *Default* | ``true`` | ++-----------+--------------------------------+ +| *Setter* | set_fit_to_longest_item(value) | ++-----------+--------------------------------+ +| *Getter* | is_fit_to_longest_item() | ++-----------+--------------------------------+ + +If ``true``, minimum size will be determined by the longest item's text, instead of the currently selected one's. + +\ **Note:** For performance reasons, the minimum size doesn't update immediately when adding, removing or modifying items. + +---- + .. _class_OptionButton_property_item_count: - :ref:`int` **item_count** @@ -440,6 +464,18 @@ Text :ref:`Color` used when the ``OptionButton`` is being hovered. ---- +.. _class_OptionButton_theme_color_font_hover_pressed_color: + +- :ref:`Color` **font_hover_pressed_color** + ++-----------+-----------------------+ +| *Default* | ``Color(1, 1, 1, 1)`` | ++-----------+-----------------------+ + +Text :ref:`Color` used when the ``OptionButton`` is being hovered and pressed. + +---- + .. _class_OptionButton_theme_color_font_outline_color: - :ref:`Color` **font_outline_color** @@ -484,7 +520,19 @@ The horizontal space between the arrow icon and the right edge of the button. | *Default* | ``2`` | +-----------+-------+ -The horizontal space between ``OptionButton``'s icon and text. +The horizontal space between ``OptionButton``'s icon and text. Negative values will be treated as ``0`` when used. + +---- + +.. _class_OptionButton_theme_constant_modulate_arrow: + +- :ref:`int` **modulate_arrow** + ++-----------+-------+ +| *Default* | ``0`` | ++-----------+-------+ + +If different than ``0``, the arrow icon will be modulated to the font color. ---- diff --git a/classes/class_os.rst b/classes/class_os.rst index 1e1da2d2d..ddc41634e 100644 --- a/classes/class_os.rst +++ b/classes/class_os.rst @@ -53,10 +53,6 @@ Methods +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`delay_usec` **(** :ref:`int` usec **)** |const| | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`dump_memory_to_file` **(** :ref:`String` file **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`dump_resources_to_file` **(** :ref:`String` file **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`execute` **(** :ref:`String` path, :ref:`PackedStringArray` arguments, :ref:`Array` output=[], :ref:`bool` read_stderr=false, :ref:`bool` open_console=false **)** | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Key` | :ref:`find_keycode_from_string` **(** :ref:`String` string **)** |const| | @@ -65,6 +61,8 @@ Methods +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`get_cmdline_args` **(** **)** | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedStringArray` | :ref:`get_cmdline_user_args` **(** **)** | ++---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_config_dir` **(** **)** |const| | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`get_connected_midi_inputs` **(** **)** | @@ -95,6 +93,8 @@ Methods +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_processor_name` **(** **)** |const| | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedStringArray` | :ref:`get_restart_on_exit_arguments` **(** **)** |const| | ++---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_static_memory_peak_usage` **(** **)** |const| | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_static_memory_usage` **(** **)** |const| | @@ -121,6 +121,8 @@ Methods +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_process_running` **(** :ref:`int` pid **)** |const| | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_restart_on_exit_set` **(** **)** |const| | ++---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_stdout_verbose` **(** **)** |const| | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_userfs_persistent` **(** **)** |const| | @@ -131,20 +133,14 @@ Methods +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`open_midi_inputs` **(** **)** | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`print_all_resources` **(** :ref:`String` tofile="" **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`print_all_textures_by_size` **(** **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`print_resources_by_type` **(** :ref:`PackedStringArray` types **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`print_resources_in_use` **(** :ref:`bool` short=false **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`request_permission` **(** :ref:`String` name **)** | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`request_permissions` **(** **)** | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`set_environment` **(** :ref:`String` variable, :ref:`String` value **)** |const| | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_restart_on_exit` **(** :ref:`bool` restart, :ref:`PackedStringArray` arguments=PackedStringArray() **)** | ++---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`set_thread_name` **(** :ref:`String` name **)** | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_use_file_access_save_and_swap` **(** :ref:`bool` enabled **)** | @@ -165,7 +161,7 @@ enum **VideoDriver**: - **VIDEO_DRIVER_VULKAN** = **0** --- The Vulkan rendering backend. It requires Vulkan 1.0 support and automatically uses features from Vulkan 1.1 and 1.2 if available. -- **VIDEO_DRIVER_OPENGL_3** = **1** --- The OpenGL 3 rendering backend. It uses OpenGL 3.3 Core Profile on desktop platforms, OpenGL ES 3.0 on mobile devices, and WebGL 2.0 on HTML5. +- **VIDEO_DRIVER_OPENGL_3** = **1** --- The OpenGL 3 rendering backend. It uses OpenGL 3.3 Core Profile on desktop platforms, OpenGL ES 3.0 on mobile devices, and WebGL 2.0 on Web. ---- @@ -432,28 +428,6 @@ Delays execution of the current thread by ``usec`` microseconds. ``usec`` must b ---- -.. _class_OS_method_dump_memory_to_file: - -- void **dump_memory_to_file** **(** :ref:`String` file **)** - -Dumps the memory allocation ringlist to a file (only works in debug). - -Entry format per line: "Address - Size - Description". - ----- - -.. _class_OS_method_dump_resources_to_file: - -- void **dump_resources_to_file** **(** :ref:`String` file **)** - -Dumps all used resources to file (only works in debug). - -Entry format per line: "Resource Type : Resource Location". - -At the end of the file is a statistic of all used Resource Types. - ----- - .. _class_OS_method_execute: - :ref:`int` **execute** **(** :ref:`String` path, :ref:`PackedStringArray` arguments, :ref:`Array` output=[], :ref:`bool` read_stderr=false, :ref:`bool` open_console=false **)** @@ -579,6 +553,22 @@ Here's a minimal example on how to parse command-line arguments into a dictionar +\ **Note:** Passing custom user arguments directly is not recommended, as the engine may discard or modify them. Instead, the best way is to use the standard UNIX double dash (``--``) and then pass custom arguments, which the engine itself will ignore. These can be read via :ref:`get_cmdline_user_args`. + +---- + +.. _class_OS_method_get_cmdline_user_args: + +- :ref:`PackedStringArray` **get_cmdline_user_args** **(** **)** + +Similar to :ref:`get_cmdline_args`, but this returns the user arguments (any argument passed after the double dash ``--`` argument). These are left untouched by Godot for the user. + +For example, in the command line below, ``--fullscreen`` will not be returned in :ref:`get_cmdline_user_args` and ``--level 1`` will only be returned in :ref:`get_cmdline_user_args`: + +:: + + godot --fullscreen -- --level 1 + ---- .. _class_OS_method_get_config_dir: @@ -719,7 +709,7 @@ On Android, this is ``"Android"``. On iOS, this is ``"iOS"``. -On the web, this is ``"HTML5"``. +On the web, this is ``"Web"``. \ **Note:** Custom builds of the engine may support additional platforms, such as consoles, yielding other return values. @@ -739,7 +729,7 @@ On the web, this is ``"HTML5"``. print("Android") "iOS": print("iOS") - "HTML5": + "Web": print("Web") .. code-tab:: csharp @@ -766,7 +756,7 @@ On the web, this is ``"HTML5"``. case "iOS": GD.Print("iOS"); break; - case "HTML5": + case "Web": GD.Print("Web"); break; } @@ -799,7 +789,15 @@ Returns the number of *logical* CPU cores available on the host machine. On CPUs Returns the name of the CPU model on the host machine (e.g. "Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz"). -\ **Note:** This method is only implemented on Windows, macOS, Linux and iOS. On Android, HTML5 and UWP, :ref:`get_processor_name` returns an empty string. +\ **Note:** This method is only implemented on Windows, macOS, Linux and iOS. On Android, Web and UWP, :ref:`get_processor_name` returns an empty string. + +---- + +.. _class_OS_method_get_restart_on_exit_arguments: + +- :ref:`PackedStringArray` **get_restart_on_exit_arguments** **(** **)** |const| + +Returns the list of command line arguments that will be used when the project automatically restarts using :ref:`set_restart_on_exit`. See also :ref:`is_restart_on_exit_set`. ---- @@ -869,7 +867,7 @@ Returns a string that is unique to the device. \ **Note:** This string may change without notice if the user reinstalls/upgrades their operating system or changes their hardware. This means it should generally not be used to encrypt persistent data as the data saved before an unexpected ID change would become inaccessible. The returned string may also be falsified using external programs, so do not rely on the string returned by :ref:`get_unique_id` for security purposes. -\ **Note:** Returns an empty string on HTML5 and UWP, as this method isn't implemented on those platforms yet. +\ **Note:** Returns an empty string on Web and UWP, as this method isn't implemented on those platforms yet. ---- @@ -947,6 +945,14 @@ Must be a valid ID generated from :ref:`create_process` **is_restart_on_exit_set** **(** **)** |const| + +Returns ``true`` if the project will automatically restart when it exits for any reason, ``false`` otherwise. See also :ref:`set_restart_on_exit` and :ref:`get_restart_on_exit_arguments`. + +---- + .. _class_OS_method_is_stdout_verbose: - :ref:`bool` **is_stdout_verbose** **(** **)** |const| @@ -959,7 +965,7 @@ Returns ``true`` if the engine was executed with the ``--verbose`` or ``-v`` com - :ref:`bool` **is_userfs_persistent** **(** **)** |const| -If ``true``, the ``user://`` file system is persistent, so that its state is the same after a player quits and starts the game again. Relevant to the HTML5 platform, where this persistence may be unavailable. +If ``true``, the ``user://`` file system is persistent, so that its state is the same after a player quits and starts the game again. Relevant to the Web platform, where this persistence may be unavailable. ---- @@ -1002,38 +1008,6 @@ Initialises the singleton for the system MIDI driver. ---- -.. _class_OS_method_print_all_resources: - -- void **print_all_resources** **(** :ref:`String` tofile="" **)** - -Shows all resources in the game. Optionally, the list can be written to a file by specifying a file path in ``tofile``. - ----- - -.. _class_OS_method_print_all_textures_by_size: - -- void **print_all_textures_by_size** **(** **)** - -Shows the list of loaded textures sorted by size in memory. - ----- - -.. _class_OS_method_print_resources_by_type: - -- void **print_resources_by_type** **(** :ref:`PackedStringArray` types **)** - -Shows the number of resources loaded by the game of the given types. - ----- - -.. _class_OS_method_print_resources_in_use: - -- void **print_resources_in_use** **(** :ref:`bool` short=false **)** - -Shows all resources currently used by the game. - ----- - .. _class_OS_method_request_permission: - :ref:`bool` **request_permission** **(** :ref:`String` name **)** @@ -1062,6 +1036,20 @@ Sets the value of the environment variable ``variable`` to ``value``. The enviro ---- +.. _class_OS_method_set_restart_on_exit: + +- void **set_restart_on_exit** **(** :ref:`bool` restart, :ref:`PackedStringArray` arguments=PackedStringArray() **)** + +If ``restart`` is ``true``, restarts the project automatically when it is exited with :ref:`SceneTree.quit` or :ref:`Node.NOTIFICATION_WM_CLOSE_REQUEST`. Command line ``arguments`` can be supplied. To restart the project with the same command line arguments as originally used to run the project, pass :ref:`get_cmdline_args` as the value for ``arguments``. + +\ :ref:`set_restart_on_exit` can be used to apply setting changes that require a restart. See also :ref:`is_restart_on_exit_set` and :ref:`get_restart_on_exit_arguments`. + +\ **Note:** This method is only effective on desktop platforms, and only when the project isn't started from the editor. It will have no effect on mobile and Web platforms, or when the project is started from the editor. + +\ **Note:** If the project process crashes or is *killed* by the user (by sending ``SIGKILL`` instead of the usual ``SIGTERM``), the project won't restart automatically. + +---- + .. _class_OS_method_set_thread_name: - :ref:`Error` **set_thread_name** **(** :ref:`String` name **)** @@ -1092,7 +1080,7 @@ Requests the OS to open a resource with the most appropriate program. For exampl Use :ref:`ProjectSettings.globalize_path` to convert a ``res://`` or ``user://`` path into a system path for use with this method. -\ **Note:** This method is implemented on Android, iOS, HTML5, Linux, macOS and Windows. +\ **Note:** This method is implemented on Android, iOS, Web, Linux, macOS and Windows. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_packedbytearray.rst b/classes/class_packedbytearray.rst index ff1f8fe61..6174d81f0 100644 --- a/classes/class_packedbytearray.rst +++ b/classes/class_packedbytearray.rst @@ -17,6 +17,8 @@ Description An array specifically designed to hold bytes. Packs data tightly, so it saves memory for large array sizes. +\ ``PackedByteArray`` also provides methods to encode/decode various types to/from bytes. The way values are encoded is an implementation detail and shouldn't be relied upon when interacting with external apps. + Constructors ------------ @@ -38,6 +40,8 @@ Methods +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`bsearch` **(** :ref:`int` value, :ref:`bool` before=true **)** | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedByteArray` | :ref:`compress` **(** :ref:`int` compression_mode=0 **)** |const| | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`count` **(** :ref:`int` value **)** |const| | @@ -210,6 +214,14 @@ Finds the index of an existing value (or the insertion index that maintains sort ---- +.. _class_PackedByteArray_method_clear: + +- void **clear** **(** **)** + +Clears the array. This is equivalent to using :ref:`resize` with a size of ``0``. + +---- + .. _class_PackedByteArray_method_compress: - :ref:`PackedByteArray` **compress** **(** :ref:`int` compression_mode=0 **)** |const| @@ -230,78 +242,104 @@ Returns the number of times an element is in the array. - :ref:`float` **decode_double** **(** :ref:`int` byte_offset **)** |const| +Decodes a 64-bit floating point number from the bytes starting at ``byte_offset``. Fails if the byte count is insufficient. Returns ``0.0`` if a valid number can't be decoded. + ---- .. _class_PackedByteArray_method_decode_float: - :ref:`float` **decode_float** **(** :ref:`int` byte_offset **)** |const| +Decodes a 32-bit floating point number from the bytes starting at ``byte_offset``. Fails if the byte count is insufficient. Returns ``0.0`` if a valid number can't be decoded. + ---- .. _class_PackedByteArray_method_decode_half: - :ref:`float` **decode_half** **(** :ref:`int` byte_offset **)** |const| +Decodes a 16-bit floating point number from the bytes starting at ``byte_offset``. Fails if the byte count is insufficient. Returns ``0.0`` if a valid number can't be decoded. + ---- .. _class_PackedByteArray_method_decode_s16: - :ref:`int` **decode_s16** **(** :ref:`int` byte_offset **)** |const| +Decodes a 16-bit signed integer number from the bytes starting at ``byte_offset``. Fails if the byte count is insufficient. Returns ``0`` if a valid number can't be decoded. + ---- .. _class_PackedByteArray_method_decode_s32: - :ref:`int` **decode_s32** **(** :ref:`int` byte_offset **)** |const| +Decodes a 32-bit signed integer number from the bytes starting at ``byte_offset``. Fails if the byte count is insufficient. Returns ``0`` if a valid number can't be decoded. + ---- .. _class_PackedByteArray_method_decode_s64: - :ref:`int` **decode_s64** **(** :ref:`int` byte_offset **)** |const| +Decodes a 64-bit signed integer number from the bytes starting at ``byte_offset``. Fails if the byte count is insufficient. Returns ``0`` if a valid number can't be decoded. + ---- .. _class_PackedByteArray_method_decode_s8: - :ref:`int` **decode_s8** **(** :ref:`int` byte_offset **)** |const| +Decodes a 8-bit signed integer number from the bytes starting at ``byte_offset``. Fails if the byte count is insufficient. Returns ``0`` if a valid number can't be decoded. + ---- .. _class_PackedByteArray_method_decode_u16: - :ref:`int` **decode_u16** **(** :ref:`int` byte_offset **)** |const| +Decodes a 16-bit unsigned integer number from the bytes starting at ``byte_offset``. Fails if the byte count is insufficient. Returns ``0`` if a valid number can't be decoded. + ---- .. _class_PackedByteArray_method_decode_u32: - :ref:`int` **decode_u32** **(** :ref:`int` byte_offset **)** |const| +Decodes a 32-bit unsigned integer number from the bytes starting at ``byte_offset``. Fails if the byte count is insufficient. Returns ``0`` if a valid number can't be decoded. + ---- .. _class_PackedByteArray_method_decode_u64: - :ref:`int` **decode_u64** **(** :ref:`int` byte_offset **)** |const| +Decodes a 64-bit unsigned integer number from the bytes starting at ``byte_offset``. Fails if the byte count is insufficient. Returns ``0`` if a valid number can't be decoded. + ---- .. _class_PackedByteArray_method_decode_u8: - :ref:`int` **decode_u8** **(** :ref:`int` byte_offset **)** |const| +Decodes a 8-bit unsigned integer number from the bytes starting at ``byte_offset``. Fails if the byte count is insufficient. Returns ``0`` if a valid number can't be decoded. + ---- .. _class_PackedByteArray_method_decode_var: - :ref:`Variant` **decode_var** **(** :ref:`int` byte_offset, :ref:`bool` allow_objects=false **)** |const| +Decodes a :ref:`Variant` from the bytes starting at ``byte_offset``. Returns ``null`` if a valid variant can't be decoded or the value is :ref:`Object`-derived and ``allow_objects`` is ``false``. + ---- .. _class_PackedByteArray_method_decode_var_size: - :ref:`int` **decode_var_size** **(** :ref:`int` byte_offset, :ref:`bool` allow_objects=false **)** |const| +Decodes a size of a :ref:`Variant` from the bytes starting at ``byte_offset``. Requires at least 4 bytes of data starting at the offset, otherwise fails. + ---- .. _class_PackedByteArray_method_decompress: @@ -318,7 +356,7 @@ Returns a new ``PackedByteArray`` with the data decompressed. Set ``buffer_size` Returns a new ``PackedByteArray`` with the data decompressed. Set the compression mode using one of :ref:`CompressionMode`'s constants. **This method only accepts gzip and deflate compression modes.**\ -This method is potentially slower than ``decompress``, as it may have to re-allocate its output buffer multiple times while decompressing, whereas ``decompress`` knows its output buffer size from the beginning. +This method is potentially slower than ``decompress``, as it may have to re-allocate its output buffer multiple times while decompressing, whereas ``decompress`` knows it's output buffer size from the beginning. GZIP has a maximal compression ratio of 1032:1, meaning it's very possible for a small compressed payload to decompress to a potentially very large output. To guard against this, you may provide a maximum size this function is allowed to allocate in bytes via ``max_output_size``. Passing -1 will allow for unbounded output. If any positive value is passed, and the decompression exceeds that amount in bytes, then an error will be returned. @@ -336,72 +374,96 @@ Creates a copy of the array, and returns it. - void **encode_double** **(** :ref:`int` byte_offset, :ref:`float` value **)** +Encodes a 64-bit floating point number as bytes at the index of ``byte_offset`` bytes. The array must have at least 8 bytes of allocated space, starting at the offset. + ---- .. _class_PackedByteArray_method_encode_float: - void **encode_float** **(** :ref:`int` byte_offset, :ref:`float` value **)** +Encodes a 32-bit floating point number as bytes at the index of ``byte_offset`` bytes. The array must have at least 4 bytes of space, starting at the offset. + ---- .. _class_PackedByteArray_method_encode_half: - void **encode_half** **(** :ref:`int` byte_offset, :ref:`float` value **)** +Encodes a 16-bit floating point number as bytes at the index of ``byte_offset`` bytes. The array must have at least 2 bytes of space, starting at the offset. + ---- .. _class_PackedByteArray_method_encode_s16: - void **encode_s16** **(** :ref:`int` byte_offset, :ref:`int` value **)** +Encodes a 16-bit signed integer number as bytes at the index of ``byte_offset`` bytes. The array must have at least 2 bytes of space, starting at the offset. + ---- .. _class_PackedByteArray_method_encode_s32: - void **encode_s32** **(** :ref:`int` byte_offset, :ref:`int` value **)** +Encodes a 32-bit signed integer number as bytes at the index of ``byte_offset`` bytes. The array must have at least 2 bytes of space, starting at the offset. + ---- .. _class_PackedByteArray_method_encode_s64: - void **encode_s64** **(** :ref:`int` byte_offset, :ref:`int` value **)** +Encodes a 64-bit signed integer number as bytes at the index of ``byte_offset`` bytes. The array must have at least 2 bytes of space, starting at the offset. + ---- .. _class_PackedByteArray_method_encode_s8: - void **encode_s8** **(** :ref:`int` byte_offset, :ref:`int` value **)** +Encodes a 8-bit signed integer number (signed byte) at the index of ``byte_offset`` bytes. The array must have at least 1 byte of space, starting at the offset. + ---- .. _class_PackedByteArray_method_encode_u16: - void **encode_u16** **(** :ref:`int` byte_offset, :ref:`int` value **)** +Encodes a 16-bit unsigned integer number as bytes at the index of ``byte_offset`` bytes. The array must have at least 2 bytes of space, starting at the offset. + ---- .. _class_PackedByteArray_method_encode_u32: - void **encode_u32** **(** :ref:`int` byte_offset, :ref:`int` value **)** +Encodes a 32-bit unsigned integer number as bytes at the index of ``byte_offset`` bytes. The array must have at least 4 bytes of space, starting at the offset. + ---- .. _class_PackedByteArray_method_encode_u64: - void **encode_u64** **(** :ref:`int` byte_offset, :ref:`int` value **)** +Encodes a 64-bit unsigned integer number as bytes at the index of ``byte_offset`` bytes. The array must have at least 8 bytes of space, starting at the offset. + ---- .. _class_PackedByteArray_method_encode_u8: - void **encode_u8** **(** :ref:`int` byte_offset, :ref:`int` value **)** +Encodes a 8-bit unsigned integer number (byte) at the index of ``byte_offset`` bytes. The array must have at least 1 byte of space, starting at the offset. + ---- .. _class_PackedByteArray_method_encode_var: - :ref:`int` **encode_var** **(** :ref:`int` byte_offset, :ref:`Variant` value, :ref:`bool` allow_objects=false **)** +Encodes a :ref:`Variant` at the index of ``byte_offset`` bytes. A sufficient space must be allocated, depending on the encoded variant's size. If ``allow_objects`` is ``false``, :ref:`Object`-derived values are not permitted and will instead be serialized as ID-only. + ---- .. _class_PackedByteArray_method_fill: @@ -464,6 +526,8 @@ Returns ``true`` if the array contains ``value``. - :ref:`bool` **has_encoded_var** **(** :ref:`int` byte_offset, :ref:`bool` allow_objects=false **)** |const| +Returns ``true`` if a valid :ref:`Variant` value can be decoded at the ``byte_offset``. Returns ``false`` othewrise or when the value is :ref:`Object`-derived and ``allow_objects`` is ``false``. + ---- .. _class_PackedByteArray_method_hex_encode: @@ -634,24 +698,34 @@ Operator Descriptions - :ref:`bool` **operator !=** **(** :ref:`PackedByteArray` right **)** +Returns ``true`` if contents of the arrays differ. + ---- .. _class_PackedByteArray_operator_sum_PackedByteArray: - :ref:`PackedByteArray` **operator +** **(** :ref:`PackedByteArray` right **)** +Returns a new ``PackedByteArray`` with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array` instead. + ---- .. _class_PackedByteArray_operator_eq_bool: - :ref:`bool` **operator ==** **(** :ref:`PackedByteArray` right **)** +Returns ``true`` if contents of both arrays are the same, i.e. they have all equal bytes at the corresponding indices. + ---- .. _class_PackedByteArray_operator_idx_int: - :ref:`int` **operator []** **(** :ref:`int` index **)** +Returns the byte at index ``index``. Negative indices can be used to access the elements starting from the end. Using index out of array's bounds will result in an error. + +Note that the byte is returned as a 64-bit :ref:`int`. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_packedcolorarray.rst b/classes/class_packedcolorarray.rst index 5fa4c62cb..27bdfa483 100644 --- a/classes/class_packedcolorarray.rst +++ b/classes/class_packedcolorarray.rst @@ -38,6 +38,8 @@ Methods +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`bsearch` **(** :ref:`Color` value, :ref:`bool` before=true **)** | +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`count` **(** :ref:`Color` value **)** |const| | +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedColorArray` | :ref:`duplicate` **(** **)** | @@ -136,6 +138,14 @@ Finds the index of an existing value (or the insertion index that maintains sort ---- +.. _class_PackedColorArray_method_clear: + +- void **clear** **(** **)** + +Clears the array. This is equivalent to using :ref:`resize` with a size of ``0``. + +---- + .. _class_PackedColorArray_method_count: - :ref:`int` **count** **(** :ref:`Color` value **)** |const| @@ -272,6 +282,8 @@ Sorts the elements of the array in ascending order. - :ref:`PackedByteArray` **to_byte_array** **(** **)** |const| +Returns a :ref:`PackedByteArray` with each color encoded as bytes. + Operator Descriptions --------------------- @@ -279,24 +291,32 @@ Operator Descriptions - :ref:`bool` **operator !=** **(** :ref:`PackedColorArray` right **)** +Returns ``true`` if contents of the arrays differ. + ---- .. _class_PackedColorArray_operator_sum_PackedColorArray: - :ref:`PackedColorArray` **operator +** **(** :ref:`PackedColorArray` right **)** +Returns a new ``PackedColorArray`` with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array` instead. + ---- .. _class_PackedColorArray_operator_eq_bool: - :ref:`bool` **operator ==** **(** :ref:`PackedColorArray` right **)** +Returns ``true`` if contents of both arrays are the same, i.e. they have all equal :ref:`Color`\ s at the corresponding indices. + ---- .. _class_PackedColorArray_operator_idx_Color: - :ref:`Color` **operator []** **(** :ref:`int` index **)** +Returns the :ref:`Color` at index ``index``. Negative indices can be used to access the elements starting from the end. Using index out of array's bounds will result in an error. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_packedfloat32array.rst b/classes/class_packedfloat32array.rst index 1731c59b9..775d26843 100644 --- a/classes/class_packedfloat32array.rst +++ b/classes/class_packedfloat32array.rst @@ -15,7 +15,7 @@ A packed array of 32-bit floating-point values. Description ----------- -An array specifically designed to hold 32-bit floating-point values. Packs data tightly, so it saves memory for large array sizes. +An array specifically designed to hold 32-bit floating-point values (float). Packs data tightly, so it saves memory for large array sizes. If you need to pack 64-bit floats tightly, see :ref:`PackedFloat64Array`. @@ -40,6 +40,8 @@ Methods +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`bsearch` **(** :ref:`float` value, :ref:`bool` before=true **)** | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`count` **(** :ref:`float` value **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedFloat32Array` | :ref:`duplicate` **(** **)** | @@ -138,6 +140,14 @@ Finds the index of an existing value (or the insertion index that maintains sort ---- +.. _class_PackedFloat32Array_method_clear: + +- void **clear** **(** **)** + +Clears the array. This is equivalent to using :ref:`resize` with a size of ``0``. + +---- + .. _class_PackedFloat32Array_method_count: - :ref:`int` **count** **(** :ref:`float` value **)** |const| @@ -285,24 +295,34 @@ Operator Descriptions - :ref:`bool` **operator !=** **(** :ref:`PackedFloat32Array` right **)** +Returns ``true`` if contents of the arrays differ. + ---- .. _class_PackedFloat32Array_operator_sum_PackedFloat32Array: - :ref:`PackedFloat32Array` **operator +** **(** :ref:`PackedFloat32Array` right **)** +Returns a new ``PackedFloat32Array`` with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array` instead. + ---- .. _class_PackedFloat32Array_operator_eq_bool: - :ref:`bool` **operator ==** **(** :ref:`PackedFloat32Array` right **)** +Returns ``true`` if contents of both arrays are the same, i.e. they have all equal floats at the corresponding indices. + ---- .. _class_PackedFloat32Array_operator_idx_float: - :ref:`float` **operator []** **(** :ref:`int` index **)** +Returns the :ref:`float` at index ``index``. Negative indices can be used to access the elements starting from the end. Using index out of array's bounds will result in an error. + +Note that :ref:`float` type is 64-bit, unlike the values stored in the array. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_packedfloat64array.rst b/classes/class_packedfloat64array.rst index d78356a04..595f80135 100644 --- a/classes/class_packedfloat64array.rst +++ b/classes/class_packedfloat64array.rst @@ -15,7 +15,7 @@ A packed array of 64-bit floating-point values. Description ----------- -An array specifically designed to hold 64-bit floating-point values. Packs data tightly, so it saves memory for large array sizes. +An array specifically designed to hold 64-bit floating-point values (double). Packs data tightly, so it saves memory for large array sizes. If you only need to pack 32-bit floats tightly, see :ref:`PackedFloat32Array` for a more memory-friendly alternative. @@ -40,6 +40,8 @@ Methods +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`bsearch` **(** :ref:`float` value, :ref:`bool` before=true **)** | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`count` **(** :ref:`float` value **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedFloat64Array` | :ref:`duplicate` **(** **)** | @@ -138,6 +140,14 @@ Finds the index of an existing value (or the insertion index that maintains sort ---- +.. _class_PackedFloat64Array_method_clear: + +- void **clear** **(** **)** + +Clears the array. This is equivalent to using :ref:`resize` with a size of ``0``. + +---- + .. _class_PackedFloat64Array_method_count: - :ref:`int` **count** **(** :ref:`float` value **)** |const| @@ -285,24 +295,32 @@ Operator Descriptions - :ref:`bool` **operator !=** **(** :ref:`PackedFloat64Array` right **)** +Returns ``true`` if contents of the arrays differ. + ---- .. _class_PackedFloat64Array_operator_sum_PackedFloat64Array: - :ref:`PackedFloat64Array` **operator +** **(** :ref:`PackedFloat64Array` right **)** +Returns a new ``PackedFloat64Array`` with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array` instead. + ---- .. _class_PackedFloat64Array_operator_eq_bool: - :ref:`bool` **operator ==** **(** :ref:`PackedFloat64Array` right **)** +Returns ``true`` if contents of both arrays are the same, i.e. they have all equal doubles at the corresponding indices. + ---- .. _class_PackedFloat64Array_operator_idx_float: - :ref:`float` **operator []** **(** :ref:`int` index **)** +Returns the :ref:`float` at index ``index``. Negative indices can be used to access the elements starting from the end. Using index out of array's bounds will result in an error. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_packedint32array.rst b/classes/class_packedint32array.rst index 5570d1a0e..c7dd6cdca 100644 --- a/classes/class_packedint32array.rst +++ b/classes/class_packedint32array.rst @@ -40,6 +40,8 @@ Methods +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`bsearch` **(** :ref:`int` value, :ref:`bool` before=true **)** | +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`count` **(** :ref:`int` value **)** |const| | +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedInt32Array` | :ref:`duplicate` **(** **)** | @@ -138,6 +140,14 @@ Finds the index of an existing value (or the insertion index that maintains sort ---- +.. _class_PackedInt32Array_method_clear: + +- void **clear** **(** **)** + +Clears the array. This is equivalent to using :ref:`resize` with a size of ``0``. + +---- + .. _class_PackedInt32Array_method_count: - :ref:`int` **count** **(** :ref:`int` value **)** |const| @@ -285,24 +295,34 @@ Operator Descriptions - :ref:`bool` **operator !=** **(** :ref:`PackedInt32Array` right **)** +Returns ``true`` if contents of the arrays differ. + ---- .. _class_PackedInt32Array_operator_sum_PackedInt32Array: - :ref:`PackedInt32Array` **operator +** **(** :ref:`PackedInt32Array` right **)** +Returns a new ``PackedInt32Array`` with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array` instead. + ---- .. _class_PackedInt32Array_operator_eq_bool: - :ref:`bool` **operator ==** **(** :ref:`PackedInt32Array` right **)** +Returns ``true`` if contents of both arrays are the same, i.e. they have all equal ints at the corresponding indices. + ---- .. _class_PackedInt32Array_operator_idx_int: - :ref:`int` **operator []** **(** :ref:`int` index **)** +Returns the :ref:`int` at index ``index``. Negative indices can be used to access the elements starting from the end. Using index out of array's bounds will result in an error. + +Note that :ref:`int` type is 64-bit, unlike the values stored in the array. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_packedint64array.rst b/classes/class_packedint64array.rst index 6ad9a37e9..d9108a285 100644 --- a/classes/class_packedint64array.rst +++ b/classes/class_packedint64array.rst @@ -40,6 +40,8 @@ Methods +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`bsearch` **(** :ref:`int` value, :ref:`bool` before=true **)** | +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`count` **(** :ref:`int` value **)** |const| | +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedInt64Array` | :ref:`duplicate` **(** **)** | @@ -138,6 +140,14 @@ Finds the index of an existing value (or the insertion index that maintains sort ---- +.. _class_PackedInt64Array_method_clear: + +- void **clear** **(** **)** + +Clears the array. This is equivalent to using :ref:`resize` with a size of ``0``. + +---- + .. _class_PackedInt64Array_method_count: - :ref:`int` **count** **(** :ref:`int` value **)** |const| @@ -285,24 +295,32 @@ Operator Descriptions - :ref:`bool` **operator !=** **(** :ref:`PackedInt64Array` right **)** +Returns ``true`` if contents of the arrays differ. + ---- .. _class_PackedInt64Array_operator_sum_PackedInt64Array: - :ref:`PackedInt64Array` **operator +** **(** :ref:`PackedInt64Array` right **)** +Returns a new ``PackedInt64Array`` with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array` instead. + ---- .. _class_PackedInt64Array_operator_eq_bool: - :ref:`bool` **operator ==** **(** :ref:`PackedInt64Array` right **)** +Returns ``true`` if contents of both arrays are the same, i.e. they have all equal ints at the corresponding indices. + ---- .. _class_PackedInt64Array_operator_idx_int: - :ref:`int` **operator []** **(** :ref:`int` index **)** +Returns the :ref:`int` at index ``index``. Negative indices can be used to access the elements starting from the end. Using index out of array's bounds will result in an error. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_packedscene.rst b/classes/class_packedscene.rst index 09ff0dfab..7d9f6f8e0 100644 --- a/classes/class_packedscene.rst +++ b/classes/class_packedscene.rst @@ -44,7 +44,7 @@ Can be used to save a node to a file. When saving, the node as well as all the n -\ **Example of saving a node with different owners:** The following example creates 3 objects: :ref:`Node2D` (``node``), :ref:`RigidDynamicBody2D` (``body``) and :ref:`CollisionObject2D` (``collision``). ``collision`` is a child of ``body`` which is a child of ``node``. Only ``body`` is owned by ``node`` and ``pack`` will therefore only save those two nodes, but not ``collision``. +\ **Example of saving a node with different owners:** The following example creates 3 objects: :ref:`Node2D` (``node``), :ref:`RigidBody2D` (``body``) and :ref:`CollisionObject2D` (``collision``). ``collision`` is a child of ``body`` which is a child of ``node``. Only ``body`` is owned by ``node`` and ``pack`` will therefore only save those two nodes, but not ``collision``. .. tabs:: @@ -53,7 +53,7 @@ Can be used to save a node to a file. When saving, the node as well as all the n # Create the objects. var node = Node2D.new() - var body = RigidDynamicBody2D.new() + var body = RigidBody2D.new() var collision = CollisionShape2D.new() # Create the object hierarchy. @@ -75,7 +75,7 @@ Can be used to save a node to a file. When saving, the node as well as all the n // Create the objects. var node = new Node2D(); - var body = new RigidDynamicBody2D(); + var body = new RigidBody2D(); var collision = new CollisionShape2D(); // Create the object hierarchy. @@ -191,7 +191,7 @@ Returns the ``SceneState`` representing the scene file contents. - :ref:`Node` **instantiate** **(** :ref:`GenEditState` edit_state=0 **)** |const| -Instantiates the scene's node hierarchy. Triggers child scene instantiation(s). Triggers a :ref:`Node.NOTIFICATION_INSTANCED` notification on the root node. +Instantiates the scene's node hierarchy. Triggers child scene instantiation(s). Triggers a :ref:`Node.NOTIFICATION_SCENE_INSTANTIATED` notification on the root node. ---- diff --git a/classes/class_packedstringarray.rst b/classes/class_packedstringarray.rst index 1d3a229bc..b189bab7a 100644 --- a/classes/class_packedstringarray.rst +++ b/classes/class_packedstringarray.rst @@ -51,6 +51,8 @@ Methods +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`bsearch` **(** :ref:`String` value, :ref:`bool` before=true **)** | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`count` **(** :ref:`String` value **)** |const| | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`duplicate` **(** **)** | @@ -149,6 +151,14 @@ Finds the index of an existing value (or the insertion index that maintains sort ---- +.. _class_PackedStringArray_method_clear: + +- void **clear** **(** **)** + +Clears the array. This is equivalent to using :ref:`resize` with a size of ``0``. + +---- + .. _class_PackedStringArray_method_count: - :ref:`int` **count** **(** :ref:`String` value **)** |const| @@ -285,6 +295,8 @@ Sorts the elements of the array in ascending order. - :ref:`PackedByteArray` **to_byte_array** **(** **)** |const| +Returns a :ref:`PackedByteArray` with each string encoded as bytes. + Operator Descriptions --------------------- @@ -292,24 +304,32 @@ Operator Descriptions - :ref:`bool` **operator !=** **(** :ref:`PackedStringArray` right **)** +Returns ``true`` if contents of the arrays differ. + ---- .. _class_PackedStringArray_operator_sum_PackedStringArray: - :ref:`PackedStringArray` **operator +** **(** :ref:`PackedStringArray` right **)** +Returns a new ``PackedStringArray`` with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array` instead. + ---- .. _class_PackedStringArray_operator_eq_bool: - :ref:`bool` **operator ==** **(** :ref:`PackedStringArray` right **)** +Returns ``true`` if contents of both arrays are the same, i.e. they have all equal :ref:`String`\ s at the corresponding indices. + ---- .. _class_PackedStringArray_operator_idx_String: - :ref:`String` **operator []** **(** :ref:`int` index **)** +Returns the :ref:`String` at index ``index``. Negative indices can be used to access the elements starting from the end. Using index out of array's bounds will result in an error. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_packedvector2array.rst b/classes/class_packedvector2array.rst index e88498c47..1084a6cbf 100644 --- a/classes/class_packedvector2array.rst +++ b/classes/class_packedvector2array.rst @@ -43,6 +43,8 @@ Methods +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`bsearch` **(** :ref:`Vector2` value, :ref:`bool` before=true **)** | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`count` **(** :ref:`Vector2` value **)** |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedVector2Array` | :ref:`duplicate` **(** **)** | @@ -143,6 +145,14 @@ Finds the index of an existing value (or the insertion index that maintains sort ---- +.. _class_PackedVector2Array_method_clear: + +- void **clear** **(** **)** + +Clears the array. This is equivalent to using :ref:`resize` with a size of ``0``. + +---- + .. _class_PackedVector2Array_method_count: - :ref:`int` **count** **(** :ref:`Vector2` value **)** |const| @@ -279,6 +289,8 @@ Sorts the elements of the array in ascending order. - :ref:`PackedByteArray` **to_byte_array** **(** **)** |const| +Returns a :ref:`PackedByteArray` with each vector encoded as bytes. + Operator Descriptions --------------------- @@ -286,30 +298,40 @@ Operator Descriptions - :ref:`bool` **operator !=** **(** :ref:`PackedVector2Array` right **)** +Returns ``true`` if contents of the arrays differ. + ---- .. _class_PackedVector2Array_operator_mul_PackedVector2Array: - :ref:`PackedVector2Array` **operator *** **(** :ref:`Transform2D` right **)** +Transforms (multiplies) all vectors in the array by the :ref:`Transform2D` matrix. + ---- .. _class_PackedVector2Array_operator_sum_PackedVector2Array: - :ref:`PackedVector2Array` **operator +** **(** :ref:`PackedVector2Array` right **)** +Returns a new ``PackedVector2Array`` with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array` instead. + ---- .. _class_PackedVector2Array_operator_eq_bool: - :ref:`bool` **operator ==** **(** :ref:`PackedVector2Array` right **)** +Returns ``true`` if contents of both arrays are the same, i.e. they have all equal :ref:`Vector2`\ s at the corresponding indices. + ---- .. _class_PackedVector2Array_operator_idx_Vector2: - :ref:`Vector2` **operator []** **(** :ref:`int` index **)** +Returns the :ref:`Vector2` at index ``index``. Negative indices can be used to access the elements starting from the end. Using index out of array's bounds will result in an error. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_packedvector3array.rst b/classes/class_packedvector3array.rst index 613042195..1fed5bafc 100644 --- a/classes/class_packedvector3array.rst +++ b/classes/class_packedvector3array.rst @@ -38,6 +38,8 @@ Methods +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`bsearch` **(** :ref:`Vector3` value, :ref:`bool` before=true **)** | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`count` **(** :ref:`Vector3` value **)** |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedVector3Array` | :ref:`duplicate` **(** **)** | @@ -138,6 +140,14 @@ Finds the index of an existing value (or the insertion index that maintains sort ---- +.. _class_PackedVector3Array_method_clear: + +- void **clear** **(** **)** + +Clears the array. This is equivalent to using :ref:`resize` with a size of ``0``. + +---- + .. _class_PackedVector3Array_method_count: - :ref:`int` **count** **(** :ref:`Vector3` value **)** |const| @@ -274,6 +284,8 @@ Sorts the elements of the array in ascending order. - :ref:`PackedByteArray` **to_byte_array** **(** **)** |const| +Returns a :ref:`PackedByteArray` with each vector encoded as bytes. + Operator Descriptions --------------------- @@ -281,30 +293,40 @@ Operator Descriptions - :ref:`bool` **operator !=** **(** :ref:`PackedVector3Array` right **)** +Returns ``true`` if contents of the arrays differ. + ---- .. _class_PackedVector3Array_operator_mul_PackedVector3Array: - :ref:`PackedVector3Array` **operator *** **(** :ref:`Transform3D` right **)** +Transforms (multiplies) all vectors in the array by the :ref:`Transform3D` matrix. + ---- .. _class_PackedVector3Array_operator_sum_PackedVector3Array: - :ref:`PackedVector3Array` **operator +** **(** :ref:`PackedVector3Array` right **)** +Returns a new ``PackedVector3Array`` with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array` instead. + ---- .. _class_PackedVector3Array_operator_eq_bool: - :ref:`bool` **operator ==** **(** :ref:`PackedVector3Array` right **)** +Returns ``true`` if contents of both arrays are the same, i.e. they have all equal :ref:`Vector3`\ s at the corresponding indices. + ---- .. _class_PackedVector3Array_operator_idx_Vector3: - :ref:`Vector3` **operator []** **(** :ref:`int` index **)** +Returns the :ref:`Vector3` at index ``index``. Negative indices can be used to access the elements starting from the end. Using index out of array's bounds will result in an error. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_packetpeerdtls.rst b/classes/class_packetpeerdtls.rst index e61fe1bcc..a82a3f844 100644 --- a/classes/class_packetpeerdtls.rst +++ b/classes/class_packetpeerdtls.rst @@ -70,7 +70,7 @@ Method Descriptions - :ref:`Error` **connect_to_peer** **(** :ref:`PacketPeerUDP` packet_peer, :ref:`bool` validate_certs=true, :ref:`String` for_hostname="", :ref:`X509Certificate` valid_certificate=null **)** -Connects a ``peer`` beginning the DTLS handshake using the underlying :ref:`PacketPeerUDP` which must be connected (see :ref:`PacketPeerUDP.connect_to_host`). If ``validate_certs`` is ``true``, ``PacketPeerDTLS`` will validate that the certificate presented by the remote peer and match it with the ``for_hostname`` argument. You can specify a custom :ref:`X509Certificate` to use for validation via the ``valid_certificate`` argument. +Connects a ``packet_peer`` beginning the DTLS handshake using the underlying :ref:`PacketPeerUDP` which must be connected (see :ref:`PacketPeerUDP.connect_to_host`). If ``validate_certs`` is ``true``, ``PacketPeerDTLS`` will validate that the certificate presented by the remote peer and match it with the ``for_hostname`` argument. You can specify a custom :ref:`X509Certificate` to use for validation via the ``valid_certificate`` argument. ---- diff --git a/classes/class_packetpeerudp.rst b/classes/class_packetpeerudp.rst index 494ac8917..7b7bafff5 100644 --- a/classes/class_packetpeerudp.rst +++ b/classes/class_packetpeerudp.rst @@ -59,13 +59,13 @@ Method Descriptions - :ref:`Error` **bind** **(** :ref:`int` port, :ref:`String` bind_address="*", :ref:`int` recv_buf_size=65536 **)** -Binds this ``PacketPeerUDP`` to the specified ``port`` and ``address`` with a buffer size ``recv_buf_size``, allowing it to receive incoming packets. +Binds this ``PacketPeerUDP`` to the specified ``port`` and ``bind_address`` with a buffer size ``recv_buf_size``, allowing it to receive incoming packets. -If ``address`` is set to ``"*"`` (default), the peer will be bound on all available addresses (both IPv4 and IPv6). +If ``bind_address`` is set to ``"*"`` (default), the peer will be bound on all available addresses (both IPv4 and IPv6). -If ``address`` is set to ``"0.0.0.0"`` (for IPv4) or ``"::"`` (for IPv6), the peer will be bound to all available addresses matching that IP type. +If ``bind_address`` is set to ``"0.0.0.0"`` (for IPv4) or ``"::"`` (for IPv6), the peer will be bound to all available addresses matching that IP type. -If ``address`` is set to any valid address (e.g. ``"192.168.1.101"``, ``"::1"``, etc), the peer will only be bound to the interface with that addresses (or fail if no interface with the given address exists). +If ``bind_address`` is set to any valid address (e.g. ``"192.168.1.101"``, ``"::1"``, etc), the peer will only be bound to the interface with that addresses (or fail if no interface with the given address exists). ---- diff --git a/classes/class_particleprocessmaterial.rst b/classes/class_particleprocessmaterial.rst new file mode 100644 index 000000000..1fe021565 --- /dev/null +++ b/classes/class_particleprocessmaterial.rst @@ -0,0 +1,1632 @@ +: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/ParticleProcessMaterial.xml. + +.. _class_ParticleProcessMaterial: + +ParticleProcessMaterial +======================= + +**Inherits:** :ref:`Material` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +Particle properties for :ref:`GPUParticles3D` and :ref:`GPUParticles2D` nodes. + +Description +----------- + +ParticleProcessMaterial defines particle properties and behavior. It is used in the ``process_material`` of :ref:`GPUParticles3D` and :ref:`GPUParticles2D` emitter nodes. + +Some of this material's properties are applied to each particle when emitted, while others can have a :ref:`CurveTexture` applied to vary values over the lifetime of the particle. + +Particle animation is available only in :ref:`GPUParticles2D`. To use it, attach a :ref:`CanvasItemMaterial`, with :ref:`CanvasItemMaterial.particles_animation` enabled, to the particles node. + +Properties +---------- + ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`Texture2D` | :ref:`angle_curve` | | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`float` | :ref:`angle_max` | ``0.0`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`float` | :ref:`angle_min` | ``0.0`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`Texture2D` | :ref:`angular_velocity_curve` | | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`float` | :ref:`angular_velocity_max` | ``0.0`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`float` | :ref:`angular_velocity_min` | ``0.0`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`Texture2D` | :ref:`anim_offset_curve` | | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`float` | :ref:`anim_offset_max` | ``0.0`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`float` | :ref:`anim_offset_min` | ``0.0`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`Texture2D` | :ref:`anim_speed_curve` | | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`float` | :ref:`anim_speed_max` | ``0.0`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`float` | :ref:`anim_speed_min` | ``0.0`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`bool` | :ref:`attractor_interaction_enabled` | ``true`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`float` | :ref:`collision_bounce` | | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`float` | :ref:`collision_friction` | | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`CollisionMode` | :ref:`collision_mode` | ``0`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`bool` | :ref:`collision_use_scale` | ``false`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`Color` | :ref:`color` | ``Color(1, 1, 1, 1)`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`Texture2D` | :ref:`color_initial_ramp` | | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`Texture2D` | :ref:`color_ramp` | | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`Texture2D` | :ref:`damping_curve` | | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`float` | :ref:`damping_max` | ``0.0`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`float` | :ref:`damping_min` | ``0.0`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`Vector3` | :ref:`direction` | ``Vector3(1, 0, 0)`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`Vector3` | :ref:`emission_box_extents` | | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`Texture2D` | :ref:`emission_color_texture` | | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`Texture2D` | :ref:`emission_normal_texture` | | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`int` | :ref:`emission_point_count` | | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`Texture2D` | :ref:`emission_point_texture` | | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`Vector3` | :ref:`emission_ring_axis` | | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`float` | :ref:`emission_ring_height` | | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`float` | :ref:`emission_ring_inner_radius` | | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`float` | :ref:`emission_ring_radius` | | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`EmissionShape` | :ref:`emission_shape` | ``0`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`float` | :ref:`emission_sphere_radius` | | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`float` | :ref:`flatness` | ``0.0`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`Vector3` | :ref:`gravity` | ``Vector3(0, -9.8, 0)`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`Texture2D` | :ref:`hue_variation_curve` | | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`float` | :ref:`hue_variation_max` | ``0.0`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`float` | :ref:`hue_variation_min` | ``0.0`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`float` | :ref:`initial_velocity_max` | ``0.0`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`float` | :ref:`initial_velocity_min` | ``0.0`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`float` | :ref:`lifetime_randomness` | ``0.0`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`Texture2D` | :ref:`linear_accel_curve` | | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`float` | :ref:`linear_accel_max` | ``0.0`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`float` | :ref:`linear_accel_min` | ``0.0`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`Texture2D` | :ref:`orbit_velocity_curve` | | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`float` | :ref:`orbit_velocity_max` | | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`float` | :ref:`orbit_velocity_min` | | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`bool` | :ref:`particle_flag_align_y` | ``false`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`bool` | :ref:`particle_flag_disable_z` | ``false`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`bool` | :ref:`particle_flag_rotate_y` | ``false`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`Texture2D` | :ref:`radial_accel_curve` | | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`float` | :ref:`radial_accel_max` | ``0.0`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`float` | :ref:`radial_accel_min` | ``0.0`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`Texture2D` | :ref:`scale_curve` | | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`float` | :ref:`scale_max` | ``1.0`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`float` | :ref:`scale_min` | ``1.0`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`float` | :ref:`spread` | ``45.0`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`int` | :ref:`sub_emitter_amount_at_end` | | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`float` | :ref:`sub_emitter_frequency` | | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`bool` | :ref:`sub_emitter_keep_velocity` | ``false`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`SubEmitterMode` | :ref:`sub_emitter_mode` | ``0`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`Texture2D` | :ref:`tangential_accel_curve` | | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`float` | :ref:`tangential_accel_max` | ``0.0`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`float` | :ref:`tangential_accel_min` | ``0.0`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`bool` | :ref:`turbulence_enabled` | ``false`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`float` | :ref:`turbulence_influence_max` | ``0.1`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`float` | :ref:`turbulence_influence_min` | ``0.1`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`Texture2D` | :ref:`turbulence_influence_over_life` | | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`float` | :ref:`turbulence_initial_displacement_max` | ``0.0`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`float` | :ref:`turbulence_initial_displacement_min` | ``0.0`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`float` | :ref:`turbulence_noise_scale` | ``9.0`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`Vector3` | :ref:`turbulence_noise_speed` | ``Vector3(0.5, 0.5, 0.5)`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`float` | :ref:`turbulence_noise_speed_random` | ``0.0`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`float` | :ref:`turbulence_noise_strength` | ``1.0`` | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + +Methods +------- + ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_param_max` **(** :ref:`Parameter` param **)** |const| | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_param_min` **(** :ref:`Parameter` param **)** |const| | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Texture2D` | :ref:`get_param_texture` **(** :ref:`Parameter` param **)** |const| | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_particle_flag` **(** :ref:`ParticleFlags` particle_flag **)** |const| | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_param_max` **(** :ref:`Parameter` param, :ref:`float` value **)** | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_param_min` **(** :ref:`Parameter` param, :ref:`float` value **)** | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_param_texture` **(** :ref:`Parameter` param, :ref:`Texture2D` texture **)** | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_particle_flag` **(** :ref:`ParticleFlags` particle_flag, :ref:`bool` enable **)** | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Enumerations +------------ + +.. _enum_ParticleProcessMaterial_Parameter: + +.. _class_ParticleProcessMaterial_constant_PARAM_INITIAL_LINEAR_VELOCITY: + +.. _class_ParticleProcessMaterial_constant_PARAM_ANGULAR_VELOCITY: + +.. _class_ParticleProcessMaterial_constant_PARAM_ORBIT_VELOCITY: + +.. _class_ParticleProcessMaterial_constant_PARAM_LINEAR_ACCEL: + +.. _class_ParticleProcessMaterial_constant_PARAM_RADIAL_ACCEL: + +.. _class_ParticleProcessMaterial_constant_PARAM_TANGENTIAL_ACCEL: + +.. _class_ParticleProcessMaterial_constant_PARAM_DAMPING: + +.. _class_ParticleProcessMaterial_constant_PARAM_ANGLE: + +.. _class_ParticleProcessMaterial_constant_PARAM_SCALE: + +.. _class_ParticleProcessMaterial_constant_PARAM_HUE_VARIATION: + +.. _class_ParticleProcessMaterial_constant_PARAM_ANIM_SPEED: + +.. _class_ParticleProcessMaterial_constant_PARAM_ANIM_OFFSET: + +.. _class_ParticleProcessMaterial_constant_PARAM_MAX: + +.. _class_ParticleProcessMaterial_constant_PARAM_TURB_VEL_INFLUENCE: + +.. _class_ParticleProcessMaterial_constant_PARAM_TURB_INIT_DISPLACEMENT: + +.. _class_ParticleProcessMaterial_constant_PARAM_TURB_INFLUENCE_OVER_LIFE: + +enum **Parameter**: + +- **PARAM_INITIAL_LINEAR_VELOCITY** = **0** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set initial velocity properties. + +- **PARAM_ANGULAR_VELOCITY** = **1** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set angular velocity properties. + +- **PARAM_ORBIT_VELOCITY** = **2** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set orbital velocity properties. + +- **PARAM_LINEAR_ACCEL** = **3** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set linear acceleration properties. + +- **PARAM_RADIAL_ACCEL** = **4** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set radial acceleration properties. + +- **PARAM_TANGENTIAL_ACCEL** = **5** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set tangential acceleration properties. + +- **PARAM_DAMPING** = **6** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set damping properties. + +- **PARAM_ANGLE** = **7** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set angle properties. + +- **PARAM_SCALE** = **8** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set scale properties. + +- **PARAM_HUE_VARIATION** = **9** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set hue variation properties. + +- **PARAM_ANIM_SPEED** = **10** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set animation speed properties. + +- **PARAM_ANIM_OFFSET** = **11** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set animation offset properties. + +- **PARAM_MAX** = **15** --- Represents the size of the :ref:`Parameter` enum. + +- **PARAM_TURB_VEL_INFLUENCE** = **13** --- Use with :ref:`set_param_min` and :ref:`set_param_max` to set the turbulence minimum und maximum influence on each particles velocity. + +- **PARAM_TURB_INIT_DISPLACEMENT** = **14** --- Use with :ref:`set_param_min` and :ref:`set_param_max` to set the turbulence minimum and maximum displacement of the particles spawn position. + +- **PARAM_TURB_INFLUENCE_OVER_LIFE** = **12** --- Use with :ref:`set_param_texture` to set the turbulence influence over the particles life time. + +---- + +.. _enum_ParticleProcessMaterial_ParticleFlags: + +.. _class_ParticleProcessMaterial_constant_PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY: + +.. _class_ParticleProcessMaterial_constant_PARTICLE_FLAG_ROTATE_Y: + +.. _class_ParticleProcessMaterial_constant_PARTICLE_FLAG_DISABLE_Z: + +.. _class_ParticleProcessMaterial_constant_PARTICLE_FLAG_MAX: + +enum **ParticleFlags**: + +- **PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY** = **0** --- Use with :ref:`set_particle_flag` to set :ref:`particle_flag_align_y`. + +- **PARTICLE_FLAG_ROTATE_Y** = **1** --- Use with :ref:`set_particle_flag` to set :ref:`particle_flag_rotate_y`. + +- **PARTICLE_FLAG_DISABLE_Z** = **2** --- Use with :ref:`set_particle_flag` to set :ref:`particle_flag_disable_z`. + +- **PARTICLE_FLAG_MAX** = **3** --- Represents the size of the :ref:`ParticleFlags` enum. + +---- + +.. _enum_ParticleProcessMaterial_EmissionShape: + +.. _class_ParticleProcessMaterial_constant_EMISSION_SHAPE_POINT: + +.. _class_ParticleProcessMaterial_constant_EMISSION_SHAPE_SPHERE: + +.. _class_ParticleProcessMaterial_constant_EMISSION_SHAPE_SPHERE_SURFACE: + +.. _class_ParticleProcessMaterial_constant_EMISSION_SHAPE_BOX: + +.. _class_ParticleProcessMaterial_constant_EMISSION_SHAPE_POINTS: + +.. _class_ParticleProcessMaterial_constant_EMISSION_SHAPE_DIRECTED_POINTS: + +.. _class_ParticleProcessMaterial_constant_EMISSION_SHAPE_RING: + +.. _class_ParticleProcessMaterial_constant_EMISSION_SHAPE_MAX: + +enum **EmissionShape**: + +- **EMISSION_SHAPE_POINT** = **0** --- All particles will be emitted from a single point. + +- **EMISSION_SHAPE_SPHERE** = **1** --- Particles will be emitted in the volume of a sphere. + +- **EMISSION_SHAPE_SPHERE_SURFACE** = **2** --- Particles will be emitted on the surface of a sphere. + +- **EMISSION_SHAPE_BOX** = **3** --- Particles will be emitted in the volume of a box. + +- **EMISSION_SHAPE_POINTS** = **4** --- Particles will be emitted at a position determined by sampling a random point on the :ref:`emission_point_texture`. Particle color will be modulated by :ref:`emission_color_texture`. + +- **EMISSION_SHAPE_DIRECTED_POINTS** = **5** --- Particles will be emitted at a position determined by sampling a random point on the :ref:`emission_point_texture`. Particle velocity and rotation will be set based on :ref:`emission_normal_texture`. Particle color will be modulated by :ref:`emission_color_texture`. + +- **EMISSION_SHAPE_RING** = **6** --- Particles will be emitted in a ring or cylinder. + +- **EMISSION_SHAPE_MAX** = **7** --- Represents the size of the :ref:`EmissionShape` enum. + +---- + +.. _enum_ParticleProcessMaterial_SubEmitterMode: + +.. _class_ParticleProcessMaterial_constant_SUB_EMITTER_DISABLED: + +.. _class_ParticleProcessMaterial_constant_SUB_EMITTER_CONSTANT: + +.. _class_ParticleProcessMaterial_constant_SUB_EMITTER_AT_END: + +.. _class_ParticleProcessMaterial_constant_SUB_EMITTER_AT_COLLISION: + +.. _class_ParticleProcessMaterial_constant_SUB_EMITTER_MAX: + +enum **SubEmitterMode**: + +- **SUB_EMITTER_DISABLED** = **0** + +- **SUB_EMITTER_CONSTANT** = **1** + +- **SUB_EMITTER_AT_END** = **2** + +- **SUB_EMITTER_AT_COLLISION** = **3** + +- **SUB_EMITTER_MAX** = **4** --- Represents the size of the :ref:`SubEmitterMode` enum. + +---- + +.. _enum_ParticleProcessMaterial_CollisionMode: + +.. _class_ParticleProcessMaterial_constant_COLLISION_DISABLED: + +.. _class_ParticleProcessMaterial_constant_COLLISION_RIGID: + +.. _class_ParticleProcessMaterial_constant_COLLISION_HIDE_ON_CONTACT: + +.. _class_ParticleProcessMaterial_constant_COLLISION_MAX: + +enum **CollisionMode**: + +- **COLLISION_DISABLED** = **0** --- No collision for particles. Particles will go through :ref:`GPUParticlesCollision3D` nodes. + +- **COLLISION_RIGID** = **1** --- :ref:`RigidBody3D`-style collision for particles using :ref:`GPUParticlesCollision3D` nodes. + +- **COLLISION_HIDE_ON_CONTACT** = **2** --- Hide particles instantly when colliding with a :ref:`GPUParticlesCollision3D` node. This can be combined with a subemitter that uses the :ref:`COLLISION_RIGID` collision mode to "replace" the parent particle with the subemitter on impact. + +- **COLLISION_MAX** = **3** --- Represents the size of the :ref:`CollisionMode` enum. + +Property Descriptions +--------------------- + +.. _class_ParticleProcessMaterial_property_angle_curve: + +- :ref:`Texture2D` **angle_curve** + ++----------+--------------------------+ +| *Setter* | set_param_texture(value) | ++----------+--------------------------+ +| *Getter* | get_param_texture() | ++----------+--------------------------+ + +Each particle's rotation will be animated along this :ref:`CurveTexture`. + +---- + +.. _class_ParticleProcessMaterial_property_angle_max: + +- :ref:`float` **angle_max** + ++-----------+----------------------+ +| *Default* | ``0.0`` | ++-----------+----------------------+ +| *Setter* | set_param_max(value) | ++-----------+----------------------+ +| *Getter* | get_param_max() | ++-----------+----------------------+ + +Maximum initial rotation applied to each particle, in degrees. + +Only applied when :ref:`particle_flag_disable_z` or :ref:`particle_flag_rotate_y` are ``true`` or the :ref:`BaseMaterial3D` being used to draw the particle is using :ref:`BaseMaterial3D.BILLBOARD_PARTICLES`. + +---- + +.. _class_ParticleProcessMaterial_property_angle_min: + +- :ref:`float` **angle_min** + ++-----------+----------------------+ +| *Default* | ``0.0`` | ++-----------+----------------------+ +| *Setter* | set_param_min(value) | ++-----------+----------------------+ +| *Getter* | get_param_min() | ++-----------+----------------------+ + +Minimum equivalent of :ref:`angle_max`. + +---- + +.. _class_ParticleProcessMaterial_property_angular_velocity_curve: + +- :ref:`Texture2D` **angular_velocity_curve** + ++----------+--------------------------+ +| *Setter* | set_param_texture(value) | ++----------+--------------------------+ +| *Getter* | get_param_texture() | ++----------+--------------------------+ + +Each particle's angular velocity (rotation speed) will vary along this :ref:`CurveTexture` over its lifetime. + +---- + +.. _class_ParticleProcessMaterial_property_angular_velocity_max: + +- :ref:`float` **angular_velocity_max** + ++-----------+----------------------+ +| *Default* | ``0.0`` | ++-----------+----------------------+ +| *Setter* | set_param_max(value) | ++-----------+----------------------+ +| *Getter* | get_param_max() | ++-----------+----------------------+ + +Maximum initial angular velocity (rotation speed) applied to each particle in *degrees* per second. + +Only applied when :ref:`particle_flag_disable_z` or :ref:`particle_flag_rotate_y` are ``true`` or the :ref:`BaseMaterial3D` being used to draw the particle is using :ref:`BaseMaterial3D.BILLBOARD_PARTICLES`. + +---- + +.. _class_ParticleProcessMaterial_property_angular_velocity_min: + +- :ref:`float` **angular_velocity_min** + ++-----------+----------------------+ +| *Default* | ``0.0`` | ++-----------+----------------------+ +| *Setter* | set_param_min(value) | ++-----------+----------------------+ +| *Getter* | get_param_min() | ++-----------+----------------------+ + +Minimum equivalent of :ref:`angular_velocity_max`. + +---- + +.. _class_ParticleProcessMaterial_property_anim_offset_curve: + +- :ref:`Texture2D` **anim_offset_curve** + ++----------+--------------------------+ +| *Setter* | set_param_texture(value) | ++----------+--------------------------+ +| *Getter* | get_param_texture() | ++----------+--------------------------+ + +Each particle's animation offset will vary along this :ref:`CurveTexture`. + +---- + +.. _class_ParticleProcessMaterial_property_anim_offset_max: + +- :ref:`float` **anim_offset_max** + ++-----------+----------------------+ +| *Default* | ``0.0`` | ++-----------+----------------------+ +| *Setter* | set_param_max(value) | ++-----------+----------------------+ +| *Getter* | get_param_max() | ++-----------+----------------------+ + +Maximum animation offset that corresponds to frame index in the texture. ``0`` is the first frame, ``1`` is the last one. See :ref:`CanvasItemMaterial.particles_animation`. + +---- + +.. _class_ParticleProcessMaterial_property_anim_offset_min: + +- :ref:`float` **anim_offset_min** + ++-----------+----------------------+ +| *Default* | ``0.0`` | ++-----------+----------------------+ +| *Setter* | set_param_min(value) | ++-----------+----------------------+ +| *Getter* | get_param_min() | ++-----------+----------------------+ + +Minimum equivalent of :ref:`anim_offset_max`. + +---- + +.. _class_ParticleProcessMaterial_property_anim_speed_curve: + +- :ref:`Texture2D` **anim_speed_curve** + ++----------+--------------------------+ +| *Setter* | set_param_texture(value) | ++----------+--------------------------+ +| *Getter* | get_param_texture() | ++----------+--------------------------+ + +Each particle's animation speed will vary along this :ref:`CurveTexture`. + +---- + +.. _class_ParticleProcessMaterial_property_anim_speed_max: + +- :ref:`float` **anim_speed_max** + ++-----------+----------------------+ +| *Default* | ``0.0`` | ++-----------+----------------------+ +| *Setter* | set_param_max(value) | ++-----------+----------------------+ +| *Getter* | get_param_max() | ++-----------+----------------------+ + +Maximum particle animation speed. Animation speed of ``1`` means that the particles will make full ``0`` to ``1`` offset cycle during lifetime, ``2`` means ``2`` cycles etc. + +With animation speed greater than ``1``, remember to enable :ref:`CanvasItemMaterial.particles_anim_loop` property if you want the animation to repeat. + +---- + +.. _class_ParticleProcessMaterial_property_anim_speed_min: + +- :ref:`float` **anim_speed_min** + ++-----------+----------------------+ +| *Default* | ``0.0`` | ++-----------+----------------------+ +| *Setter* | set_param_min(value) | ++-----------+----------------------+ +| *Getter* | get_param_min() | ++-----------+----------------------+ + +Minimum equivalent of :ref:`anim_speed_max`. + +---- + +.. _class_ParticleProcessMaterial_property_attractor_interaction_enabled: + +- :ref:`bool` **attractor_interaction_enabled** + ++-----------+------------------------------------------+ +| *Default* | ``true`` | ++-----------+------------------------------------------+ +| *Setter* | set_attractor_interaction_enabled(value) | ++-----------+------------------------------------------+ +| *Getter* | is_attractor_interaction_enabled() | ++-----------+------------------------------------------+ + +True if the interaction with particle attractors is enabled. + +---- + +.. _class_ParticleProcessMaterial_property_collision_bounce: + +- :ref:`float` **collision_bounce** + ++----------+-----------------------------+ +| *Setter* | set_collision_bounce(value) | ++----------+-----------------------------+ +| *Getter* | get_collision_bounce() | ++----------+-----------------------------+ + +The particles' bounciness. Values range from ``0`` (no bounce) to ``1`` (full bounciness). Only effective if :ref:`collision_mode` is :ref:`COLLISION_RIGID`. + +---- + +.. _class_ParticleProcessMaterial_property_collision_friction: + +- :ref:`float` **collision_friction** + ++----------+-------------------------------+ +| *Setter* | set_collision_friction(value) | ++----------+-------------------------------+ +| *Getter* | get_collision_friction() | ++----------+-------------------------------+ + +The particles' friction. Values range from ``0`` (frictionless) to ``1`` (maximum friction). Only effective if :ref:`collision_mode` is :ref:`COLLISION_RIGID`. + +---- + +.. _class_ParticleProcessMaterial_property_collision_mode: + +- :ref:`CollisionMode` **collision_mode** + ++-----------+---------------------------+ +| *Default* | ``0`` | ++-----------+---------------------------+ +| *Setter* | set_collision_mode(value) | ++-----------+---------------------------+ +| *Getter* | get_collision_mode() | ++-----------+---------------------------+ + +The particles' collision mode. + +\ **Note:** Particles can only collide with :ref:`GPUParticlesCollision3D` nodes, not :ref:`PhysicsBody3D` nodes. To make particles collide with various objects, you can add :ref:`GPUParticlesCollision3D` nodes as children of :ref:`PhysicsBody3D` nodes. + +---- + +.. _class_ParticleProcessMaterial_property_collision_use_scale: + +- :ref:`bool` **collision_use_scale** + ++-----------+--------------------------------+ +| *Default* | ``false`` | ++-----------+--------------------------------+ +| *Setter* | set_collision_use_scale(value) | ++-----------+--------------------------------+ +| *Getter* | is_collision_using_scale() | ++-----------+--------------------------------+ + +Should collision take scale into account. + +---- + +.. _class_ParticleProcessMaterial_property_color: + +- :ref:`Color` **color** + ++-----------+-----------------------+ +| *Default* | ``Color(1, 1, 1, 1)`` | ++-----------+-----------------------+ +| *Setter* | set_color(value) | ++-----------+-----------------------+ +| *Getter* | get_color() | ++-----------+-----------------------+ + +Each particle's initial color. If the :ref:`GPUParticles2D`'s ``texture`` is defined, it will be multiplied by this color. + +\ **Note:** :ref:`color` multiplies the particle mesh's vertex colors. To have a visible effect on a :ref:`BaseMaterial3D`, :ref:`BaseMaterial3D.vertex_color_use_as_albedo` *must* be ``true``. For a :ref:`ShaderMaterial`, ``ALBEDO *= COLOR.rgb;`` must be inserted in the shader's ``fragment()`` function. Otherwise, :ref:`color` will have no visible effect. + +---- + +.. _class_ParticleProcessMaterial_property_color_initial_ramp: + +- :ref:`Texture2D` **color_initial_ramp** + ++----------+-------------------------------+ +| *Setter* | set_color_initial_ramp(value) | ++----------+-------------------------------+ +| *Getter* | get_color_initial_ramp() | ++----------+-------------------------------+ + +Each particle's initial color will vary along this :ref:`GradientTexture1D` (multiplied with :ref:`color`). + +\ **Note:** :ref:`color_initial_ramp` multiplies the particle mesh's vertex colors. To have a visible effect on a :ref:`BaseMaterial3D`, :ref:`BaseMaterial3D.vertex_color_use_as_albedo` *must* be ``true``. For a :ref:`ShaderMaterial`, ``ALBEDO *= COLOR.rgb;`` must be inserted in the shader's ``fragment()`` function. Otherwise, :ref:`color_initial_ramp` will have no visible effect. + +---- + +.. _class_ParticleProcessMaterial_property_color_ramp: + +- :ref:`Texture2D` **color_ramp** + ++----------+-----------------------+ +| *Setter* | set_color_ramp(value) | ++----------+-----------------------+ +| *Getter* | get_color_ramp() | ++----------+-----------------------+ + +Each particle's color will vary along this :ref:`GradientTexture1D` over its lifetime (multiplied with :ref:`color`). + +\ **Note:** :ref:`color_ramp` multiplies the particle mesh's vertex colors. To have a visible effect on a :ref:`BaseMaterial3D`, :ref:`BaseMaterial3D.vertex_color_use_as_albedo` *must* be ``true``. For a :ref:`ShaderMaterial`, ``ALBEDO *= COLOR.rgb;`` must be inserted in the shader's ``fragment()`` function. Otherwise, :ref:`color_ramp` will have no visible effect. + +---- + +.. _class_ParticleProcessMaterial_property_damping_curve: + +- :ref:`Texture2D` **damping_curve** + ++----------+--------------------------+ +| *Setter* | set_param_texture(value) | ++----------+--------------------------+ +| *Getter* | get_param_texture() | ++----------+--------------------------+ + +Damping will vary along this :ref:`CurveTexture`. + +---- + +.. _class_ParticleProcessMaterial_property_damping_max: + +- :ref:`float` **damping_max** + ++-----------+----------------------+ +| *Default* | ``0.0`` | ++-----------+----------------------+ +| *Setter* | set_param_max(value) | ++-----------+----------------------+ +| *Getter* | get_param_max() | ++-----------+----------------------+ + +The maximum rate at which particles lose velocity. For example value of ``100`` means that the particle will go from ``100`` velocity to ``0`` in ``1`` second. + +---- + +.. _class_ParticleProcessMaterial_property_damping_min: + +- :ref:`float` **damping_min** + ++-----------+----------------------+ +| *Default* | ``0.0`` | ++-----------+----------------------+ +| *Setter* | set_param_min(value) | ++-----------+----------------------+ +| *Getter* | get_param_min() | ++-----------+----------------------+ + +Minimum equivalent of :ref:`damping_max`. + +---- + +.. _class_ParticleProcessMaterial_property_direction: + +- :ref:`Vector3` **direction** + ++-----------+----------------------+ +| *Default* | ``Vector3(1, 0, 0)`` | ++-----------+----------------------+ +| *Setter* | set_direction(value) | ++-----------+----------------------+ +| *Getter* | get_direction() | ++-----------+----------------------+ + +Unit vector specifying the particles' emission direction. + +---- + +.. _class_ParticleProcessMaterial_property_emission_box_extents: + +- :ref:`Vector3` **emission_box_extents** + ++----------+---------------------------------+ +| *Setter* | set_emission_box_extents(value) | ++----------+---------------------------------+ +| *Getter* | get_emission_box_extents() | ++----------+---------------------------------+ + +The box's extents if ``emission_shape`` is set to :ref:`EMISSION_SHAPE_BOX`. + +---- + +.. _class_ParticleProcessMaterial_property_emission_color_texture: + +- :ref:`Texture2D` **emission_color_texture** + ++----------+-----------------------------------+ +| *Setter* | set_emission_color_texture(value) | ++----------+-----------------------------------+ +| *Getter* | get_emission_color_texture() | ++----------+-----------------------------------+ + +Particle color will be modulated by color determined by sampling this texture at the same point as the :ref:`emission_point_texture`. + +\ **Note:** :ref:`emission_color_texture` multiplies the particle mesh's vertex colors. To have a visible effect on a :ref:`BaseMaterial3D`, :ref:`BaseMaterial3D.vertex_color_use_as_albedo` *must* be ``true``. For a :ref:`ShaderMaterial`, ``ALBEDO *= COLOR.rgb;`` must be inserted in the shader's ``fragment()`` function. Otherwise, :ref:`emission_color_texture` will have no visible effect. + +---- + +.. _class_ParticleProcessMaterial_property_emission_normal_texture: + +- :ref:`Texture2D` **emission_normal_texture** + ++----------+------------------------------------+ +| *Setter* | set_emission_normal_texture(value) | ++----------+------------------------------------+ +| *Getter* | get_emission_normal_texture() | ++----------+------------------------------------+ + +Particle velocity and rotation will be set by sampling this texture at the same point as the :ref:`emission_point_texture`. Used only in :ref:`EMISSION_SHAPE_DIRECTED_POINTS`. Can be created automatically from mesh or node by selecting "Create Emission Points from Mesh/Node" under the "Particles" tool in the toolbar. + +---- + +.. _class_ParticleProcessMaterial_property_emission_point_count: + +- :ref:`int` **emission_point_count** + ++----------+---------------------------------+ +| *Setter* | set_emission_point_count(value) | ++----------+---------------------------------+ +| *Getter* | get_emission_point_count() | ++----------+---------------------------------+ + +The number of emission points if ``emission_shape`` is set to :ref:`EMISSION_SHAPE_POINTS` or :ref:`EMISSION_SHAPE_DIRECTED_POINTS`. + +---- + +.. _class_ParticleProcessMaterial_property_emission_point_texture: + +- :ref:`Texture2D` **emission_point_texture** + ++----------+-----------------------------------+ +| *Setter* | set_emission_point_texture(value) | ++----------+-----------------------------------+ +| *Getter* | get_emission_point_texture() | ++----------+-----------------------------------+ + +Particles will be emitted at positions determined by sampling this texture at a random position. Used with :ref:`EMISSION_SHAPE_POINTS` and :ref:`EMISSION_SHAPE_DIRECTED_POINTS`. Can be created automatically from mesh or node by selecting "Create Emission Points from Mesh/Node" under the "Particles" tool in the toolbar. + +---- + +.. _class_ParticleProcessMaterial_property_emission_ring_axis: + +- :ref:`Vector3` **emission_ring_axis** + ++----------+-------------------------------+ +| *Setter* | set_emission_ring_axis(value) | ++----------+-------------------------------+ +| *Getter* | get_emission_ring_axis() | ++----------+-------------------------------+ + +The axis of the ring when using the emitter :ref:`EMISSION_SHAPE_RING`. + +---- + +.. _class_ParticleProcessMaterial_property_emission_ring_height: + +- :ref:`float` **emission_ring_height** + ++----------+---------------------------------+ +| *Setter* | set_emission_ring_height(value) | ++----------+---------------------------------+ +| *Getter* | get_emission_ring_height() | ++----------+---------------------------------+ + +The height of the ring when using the emitter :ref:`EMISSION_SHAPE_RING`. + +---- + +.. _class_ParticleProcessMaterial_property_emission_ring_inner_radius: + +- :ref:`float` **emission_ring_inner_radius** + ++----------+---------------------------------------+ +| *Setter* | set_emission_ring_inner_radius(value) | ++----------+---------------------------------------+ +| *Getter* | get_emission_ring_inner_radius() | ++----------+---------------------------------------+ + +The inner radius of the ring when using the emitter :ref:`EMISSION_SHAPE_RING`. + +---- + +.. _class_ParticleProcessMaterial_property_emission_ring_radius: + +- :ref:`float` **emission_ring_radius** + ++----------+---------------------------------+ +| *Setter* | set_emission_ring_radius(value) | ++----------+---------------------------------+ +| *Getter* | get_emission_ring_radius() | ++----------+---------------------------------+ + +The radius of the ring when using the emitter :ref:`EMISSION_SHAPE_RING`. + +---- + +.. _class_ParticleProcessMaterial_property_emission_shape: + +- :ref:`EmissionShape` **emission_shape** + ++-----------+---------------------------+ +| *Default* | ``0`` | ++-----------+---------------------------+ +| *Setter* | set_emission_shape(value) | ++-----------+---------------------------+ +| *Getter* | get_emission_shape() | ++-----------+---------------------------+ + +Particles will be emitted inside this region. Use :ref:`EmissionShape` constants for values. + +---- + +.. _class_ParticleProcessMaterial_property_emission_sphere_radius: + +- :ref:`float` **emission_sphere_radius** + ++----------+-----------------------------------+ +| *Setter* | set_emission_sphere_radius(value) | ++----------+-----------------------------------+ +| *Getter* | get_emission_sphere_radius() | ++----------+-----------------------------------+ + +The sphere's radius if ``emission_shape`` is set to :ref:`EMISSION_SHAPE_SPHERE`. + +---- + +.. _class_ParticleProcessMaterial_property_flatness: + +- :ref:`float` **flatness** + ++-----------+---------------------+ +| *Default* | ``0.0`` | ++-----------+---------------------+ +| *Setter* | set_flatness(value) | ++-----------+---------------------+ +| *Getter* | get_flatness() | ++-----------+---------------------+ + +Amount of :ref:`spread` along the Y axis. + +---- + +.. _class_ParticleProcessMaterial_property_gravity: + +- :ref:`Vector3` **gravity** + ++-----------+-------------------------+ +| *Default* | ``Vector3(0, -9.8, 0)`` | ++-----------+-------------------------+ +| *Setter* | set_gravity(value) | ++-----------+-------------------------+ +| *Getter* | get_gravity() | ++-----------+-------------------------+ + +Gravity applied to every particle. + +---- + +.. _class_ParticleProcessMaterial_property_hue_variation_curve: + +- :ref:`Texture2D` **hue_variation_curve** + ++----------+--------------------------+ +| *Setter* | set_param_texture(value) | ++----------+--------------------------+ +| *Getter* | get_param_texture() | ++----------+--------------------------+ + +Each particle's hue will vary along this :ref:`CurveTexture`. + +---- + +.. _class_ParticleProcessMaterial_property_hue_variation_max: + +- :ref:`float` **hue_variation_max** + ++-----------+----------------------+ +| *Default* | ``0.0`` | ++-----------+----------------------+ +| *Setter* | set_param_max(value) | ++-----------+----------------------+ +| *Getter* | get_param_max() | ++-----------+----------------------+ + +Maximum initial hue variation applied to each particle. It will shift the particle color's hue. + +---- + +.. _class_ParticleProcessMaterial_property_hue_variation_min: + +- :ref:`float` **hue_variation_min** + ++-----------+----------------------+ +| *Default* | ``0.0`` | ++-----------+----------------------+ +| *Setter* | set_param_min(value) | ++-----------+----------------------+ +| *Getter* | get_param_min() | ++-----------+----------------------+ + +Minimum equivalent of :ref:`hue_variation_max`. + +---- + +.. _class_ParticleProcessMaterial_property_initial_velocity_max: + +- :ref:`float` **initial_velocity_max** + ++-----------+----------------------+ +| *Default* | ``0.0`` | ++-----------+----------------------+ +| *Setter* | set_param_max(value) | ++-----------+----------------------+ +| *Getter* | get_param_max() | ++-----------+----------------------+ + +Maximum initial velocity magnitude for each particle. Direction comes from :ref:`direction` and :ref:`spread`. + +---- + +.. _class_ParticleProcessMaterial_property_initial_velocity_min: + +- :ref:`float` **initial_velocity_min** + ++-----------+----------------------+ +| *Default* | ``0.0`` | ++-----------+----------------------+ +| *Setter* | set_param_min(value) | ++-----------+----------------------+ +| *Getter* | get_param_min() | ++-----------+----------------------+ + +Minimum equivalent of :ref:`initial_velocity_max`. + +---- + +.. _class_ParticleProcessMaterial_property_lifetime_randomness: + +- :ref:`float` **lifetime_randomness** + ++-----------+--------------------------------+ +| *Default* | ``0.0`` | ++-----------+--------------------------------+ +| *Setter* | set_lifetime_randomness(value) | ++-----------+--------------------------------+ +| *Getter* | get_lifetime_randomness() | ++-----------+--------------------------------+ + +Particle lifetime randomness ratio. The lifetime will be multiplied by a value interpolated between ``1.0`` and a random number less than one. For example a random ratio of ``0.4`` would scale the original lifetime between ``0.4-1.0`` of its original value. + +---- + +.. _class_ParticleProcessMaterial_property_linear_accel_curve: + +- :ref:`Texture2D` **linear_accel_curve** + ++----------+--------------------------+ +| *Setter* | set_param_texture(value) | ++----------+--------------------------+ +| *Getter* | get_param_texture() | ++----------+--------------------------+ + +Each particle's linear acceleration will vary along this :ref:`CurveTexture`. + +---- + +.. _class_ParticleProcessMaterial_property_linear_accel_max: + +- :ref:`float` **linear_accel_max** + ++-----------+----------------------+ +| *Default* | ``0.0`` | ++-----------+----------------------+ +| *Setter* | set_param_max(value) | ++-----------+----------------------+ +| *Getter* | get_param_max() | ++-----------+----------------------+ + +Maximum linear acceleration applied to each particle in the direction of motion. + +---- + +.. _class_ParticleProcessMaterial_property_linear_accel_min: + +- :ref:`float` **linear_accel_min** + ++-----------+----------------------+ +| *Default* | ``0.0`` | ++-----------+----------------------+ +| *Setter* | set_param_min(value) | ++-----------+----------------------+ +| *Getter* | get_param_min() | ++-----------+----------------------+ + +Minimum equivalent of :ref:`linear_accel_min`. + +---- + +.. _class_ParticleProcessMaterial_property_orbit_velocity_curve: + +- :ref:`Texture2D` **orbit_velocity_curve** + ++----------+--------------------------+ +| *Setter* | set_param_texture(value) | ++----------+--------------------------+ +| *Getter* | get_param_texture() | ++----------+--------------------------+ + +Each particle's orbital velocity will vary along this :ref:`CurveTexture`. + +---- + +.. _class_ParticleProcessMaterial_property_orbit_velocity_max: + +- :ref:`float` **orbit_velocity_max** + ++----------+----------------------+ +| *Setter* | set_param_max(value) | ++----------+----------------------+ +| *Getter* | get_param_max() | ++----------+----------------------+ + +Maximum orbital velocity applied to each particle. Makes the particles circle around origin. Specified in number of full rotations around origin per second. + +Only available when :ref:`particle_flag_disable_z` is ``true``. + +---- + +.. _class_ParticleProcessMaterial_property_orbit_velocity_min: + +- :ref:`float` **orbit_velocity_min** + ++----------+----------------------+ +| *Setter* | set_param_min(value) | ++----------+----------------------+ +| *Getter* | get_param_min() | ++----------+----------------------+ + +Minimum equivalent of :ref:`orbit_velocity_max`. + +---- + +.. _class_ParticleProcessMaterial_property_particle_flag_align_y: + +- :ref:`bool` **particle_flag_align_y** + ++-----------+--------------------------+ +| *Default* | ``false`` | ++-----------+--------------------------+ +| *Setter* | set_particle_flag(value) | ++-----------+--------------------------+ +| *Getter* | get_particle_flag() | ++-----------+--------------------------+ + +Align Y axis of particle with the direction of its velocity. + +---- + +.. _class_ParticleProcessMaterial_property_particle_flag_disable_z: + +- :ref:`bool` **particle_flag_disable_z** + ++-----------+--------------------------+ +| *Default* | ``false`` | ++-----------+--------------------------+ +| *Setter* | set_particle_flag(value) | ++-----------+--------------------------+ +| *Getter* | get_particle_flag() | ++-----------+--------------------------+ + +If ``true``, particles will not move on the z axis. + +---- + +.. _class_ParticleProcessMaterial_property_particle_flag_rotate_y: + +- :ref:`bool` **particle_flag_rotate_y** + ++-----------+--------------------------+ +| *Default* | ``false`` | ++-----------+--------------------------+ +| *Setter* | set_particle_flag(value) | ++-----------+--------------------------+ +| *Getter* | get_particle_flag() | ++-----------+--------------------------+ + +If ``true``, particles rotate around Y axis by :ref:`angle_min`. + +---- + +.. _class_ParticleProcessMaterial_property_radial_accel_curve: + +- :ref:`Texture2D` **radial_accel_curve** + ++----------+--------------------------+ +| *Setter* | set_param_texture(value) | ++----------+--------------------------+ +| *Getter* | get_param_texture() | ++----------+--------------------------+ + +Each particle's radial acceleration will vary along this :ref:`CurveTexture`. + +---- + +.. _class_ParticleProcessMaterial_property_radial_accel_max: + +- :ref:`float` **radial_accel_max** + ++-----------+----------------------+ +| *Default* | ``0.0`` | ++-----------+----------------------+ +| *Setter* | set_param_max(value) | ++-----------+----------------------+ +| *Getter* | get_param_max() | ++-----------+----------------------+ + +Maximum radial acceleration applied to each particle. Makes particle accelerate away from the origin or towards it if negative. + +---- + +.. _class_ParticleProcessMaterial_property_radial_accel_min: + +- :ref:`float` **radial_accel_min** + ++-----------+----------------------+ +| *Default* | ``0.0`` | ++-----------+----------------------+ +| *Setter* | set_param_min(value) | ++-----------+----------------------+ +| *Getter* | get_param_min() | ++-----------+----------------------+ + +Minimum equivalent of :ref:`radial_accel_max`. + +---- + +.. _class_ParticleProcessMaterial_property_scale_curve: + +- :ref:`Texture2D` **scale_curve** + ++----------+--------------------------+ +| *Setter* | set_param_texture(value) | ++----------+--------------------------+ +| *Getter* | get_param_texture() | ++----------+--------------------------+ + +Each particle's scale will vary along this :ref:`CurveTexture`. If a :ref:`CurveXYZTexture` is supplied instead, the scale will be separated per-axis. + +---- + +.. _class_ParticleProcessMaterial_property_scale_max: + +- :ref:`float` **scale_max** + ++-----------+----------------------+ +| *Default* | ``1.0`` | ++-----------+----------------------+ +| *Setter* | set_param_max(value) | ++-----------+----------------------+ +| *Getter* | get_param_max() | ++-----------+----------------------+ + +Maximum initial scale applied to each particle. + +---- + +.. _class_ParticleProcessMaterial_property_scale_min: + +- :ref:`float` **scale_min** + ++-----------+----------------------+ +| *Default* | ``1.0`` | ++-----------+----------------------+ +| *Setter* | set_param_min(value) | ++-----------+----------------------+ +| *Getter* | get_param_min() | ++-----------+----------------------+ + +Minimum equivalent of :ref:`scale_max`. + +---- + +.. _class_ParticleProcessMaterial_property_spread: + +- :ref:`float` **spread** + ++-----------+-------------------+ +| *Default* | ``45.0`` | ++-----------+-------------------+ +| *Setter* | set_spread(value) | ++-----------+-------------------+ +| *Getter* | get_spread() | ++-----------+-------------------+ + +Each particle's initial direction range from ``+spread`` to ``-spread`` degrees. + +---- + +.. _class_ParticleProcessMaterial_property_sub_emitter_amount_at_end: + +- :ref:`int` **sub_emitter_amount_at_end** + ++----------+--------------------------------------+ +| *Setter* | set_sub_emitter_amount_at_end(value) | ++----------+--------------------------------------+ +| *Getter* | get_sub_emitter_amount_at_end() | ++----------+--------------------------------------+ + +---- + +.. _class_ParticleProcessMaterial_property_sub_emitter_frequency: + +- :ref:`float` **sub_emitter_frequency** + ++----------+----------------------------------+ +| *Setter* | set_sub_emitter_frequency(value) | ++----------+----------------------------------+ +| *Getter* | get_sub_emitter_frequency() | ++----------+----------------------------------+ + +---- + +.. _class_ParticleProcessMaterial_property_sub_emitter_keep_velocity: + +- :ref:`bool` **sub_emitter_keep_velocity** + ++-----------+--------------------------------------+ +| *Default* | ``false`` | ++-----------+--------------------------------------+ +| *Setter* | set_sub_emitter_keep_velocity(value) | ++-----------+--------------------------------------+ +| *Getter* | get_sub_emitter_keep_velocity() | ++-----------+--------------------------------------+ + +---- + +.. _class_ParticleProcessMaterial_property_sub_emitter_mode: + +- :ref:`SubEmitterMode` **sub_emitter_mode** + ++-----------+-----------------------------+ +| *Default* | ``0`` | ++-----------+-----------------------------+ +| *Setter* | set_sub_emitter_mode(value) | ++-----------+-----------------------------+ +| *Getter* | get_sub_emitter_mode() | ++-----------+-----------------------------+ + +---- + +.. _class_ParticleProcessMaterial_property_tangential_accel_curve: + +- :ref:`Texture2D` **tangential_accel_curve** + ++----------+--------------------------+ +| *Setter* | set_param_texture(value) | ++----------+--------------------------+ +| *Getter* | get_param_texture() | ++----------+--------------------------+ + +Each particle's tangential acceleration will vary along this :ref:`CurveTexture`. + +---- + +.. _class_ParticleProcessMaterial_property_tangential_accel_max: + +- :ref:`float` **tangential_accel_max** + ++-----------+----------------------+ +| *Default* | ``0.0`` | ++-----------+----------------------+ +| *Setter* | set_param_max(value) | ++-----------+----------------------+ +| *Getter* | get_param_max() | ++-----------+----------------------+ + +Maximum tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion. + +---- + +.. _class_ParticleProcessMaterial_property_tangential_accel_min: + +- :ref:`float` **tangential_accel_min** + ++-----------+----------------------+ +| *Default* | ``0.0`` | ++-----------+----------------------+ +| *Setter* | set_param_min(value) | ++-----------+----------------------+ +| *Getter* | get_param_min() | ++-----------+----------------------+ + +Minimum equivalent of :ref:`tangential_accel_max`. + +---- + +.. _class_ParticleProcessMaterial_property_turbulence_enabled: + +- :ref:`bool` **turbulence_enabled** + ++-----------+-------------------------------+ +| *Default* | ``false`` | ++-----------+-------------------------------+ +| *Setter* | set_turbulence_enabled(value) | ++-----------+-------------------------------+ +| *Getter* | get_turbulence_enabled() | ++-----------+-------------------------------+ + +Enables and disables Turbulence for the particle system. + +---- + +.. _class_ParticleProcessMaterial_property_turbulence_influence_max: + +- :ref:`float` **turbulence_influence_max** + ++-----------+----------------------+ +| *Default* | ``0.1`` | ++-----------+----------------------+ +| *Setter* | set_param_max(value) | ++-----------+----------------------+ +| *Getter* | get_param_max() | ++-----------+----------------------+ + +Minimum turbulence influence on each particle. + + The actual amount of turbulence influence on each particle is calculated as a random value between :ref:`turbulence_influence_min` and :ref:`turbulence_influence_max` and multiplied by the amount of turbulence influence from :ref:`turbulence_influence_over_life`. + +---- + +.. _class_ParticleProcessMaterial_property_turbulence_influence_min: + +- :ref:`float` **turbulence_influence_min** + ++-----------+----------------------+ +| *Default* | ``0.1`` | ++-----------+----------------------+ +| *Setter* | set_param_min(value) | ++-----------+----------------------+ +| *Getter* | get_param_min() | ++-----------+----------------------+ + +Maximum turbulence influence on each particle. + +The actual amount of turbulence influence on each particle is calculated as a random value between :ref:`turbulence_influence_min` and :ref:`turbulence_influence_max` and multiplied by the amount of turbulence influence from :ref:`turbulence_influence_over_life`. + +---- + +.. _class_ParticleProcessMaterial_property_turbulence_influence_over_life: + +- :ref:`Texture2D` **turbulence_influence_over_life** + ++----------+--------------------------+ +| *Setter* | set_param_texture(value) | ++----------+--------------------------+ +| *Getter* | get_param_texture() | ++----------+--------------------------+ + +Each particle's amount of turbulence will be influenced along this :ref:`CurveTexture` over its life time. + +---- + +.. _class_ParticleProcessMaterial_property_turbulence_initial_displacement_max: + +- :ref:`float` **turbulence_initial_displacement_max** + ++-----------+----------------------+ +| *Default* | ``0.0`` | ++-----------+----------------------+ +| *Setter* | set_param_max(value) | ++-----------+----------------------+ +| *Getter* | get_param_max() | ++-----------+----------------------+ + +Maximum displacement of each particles spawn position by the turbulence. + +The actual amount of displacement will be a factor of the underlying turbulence multiplied by a random value between :ref:`turbulence_initial_displacement_min` and :ref:`turbulence_initial_displacement_max`. + +---- + +.. _class_ParticleProcessMaterial_property_turbulence_initial_displacement_min: + +- :ref:`float` **turbulence_initial_displacement_min** + ++-----------+----------------------+ +| *Default* | ``0.0`` | ++-----------+----------------------+ +| *Setter* | set_param_min(value) | ++-----------+----------------------+ +| *Getter* | get_param_min() | ++-----------+----------------------+ + +Minimum displacement of each particles spawn position by the turbulence. + +The actual amount of displacement will be a factor of the underlying turbulence multiplied by a random value between :ref:`turbulence_initial_displacement_min` and :ref:`turbulence_initial_displacement_max`. + +---- + +.. _class_ParticleProcessMaterial_property_turbulence_noise_scale: + +- :ref:`float` **turbulence_noise_scale** + ++-----------+-----------------------------------+ +| *Default* | ``9.0`` | ++-----------+-----------------------------------+ +| *Setter* | set_turbulence_noise_scale(value) | ++-----------+-----------------------------------+ +| *Getter* | get_turbulence_noise_scale() | ++-----------+-----------------------------------+ + +This value controls the overall scale/frequency of the turbulence noise pattern. + +A small scale will result in smaller features with more detail while a high scale will result in smoother noise with larger features. + +---- + +.. _class_ParticleProcessMaterial_property_turbulence_noise_speed: + +- :ref:`Vector3` **turbulence_noise_speed** + ++-----------+-----------------------------------+ +| *Default* | ``Vector3(0.5, 0.5, 0.5)`` | ++-----------+-----------------------------------+ +| *Setter* | set_turbulence_noise_speed(value) | ++-----------+-----------------------------------+ +| *Getter* | get_turbulence_noise_speed() | ++-----------+-----------------------------------+ + +The movement speed of the turbulence pattern. This changes how quickly the noise changes over time. + +A value of ``Vector3(0.0, 0.0, 0.0)`` will freeze the turbulence pattern in place. + +---- + +.. _class_ParticleProcessMaterial_property_turbulence_noise_speed_random: + +- :ref:`float` **turbulence_noise_speed_random** + ++-----------+------------------------------------------+ +| *Default* | ``0.0`` | ++-----------+------------------------------------------+ +| *Setter* | set_turbulence_noise_speed_random(value) | ++-----------+------------------------------------------+ +| *Getter* | get_turbulence_noise_speed_random() | ++-----------+------------------------------------------+ + +Use to influence the noise speed in a random pattern. This helps to break up visible movement patterns. + +---- + +.. _class_ParticleProcessMaterial_property_turbulence_noise_strength: + +- :ref:`float` **turbulence_noise_strength** + ++-----------+--------------------------------------+ +| *Default* | ``1.0`` | ++-----------+--------------------------------------+ +| *Setter* | set_turbulence_noise_strength(value) | ++-----------+--------------------------------------+ +| *Getter* | get_turbulence_noise_strength() | ++-----------+--------------------------------------+ + +The turbulence noise strength. Increasing this will result in a stronger, more contrasting, noise pattern. + +Method Descriptions +------------------- + +.. _class_ParticleProcessMaterial_method_get_param_max: + +- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| + +Returns the maximum value range for the given parameter. + +---- + +.. _class_ParticleProcessMaterial_method_get_param_min: + +- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| + +Returns the minimum value range for the given parameter. + +---- + +.. _class_ParticleProcessMaterial_method_get_param_texture: + +- :ref:`Texture2D` **get_param_texture** **(** :ref:`Parameter` param **)** |const| + +Returns the :ref:`Texture2D` used by the specified parameter. + +---- + +.. _class_ParticleProcessMaterial_method_get_particle_flag: + +- :ref:`bool` **get_particle_flag** **(** :ref:`ParticleFlags` particle_flag **)** |const| + +Returns ``true`` if the specified particle flag is enabled. See :ref:`ParticleFlags` for options. + +---- + +.. _class_ParticleProcessMaterial_method_set_param_max: + +- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** + +Sets the maximum value range for the given parameter. + +---- + +.. _class_ParticleProcessMaterial_method_set_param_min: + +- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** + +Sets the minimum value range for the given parameter. + +---- + +.. _class_ParticleProcessMaterial_method_set_param_texture: + +- void **set_param_texture** **(** :ref:`Parameter` param, :ref:`Texture2D` texture **)** + +Sets the :ref:`Texture2D` for the specified :ref:`Parameter`. + +---- + +.. _class_ParticleProcessMaterial_method_set_particle_flag: + +- void **set_particle_flag** **(** :ref:`ParticleFlags` particle_flag, :ref:`bool` enable **)** + +If ``true``, enables the specified particle flag. See :ref:`ParticleFlags` for options. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_particlesmaterial.rst b/classes/class_particlesmaterial.rst deleted file mode 100644 index 053285ddd..000000000 --- a/classes/class_particlesmaterial.rst +++ /dev/null @@ -1,1402 +0,0 @@ -: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/ParticlesMaterial.xml. - -.. _class_ParticlesMaterial: - -ParticlesMaterial -================= - -**Inherits:** :ref:`Material` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -Particle properties for :ref:`GPUParticles3D` and :ref:`GPUParticles2D` nodes. - -Description ------------ - -ParticlesMaterial defines particle properties and behavior. It is used in the ``process_material`` of :ref:`GPUParticles3D` and :ref:`GPUParticles2D` emitter nodes. - -Some of this material's properties are applied to each particle when emitted, while others can have a :ref:`CurveTexture` applied to vary values over the lifetime of the particle. - -Particle animation is available only in :ref:`GPUParticles2D`. To use it, attach a :ref:`CanvasItemMaterial`, with :ref:`CanvasItemMaterial.particles_animation` enabled, to the particles node. - -Properties ----------- - -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`Texture2D` | :ref:`angle_curve` | | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`float` | :ref:`angle_max` | ``0.0`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`float` | :ref:`angle_min` | ``0.0`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`Texture2D` | :ref:`angular_velocity_curve` | | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`float` | :ref:`angular_velocity_max` | ``0.0`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`float` | :ref:`angular_velocity_min` | ``0.0`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`Texture2D` | :ref:`anim_offset_curve` | | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`float` | :ref:`anim_offset_max` | ``0.0`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`float` | :ref:`anim_offset_min` | ``0.0`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`Texture2D` | :ref:`anim_speed_curve` | | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`float` | :ref:`anim_speed_max` | ``0.0`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`float` | :ref:`anim_speed_min` | ``0.0`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`bool` | :ref:`attractor_interaction_enabled` | ``true`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`float` | :ref:`collision_bounce` | ``0.0`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`bool` | :ref:`collision_enabled` | ``false`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`float` | :ref:`collision_friction` | ``0.0`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`bool` | :ref:`collision_use_scale` | ``false`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`Color` | :ref:`color` | ``Color(1, 1, 1, 1)`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`Texture2D` | :ref:`color_initial_ramp` | | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`Texture2D` | :ref:`color_ramp` | | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`Texture2D` | :ref:`damping_curve` | | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`float` | :ref:`damping_max` | ``0.0`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`float` | :ref:`damping_min` | ``0.0`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`Vector3` | :ref:`direction` | ``Vector3(1, 0, 0)`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`Vector3` | :ref:`emission_box_extents` | | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`Texture2D` | :ref:`emission_color_texture` | | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`Texture2D` | :ref:`emission_normal_texture` | | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`int` | :ref:`emission_point_count` | | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`Texture2D` | :ref:`emission_point_texture` | | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`Vector3` | :ref:`emission_ring_axis` | | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`float` | :ref:`emission_ring_height` | | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`float` | :ref:`emission_ring_inner_radius` | | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`float` | :ref:`emission_ring_radius` | | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`EmissionShape` | :ref:`emission_shape` | ``0`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`float` | :ref:`emission_sphere_radius` | | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`float` | :ref:`flatness` | ``0.0`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`Vector3` | :ref:`gravity` | ``Vector3(0, -9.8, 0)`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`Texture2D` | :ref:`hue_variation_curve` | | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`float` | :ref:`hue_variation_max` | ``0.0`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`float` | :ref:`hue_variation_min` | ``0.0`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`float` | :ref:`initial_velocity_max` | ``0.0`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`float` | :ref:`initial_velocity_min` | ``0.0`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`float` | :ref:`lifetime_randomness` | ``0.0`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`Texture2D` | :ref:`linear_accel_curve` | | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`float` | :ref:`linear_accel_max` | ``0.0`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`float` | :ref:`linear_accel_min` | ``0.0`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`Texture2D` | :ref:`orbit_velocity_curve` | | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`float` | :ref:`orbit_velocity_max` | | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`float` | :ref:`orbit_velocity_min` | | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`bool` | :ref:`particle_flag_align_y` | ``false`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`bool` | :ref:`particle_flag_disable_z` | ``false`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`bool` | :ref:`particle_flag_rotate_y` | ``false`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`Texture2D` | :ref:`radial_accel_curve` | | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`float` | :ref:`radial_accel_max` | ``0.0`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`float` | :ref:`radial_accel_min` | ``0.0`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`Texture2D` | :ref:`scale_curve` | | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`float` | :ref:`scale_max` | ``1.0`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`float` | :ref:`scale_min` | ``1.0`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`float` | :ref:`spread` | ``45.0`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`int` | :ref:`sub_emitter_amount_at_end` | | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`float` | :ref:`sub_emitter_frequency` | | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`bool` | :ref:`sub_emitter_keep_velocity` | ``false`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`SubEmitterMode` | :ref:`sub_emitter_mode` | ``0`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`Texture2D` | :ref:`tangential_accel_curve` | | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`float` | :ref:`tangential_accel_max` | ``0.0`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`float` | :ref:`tangential_accel_min` | ``0.0`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------+-------------------------+ - -Methods -------- - -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_param_max` **(** :ref:`Parameter` param **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_param_min` **(** :ref:`Parameter` param **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`get_param_texture` **(** :ref:`Parameter` param **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_particle_flag` **(** :ref:`ParticleFlags` particle_flag **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_param_max` **(** :ref:`Parameter` param, :ref:`float` value **)** | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_param_min` **(** :ref:`Parameter` param, :ref:`float` value **)** | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_param_texture` **(** :ref:`Parameter` param, :ref:`Texture2D` texture **)** | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_particle_flag` **(** :ref:`ParticleFlags` particle_flag, :ref:`bool` enable **)** | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - -Enumerations ------------- - -.. _enum_ParticlesMaterial_Parameter: - -.. _class_ParticlesMaterial_constant_PARAM_INITIAL_LINEAR_VELOCITY: - -.. _class_ParticlesMaterial_constant_PARAM_ANGULAR_VELOCITY: - -.. _class_ParticlesMaterial_constant_PARAM_ORBIT_VELOCITY: - -.. _class_ParticlesMaterial_constant_PARAM_LINEAR_ACCEL: - -.. _class_ParticlesMaterial_constant_PARAM_RADIAL_ACCEL: - -.. _class_ParticlesMaterial_constant_PARAM_TANGENTIAL_ACCEL: - -.. _class_ParticlesMaterial_constant_PARAM_DAMPING: - -.. _class_ParticlesMaterial_constant_PARAM_ANGLE: - -.. _class_ParticlesMaterial_constant_PARAM_SCALE: - -.. _class_ParticlesMaterial_constant_PARAM_HUE_VARIATION: - -.. _class_ParticlesMaterial_constant_PARAM_ANIM_SPEED: - -.. _class_ParticlesMaterial_constant_PARAM_ANIM_OFFSET: - -.. _class_ParticlesMaterial_constant_PARAM_MAX: - -enum **Parameter**: - -- **PARAM_INITIAL_LINEAR_VELOCITY** = **0** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set initial velocity properties. - -- **PARAM_ANGULAR_VELOCITY** = **1** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set angular velocity properties. - -- **PARAM_ORBIT_VELOCITY** = **2** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set orbital velocity properties. - -- **PARAM_LINEAR_ACCEL** = **3** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set linear acceleration properties. - -- **PARAM_RADIAL_ACCEL** = **4** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set radial acceleration properties. - -- **PARAM_TANGENTIAL_ACCEL** = **5** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set tangential acceleration properties. - -- **PARAM_DAMPING** = **6** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set damping properties. - -- **PARAM_ANGLE** = **7** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set angle properties. - -- **PARAM_SCALE** = **8** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set scale properties. - -- **PARAM_HUE_VARIATION** = **9** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set hue variation properties. - -- **PARAM_ANIM_SPEED** = **10** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set animation speed properties. - -- **PARAM_ANIM_OFFSET** = **11** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set animation offset properties. - -- **PARAM_MAX** = **12** --- Represents the size of the :ref:`Parameter` enum. - ----- - -.. _enum_ParticlesMaterial_ParticleFlags: - -.. _class_ParticlesMaterial_constant_PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY: - -.. _class_ParticlesMaterial_constant_PARTICLE_FLAG_ROTATE_Y: - -.. _class_ParticlesMaterial_constant_PARTICLE_FLAG_DISABLE_Z: - -.. _class_ParticlesMaterial_constant_PARTICLE_FLAG_MAX: - -enum **ParticleFlags**: - -- **PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY** = **0** --- Use with :ref:`set_particle_flag` to set :ref:`particle_flag_align_y`. - -- **PARTICLE_FLAG_ROTATE_Y** = **1** --- Use with :ref:`set_particle_flag` to set :ref:`particle_flag_rotate_y`. - -- **PARTICLE_FLAG_DISABLE_Z** = **2** --- Use with :ref:`set_particle_flag` to set :ref:`particle_flag_disable_z`. - -- **PARTICLE_FLAG_MAX** = **3** --- Represents the size of the :ref:`ParticleFlags` enum. - ----- - -.. _enum_ParticlesMaterial_EmissionShape: - -.. _class_ParticlesMaterial_constant_EMISSION_SHAPE_POINT: - -.. _class_ParticlesMaterial_constant_EMISSION_SHAPE_SPHERE: - -.. _class_ParticlesMaterial_constant_EMISSION_SHAPE_SPHERE_SURFACE: - -.. _class_ParticlesMaterial_constant_EMISSION_SHAPE_BOX: - -.. _class_ParticlesMaterial_constant_EMISSION_SHAPE_POINTS: - -.. _class_ParticlesMaterial_constant_EMISSION_SHAPE_DIRECTED_POINTS: - -.. _class_ParticlesMaterial_constant_EMISSION_SHAPE_RING: - -.. _class_ParticlesMaterial_constant_EMISSION_SHAPE_MAX: - -enum **EmissionShape**: - -- **EMISSION_SHAPE_POINT** = **0** --- All particles will be emitted from a single point. - -- **EMISSION_SHAPE_SPHERE** = **1** --- Particles will be emitted in the volume of a sphere. - -- **EMISSION_SHAPE_SPHERE_SURFACE** = **2** --- Particles will be emitted on the surface of a sphere. - -- **EMISSION_SHAPE_BOX** = **3** --- Particles will be emitted in the volume of a box. - -- **EMISSION_SHAPE_POINTS** = **4** --- Particles will be emitted at a position determined by sampling a random point on the :ref:`emission_point_texture`. Particle color will be modulated by :ref:`emission_color_texture`. - -- **EMISSION_SHAPE_DIRECTED_POINTS** = **5** --- Particles will be emitted at a position determined by sampling a random point on the :ref:`emission_point_texture`. Particle velocity and rotation will be set based on :ref:`emission_normal_texture`. Particle color will be modulated by :ref:`emission_color_texture`. - -- **EMISSION_SHAPE_RING** = **6** --- Particles will be emitted in a ring or cylinder. - -- **EMISSION_SHAPE_MAX** = **7** --- Represents the size of the :ref:`EmissionShape` enum. - ----- - -.. _enum_ParticlesMaterial_SubEmitterMode: - -.. _class_ParticlesMaterial_constant_SUB_EMITTER_DISABLED: - -.. _class_ParticlesMaterial_constant_SUB_EMITTER_CONSTANT: - -.. _class_ParticlesMaterial_constant_SUB_EMITTER_AT_END: - -.. _class_ParticlesMaterial_constant_SUB_EMITTER_AT_COLLISION: - -.. _class_ParticlesMaterial_constant_SUB_EMITTER_MAX: - -enum **SubEmitterMode**: - -- **SUB_EMITTER_DISABLED** = **0** - -- **SUB_EMITTER_CONSTANT** = **1** - -- **SUB_EMITTER_AT_END** = **2** - -- **SUB_EMITTER_AT_COLLISION** = **3** - -- **SUB_EMITTER_MAX** = **4** - -Property Descriptions ---------------------- - -.. _class_ParticlesMaterial_property_angle_curve: - -- :ref:`Texture2D` **angle_curve** - -+----------+--------------------------+ -| *Setter* | set_param_texture(value) | -+----------+--------------------------+ -| *Getter* | get_param_texture() | -+----------+--------------------------+ - -Each particle's rotation will be animated along this :ref:`CurveTexture`. - ----- - -.. _class_ParticlesMaterial_property_angle_max: - -- :ref:`float` **angle_max** - -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ - -Maximum initial rotation applied to each particle, in degrees. - -Only applied when :ref:`particle_flag_disable_z` or :ref:`particle_flag_rotate_y` are ``true`` or the :ref:`BaseMaterial3D` being used to draw the particle is using :ref:`BaseMaterial3D.BILLBOARD_PARTICLES`. - ----- - -.. _class_ParticlesMaterial_property_angle_min: - -- :ref:`float` **angle_min** - -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ - -Minimum equivalent of :ref:`angle_max`. - ----- - -.. _class_ParticlesMaterial_property_angular_velocity_curve: - -- :ref:`Texture2D` **angular_velocity_curve** - -+----------+--------------------------+ -| *Setter* | set_param_texture(value) | -+----------+--------------------------+ -| *Getter* | get_param_texture() | -+----------+--------------------------+ - -Each particle's angular velocity (rotation speed) will vary along this :ref:`CurveTexture` over its lifetime. - ----- - -.. _class_ParticlesMaterial_property_angular_velocity_max: - -- :ref:`float` **angular_velocity_max** - -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ - -Maximum initial angular velocity (rotation speed) applied to each particle in *degrees* per second. - -Only applied when :ref:`particle_flag_disable_z` or :ref:`particle_flag_rotate_y` are ``true`` or the :ref:`BaseMaterial3D` being used to draw the particle is using :ref:`BaseMaterial3D.BILLBOARD_PARTICLES`. - ----- - -.. _class_ParticlesMaterial_property_angular_velocity_min: - -- :ref:`float` **angular_velocity_min** - -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ - -Minimum equivalent of :ref:`angular_velocity_max`. - ----- - -.. _class_ParticlesMaterial_property_anim_offset_curve: - -- :ref:`Texture2D` **anim_offset_curve** - -+----------+--------------------------+ -| *Setter* | set_param_texture(value) | -+----------+--------------------------+ -| *Getter* | get_param_texture() | -+----------+--------------------------+ - -Each particle's animation offset will vary along this :ref:`CurveTexture`. - ----- - -.. _class_ParticlesMaterial_property_anim_offset_max: - -- :ref:`float` **anim_offset_max** - -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ - -Maximum animation offset that corresponds to frame index in the texture. ``0`` is the first frame, ``1`` is the last one. See :ref:`CanvasItemMaterial.particles_animation`. - ----- - -.. _class_ParticlesMaterial_property_anim_offset_min: - -- :ref:`float` **anim_offset_min** - -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ - -Minimum equivalent of :ref:`anim_offset_max`. - ----- - -.. _class_ParticlesMaterial_property_anim_speed_curve: - -- :ref:`Texture2D` **anim_speed_curve** - -+----------+--------------------------+ -| *Setter* | set_param_texture(value) | -+----------+--------------------------+ -| *Getter* | get_param_texture() | -+----------+--------------------------+ - -Each particle's animation speed will vary along this :ref:`CurveTexture`. - ----- - -.. _class_ParticlesMaterial_property_anim_speed_max: - -- :ref:`float` **anim_speed_max** - -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ - -Maximum particle animation speed. Animation speed of ``1`` means that the particles will make full ``0`` to ``1`` offset cycle during lifetime, ``2`` means ``2`` cycles etc. - -With animation speed greater than ``1``, remember to enable :ref:`CanvasItemMaterial.particles_anim_loop` property if you want the animation to repeat. - ----- - -.. _class_ParticlesMaterial_property_anim_speed_min: - -- :ref:`float` **anim_speed_min** - -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ - -Minimum equivalent of :ref:`anim_speed_max`. - ----- - -.. _class_ParticlesMaterial_property_attractor_interaction_enabled: - -- :ref:`bool` **attractor_interaction_enabled** - -+-----------+------------------------------------------+ -| *Default* | ``true`` | -+-----------+------------------------------------------+ -| *Setter* | set_attractor_interaction_enabled(value) | -+-----------+------------------------------------------+ -| *Getter* | is_attractor_interaction_enabled() | -+-----------+------------------------------------------+ - -True if the interaction with particle attractors is enabled. - ----- - -.. _class_ParticlesMaterial_property_collision_bounce: - -- :ref:`float` **collision_bounce** - -+-----------+-----------------------------+ -| *Default* | ``0.0`` | -+-----------+-----------------------------+ -| *Setter* | set_collision_bounce(value) | -+-----------+-----------------------------+ -| *Getter* | get_collision_bounce() | -+-----------+-----------------------------+ - -Collision bounciness. - ----- - -.. _class_ParticlesMaterial_property_collision_enabled: - -- :ref:`bool` **collision_enabled** - -+-----------+------------------------------+ -| *Default* | ``false`` | -+-----------+------------------------------+ -| *Setter* | set_collision_enabled(value) | -+-----------+------------------------------+ -| *Getter* | is_collision_enabled() | -+-----------+------------------------------+ - -True if collisions are enabled for this particle system. - ----- - -.. _class_ParticlesMaterial_property_collision_friction: - -- :ref:`float` **collision_friction** - -+-----------+-------------------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------------------+ -| *Setter* | set_collision_friction(value) | -+-----------+-------------------------------+ -| *Getter* | get_collision_friction() | -+-----------+-------------------------------+ - -Collision friction. - ----- - -.. _class_ParticlesMaterial_property_collision_use_scale: - -- :ref:`bool` **collision_use_scale** - -+-----------+--------------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------------+ -| *Setter* | set_collision_use_scale(value) | -+-----------+--------------------------------+ -| *Getter* | is_collision_using_scale() | -+-----------+--------------------------------+ - -Should collision take scale into account. - ----- - -.. _class_ParticlesMaterial_property_color: - -- :ref:`Color` **color** - -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ -| *Setter* | set_color(value) | -+-----------+-----------------------+ -| *Getter* | get_color() | -+-----------+-----------------------+ - -Each particle's initial color. If the :ref:`GPUParticles2D`'s ``texture`` is defined, it will be multiplied by this color. To have particle display color in a :ref:`BaseMaterial3D` make sure to set :ref:`BaseMaterial3D.vertex_color_use_as_albedo` to ``true``. - ----- - -.. _class_ParticlesMaterial_property_color_initial_ramp: - -- :ref:`Texture2D` **color_initial_ramp** - -+----------+-------------------------------+ -| *Setter* | set_color_initial_ramp(value) | -+----------+-------------------------------+ -| *Getter* | get_color_initial_ramp() | -+----------+-------------------------------+ - -Each particle's initial color will vary along this :ref:`GradientTexture1D` (multiplied with :ref:`color`). - ----- - -.. _class_ParticlesMaterial_property_color_ramp: - -- :ref:`Texture2D` **color_ramp** - -+----------+-----------------------+ -| *Setter* | set_color_ramp(value) | -+----------+-----------------------+ -| *Getter* | get_color_ramp() | -+----------+-----------------------+ - -Each particle's color will vary along this :ref:`GradientTexture1D` over its lifetime (multiplied with :ref:`color`). - ----- - -.. _class_ParticlesMaterial_property_damping_curve: - -- :ref:`Texture2D` **damping_curve** - -+----------+--------------------------+ -| *Setter* | set_param_texture(value) | -+----------+--------------------------+ -| *Getter* | get_param_texture() | -+----------+--------------------------+ - -Damping will vary along this :ref:`CurveTexture`. - ----- - -.. _class_ParticlesMaterial_property_damping_max: - -- :ref:`float` **damping_max** - -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ - -The maximum rate at which particles lose velocity. For example value of ``100`` means that the particle will go from ``100`` velocity to ``0`` in ``1`` second. - ----- - -.. _class_ParticlesMaterial_property_damping_min: - -- :ref:`float` **damping_min** - -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ - -Minimum equivalent of :ref:`damping_max`. - ----- - -.. _class_ParticlesMaterial_property_direction: - -- :ref:`Vector3` **direction** - -+-----------+----------------------+ -| *Default* | ``Vector3(1, 0, 0)`` | -+-----------+----------------------+ -| *Setter* | set_direction(value) | -+-----------+----------------------+ -| *Getter* | get_direction() | -+-----------+----------------------+ - -Unit vector specifying the particles' emission direction. - ----- - -.. _class_ParticlesMaterial_property_emission_box_extents: - -- :ref:`Vector3` **emission_box_extents** - -+----------+---------------------------------+ -| *Setter* | set_emission_box_extents(value) | -+----------+---------------------------------+ -| *Getter* | get_emission_box_extents() | -+----------+---------------------------------+ - -The box's extents if ``emission_shape`` is set to :ref:`EMISSION_SHAPE_BOX`. - ----- - -.. _class_ParticlesMaterial_property_emission_color_texture: - -- :ref:`Texture2D` **emission_color_texture** - -+----------+-----------------------------------+ -| *Setter* | set_emission_color_texture(value) | -+----------+-----------------------------------+ -| *Getter* | get_emission_color_texture() | -+----------+-----------------------------------+ - -Particle color will be modulated by color determined by sampling this texture at the same point as the :ref:`emission_point_texture`. - ----- - -.. _class_ParticlesMaterial_property_emission_normal_texture: - -- :ref:`Texture2D` **emission_normal_texture** - -+----------+------------------------------------+ -| *Setter* | set_emission_normal_texture(value) | -+----------+------------------------------------+ -| *Getter* | get_emission_normal_texture() | -+----------+------------------------------------+ - -Particle velocity and rotation will be set by sampling this texture at the same point as the :ref:`emission_point_texture`. Used only in :ref:`EMISSION_SHAPE_DIRECTED_POINTS`. Can be created automatically from mesh or node by selecting "Create Emission Points from Mesh/Node" under the "Particles" tool in the toolbar. - ----- - -.. _class_ParticlesMaterial_property_emission_point_count: - -- :ref:`int` **emission_point_count** - -+----------+---------------------------------+ -| *Setter* | set_emission_point_count(value) | -+----------+---------------------------------+ -| *Getter* | get_emission_point_count() | -+----------+---------------------------------+ - -The number of emission points if ``emission_shape`` is set to :ref:`EMISSION_SHAPE_POINTS` or :ref:`EMISSION_SHAPE_DIRECTED_POINTS`. - ----- - -.. _class_ParticlesMaterial_property_emission_point_texture: - -- :ref:`Texture2D` **emission_point_texture** - -+----------+-----------------------------------+ -| *Setter* | set_emission_point_texture(value) | -+----------+-----------------------------------+ -| *Getter* | get_emission_point_texture() | -+----------+-----------------------------------+ - -Particles will be emitted at positions determined by sampling this texture at a random position. Used with :ref:`EMISSION_SHAPE_POINTS` and :ref:`EMISSION_SHAPE_DIRECTED_POINTS`. Can be created automatically from mesh or node by selecting "Create Emission Points from Mesh/Node" under the "Particles" tool in the toolbar. - ----- - -.. _class_ParticlesMaterial_property_emission_ring_axis: - -- :ref:`Vector3` **emission_ring_axis** - -+----------+-------------------------------+ -| *Setter* | set_emission_ring_axis(value) | -+----------+-------------------------------+ -| *Getter* | get_emission_ring_axis() | -+----------+-------------------------------+ - -The axis of the ring when using the emitter :ref:`EMISSION_SHAPE_RING`. - ----- - -.. _class_ParticlesMaterial_property_emission_ring_height: - -- :ref:`float` **emission_ring_height** - -+----------+---------------------------------+ -| *Setter* | set_emission_ring_height(value) | -+----------+---------------------------------+ -| *Getter* | get_emission_ring_height() | -+----------+---------------------------------+ - -The height of the ring when using the emitter :ref:`EMISSION_SHAPE_RING`. - ----- - -.. _class_ParticlesMaterial_property_emission_ring_inner_radius: - -- :ref:`float` **emission_ring_inner_radius** - -+----------+---------------------------------------+ -| *Setter* | set_emission_ring_inner_radius(value) | -+----------+---------------------------------------+ -| *Getter* | get_emission_ring_inner_radius() | -+----------+---------------------------------------+ - -The inner radius of the ring when using the emitter :ref:`EMISSION_SHAPE_RING`. - ----- - -.. _class_ParticlesMaterial_property_emission_ring_radius: - -- :ref:`float` **emission_ring_radius** - -+----------+---------------------------------+ -| *Setter* | set_emission_ring_radius(value) | -+----------+---------------------------------+ -| *Getter* | get_emission_ring_radius() | -+----------+---------------------------------+ - -The radius of the ring when using the emitter :ref:`EMISSION_SHAPE_RING`. - ----- - -.. _class_ParticlesMaterial_property_emission_shape: - -- :ref:`EmissionShape` **emission_shape** - -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_emission_shape(value) | -+-----------+---------------------------+ -| *Getter* | get_emission_shape() | -+-----------+---------------------------+ - -Particles will be emitted inside this region. Use :ref:`EmissionShape` constants for values. - ----- - -.. _class_ParticlesMaterial_property_emission_sphere_radius: - -- :ref:`float` **emission_sphere_radius** - -+----------+-----------------------------------+ -| *Setter* | set_emission_sphere_radius(value) | -+----------+-----------------------------------+ -| *Getter* | get_emission_sphere_radius() | -+----------+-----------------------------------+ - -The sphere's radius if ``emission_shape`` is set to :ref:`EMISSION_SHAPE_SPHERE`. - ----- - -.. _class_ParticlesMaterial_property_flatness: - -- :ref:`float` **flatness** - -+-----------+---------------------+ -| *Default* | ``0.0`` | -+-----------+---------------------+ -| *Setter* | set_flatness(value) | -+-----------+---------------------+ -| *Getter* | get_flatness() | -+-----------+---------------------+ - -Amount of :ref:`spread` along the Y axis. - ----- - -.. _class_ParticlesMaterial_property_gravity: - -- :ref:`Vector3` **gravity** - -+-----------+-------------------------+ -| *Default* | ``Vector3(0, -9.8, 0)`` | -+-----------+-------------------------+ -| *Setter* | set_gravity(value) | -+-----------+-------------------------+ -| *Getter* | get_gravity() | -+-----------+-------------------------+ - -Gravity applied to every particle. - ----- - -.. _class_ParticlesMaterial_property_hue_variation_curve: - -- :ref:`Texture2D` **hue_variation_curve** - -+----------+--------------------------+ -| *Setter* | set_param_texture(value) | -+----------+--------------------------+ -| *Getter* | get_param_texture() | -+----------+--------------------------+ - -Each particle's hue will vary along this :ref:`CurveTexture`. - ----- - -.. _class_ParticlesMaterial_property_hue_variation_max: - -- :ref:`float` **hue_variation_max** - -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ - -Maximum initial hue variation applied to each particle. It will shift the particle color's hue. - ----- - -.. _class_ParticlesMaterial_property_hue_variation_min: - -- :ref:`float` **hue_variation_min** - -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ - -Minimum equivalent of :ref:`hue_variation_max`. - ----- - -.. _class_ParticlesMaterial_property_initial_velocity_max: - -- :ref:`float` **initial_velocity_max** - -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ - -Maximum initial velocity magnitude for each particle. Direction comes from :ref:`direction` and :ref:`spread`. - ----- - -.. _class_ParticlesMaterial_property_initial_velocity_min: - -- :ref:`float` **initial_velocity_min** - -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ - -Minimum equivalent of :ref:`initial_velocity_max`. - ----- - -.. _class_ParticlesMaterial_property_lifetime_randomness: - -- :ref:`float` **lifetime_randomness** - -+-----------+--------------------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------------------+ -| *Setter* | set_lifetime_randomness(value) | -+-----------+--------------------------------+ -| *Getter* | get_lifetime_randomness() | -+-----------+--------------------------------+ - -Particle lifetime randomness ratio. The lifetime will be multiplied by a value interpolated between ``1.0`` and a random number less than one. For example a random ratio of ``0.4`` would scale the original lifetime between ``0.4-1.0`` of its original value. - ----- - -.. _class_ParticlesMaterial_property_linear_accel_curve: - -- :ref:`Texture2D` **linear_accel_curve** - -+----------+--------------------------+ -| *Setter* | set_param_texture(value) | -+----------+--------------------------+ -| *Getter* | get_param_texture() | -+----------+--------------------------+ - -Each particle's linear acceleration will vary along this :ref:`CurveTexture`. - ----- - -.. _class_ParticlesMaterial_property_linear_accel_max: - -- :ref:`float` **linear_accel_max** - -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ - -Maximum linear acceleration applied to each particle in the direction of motion. - ----- - -.. _class_ParticlesMaterial_property_linear_accel_min: - -- :ref:`float` **linear_accel_min** - -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ - -Minimum equivalent of :ref:`linear_accel_min`. - ----- - -.. _class_ParticlesMaterial_property_orbit_velocity_curve: - -- :ref:`Texture2D` **orbit_velocity_curve** - -+----------+--------------------------+ -| *Setter* | set_param_texture(value) | -+----------+--------------------------+ -| *Getter* | get_param_texture() | -+----------+--------------------------+ - -Each particle's orbital velocity will vary along this :ref:`CurveTexture`. - ----- - -.. _class_ParticlesMaterial_property_orbit_velocity_max: - -- :ref:`float` **orbit_velocity_max** - -+----------+----------------------+ -| *Setter* | set_param_max(value) | -+----------+----------------------+ -| *Getter* | get_param_max() | -+----------+----------------------+ - -Maximum orbital velocity applied to each particle. Makes the particles circle around origin. Specified in number of full rotations around origin per second. - -Only available when :ref:`particle_flag_disable_z` is ``true``. - ----- - -.. _class_ParticlesMaterial_property_orbit_velocity_min: - -- :ref:`float` **orbit_velocity_min** - -+----------+----------------------+ -| *Setter* | set_param_min(value) | -+----------+----------------------+ -| *Getter* | get_param_min() | -+----------+----------------------+ - -Minimum equivalent of :ref:`orbit_velocity_max`. - ----- - -.. _class_ParticlesMaterial_property_particle_flag_align_y: - -- :ref:`bool` **particle_flag_align_y** - -+-----------+--------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------+ -| *Setter* | set_particle_flag(value) | -+-----------+--------------------------+ -| *Getter* | get_particle_flag() | -+-----------+--------------------------+ - -Align Y axis of particle with the direction of its velocity. - ----- - -.. _class_ParticlesMaterial_property_particle_flag_disable_z: - -- :ref:`bool` **particle_flag_disable_z** - -+-----------+--------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------+ -| *Setter* | set_particle_flag(value) | -+-----------+--------------------------+ -| *Getter* | get_particle_flag() | -+-----------+--------------------------+ - -If ``true``, particles will not move on the z axis. - ----- - -.. _class_ParticlesMaterial_property_particle_flag_rotate_y: - -- :ref:`bool` **particle_flag_rotate_y** - -+-----------+--------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------+ -| *Setter* | set_particle_flag(value) | -+-----------+--------------------------+ -| *Getter* | get_particle_flag() | -+-----------+--------------------------+ - -If ``true``, particles rotate around Y axis by :ref:`angle_min`. - ----- - -.. _class_ParticlesMaterial_property_radial_accel_curve: - -- :ref:`Texture2D` **radial_accel_curve** - -+----------+--------------------------+ -| *Setter* | set_param_texture(value) | -+----------+--------------------------+ -| *Getter* | get_param_texture() | -+----------+--------------------------+ - -Each particle's radial acceleration will vary along this :ref:`CurveTexture`. - ----- - -.. _class_ParticlesMaterial_property_radial_accel_max: - -- :ref:`float` **radial_accel_max** - -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ - -Maximum radial acceleration applied to each particle. Makes particle accelerate away from the origin or towards it if negative. - ----- - -.. _class_ParticlesMaterial_property_radial_accel_min: - -- :ref:`float` **radial_accel_min** - -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ - -Minimum equivalent of :ref:`radial_accel_max`. - ----- - -.. _class_ParticlesMaterial_property_scale_curve: - -- :ref:`Texture2D` **scale_curve** - -+----------+--------------------------+ -| *Setter* | set_param_texture(value) | -+----------+--------------------------+ -| *Getter* | get_param_texture() | -+----------+--------------------------+ - -Each particle's scale will vary along this :ref:`CurveTexture`. If a :ref:`CurveXYZTexture` is supplied instead, the scale will be separated per-axis. - ----- - -.. _class_ParticlesMaterial_property_scale_max: - -- :ref:`float` **scale_max** - -+-----------+----------------------+ -| *Default* | ``1.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ - -Maximum initial scale applied to each particle. - ----- - -.. _class_ParticlesMaterial_property_scale_min: - -- :ref:`float` **scale_min** - -+-----------+----------------------+ -| *Default* | ``1.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ - -Minimum equivalent of :ref:`scale_max`. - ----- - -.. _class_ParticlesMaterial_property_spread: - -- :ref:`float` **spread** - -+-----------+-------------------+ -| *Default* | ``45.0`` | -+-----------+-------------------+ -| *Setter* | set_spread(value) | -+-----------+-------------------+ -| *Getter* | get_spread() | -+-----------+-------------------+ - -Each particle's initial direction range from ``+spread`` to ``-spread`` degrees. - ----- - -.. _class_ParticlesMaterial_property_sub_emitter_amount_at_end: - -- :ref:`int` **sub_emitter_amount_at_end** - -+----------+--------------------------------------+ -| *Setter* | set_sub_emitter_amount_at_end(value) | -+----------+--------------------------------------+ -| *Getter* | get_sub_emitter_amount_at_end() | -+----------+--------------------------------------+ - ----- - -.. _class_ParticlesMaterial_property_sub_emitter_frequency: - -- :ref:`float` **sub_emitter_frequency** - -+----------+----------------------------------+ -| *Setter* | set_sub_emitter_frequency(value) | -+----------+----------------------------------+ -| *Getter* | get_sub_emitter_frequency() | -+----------+----------------------------------+ - ----- - -.. _class_ParticlesMaterial_property_sub_emitter_keep_velocity: - -- :ref:`bool` **sub_emitter_keep_velocity** - -+-----------+--------------------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------------------+ -| *Setter* | set_sub_emitter_keep_velocity(value) | -+-----------+--------------------------------------+ -| *Getter* | get_sub_emitter_keep_velocity() | -+-----------+--------------------------------------+ - ----- - -.. _class_ParticlesMaterial_property_sub_emitter_mode: - -- :ref:`SubEmitterMode` **sub_emitter_mode** - -+-----------+-----------------------------+ -| *Default* | ``0`` | -+-----------+-----------------------------+ -| *Setter* | set_sub_emitter_mode(value) | -+-----------+-----------------------------+ -| *Getter* | get_sub_emitter_mode() | -+-----------+-----------------------------+ - ----- - -.. _class_ParticlesMaterial_property_tangential_accel_curve: - -- :ref:`Texture2D` **tangential_accel_curve** - -+----------+--------------------------+ -| *Setter* | set_param_texture(value) | -+----------+--------------------------+ -| *Getter* | get_param_texture() | -+----------+--------------------------+ - -Each particle's tangential acceleration will vary along this :ref:`CurveTexture`. - ----- - -.. _class_ParticlesMaterial_property_tangential_accel_max: - -- :ref:`float` **tangential_accel_max** - -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ - -Maximum tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion. - ----- - -.. _class_ParticlesMaterial_property_tangential_accel_min: - -- :ref:`float` **tangential_accel_min** - -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ - -Minimum equivalent of :ref:`tangential_accel_max`. - -Method Descriptions -------------------- - -.. _class_ParticlesMaterial_method_get_param_max: - -- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| - -Returns the maximum value range for the given parameter. - ----- - -.. _class_ParticlesMaterial_method_get_param_min: - -- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| - -Returns the minimum value range for the given parameter. - ----- - -.. _class_ParticlesMaterial_method_get_param_texture: - -- :ref:`Texture2D` **get_param_texture** **(** :ref:`Parameter` param **)** |const| - -Returns the :ref:`Texture2D` used by the specified parameter. - ----- - -.. _class_ParticlesMaterial_method_get_particle_flag: - -- :ref:`bool` **get_particle_flag** **(** :ref:`ParticleFlags` particle_flag **)** |const| - -Returns ``true`` if the specified particle flag is enabled. See :ref:`ParticleFlags` for options. - ----- - -.. _class_ParticlesMaterial_method_set_param_max: - -- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** - -Sets the maximum value range for the given parameter. - ----- - -.. _class_ParticlesMaterial_method_set_param_min: - -- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** - -Sets the minimum value range for the given parameter. - ----- - -.. _class_ParticlesMaterial_method_set_param_texture: - -- void **set_param_texture** **(** :ref:`Parameter` param, :ref:`Texture2D` texture **)** - -Sets the :ref:`Texture2D` for the specified :ref:`Parameter`. - ----- - -.. _class_ParticlesMaterial_method_set_particle_flag: - -- void **set_particle_flag** **(** :ref:`ParticleFlags` particle_flag, :ref:`bool` enable **)** - -If ``true``, enables the specified particle flag. See :ref:`ParticleFlags` for options. - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_pathfollow2d.rst b/classes/class_pathfollow2d.rst index 687b4802d..5f1c52dc1 100644 --- a/classes/class_pathfollow2d.rst +++ b/classes/class_pathfollow2d.rst @@ -19,28 +19,28 @@ Description This node takes its parent :ref:`Path2D`, and returns the coordinates of a point within it, given a distance from the first vertex. -It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be children of this node. The descendant nodes will then move accordingly when setting an offset in this node. +It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be children of this node. The descendant nodes will then move accordingly when setting the :ref:`progress` in this node. Properties ---------- -+---------------------------+---------------------------------------------------------------+----------+ -| :ref:`bool` | :ref:`cubic_interp` | ``true`` | -+---------------------------+---------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`h_offset` | ``0.0`` | -+---------------------------+---------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`lookahead` | ``4.0`` | -+---------------------------+---------------------------------------------------------------+----------+ -| :ref:`bool` | :ref:`loop` | ``true`` | -+---------------------------+---------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`offset` | ``0.0`` | -+---------------------------+---------------------------------------------------------------+----------+ -| :ref:`bool` | :ref:`rotates` | ``true`` | -+---------------------------+---------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`unit_offset` | ``0.0`` | -+---------------------------+---------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`v_offset` | ``0.0`` | -+---------------------------+---------------------------------------------------------------+----------+ ++---------------------------+-------------------------------------------------------------------+----------+ +| :ref:`bool` | :ref:`cubic_interp` | ``true`` | ++---------------------------+-------------------------------------------------------------------+----------+ +| :ref:`float` | :ref:`h_offset` | ``0.0`` | ++---------------------------+-------------------------------------------------------------------+----------+ +| :ref:`float` | :ref:`lookahead` | ``4.0`` | ++---------------------------+-------------------------------------------------------------------+----------+ +| :ref:`bool` | :ref:`loop` | ``true`` | ++---------------------------+-------------------------------------------------------------------+----------+ +| :ref:`float` | :ref:`progress` | ``0.0`` | ++---------------------------+-------------------------------------------------------------------+----------+ +| :ref:`float` | :ref:`progress_ratio` | ``0.0`` | ++---------------------------+-------------------------------------------------------------------+----------+ +| :ref:`bool` | :ref:`rotates` | ``true`` | ++---------------------------+-------------------------------------------------------------------+----------+ +| :ref:`float` | :ref:`v_offset` | ``0.0`` | ++---------------------------+-------------------------------------------------------------------+----------+ Property Descriptions --------------------- @@ -113,19 +113,35 @@ If ``true``, any offset outside the path's length will wrap around, instead of s ---- -.. _class_PathFollow2D_property_offset: +.. _class_PathFollow2D_property_progress: -- :ref:`float` **offset** +- :ref:`float` **progress** -+-----------+-------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------+ -| *Setter* | set_offset(value) | -+-----------+-------------------+ -| *Getter* | get_offset() | -+-----------+-------------------+ ++-----------+---------------------+ +| *Default* | ``0.0`` | ++-----------+---------------------+ +| *Setter* | set_progress(value) | ++-----------+---------------------+ +| *Getter* | get_progress() | ++-----------+---------------------+ -The distance along the path in pixels. +The distance along the path, in pixels. Changing this value sets this node's position to a point within the path. + +---- + +.. _class_PathFollow2D_property_progress_ratio: + +- :ref:`float` **progress_ratio** + ++-----------+---------------------------+ +| *Default* | ``0.0`` | ++-----------+---------------------------+ +| *Setter* | set_progress_ratio(value) | ++-----------+---------------------------+ +| *Getter* | get_progress_ratio() | ++-----------+---------------------------+ + +The distance along the path as a number in the range 0.0 (for the first vertex) to 1.0 (for the last). This is just another way of expressing the progress within the path, as the offset supplied is multiplied internally by the path's length. ---- @@ -145,22 +161,6 @@ If ``true``, this node rotates to follow the path, with the +X direction facing ---- -.. _class_PathFollow2D_property_unit_offset: - -- :ref:`float` **unit_offset** - -+-----------+------------------------+ -| *Default* | ``0.0`` | -+-----------+------------------------+ -| *Setter* | set_unit_offset(value) | -+-----------+------------------------+ -| *Getter* | get_unit_offset() | -+-----------+------------------------+ - -The distance along the path as a number in the range 0.0 (for the first vertex) to 1.0 (for the last). This is just another way of expressing the offset within the path, as the offset supplied is multiplied internally by the path's length. - ----- - .. _class_PathFollow2D_property_v_offset: - :ref:`float` **v_offset** diff --git a/classes/class_pathfollow3d.rst b/classes/class_pathfollow3d.rst index e774f501d..25a803d38 100644 --- a/classes/class_pathfollow3d.rst +++ b/classes/class_pathfollow3d.rst @@ -19,26 +19,26 @@ Description This node takes its parent :ref:`Path3D`, and returns the coordinates of a point within it, given a distance from the first vertex. -It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be children of this node. The descendant nodes will then move accordingly when setting an offset in this node. +It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be children of this node. The descendant nodes will then move accordingly when setting the :ref:`progress` in this node. Properties ---------- -+-----------------------------------------------------+-----------------------------------------------------------------+----------+ -| :ref:`bool` | :ref:`cubic_interp` | ``true`` | -+-----------------------------------------------------+-----------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`h_offset` | ``0.0`` | -+-----------------------------------------------------+-----------------------------------------------------------------+----------+ -| :ref:`bool` | :ref:`loop` | ``true`` | -+-----------------------------------------------------+-----------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`offset` | ``0.0`` | -+-----------------------------------------------------+-----------------------------------------------------------------+----------+ -| :ref:`RotationMode` | :ref:`rotation_mode` | ``3`` | -+-----------------------------------------------------+-----------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`unit_offset` | ``0.0`` | -+-----------------------------------------------------+-----------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`v_offset` | ``0.0`` | -+-----------------------------------------------------+-----------------------------------------------------------------+----------+ ++-----------------------------------------------------+-------------------------------------------------------------------+----------+ +| :ref:`bool` | :ref:`cubic_interp` | ``true`` | ++-----------------------------------------------------+-------------------------------------------------------------------+----------+ +| :ref:`float` | :ref:`h_offset` | ``0.0`` | ++-----------------------------------------------------+-------------------------------------------------------------------+----------+ +| :ref:`bool` | :ref:`loop` | ``true`` | ++-----------------------------------------------------+-------------------------------------------------------------------+----------+ +| :ref:`float` | :ref:`progress` | ``0.0`` | ++-----------------------------------------------------+-------------------------------------------------------------------+----------+ +| :ref:`float` | :ref:`progress_ratio` | ``0.0`` | ++-----------------------------------------------------+-------------------------------------------------------------------+----------+ +| :ref:`RotationMode` | :ref:`rotation_mode` | ``3`` | ++-----------------------------------------------------+-------------------------------------------------------------------+----------+ +| :ref:`float` | :ref:`v_offset` | ``0.0`` | ++-----------------------------------------------------+-------------------------------------------------------------------+----------+ Enumerations ------------ @@ -122,19 +122,35 @@ If ``true``, any offset outside the path's length will wrap around, instead of s ---- -.. _class_PathFollow3D_property_offset: +.. _class_PathFollow3D_property_progress: -- :ref:`float` **offset** +- :ref:`float` **progress** -+-----------+-------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------+ -| *Setter* | set_offset(value) | -+-----------+-------------------+ -| *Getter* | get_offset() | -+-----------+-------------------+ ++-----------+---------------------+ +| *Default* | ``0.0`` | ++-----------+---------------------+ +| *Setter* | set_progress(value) | ++-----------+---------------------+ +| *Getter* | get_progress() | ++-----------+---------------------+ -The distance from the first vertex, measured in 3D units along the path. This sets this node's position to a point within the path. +The distance from the first vertex, measured in 3D units along the path. Changing this value sets this node's position to a point within the path. + +---- + +.. _class_PathFollow3D_property_progress_ratio: + +- :ref:`float` **progress_ratio** + ++-----------+---------------------------+ +| *Default* | ``0.0`` | ++-----------+---------------------------+ +| *Setter* | set_progress_ratio(value) | ++-----------+---------------------------+ +| *Getter* | get_progress_ratio() | ++-----------+---------------------------+ + +The distance from the first vertex, considering 0.0 as the first vertex and 1.0 as the last. This is just another way of expressing the progress within the path, as the progress supplied is multiplied internally by the path's length. ---- @@ -154,22 +170,6 @@ Allows or forbids rotation on one or more axes, depending on the :ref:`RotationM ---- -.. _class_PathFollow3D_property_unit_offset: - -- :ref:`float` **unit_offset** - -+-----------+------------------------+ -| *Default* | ``0.0`` | -+-----------+------------------------+ -| *Setter* | set_unit_offset(value) | -+-----------+------------------------+ -| *Getter* | get_unit_offset() | -+-----------+------------------------+ - -The distance from the first vertex, considering 0.0 as the first vertex and 1.0 as the last. This is just another way of expressing the offset within the path, as the offset supplied is multiplied internally by the path's length. - ----- - .. _class_PathFollow3D_property_v_offset: - :ref:`float` **v_offset** diff --git a/classes/class_performance.rst b/classes/class_performance.rst index 4d146d3ae..cce81d4bd 100644 --- a/classes/class_performance.rst +++ b/classes/class_performance.rst @@ -30,21 +30,21 @@ You can add custom monitors using the :ref:`add_custom_monitor` **(** :ref:`StringName` id, :ref:`Callable` callable, :ref:`Array` arguments=[] **)** | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get_custom_monitor` **(** :ref:`StringName` id **)** | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_custom_monitor_names` **(** **)** | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_monitor` **(** :ref:`Monitor` monitor **)** |const| | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_monitor_modification_time` **(** **)** | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_custom_monitor` **(** :ref:`StringName` id **)** | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_custom_monitor` **(** :ref:`StringName` id **)** | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_custom_monitor` **(** :ref:`StringName` id, :ref:`Callable` callable, :ref:`Array` arguments=[] **)** | ++---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`get_custom_monitor` **(** :ref:`StringName` id **)** | ++---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringName[]` | :ref:`get_custom_monitor_names` **(** **)** | ++---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_monitor` **(** :ref:`Monitor` monitor **)** |const| | ++---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_monitor_modification_time` **(** **)** | ++---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_custom_monitor` **(** :ref:`StringName` id **)** | ++---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_custom_monitor` **(** :ref:`StringName` id **)** | ++---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Enumerations ------------ @@ -133,13 +133,13 @@ enum **Monitor**: - **RENDER_BUFFER_MEM_USED** = **15** --- The amount of render buffer memory used (in bytes). *Lower is better.* -- **PHYSICS_2D_ACTIVE_OBJECTS** = **16** --- Number of active :ref:`RigidDynamicBody2D` nodes in the game. *Lower is better.* +- **PHYSICS_2D_ACTIVE_OBJECTS** = **16** --- Number of active :ref:`RigidBody2D` nodes in the game. *Lower is better.* - **PHYSICS_2D_COLLISION_PAIRS** = **17** --- Number of collision pairs in the 2D physics engine. *Lower is better.* - **PHYSICS_2D_ISLAND_COUNT** = **18** --- Number of islands in the 2D physics engine. *Lower is better.* -- **PHYSICS_3D_ACTIVE_OBJECTS** = **19** --- Number of active :ref:`RigidDynamicBody3D` and :ref:`VehicleBody3D` nodes in the game. *Lower is better.* +- **PHYSICS_3D_ACTIVE_OBJECTS** = **19** --- Number of active :ref:`RigidBody3D` and :ref:`VehicleBody3D` nodes in the game. *Lower is better.* - **PHYSICS_3D_COLLISION_PAIRS** = **20** --- Number of collision pairs in the 3D physics engine. *Lower is better.* @@ -226,7 +226,7 @@ Returns the value of custom monitor with given ``id``. The callable is called to .. _class_Performance_method_get_custom_monitor_names: -- :ref:`Array` **get_custom_monitor_names** **(** **)** +- :ref:`StringName[]` **get_custom_monitor_names** **(** **)** Returns the names of active custom monitors in an :ref:`Array`. diff --git a/classes/class_physicalbone2d.rst b/classes/class_physicalbone2d.rst index b1b731194..e2350525a 100644 --- a/classes/class_physicalbone2d.rst +++ b/classes/class_physicalbone2d.rst @@ -10,18 +10,18 @@ PhysicalBone2D ============== -**Inherits:** :ref:`RigidDynamicBody2D` **<** :ref:`PhysicsBody2D` **<** :ref:`CollisionObject2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**Inherits:** :ref:`RigidBody2D` **<** :ref:`PhysicsBody2D` **<** :ref:`CollisionObject2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` A 2D node that can be used for physically aware bones in 2D. Description ----------- -The ``PhysicalBone2D`` node is a :ref:`RigidDynamicBody2D`-based node that can be used to make :ref:`Bone2D` nodes in a :ref:`Skeleton2D` react to physics. This node is very similar to the :ref:`PhysicalBone3D` node, just for 2D instead of 3D. +The ``PhysicalBone2D`` node is a :ref:`RigidBody2D`-based node that can be used to make :ref:`Bone2D` nodes in a :ref:`Skeleton2D` react to physics. This node is very similar to the :ref:`PhysicalBone3D` node, just for 2D instead of 3D. \ **Note:** To have the Bone2D nodes visually follow the ``PhysicalBone2D`` node, use a :ref:`SkeletonModification2DPhysicalBones` modification on the :ref:`Skeleton2D` node with the :ref:`Bone2D` nodes. -\ **Note:** The PhysicalBone2D node does not automatically create a :ref:`Joint2D` node to keep ``PhysicalBone2D`` nodes together. You will need to create these manually. For most cases, you want to use a :ref:`PinJoint2D` node. The ``PhysicalBone2D`` node can automatically configure the :ref:`Joint2D` node once its been created as a child node. +\ **Note:** The PhysicalBone2D node does not automatically create a :ref:`Joint2D` node to keep ``PhysicalBone2D`` nodes together. You will need to create these manually. For most cases, you want to use a :ref:`PinJoint2D` node. The ``PhysicalBone2D`` node can automatically configure the :ref:`Joint2D` node once it's been created as a child node. Properties ---------- diff --git a/classes/class_physicsbody2d.rst b/classes/class_physicsbody2d.rst index ae1824da8..d87097d7a 100644 --- a/classes/class_physicsbody2d.rst +++ b/classes/class_physicsbody2d.rst @@ -12,7 +12,7 @@ PhysicsBody2D **Inherits:** :ref:`CollisionObject2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`CharacterBody2D`, :ref:`RigidDynamicBody2D`, :ref:`StaticBody2D` +**Inherited By:** :ref:`CharacterBody2D`, :ref:`RigidBody2D`, :ref:`StaticBody2D` Base class for all objects affected by physics in 2D space. @@ -77,7 +77,7 @@ Returns a :ref:`KinematicCollision2D`, which contain If ``test_only`` is ``true``, the body does not move but the would-be collision information is given. -\ ``safe_margin`` is the extra margin used for collision recovery (see :ref:`CharacterBody2D.collision/safe_margin` for more details). +``safe_margin`` is the extra margin used for collision recovery (see :ref:`CharacterBody2D.safe_margin` for more details). ---- @@ -97,9 +97,9 @@ Checks for collisions without moving the body. In order to be frame rate indepen Virtually sets the node's position, scale and rotation to that of the given :ref:`Transform2D`, then tries to move the body along the vector ``distance``. Returns ``true`` if a collision would stop the body from moving along the whole path. -\ ``collision`` is an optional object of type :ref:`KinematicCollision2D`, which contains additional information about the collision when stopped, or when touching another body along the motion. +``collision`` is an optional object of type :ref:`KinematicCollision2D`, which contains additional information about the collision when stopped, or when touching another body along the motion. -\ ``safe_margin`` is the extra margin used for collision recovery (see :ref:`CharacterBody2D.collision/safe_margin` for more details). +``safe_margin`` is the extra margin used for collision recovery (see :ref:`CharacterBody2D.safe_margin` for more details). .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_physicsbody3d.rst b/classes/class_physicsbody3d.rst index 1d9ff872d..832488bff 100644 --- a/classes/class_physicsbody3d.rst +++ b/classes/class_physicsbody3d.rst @@ -12,7 +12,7 @@ PhysicsBody3D **Inherits:** :ref:`CollisionObject3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`CharacterBody3D`, :ref:`PhysicalBone3D`, :ref:`RigidDynamicBody3D`, :ref:`StaticBody3D` +**Inherited By:** :ref:`CharacterBody3D`, :ref:`PhysicalBone3D`, :ref:`RigidBody3D`, :ref:`StaticBody3D` Base class for all objects affected by physics in 3D space. @@ -196,9 +196,9 @@ The body will stop if it collides. Returns a :ref:`KinematicCollision3D` for more details). +``safe_margin`` is the extra margin used for collision recovery (see :ref:`CharacterBody3D.safe_margin` for more details). -\ ``max_collisions`` allows to retrieve more than one collision result. +``max_collisions`` allows to retrieve more than one collision result. ---- @@ -226,11 +226,11 @@ Checks for collisions without moving the body. In order to be frame rate indepen Virtually sets the node's position, scale and rotation to that of the given :ref:`Transform3D`, then tries to move the body along the vector ``distance``. Returns ``true`` if a collision would stop the body from moving along the whole path. -\ ``collision`` is an optional object of type :ref:`KinematicCollision3D`, which contains additional information about the collision when stopped, or when touching another body along the motion. +``collision`` is an optional object of type :ref:`KinematicCollision3D`, which contains additional information about the collision when stopped, or when touching another body along the motion. -\ ``safe_margin`` is the extra margin used for collision recovery (see :ref:`CharacterBody3D.collision/safe_margin` for more details). +``safe_margin`` is the extra margin used for collision recovery (see :ref:`CharacterBody3D.safe_margin` for more details). -\ ``max_collisions`` allows to retrieve more than one collision result. +``max_collisions`` allows to retrieve more than one collision result. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_physicsdirectbodystate2d.rst b/classes/class_physicsdirectbodystate2d.rst index 67b28e8ac..8148bb74c 100644 --- a/classes/class_physicsdirectbodystate2d.rst +++ b/classes/class_physicsdirectbodystate2d.rst @@ -17,7 +17,7 @@ Direct access object to a physics body in the :ref:`PhysicsServer2D`, allowing safe changes to physics properties. This object is passed via the direct state callback of dynamic bodies, and is intended for changing the direct state of that body. See :ref:`RigidDynamicBody2D._integrate_forces`. +Provides direct access to a physics body in the :ref:`PhysicsServer2D`, allowing safe changes to physics properties. This object is passed via the direct state callback of rigid bodies, and is intended for changing the direct state of that body. See :ref:`RigidBody2D._integrate_forces`. Tutorials --------- @@ -284,7 +284,7 @@ This is equivalent to using :ref:`add_constant_force`. +\ **Note:** By default, this returns 0 unless bodies are configured to monitor contacts. See :ref:`RigidBody2D.contact_monitor`. ---- diff --git a/classes/class_physicsdirectbodystate3d.rst b/classes/class_physicsdirectbodystate3d.rst index 74fb841ea..14f3219fe 100644 --- a/classes/class_physicsdirectbodystate3d.rst +++ b/classes/class_physicsdirectbodystate3d.rst @@ -19,7 +19,7 @@ Direct access object to a physics body in the :ref:`PhysicsServer3D`, allowing safe changes to physics properties. This object is passed via the direct state callback of dynamic bodies, and is intended for changing the direct state of that body. See :ref:`RigidDynamicBody3D._integrate_forces`. +Provides direct access to a physics body in the :ref:`PhysicsServer3D`, allowing safe changes to physics properties. This object is passed via the direct state callback of rigid bodies, and is intended for changing the direct state of that body. See :ref:`RigidBody3D._integrate_forces`. Tutorials --------- @@ -300,7 +300,7 @@ This is equivalent to using :ref:`add_constant_force`. +\ **Note:** By default, this returns 0 unless bodies are configured to monitor contacts. See :ref:`RigidBody3D.contact_monitor`. ---- diff --git a/classes/class_physicsdirectspacestate2d.rst b/classes/class_physicsdirectspacestate2d.rst index 32ff84822..f2a427d8b 100644 --- a/classes/class_physicsdirectspacestate2d.rst +++ b/classes/class_physicsdirectspacestate2d.rst @@ -29,26 +29,26 @@ Tutorials Methods ------- -+-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`cast_motion` **(** :ref:`PhysicsShapeQueryParameters2D` parameters **)** | -+-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`collide_shape` **(** :ref:`PhysicsShapeQueryParameters2D` parameters, :ref:`int` max_results=32 **)** | -+-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_rest_info` **(** :ref:`PhysicsShapeQueryParameters2D` parameters **)** | -+-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`intersect_point` **(** :ref:`PhysicsPointQueryParameters2D` parameters, :ref:`int` max_results=32 **)** | -+-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`intersect_ray` **(** :ref:`PhysicsRayQueryParameters2D` parameters **)** | -+-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`intersect_shape` **(** :ref:`PhysicsShapeQueryParameters2D` parameters, :ref:`int` max_results=32 **)** | -+-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedFloat32Array` | :ref:`cast_motion` **(** :ref:`PhysicsShapeQueryParameters2D` parameters **)** | ++-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedVector2Array[]` | :ref:`collide_shape` **(** :ref:`PhysicsShapeQueryParameters2D` parameters, :ref:`int` max_results=32 **)** | ++-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`get_rest_info` **(** :ref:`PhysicsShapeQueryParameters2D` parameters **)** | ++-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary[]` | :ref:`intersect_point` **(** :ref:`PhysicsPointQueryParameters2D` parameters, :ref:`int` max_results=32 **)** | ++-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`intersect_ray` **(** :ref:`PhysicsRayQueryParameters2D` parameters **)** | ++-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary[]` | :ref:`intersect_shape` **(** :ref:`PhysicsShapeQueryParameters2D` parameters, :ref:`int` max_results=32 **)** | ++-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Method Descriptions ------------------- .. _class_PhysicsDirectSpaceState2D_method_cast_motion: -- :ref:`Array` **cast_motion** **(** :ref:`PhysicsShapeQueryParameters2D` parameters **)** +- :ref:`PackedFloat32Array` **cast_motion** **(** :ref:`PhysicsShapeQueryParameters2D` parameters **)** Checks how far a :ref:`Shape2D` can move without colliding. All the parameters for the query, including the shape and the motion, are supplied through a :ref:`PhysicsShapeQueryParameters2D` object. @@ -60,7 +60,7 @@ Returns an array with the safe and unsafe proportions (between 0 and 1) of the m .. _class_PhysicsDirectSpaceState2D_method_collide_shape: -- :ref:`Array` **collide_shape** **(** :ref:`PhysicsShapeQueryParameters2D` parameters, :ref:`int` max_results=32 **)** +- :ref:`PackedVector2Array[]` **collide_shape** **(** :ref:`PhysicsShapeQueryParameters2D` parameters, :ref:`int` max_results=32 **)** Checks the intersections of a shape, given through a :ref:`PhysicsShapeQueryParameters2D` object, against the space. The resulting array contains a list of points where the shape intersects another. Like with :ref:`intersect_shape`, the number of returned results can be limited to save processing time. @@ -92,7 +92,7 @@ Checks the intersections of a shape, given through a :ref:`PhysicsShapeQueryPara .. _class_PhysicsDirectSpaceState2D_method_intersect_point: -- :ref:`Array` **intersect_point** **(** :ref:`PhysicsPointQueryParameters2D` parameters, :ref:`int` max_results=32 **)** +- :ref:`Dictionary[]` **intersect_point** **(** :ref:`PhysicsPointQueryParameters2D` parameters, :ref:`int` max_results=32 **)** Checks whether a point is inside any solid shape. Position and other parameters are defined through :ref:`PhysicsPointQueryParameters2D`. The shapes the point is inside of are returned in an array containing dictionaries with the following fields: @@ -134,7 +134,7 @@ If the ray did not intersect anything, then an empty dictionary is returned inst .. _class_PhysicsDirectSpaceState2D_method_intersect_shape: -- :ref:`Array` **intersect_shape** **(** :ref:`PhysicsShapeQueryParameters2D` parameters, :ref:`int` max_results=32 **)** +- :ref:`Dictionary[]` **intersect_shape** **(** :ref:`PhysicsShapeQueryParameters2D` parameters, :ref:`int` max_results=32 **)** Checks the intersections of a shape, given through a :ref:`PhysicsShapeQueryParameters2D` object, against the space. The intersected shapes are returned in an array containing dictionaries with the following fields: diff --git a/classes/class_physicsdirectspacestate3d.rst b/classes/class_physicsdirectspacestate3d.rst index ada0f1b91..0f596fef1 100644 --- a/classes/class_physicsdirectspacestate3d.rst +++ b/classes/class_physicsdirectspacestate3d.rst @@ -31,26 +31,26 @@ Tutorials Methods ------- -+-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`cast_motion` **(** :ref:`PhysicsShapeQueryParameters3D` parameters **)** | -+-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`collide_shape` **(** :ref:`PhysicsShapeQueryParameters3D` parameters, :ref:`int` max_results=32 **)** | -+-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_rest_info` **(** :ref:`PhysicsShapeQueryParameters3D` parameters **)** | -+-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`intersect_point` **(** :ref:`PhysicsPointQueryParameters3D` parameters, :ref:`int` max_results=32 **)** | -+-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`intersect_ray` **(** :ref:`PhysicsRayQueryParameters3D` parameters **)** | -+-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`intersect_shape` **(** :ref:`PhysicsShapeQueryParameters3D` parameters, :ref:`int` max_results=32 **)** | -+-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedFloat32Array` | :ref:`cast_motion` **(** :ref:`PhysicsShapeQueryParameters3D` parameters **)** | ++-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedVector2Array[]` | :ref:`collide_shape` **(** :ref:`PhysicsShapeQueryParameters3D` parameters, :ref:`int` max_results=32 **)** | ++-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`get_rest_info` **(** :ref:`PhysicsShapeQueryParameters3D` parameters **)** | ++-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary[]` | :ref:`intersect_point` **(** :ref:`PhysicsPointQueryParameters3D` parameters, :ref:`int` max_results=32 **)** | ++-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`intersect_ray` **(** :ref:`PhysicsRayQueryParameters3D` parameters **)** | ++-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary[]` | :ref:`intersect_shape` **(** :ref:`PhysicsShapeQueryParameters3D` parameters, :ref:`int` max_results=32 **)** | ++-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Method Descriptions ------------------- .. _class_PhysicsDirectSpaceState3D_method_cast_motion: -- :ref:`Array` **cast_motion** **(** :ref:`PhysicsShapeQueryParameters3D` parameters **)** +- :ref:`PackedFloat32Array` **cast_motion** **(** :ref:`PhysicsShapeQueryParameters3D` parameters **)** Checks how far a :ref:`Shape3D` can move without colliding. All the parameters for the query, including the shape, are supplied through a :ref:`PhysicsShapeQueryParameters3D` object. @@ -62,7 +62,7 @@ Returns an array with the safe and unsafe proportions (between 0 and 1) of the m .. _class_PhysicsDirectSpaceState3D_method_collide_shape: -- :ref:`Array` **collide_shape** **(** :ref:`PhysicsShapeQueryParameters3D` parameters, :ref:`int` max_results=32 **)** +- :ref:`PackedVector2Array[]` **collide_shape** **(** :ref:`PhysicsShapeQueryParameters3D` parameters, :ref:`int` max_results=32 **)** Checks the intersections of a shape, given through a :ref:`PhysicsShapeQueryParameters3D` object, against the space. The resulting array contains a list of points where the shape intersects another. Like with :ref:`intersect_shape`, the number of returned results can be limited to save processing time. @@ -98,7 +98,7 @@ If the shape did not intersect anything, then an empty dictionary is returned in .. _class_PhysicsDirectSpaceState3D_method_intersect_point: -- :ref:`Array` **intersect_point** **(** :ref:`PhysicsPointQueryParameters3D` parameters, :ref:`int` max_results=32 **)** +- :ref:`Dictionary[]` **intersect_point** **(** :ref:`PhysicsPointQueryParameters3D` parameters, :ref:`int` max_results=32 **)** Checks whether a point is inside any solid shape. Position and other parameters are defined through :ref:`PhysicsPointQueryParameters3D`. The shapes the point is inside of are returned in an array containing dictionaries with the following fields: @@ -138,7 +138,7 @@ If the ray did not intersect anything, then an empty dictionary is returned inst .. _class_PhysicsDirectSpaceState3D_method_intersect_shape: -- :ref:`Array` **intersect_shape** **(** :ref:`PhysicsShapeQueryParameters3D` parameters, :ref:`int` max_results=32 **)** +- :ref:`Dictionary[]` **intersect_shape** **(** :ref:`PhysicsShapeQueryParameters3D` parameters, :ref:`int` max_results=32 **)** Checks the intersections of a shape, given through a :ref:`PhysicsShapeQueryParameters3D` object, against the space. The intersected shapes are returned in an array containing dictionaries with the following fields: diff --git a/classes/class_physicsrayqueryparameters2d.rst b/classes/class_physicsrayqueryparameters2d.rst index 0d2b7754d..6d316b05d 100644 --- a/classes/class_physicsrayqueryparameters2d.rst +++ b/classes/class_physicsrayqueryparameters2d.rst @@ -38,6 +38,13 @@ Properties | :ref:`Vector2` | :ref:`to` | ``Vector2(0, 0)`` | +-------------------------------+--------------------------------------------------------------------------------------------+-------------------+ +Methods +------- + ++-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PhysicsRayQueryParameters2D` | :ref:`create` **(** :ref:`Vector2` from, :ref:`Vector2` to, :ref:`int` collision_mask=4294967295, :ref:`Array` exclude=[] **)** |static| | ++-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + Property Descriptions --------------------- @@ -151,6 +158,20 @@ If ``true``, the query will detect a hit when starting inside shapes. In this ca The ending point of the ray being queried for, in global coordinates. +Method Descriptions +------------------- + +.. _class_PhysicsRayQueryParameters2D_method_create: + +- :ref:`PhysicsRayQueryParameters2D` **create** **(** :ref:`Vector2` from, :ref:`Vector2` to, :ref:`int` collision_mask=4294967295, :ref:`Array` exclude=[] **)** |static| + +Returns a new, pre-configured ``PhysicsRayQueryParameters2D`` object. Use it to quickly create query parameters using the most common options. + +:: + + var query = PhysicsRayQueryParameters2D.create(global_position, global_position + Vector2(0, 100)) + var collision = get_world_2d().direct_space_state.intersect_ray(query) + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_physicsrayqueryparameters3d.rst b/classes/class_physicsrayqueryparameters3d.rst index 9e0fa3781..acd31a974 100644 --- a/classes/class_physicsrayqueryparameters3d.rst +++ b/classes/class_physicsrayqueryparameters3d.rst @@ -40,6 +40,13 @@ Properties | :ref:`Vector3` | :ref:`to` | ``Vector3(0, 0, 0)`` | +-------------------------------+--------------------------------------------------------------------------------------------+----------------------+ +Methods +------- + ++-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PhysicsRayQueryParameters3D` | :ref:`create` **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`int` collision_mask=4294967295, :ref:`Array` exclude=[] **)** |static| | ++-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + Property Descriptions --------------------- @@ -169,6 +176,20 @@ If ``true``, the query will detect a hit when starting inside shapes. In this ca The ending point of the ray being queried for, in global coordinates. +Method Descriptions +------------------- + +.. _class_PhysicsRayQueryParameters3D_method_create: + +- :ref:`PhysicsRayQueryParameters3D` **create** **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`int` collision_mask=4294967295, :ref:`Array` exclude=[] **)** |static| + +Returns a new, pre-configured ``PhysicsRayQueryParameters3D`` object. Use it to quickly create query parameters using the most common options. + +:: + + var query = PhysicsRayQueryParameters3D.create(position, position + Vector3(0, -10, 0)) + var collision = get_world_3d().direct_space_state.intersect_ray(query) + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_physicsserver2d.rst b/classes/class_physicsserver2d.rst index 6ccd7969d..e1136ee1d 100644 --- a/classes/class_physicsserver2d.rst +++ b/classes/class_physicsserver2d.rst @@ -109,6 +109,8 @@ Methods +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`body_get_collision_mask` **(** :ref:`RID` body **)** |const| | +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`body_get_collision_priority` **(** :ref:`RID` body **)** |const| | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`body_get_constant_force` **(** :ref:`RID` body **)** |const| | +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`body_get_constant_torque` **(** :ref:`RID` body **)** |const| | @@ -149,6 +151,8 @@ Methods +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`body_set_collision_mask` **(** :ref:`RID` body, :ref:`int` mask **)** | +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_collision_priority` **(** :ref:`RID` body, :ref:`float` priority **)** | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`body_set_constant_force` **(** :ref:`RID` body, :ref:`Vector2` force **)** | +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`body_set_constant_torque` **(** :ref:`RID` body, :ref:`float` torque **)** | @@ -281,7 +285,7 @@ enum **SpaceParameter**: - **SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS** = **7** --- Constant to set/get the default solver bias for all physics constraints. A solver bias is a factor controlling how much two objects "rebound", after violating a constraint, to avoid leaving them in that state because of numerical imprecision. -- **SPACE_PARAM_SOLVER_ITERATIONS** = **8** --- Constant to set/get the number of solver iterations for all contacts and constraints. The greater the amount of iterations, the more accurate the collisions will be. However, a greater amount of iterations requires more CPU power, which can decrease performance. +- **SPACE_PARAM_SOLVER_ITERATIONS** = **8** --- Constant to set/get the number of solver iterations for all contacts and constraints. The greater the number of iterations, the more accurate the collisions will be. However, a greater number of iterations requires more CPU power, which can decrease performance. ---- @@ -409,9 +413,9 @@ enum **AreaSpaceOverrideMode**: .. _class_PhysicsServer2D_constant_BODY_MODE_KINEMATIC: -.. _class_PhysicsServer2D_constant_BODY_MODE_DYNAMIC: +.. _class_PhysicsServer2D_constant_BODY_MODE_RIGID: -.. _class_PhysicsServer2D_constant_BODY_MODE_DYNAMIC_LINEAR: +.. _class_PhysicsServer2D_constant_BODY_MODE_RIGID_LINEAR: enum **BodyMode**: @@ -419,9 +423,9 @@ enum **BodyMode**: - **BODY_MODE_KINEMATIC** = **1** --- Constant for kinematic bodies. In this mode, a body can be only moved by user code and collides with other bodies along its path. -- **BODY_MODE_DYNAMIC** = **2** --- Constant for dynamic bodies. In this mode, a body can be pushed by other bodies and has forces applied. +- **BODY_MODE_RIGID** = **2** --- Constant for rigid bodies. In this mode, a body can be pushed by other bodies and has forces applied. -- **BODY_MODE_DYNAMIC_LINEAR** = **3** --- Constant for linear dynamic bodies. In this mode, a body is dynamic but can not rotate, and only its linear velocity is affected by external forces. +- **BODY_MODE_RIGID_LINEAR** = **3** --- Constant for linear rigid bodies. In this mode, a body can not rotate, and only its linear velocity is affected by external forces. ---- @@ -850,7 +854,7 @@ This is equivalent to using :ref:`body_add_constant_force` **body_get_collision_priority** **(** :ref:`RID` body **)** |const| + +Returns the body's collision priority. + +---- + .. _class_PhysicsServer2D_method_body_get_constant_force: - :ref:`Vector2` **body_get_constant_force** **(** :ref:`RID` body **)** |const| @@ -1148,6 +1160,14 @@ Sets the physics layer or layers a body can collide with. ---- +.. _class_PhysicsServer2D_method_body_set_collision_priority: + +- void **body_set_collision_priority** **(** :ref:`RID` body, :ref:`float` priority **)** + +Sets the body's collision priority. + +---- + .. _class_PhysicsServer2D_method_body_set_constant_force: - void **body_set_constant_force** **(** :ref:`RID` body, :ref:`Vector2` force **)** @@ -1196,7 +1216,7 @@ The force integration function takes 2 arguments: - void **body_set_max_contacts_reported** **(** :ref:`RID` body, :ref:`int` amount **)** -Sets the maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0. +Sets the maximum contacts to report. Bodies can keep a log of the contacts with other bodies. This is enabled by setting the maximum number of contacts reported to a number greater than 0. ---- @@ -1244,7 +1264,7 @@ Enables one way collision on body if ``enable`` is ``true``. - void **body_set_shape_disabled** **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`bool` disabled **)** -Disables shape in body if ``disable`` is ``true``. +Disables shape in body if ``disabled`` is ``true``. ---- diff --git a/classes/class_physicsserver3d.rst b/classes/class_physicsserver3d.rst index 027346520..a1ad423d2 100644 --- a/classes/class_physicsserver3d.rst +++ b/classes/class_physicsserver3d.rst @@ -105,6 +105,8 @@ Methods +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`body_get_collision_mask` **(** :ref:`RID` body **)** |const| | +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`body_get_collision_priority` **(** :ref:`RID` body **)** |const| | ++-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`body_get_constant_force` **(** :ref:`RID` body **)** |const| | +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`body_get_constant_torque` **(** :ref:`RID` body **)** |const| | @@ -149,6 +151,8 @@ Methods +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`body_set_collision_mask` **(** :ref:`RID` body, :ref:`int` mask **)** | +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_collision_priority` **(** :ref:`RID` body, :ref:`float` priority **)** | ++-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`body_set_constant_force` **(** :ref:`RID` body, :ref:`Vector3` force **)** | +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`body_set_constant_torque` **(** :ref:`RID` body, :ref:`Vector3` torque **)** | @@ -763,9 +767,9 @@ enum **AreaSpaceOverrideMode**: .. _class_PhysicsServer3D_constant_BODY_MODE_KINEMATIC: -.. _class_PhysicsServer3D_constant_BODY_MODE_DYNAMIC: +.. _class_PhysicsServer3D_constant_BODY_MODE_RIGID: -.. _class_PhysicsServer3D_constant_BODY_MODE_DYNAMIC_LINEAR: +.. _class_PhysicsServer3D_constant_BODY_MODE_RIGID_LINEAR: enum **BodyMode**: @@ -773,9 +777,9 @@ enum **BodyMode**: - **BODY_MODE_KINEMATIC** = **1** --- Constant for kinematic bodies. In this mode, a body can be only moved by user code and collides with other bodies along its path. -- **BODY_MODE_DYNAMIC** = **2** --- Constant for dynamic bodies. In this mode, a body can be pushed by other bodies and has forces applied. +- **BODY_MODE_RIGID** = **2** --- Constant for rigid bodies. In this mode, a body can be pushed by other bodies and has forces applied. -- **BODY_MODE_DYNAMIC_LINEAR** = **3** --- Constant for linear dynamic bodies. In this mode, a body is dynamic but can not rotate, and only its linear velocity is affected by external forces. +- **BODY_MODE_RIGID_LINEAR** = **3** --- Constant for linear rigid bodies. In this mode, a body can not rotate, and only its linear velocity is affected by external forces. ---- @@ -935,7 +939,7 @@ enum **SpaceParameter**: - **SPACE_PARAM_BODY_TIME_TO_SLEEP** = **6** --- Constant to set/get the maximum time of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after this time. -- **SPACE_PARAM_SOLVER_ITERATIONS** = **7** --- Constant to set/get the number of solver iterations for contacts and constraints. The greater the amount of iterations, the more accurate the collisions and constraints will be. However, a greater amount of iterations requires more CPU power, which can decrease performance. +- **SPACE_PARAM_SOLVER_ITERATIONS** = **7** --- Constant to set/get the number of solver iterations for contacts and constraints. The greater the number of iterations, the more accurate the collisions and constraints will be. However, a greater number of iterations requires more CPU power, which can decrease performance. ---- @@ -1190,7 +1194,7 @@ This is equivalent to using :ref:`body_add_constant_force` **body_get_collision_priority** **(** :ref:`RID` body **)** |const| + +Returns the body's collision priority. + +---- + .. _class_PhysicsServer3D_method_body_get_constant_force: - :ref:`Vector3` **body_get_constant_force** **(** :ref:`RID` body **)** |const| @@ -1488,6 +1500,14 @@ Sets the physics layer or layers a body can collide with. ---- +.. _class_PhysicsServer3D_method_body_set_collision_priority: + +- void **body_set_collision_priority** **(** :ref:`RID` body, :ref:`float` priority **)** + +Sets the body's collision priority. + +---- + .. _class_PhysicsServer3D_method_body_set_constant_force: - void **body_set_constant_force** **(** :ref:`RID` body, :ref:`Vector3` force **)** @@ -1536,7 +1556,7 @@ The force integration function takes 2 arguments: - void **body_set_max_contacts_reported** **(** :ref:`RID` body, :ref:`int` amount **)** -Sets the maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0. +Sets the maximum contacts to report. Bodies can keep a log of the contacts with other bodies. This is enabled by setting the maximum number of contacts reported to a number greater than 0. ---- @@ -1568,7 +1588,7 @@ Sets a body parameter. A list of available parameters is on the :ref:`BodyParame - void **body_set_ray_pickable** **(** :ref:`RID` body, :ref:`bool` enable **)** -Sets the body pickable with rays if ``enabled`` is set. +Sets the body pickable with rays if ``enable`` is set. ---- diff --git a/classes/class_physicsserver3dextension.rst b/classes/class_physicsserver3dextension.rst index c2c074299..f993ce527 100644 --- a/classes/class_physicsserver3dextension.rst +++ b/classes/class_physicsserver3dextension.rst @@ -98,6 +98,8 @@ Methods +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`_body_get_collision_mask` **(** :ref:`RID` body **)** |virtual| |const| | +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`_body_get_collision_priority` **(** :ref:`RID` body **)** |virtual| |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`_body_get_constant_force` **(** :ref:`RID` body **)** |virtual| |const| | +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`_body_get_constant_torque` **(** :ref:`RID` body **)** |virtual| |const| | @@ -142,6 +144,8 @@ Methods +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_body_set_collision_mask` **(** :ref:`RID` body, :ref:`int` mask **)** |virtual| | +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_body_set_collision_priority` **(** :ref:`RID` body, :ref:`float` priority **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_body_set_constant_force` **(** :ref:`RID` body, :ref:`Vector3` force **)** |virtual| | +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_body_set_constant_torque` **(** :ref:`RID` body, :ref:`Vector3` torque **)** |virtual| | @@ -518,6 +522,12 @@ Method Descriptions ---- +.. _class_PhysicsServer3DExtension_method__body_get_collision_priority: + +- :ref:`float` **_body_get_collision_priority** **(** :ref:`RID` body **)** |virtual| |const| + +---- + .. _class_PhysicsServer3DExtension_method__body_get_constant_force: - :ref:`Vector3` **_body_get_constant_force** **(** :ref:`RID` body **)** |virtual| |const| @@ -650,6 +660,12 @@ Method Descriptions ---- +.. _class_PhysicsServer3DExtension_method__body_set_collision_priority: + +- void **_body_set_collision_priority** **(** :ref:`RID` body, :ref:`float` priority **)** |virtual| + +---- + .. _class_PhysicsServer3DExtension_method__body_set_constant_force: - void **_body_set_constant_force** **(** :ref:`RID` body, :ref:`Vector3` force **)** |virtual| diff --git a/classes/class_plane.rst b/classes/class_plane.rst index d0903621d..bcb63e683 100644 --- a/classes/class_plane.rst +++ b/classes/class_plane.rst @@ -84,15 +84,17 @@ Methods Operators --------- -+---------------------------+-----------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** :ref:`Plane` right **)** | -+---------------------------+-----------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** :ref:`Plane` right **)** | -+---------------------------+-----------------------------------------------------------------------------------------------+ -| :ref:`Plane` | :ref:`operator unary+` **(** **)** | -+---------------------------+-----------------------------------------------------------------------------------------------+ -| :ref:`Plane` | :ref:`operator unary-` **(** **)** | -+---------------------------+-----------------------------------------------------------------------------------------------+ ++---------------------------+-----------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`operator !=` **(** :ref:`Plane` right **)** | ++---------------------------+-----------------------------------------------------------------------------------------------------------+ +| :ref:`Plane` | :ref:`operator *` **(** :ref:`Transform3D` right **)** | ++---------------------------+-----------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`operator ==` **(** :ref:`Plane` right **)** | ++---------------------------+-----------------------------------------------------------------------------------------------------------+ +| :ref:`Plane` | :ref:`operator unary+` **(** **)** | ++---------------------------+-----------------------------------------------------------------------------------------------------------+ +| :ref:`Plane` | :ref:`operator unary-` **(** **)** | ++---------------------------+-----------------------------------------------------------------------------------------------------------+ Constants --------- @@ -274,7 +276,7 @@ Returns the intersection point of a segment from position ``from`` to position ` - :ref:`bool` **is_equal_approx** **(** :ref:`Plane` to_plane **)** |const| -Returns ``true`` if this plane and ``plane`` are approximately equal, by running :ref:`@GlobalScope.is_equal_approx` on each component. +Returns ``true`` if this plane and ``to_plane`` are approximately equal, by running :ref:`@GlobalScope.is_equal_approx` on each component. ---- @@ -313,6 +315,14 @@ Returns ``true`` if the planes are not equal. ---- +.. _class_Plane_operator_mul_Plane: + +- :ref:`Plane` **operator *** **(** :ref:`Transform3D` right **)** + +Inversely transforms (multiplies) the ``Plane`` by the given :ref:`Transform3D` transformation matrix. + +---- + .. _class_Plane_operator_eq_bool: - :ref:`bool` **operator ==** **(** :ref:`Plane` right **)** diff --git a/classes/class_planemesh.rst b/classes/class_planemesh.rst index 5e10ad674..fb710d721 100644 --- a/classes/class_planemesh.rst +++ b/classes/class_planemesh.rst @@ -17,22 +17,43 @@ Class representing a planar :ref:`PrimitiveMesh`. Description ----------- -Class representing a planar :ref:`PrimitiveMesh`. This flat mesh does not have a thickness. By default, this mesh is aligned on the X and Z axes; this default rotation isn't suited for use with billboarded materials. For billboarded materials, use :ref:`QuadMesh` instead. +Class representing a planar :ref:`PrimitiveMesh`. This flat mesh does not have a thickness. By default, this mesh is aligned on the X and Z axes; this default rotation isn't suited for use with billboarded materials. For billboarded materials, change :ref:`orientation` to :ref:`FACE_Z`. \ **Note:** When using a large textured ``PlaneMesh`` (e.g. as a floor), you may stumble upon UV jittering issues depending on the camera angle. To solve this, increase :ref:`subdivide_depth` and :ref:`subdivide_width` until you no longer notice UV jittering. Properties ---------- -+-------------------------------+------------------------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`center_offset` | ``Vector3(0, 0, 0)`` | -+-------------------------------+------------------------------------------------------------------+----------------------+ -| :ref:`Vector2` | :ref:`size` | ``Vector2(2, 2)`` | -+-------------------------------+------------------------------------------------------------------+----------------------+ -| :ref:`int` | :ref:`subdivide_depth` | ``0`` | -+-------------------------------+------------------------------------------------------------------+----------------------+ -| :ref:`int` | :ref:`subdivide_width` | ``0`` | -+-------------------------------+------------------------------------------------------------------+----------------------+ ++------------------------------------------------+------------------------------------------------------------------+----------------------+ +| :ref:`Vector3` | :ref:`center_offset` | ``Vector3(0, 0, 0)`` | ++------------------------------------------------+------------------------------------------------------------------+----------------------+ +| :ref:`Orientation` | :ref:`orientation` | ``1`` | ++------------------------------------------------+------------------------------------------------------------------+----------------------+ +| :ref:`Vector2` | :ref:`size` | ``Vector2(2, 2)`` | ++------------------------------------------------+------------------------------------------------------------------+----------------------+ +| :ref:`int` | :ref:`subdivide_depth` | ``0`` | ++------------------------------------------------+------------------------------------------------------------------+----------------------+ +| :ref:`int` | :ref:`subdivide_width` | ``0`` | ++------------------------------------------------+------------------------------------------------------------------+----------------------+ + +Enumerations +------------ + +.. _enum_PlaneMesh_Orientation: + +.. _class_PlaneMesh_constant_FACE_X: + +.. _class_PlaneMesh_constant_FACE_Y: + +.. _class_PlaneMesh_constant_FACE_Z: + +enum **Orientation**: + +- **FACE_X** = **0** --- ``PlaneMesh`` will face the positive X-axis. + +- **FACE_Y** = **1** --- ``PlaneMesh`` will face the positive Y-axis. This matches the behaviour of the ``PlaneMesh`` in Godot 3.x. + +- **FACE_Z** = **2** --- ``PlaneMesh`` will face the positive Z-axis. This matches the behvaiour of the QuadMesh in Godot 3.x. Property Descriptions --------------------- @@ -53,6 +74,22 @@ Offset of the generated plane. Useful for particles. ---- +.. _class_PlaneMesh_property_orientation: + +- :ref:`Orientation` **orientation** + ++-----------+------------------------+ +| *Default* | ``1`` | ++-----------+------------------------+ +| *Setter* | set_orientation(value) | ++-----------+------------------------+ +| *Getter* | get_orientation() | ++-----------+------------------------+ + +Direction that the ``PlaneMesh`` is facing. See :ref:`Orientation` for options. + +---- + .. _class_PlaneMesh_property_size: - :ref:`Vector2` **size** diff --git a/classes/class_polygon2d.rst b/classes/class_polygon2d.rst index 551971acb..5c4226810 100644 --- a/classes/class_polygon2d.rst +++ b/classes/class_polygon2d.rst @@ -33,7 +33,7 @@ Properties +-----------------------------------------------------+------------------------------------------------------------------------------+--------------------------+ | :ref:`float` | :ref:`invert_border` | ``100.0`` | +-----------------------------------------------------+------------------------------------------------------------------------------+--------------------------+ -| :ref:`bool` | :ref:`invert_enable` | ``false`` | +| :ref:`bool` | :ref:`invert_enabled` | ``false`` | +-----------------------------------------------------+------------------------------------------------------------------------------+--------------------------+ | :ref:`Vector2` | :ref:`offset` | ``Vector2(0, 0)`` | +-----------------------------------------------------+------------------------------------------------------------------------------+--------------------------+ @@ -148,23 +148,23 @@ The polygon's fill color. If ``texture`` is defined, it will be multiplied by th | *Getter* | get_invert_border() | +-----------+--------------------------+ -Added padding applied to the bounding box when using ``invert``. Setting this value too small may result in a "Bad Polygon" error. +Added padding applied to the bounding box when :ref:`invert_enabled` is set to ``true``. Setting this value too small may result in a "Bad Polygon" error. ---- -.. _class_Polygon2D_property_invert_enable: +.. _class_Polygon2D_property_invert_enabled: -- :ref:`bool` **invert_enable** +- :ref:`bool` **invert_enabled** -+-----------+-------------------+ -| *Default* | ``false`` | -+-----------+-------------------+ -| *Setter* | set_invert(value) | -+-----------+-------------------+ -| *Getter* | get_invert() | -+-----------+-------------------+ ++-----------+---------------------------+ +| *Default* | ``false`` | ++-----------+---------------------------+ +| *Setter* | set_invert_enabled(value) | ++-----------+---------------------------+ +| *Getter* | get_invert_enabled() | ++-----------+---------------------------+ -If ``true``, polygon will be inverted, containing the area outside the defined points and extending to the ``invert_border``. +If ``true``, the polygon will be inverted, containing the area outside the defined points and extending to the :ref:`invert_border`. ---- diff --git a/classes/class_popupmenu.rst b/classes/class_popupmenu.rst index fb84eee90..5cdd5946d 100644 --- a/classes/class_popupmenu.rst +++ b/classes/class_popupmenu.rst @@ -84,12 +84,12 @@ Methods +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Key` | :ref:`get_item_accelerator` **(** :ref:`int` index **)** |const| | +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_item_horizontal_offset` **(** :ref:`int` index **)** |const| | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Texture2D` | :ref:`get_item_icon` **(** :ref:`int` index **)** |const| | +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_item_id` **(** :ref:`int` index **)** |const| | +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_item_indent` **(** :ref:`int` index **)** |const| | ++--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_item_index` **(** :ref:`int` id **)** |const| | +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_item_language` **(** :ref:`int` index **)** |const| | @@ -136,12 +136,12 @@ Methods +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_item_disabled` **(** :ref:`int` index, :ref:`bool` disabled **)** | +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_horizontal_offset` **(** :ref:`int` index, :ref:`int` offset **)** | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_item_icon` **(** :ref:`int` index, :ref:`Texture2D` icon **)** | +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_item_id` **(** :ref:`int` index, :ref:`int` id **)** | +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_indent` **(** :ref:`int` index, :ref:`int` indent **)** | ++--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_item_language` **(** :ref:`int` index, :ref:`String` language **)** | +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_item_metadata` **(** :ref:`int` index, :ref:`Variant` metadata **)** | @@ -185,6 +185,8 @@ Theme Properties +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`int` | :ref:`h_separation` | ``4`` | +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`int` | :ref:`indent` | ``10`` | ++-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`int` | :ref:`item_end_padding` | ``2`` | +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`int` | :ref:`item_start_padding` | ``2`` | @@ -205,16 +207,24 @@ Theme Properties +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Texture2D` | :ref:`checked` | | +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`Texture2D` | :ref:`checked_disabled` | | ++-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Texture2D` | :ref:`radio_checked` | | +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`Texture2D` | :ref:`radio_checked_disabled` | | ++-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Texture2D` | :ref:`radio_unchecked` | | +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`Texture2D` | :ref:`radio_unchecked_disabled` | | ++-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Texture2D` | :ref:`submenu` | | +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Texture2D` | :ref:`submenu_mirrored` | | +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Texture2D` | :ref:`unchecked` | | +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`Texture2D` | :ref:`unchecked_disabled` | | ++-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`StyleBox` | :ref:`hover` | | +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`StyleBox` | :ref:`labeled_separator_left` | | @@ -253,6 +263,12 @@ Emitted when an item of some ``id`` is pressed or its accelerator is activated. Emitted when an item of some ``index`` is pressed or its accelerator is activated. +---- + +.. _class_PopupMenu_signal_menu_changed: + +- **menu_changed** **(** **)** + Property Descriptions --------------------- @@ -539,14 +555,6 @@ Returns the accelerator of the item at the given ``index``. Accelerators are spe ---- -.. _class_PopupMenu_method_get_item_horizontal_offset: - -- :ref:`int` **get_item_horizontal_offset** **(** :ref:`int` index **)** |const| - -Returns the horizontal offset of the item at the given ``index``. - ----- - .. _class_PopupMenu_method_get_item_icon: - :ref:`Texture2D` **get_item_icon** **(** :ref:`int` index **)** |const| @@ -563,6 +571,14 @@ Returns the id of the item at the given ``index``. ``id`` can be manually assign ---- +.. _class_PopupMenu_method_get_item_indent: + +- :ref:`int` **get_item_indent** **(** :ref:`int` index **)** |const| + +Returns the horizontal offset of the item at the given ``index``. + +---- + .. _class_PopupMenu_method_get_item_index: - :ref:`int` **get_item_index** **(** :ref:`int` id **)** |const| @@ -705,6 +721,8 @@ Moves the scroll view to make the item at the given ``index`` visible. Sets the currently focused item as the given ``index``. +Passing ``-1`` as the index makes so that no item is focused. + ---- .. _class_PopupMenu_method_set_item_accelerator: @@ -757,14 +775,6 @@ Enables/disables the item at the given ``index``. When it is disabled, it can't ---- -.. _class_PopupMenu_method_set_item_horizontal_offset: - -- void **set_item_horizontal_offset** **(** :ref:`int` index, :ref:`int` offset **)** - -Sets the horizontal offset of the item at the given ``index``. - ----- - .. _class_PopupMenu_method_set_item_icon: - void **set_item_icon** **(** :ref:`int` index, :ref:`Texture2D` icon **)** @@ -783,6 +793,14 @@ The ``id`` is used in :ref:`id_pressed` and : ---- +.. _class_PopupMenu_method_set_item_indent: + +- void **set_item_indent** **(** :ref:`int` index, :ref:`int` indent **)** + +Sets the horizontal offset of the item at the given ``index``. + +---- + .. _class_PopupMenu_method_set_item_language: - void **set_item_language** **(** :ref:`int` index, :ref:`String` language **)** @@ -968,6 +986,18 @@ The horizontal space between the item's elements. ---- +.. _class_PopupMenu_theme_constant_indent: + +- :ref:`int` **indent** + ++-----------+--------+ +| *Default* | ``10`` | ++-----------+--------+ + +Width of the single indentation level. + +---- + .. _class_PopupMenu_theme_constant_item_end_padding: - :ref:`int` **item_end_padding** @@ -1064,6 +1094,14 @@ Font size of the menu items. ---- +.. _class_PopupMenu_theme_icon_checked_disabled: + +- :ref:`Texture2D` **checked_disabled** + +:ref:`Texture2D` icon for the checked checkbox items when they are disabled. + +---- + .. _class_PopupMenu_theme_icon_radio_checked: - :ref:`Texture2D` **radio_checked** @@ -1072,6 +1110,14 @@ Font size of the menu items. ---- +.. _class_PopupMenu_theme_icon_radio_checked_disabled: + +- :ref:`Texture2D` **radio_checked_disabled** + +:ref:`Texture2D` icon for the checked radio button items when they are disabled. + +---- + .. _class_PopupMenu_theme_icon_radio_unchecked: - :ref:`Texture2D` **radio_unchecked** @@ -1080,6 +1126,14 @@ Font size of the menu items. ---- +.. _class_PopupMenu_theme_icon_radio_unchecked_disabled: + +- :ref:`Texture2D` **radio_unchecked_disabled** + +:ref:`Texture2D` icon for the unchecked radio button items when they are disabled. + +---- + .. _class_PopupMenu_theme_icon_submenu: - :ref:`Texture2D` **submenu** @@ -1104,6 +1158,14 @@ Font size of the menu items. ---- +.. _class_PopupMenu_theme_icon_unchecked_disabled: + +- :ref:`Texture2D` **unchecked_disabled** + +:ref:`Texture2D` icon for the unchecked checkbox items when they are disabled. + +---- + .. _class_PopupMenu_theme_style_hover: - :ref:`StyleBox` **hover** diff --git a/classes/class_popuppanel.rst b/classes/class_popuppanel.rst index 16608c6f5..bd5ebbd1e 100644 --- a/classes/class_popuppanel.rst +++ b/classes/class_popuppanel.rst @@ -19,6 +19,8 @@ Description Class for displaying popups with a panel background. In some cases it might be simpler to use than :ref:`Popup`, since it provides a configurable background. If you are making windows, better check :ref:`Window`. +If any :ref:`Control` node is added as a child of this ``PopupPanel``, it will be stretched to fit the panel's size (similar to how :ref:`PanelContainer` works). + Theme Properties ---------------- diff --git a/classes/class_primitivemesh.rst b/classes/class_primitivemesh.rst index 2ae0c54f0..501be77f4 100644 --- a/classes/class_primitivemesh.rst +++ b/classes/class_primitivemesh.rst @@ -12,14 +12,14 @@ PrimitiveMesh **Inherits:** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`BoxMesh`, :ref:`CapsuleMesh`, :ref:`CylinderMesh`, :ref:`PlaneMesh`, :ref:`PointMesh`, :ref:`PrismMesh`, :ref:`QuadMesh`, :ref:`RibbonTrailMesh`, :ref:`SphereMesh`, :ref:`TextMesh`, :ref:`TubeTrailMesh` +**Inherited By:** :ref:`BoxMesh`, :ref:`CapsuleMesh`, :ref:`CylinderMesh`, :ref:`PlaneMesh`, :ref:`PointMesh`, :ref:`PrismMesh`, :ref:`RibbonTrailMesh`, :ref:`SphereMesh`, :ref:`TextMesh`, :ref:`TorusMesh`, :ref:`TubeTrailMesh` Base class for all primitive meshes. Handles applying a :ref:`Material` to a primitive mesh. Description ----------- -Base class for all primitive meshes. Handles applying a :ref:`Material` to a primitive mesh. Examples include :ref:`BoxMesh`, :ref:`CapsuleMesh`, :ref:`CylinderMesh`, :ref:`PlaneMesh`, :ref:`PrismMesh`, :ref:`QuadMesh`, and :ref:`SphereMesh`. +Base class for all primitive meshes. Handles applying a :ref:`Material` to a primitive mesh. Examples include :ref:`BoxMesh`, :ref:`CapsuleMesh`, :ref:`CylinderMesh`, :ref:`PlaneMesh`, :ref:`PrismMesh`, and :ref:`SphereMesh`. Properties ---------- diff --git a/classes/class_projection.rst b/classes/class_projection.rst index 1034e2556..fbd95f1bb 100644 --- a/classes/class_projection.rst +++ b/classes/class_projection.rst @@ -15,26 +15,28 @@ Projection Properties ---------- -+-------------------------------+---------------------------------------+----------------------+ -| :ref:`Vector4` | :ref:`w` | ``Vector4(0, 0, 0)`` | -+-------------------------------+---------------------------------------+----------------------+ -| :ref:`Vector4` | :ref:`x` | ``Vector4(1, 0, 0)`` | -+-------------------------------+---------------------------------------+----------------------+ -| :ref:`Vector4` | :ref:`y` | ``Vector4(0, 1, 0)`` | -+-------------------------------+---------------------------------------+----------------------+ -| :ref:`Vector4` | :ref:`z` | ``Vector4(0, 0, 1)`` | -+-------------------------------+---------------------------------------+----------------------+ ++-------------------------------+---------------------------------------+-------------------------+ +| :ref:`Vector4` | :ref:`w` | ``Vector4(0, 0, 0, 1)`` | ++-------------------------------+---------------------------------------+-------------------------+ +| :ref:`Vector4` | :ref:`x` | ``Vector4(1, 0, 0, 0)`` | ++-------------------------------+---------------------------------------+-------------------------+ +| :ref:`Vector4` | :ref:`y` | ``Vector4(0, 1, 0, 0)`` | ++-------------------------------+---------------------------------------+-------------------------+ +| :ref:`Vector4` | :ref:`z` | ``Vector4(0, 0, 1, 0)`` | ++-------------------------------+---------------------------------------+-------------------------+ Constructors ------------ -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| :ref:`Projection` | :ref:`Projection` **(** **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| :ref:`Projection` | :ref:`Projection` **(** :ref:`Projection` from **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| :ref:`Projection` | :ref:`Projection` **(** :ref:`Transform3D` from **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------+ ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Projection` | :ref:`Projection` **(** **)** | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Projection` | :ref:`Projection` **(** :ref:`Projection` from **)** | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Projection` | :ref:`Projection` **(** :ref:`Transform3D` from **)** | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Projection` | :ref:`Projection` **(** :ref:`Vector4` x_axis, :ref:`Vector4` y_axis, :ref:`Vector4` z_axis, :ref:`Vector4` w_axis **)** | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Methods ------- @@ -150,9 +152,9 @@ Property Descriptions - :ref:`Vector4` **w** -+-----------+----------------------+ -| *Default* | ``Vector4(0, 0, 0)`` | -+-----------+----------------------+ ++-----------+-------------------------+ +| *Default* | ``Vector4(0, 0, 0, 1)`` | ++-----------+-------------------------+ ---- @@ -160,9 +162,9 @@ Property Descriptions - :ref:`Vector4` **x** -+-----------+----------------------+ -| *Default* | ``Vector4(1, 0, 0)`` | -+-----------+----------------------+ ++-----------+-------------------------+ +| *Default* | ``Vector4(1, 0, 0, 0)`` | ++-----------+-------------------------+ ---- @@ -170,9 +172,9 @@ Property Descriptions - :ref:`Vector4` **y** -+-----------+----------------------+ -| *Default* | ``Vector4(0, 1, 0)`` | -+-----------+----------------------+ ++-----------+-------------------------+ +| *Default* | ``Vector4(0, 1, 0, 0)`` | ++-----------+-------------------------+ ---- @@ -180,9 +182,9 @@ Property Descriptions - :ref:`Vector4` **z** -+-----------+----------------------+ -| *Default* | ``Vector4(0, 0, 1)`` | -+-----------+----------------------+ ++-----------+-------------------------+ +| *Default* | ``Vector4(0, 0, 1, 0)`` | ++-----------+-------------------------+ Constructor Descriptions ------------------------ @@ -199,6 +201,12 @@ Constructor Descriptions - :ref:`Projection` **Projection** **(** :ref:`Transform3D` from **)** +---- + +- :ref:`Projection` **Projection** **(** :ref:`Vector4` x_axis, :ref:`Vector4` y_axis, :ref:`Vector4` z_axis, :ref:`Vector4` w_axis **)** + +Constructs a Projection from four :ref:`Vector4` values (matrix columns). + Method Descriptions ------------------- diff --git a/classes/class_projectsettings.rst b/classes/class_projectsettings.rst index 37f74548e..d263f3e1a 100644 --- a/classes/class_projectsettings.rst +++ b/classes/class_projectsettings.rst @@ -216,8 +216,6 @@ Properties +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`debug/settings/stdout/verbose_stdout` | ``false`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`debug/settings/visual_script/max_call_stack` | ``1024`` | -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`debug/shapes/collision/contact_color` | ``Color(1, 0.2, 0.1, 0.8)`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`debug/shapes/collision/draw_2d_outlines` | ``true`` | @@ -228,8 +226,28 @@ Properties +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`debug/shapes/navigation/disabled_geometry_color` | ``Color(1, 0.7, 0.1, 0.4)`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`debug/shapes/navigation/edge_connection_color` | ``Color(1, 0, 1, 1)`` | ++---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`debug/shapes/navigation/enable_edge_connections` | ``true`` | ++---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`debug/shapes/navigation/enable_edge_connections_xray` | ``true`` | ++---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`debug/shapes/navigation/enable_edge_lines` | ``true`` | ++---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`debug/shapes/navigation/enable_edge_lines_xray` | ``true`` | ++---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`debug/shapes/navigation/enable_geometry_face_random_color` | ``true`` | ++---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`debug/shapes/navigation/geometry_color` | ``Color(0.1, 1, 0.7, 0.4)`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`debug/shapes/navigation/geometry_edge_color` | ``Color(0.5, 1, 1, 1)`` | ++---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`debug/shapes/navigation/geometry_edge_disabled_color` | ``Color(0.5, 0.5, 0.5, 1)`` | ++---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`debug/shapes/navigation/geometry_face_color` | ``Color(0.5, 1, 1, 0.4)`` | ++---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`debug/shapes/navigation/geometry_face_disabled_color` | ``Color(0.5, 0.5, 0.5, 0.4)`` | ++---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`debug/shapes/paths/geometry_color` | ``Color(0.1, 1, 0.7, 0.4)`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`debug/shapes/paths/geometry_width` | ``2.0`` | @@ -244,6 +262,8 @@ Properties +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`display/window/energy_saving/keep_screen_on` | ``true`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`display/window/energy_saving/keep_screen_on.editor` | ``false`` | ++---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`display/window/handheld/orientation` | ``0`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`display/window/ios/hide_home_indicator` | ``true`` | @@ -256,9 +276,9 @@ Properties +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`display/window/size/resizable` | ``true`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`display/window/size/viewport_height` | ``600`` | +| :ref:`int` | :ref:`display/window/size/viewport_height` | ``648`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`display/window/size/viewport_width` | ``1024`` | +| :ref:`int` | :ref:`display/window/size/viewport_width` | ``1152`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`display/window/size/window_height_override` | ``0`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ @@ -302,7 +322,7 @@ Properties +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`gui/theme/custom_font` | ``""`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`gui/theme/default_font_antialiased` | ``true`` | +| :ref:`int` | :ref:`gui/theme/default_font_antialiasing` | ``1`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`gui/theme/default_font_generate_mipmaps` | ``false`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ @@ -314,6 +334,8 @@ Properties +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`gui/theme/default_theme_scale` | ``1.0`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`gui/theme/lcd_subpixel_layout` | ``1`` | ++---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`gui/timers/incremental_search_max_interval_msec` | ``2000`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`gui/timers/text_edit_idle_detect_sec` | ``3`` | @@ -842,18 +864,6 @@ Properties +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`memory/limits/multithreaded_server/rid_pool_prealloc` | ``60`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`mono/debugger_agent/port` | ``23685`` | -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`mono/debugger_agent/wait_for_debugger` | ``false`` | -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`mono/debugger_agent/wait_timeout` | ``3000`` | -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`mono/profiler/args` | ``"log:calls,alloc,sample,output=output.mlpd"`` | -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`mono/profiler/enabled` | ``false`` | -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`mono/runtime/unhandled_exception_policy` | ``0`` | -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`navigation/2d/default_cell_size` | ``1`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`navigation/2d/default_edge_connection_margin` | ``1`` | @@ -956,7 +966,9 @@ Properties +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`rendering/2d/snap/snap_2d_vertices_to_pixel` | ``false`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/anti_aliasing/quality/msaa` | ``0`` | +| :ref:`int` | :ref:`rendering/anti_aliasing/quality/msaa_2d` | ``0`` | ++---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`rendering/anti_aliasing/quality/msaa_3d` | ``0`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/anti_aliasing/quality/screen_space_aa` | ``0`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ @@ -1110,8 +1122,6 @@ Properties +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`rendering/reflections/sky_reflections/texture_array_reflections.mobile` | ``false`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`rendering/scaling_3d/fsr_mipmap_bias` | ``0.0`` | -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`rendering/scaling_3d/fsr_sharpness` | ``0.2`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/scaling_3d/mode` | ``0`` | @@ -1168,6 +1178,8 @@ Properties +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/textures/default_filters/anisotropic_filtering_level` | ``2`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`rendering/textures/default_filters/texture_mipmap_bias` | ``0.0`` | ++---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`rendering/textures/default_filters/use_nearest_mipmap_filter` | ``false`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/textures/light_projectors/filter` | ``3`` | @@ -1239,10 +1251,6 @@ Methods +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`localize_path` **(** :ref:`String` path **)** |const| | +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`property_can_revert` **(** :ref:`String` name **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`property_get_revert` **(** :ref:`String` name **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`save` **(** **)** | +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`save_custom` **(** :ref:`String` file **)** | @@ -1621,6 +1629,10 @@ Default :ref:`AudioBusLayout` resource file to use in the Specifies the audio driver to use. This setting is platform-dependent as each platform supports different audio drivers. If left empty, the default audio driver will be used. +The ``Dummy`` audio driver disables all audio playback and recording, which is useful for non-game applications as it reduces CPU usage. It also prevents the engine from appearing as an application playing audio in the OS' audio mixer. + +\ **Note:** The driver in use can be overridden at runtime via the ``--audio-driver`` command line argument. + ---- .. _class_ProjectSettings_property_audio/driver/enable_input: @@ -1827,7 +1839,7 @@ Path to logs within the project. Using an ``user://`` path is recommended. | *Default* | ``5`` | +-----------+-------+ -Specifies the maximum amount of log files allowed (used for rotation). +Specifies the maximum number of log files allowed (used for rotation). ---- @@ -2311,7 +2323,7 @@ Maximum call stack allowed for debugging GDScript. | *Default* | ``16384`` | +-----------+-----------+ -Maximum amount of functions per frame allowed when profiling. +Maximum number of functions per frame allowed when profiling. ---- @@ -2349,18 +2361,6 @@ Print more information to standard output when running. It displays information ---- -.. _class_ProjectSettings_property_debug/settings/visual_script/max_call_stack: - -- :ref:`int` **debug/settings/visual_script/max_call_stack** - -+-----------+----------+ -| *Default* | ``1024`` | -+-----------+----------+ - -Maximum call stack in visual scripting, to avoid infinite recursion. - ----- - .. _class_ProjectSettings_property_debug/shapes/collision/contact_color: - :ref:`Color` **debug/shapes/collision/contact_color** @@ -2421,6 +2421,78 @@ Color of the disabled navigation geometry, visible when "Visible Navigation" is ---- +.. _class_ProjectSettings_property_debug/shapes/navigation/edge_connection_color: + +- :ref:`Color` **debug/shapes/navigation/edge_connection_color** + ++-----------+-----------------------+ +| *Default* | ``Color(1, 0, 1, 1)`` | ++-----------+-----------------------+ + +Color to display edge connections between navigation regions, visible when "Visible Navigation" is enabled in the Debug menu. + +---- + +.. _class_ProjectSettings_property_debug/shapes/navigation/enable_edge_connections: + +- :ref:`bool` **debug/shapes/navigation/enable_edge_connections** + ++-----------+----------+ +| *Default* | ``true`` | ++-----------+----------+ + +If enabled, displays edge connections between navigation regions when "Visible Navigation" is enabled in the Debug menu. + +---- + +.. _class_ProjectSettings_property_debug/shapes/navigation/enable_edge_connections_xray: + +- :ref:`bool` **debug/shapes/navigation/enable_edge_connections_xray** + ++-----------+----------+ +| *Default* | ``true`` | ++-----------+----------+ + +If enabled, displays edge connections between navigation regions through geometry when "Visible Navigation" is enabled in the Debug menu. + +---- + +.. _class_ProjectSettings_property_debug/shapes/navigation/enable_edge_lines: + +- :ref:`bool` **debug/shapes/navigation/enable_edge_lines** + ++-----------+----------+ +| *Default* | ``true`` | ++-----------+----------+ + +If enabled, displays navigation mesh polygon edges when "Visible Navigation" is enabled in the Debug menu. + +---- + +.. _class_ProjectSettings_property_debug/shapes/navigation/enable_edge_lines_xray: + +- :ref:`bool` **debug/shapes/navigation/enable_edge_lines_xray** + ++-----------+----------+ +| *Default* | ``true`` | ++-----------+----------+ + +If enabled, displays navigation mesh polygon edges through geometry when "Visible Navigation" is enabled in the Debug menu. + +---- + +.. _class_ProjectSettings_property_debug/shapes/navigation/enable_geometry_face_random_color: + +- :ref:`bool` **debug/shapes/navigation/enable_geometry_face_random_color** + ++-----------+----------+ +| *Default* | ``true`` | ++-----------+----------+ + +If enabled, colorizes each navigation mesh polygon face with a random color when "Visible Navigation" is enabled in the Debug menu. + +---- + .. _class_ProjectSettings_property_debug/shapes/navigation/geometry_color: - :ref:`Color` **debug/shapes/navigation/geometry_color** @@ -2433,6 +2505,54 @@ Color of the navigation geometry, visible when "Visible Navigation" is enabled i ---- +.. _class_ProjectSettings_property_debug/shapes/navigation/geometry_edge_color: + +- :ref:`Color` **debug/shapes/navigation/geometry_edge_color** + ++-----------+-------------------------+ +| *Default* | ``Color(0.5, 1, 1, 1)`` | ++-----------+-------------------------+ + +Color to display enabled navigation mesh polygon edges, visible when "Visible Navigation" is enabled in the Debug menu. + +---- + +.. _class_ProjectSettings_property_debug/shapes/navigation/geometry_edge_disabled_color: + +- :ref:`Color` **debug/shapes/navigation/geometry_edge_disabled_color** + ++-----------+-----------------------------+ +| *Default* | ``Color(0.5, 0.5, 0.5, 1)`` | ++-----------+-----------------------------+ + +Color to display disabled navigation mesh polygon edges, visible when "Visible Navigation" is enabled in the Debug menu. + +---- + +.. _class_ProjectSettings_property_debug/shapes/navigation/geometry_face_color: + +- :ref:`Color` **debug/shapes/navigation/geometry_face_color** + ++-----------+---------------------------+ +| *Default* | ``Color(0.5, 1, 1, 0.4)`` | ++-----------+---------------------------+ + +Color to display enabled navigation mesh polygon faces, visible when "Visible Navigation" is enabled in the Debug menu. + +---- + +.. _class_ProjectSettings_property_debug/shapes/navigation/geometry_face_disabled_color: + +- :ref:`Color` **debug/shapes/navigation/geometry_face_disabled_color** + ++-----------+-------------------------------+ +| *Default* | ``Color(0.5, 0.5, 0.5, 0.4)`` | ++-----------+-------------------------------+ + +Color to display disabled navigation mesh polygon faces, visible when "Visible Navigation" is enabled in the Debug menu. + +---- + .. _class_ProjectSettings_property_debug/shapes/paths/geometry_color: - :ref:`Color` **debug/shapes/paths/geometry_color** @@ -2501,7 +2621,7 @@ Position offset for tooltips, relative to the mouse cursor's hotspot. | *Default* | ``true`` | +-----------+----------+ -If ``true``, allows HiDPI display on Windows, macOS, Android, iOS and HTML5. If ``false``, the platform's low-DPI fallback will be used on HiDPI displays, which causes the window to be displayed in a blurry or pixelated manner (and can cause various window management bugs). Therefore, it is recommended to make your project scale to :doc:`multiple resolutions <../tutorials/viewports/multiple_resolutions>` instead of disabling this setting. +If ``true``, allows HiDPI display on Windows, macOS, Android, iOS and Web. If ``false``, the platform's low-DPI fallback will be used on HiDPI displays, which causes the window to be displayed in a blurry or pixelated manner (and can cause various window management bugs). Therefore, it is recommended to make your project scale to :doc:`multiple resolutions <../tutorials/viewports/multiple_resolutions>` instead of disabling this setting. \ **Note:** This setting has no effect on Linux as DPI-awareness fallbacks are not supported there. @@ -2519,6 +2639,18 @@ If ``true``, keeps the screen on (even in case of inactivity), so the screensave ---- +.. _class_ProjectSettings_property_display/window/energy_saving/keep_screen_on.editor: + +- :ref:`bool` **display/window/energy_saving/keep_screen_on.editor** + ++-----------+-----------+ +| *Default* | ``false`` | ++-----------+-----------+ + +Editor-only override for :ref:`display/window/energy_saving/keep_screen_on`. Does not affect exported projects in debug or release mode. + +---- + .. _class_ProjectSettings_property_display/window/handheld/orientation: - :ref:`int` **display/window/handheld/orientation** @@ -2555,7 +2687,7 @@ If ``true``, the home indicator is hidden automatically. This only affects iOS d Forces the main window to be always on top. -\ **Note:** This setting is ignored on iOS, Android, and HTML5. +\ **Note:** This setting is ignored on iOS, Android, and Web. ---- @@ -2569,7 +2701,7 @@ Forces the main window to be always on top. Forces the main window to be borderless. -\ **Note:** This setting is ignored on iOS, Android, and HTML5. +\ **Note:** This setting is ignored on iOS, Android, and Web. ---- @@ -2585,7 +2717,7 @@ Sets the main window to full screen when the project starts. Note that this is n Regardless of the platform, enabling fullscreen will change the window size to match the monitor's size. Therefore, make sure your project supports :doc:`multiple resolutions <../tutorials/rendering/multiple_resolutions>` when enabling fullscreen mode. -\ **Note:** This setting is ignored on iOS, Android, and HTML5. +\ **Note:** This setting is ignored on iOS, Android, and Web. ---- @@ -2608,10 +2740,10 @@ Allows the window to be resizable by default. - :ref:`int` **display/window/size/viewport_height** +-----------+---------+ -| *Default* | ``600`` | +| *Default* | ``648`` | +-----------+---------+ -Sets the game's main viewport height. On desktop platforms, this is also the initial window height. +Sets the game's main viewport height. On desktop platforms, this is also the initial window height, represented by an indigo-colored rectangle in the 2D editor. Stretch mode settings also use this as a reference when using the ``canvas_items`` or ``viewport`` stretch modes. See also :ref:`display/window/size/viewport_width`, :ref:`display/window/size/window_width_override` and :ref:`display/window/size/window_height_override`. ---- @@ -2620,10 +2752,10 @@ Sets the game's main viewport height. On desktop platforms, this is also the ini - :ref:`int` **display/window/size/viewport_width** +-----------+----------+ -| *Default* | ``1024`` | +| *Default* | ``1152`` | +-----------+----------+ -Sets the game's main viewport width. On desktop platforms, this is also the initial window width. +Sets the game's main viewport width. On desktop platforms, this is also the initial window width, represented by an indigo-colored rectangle in the 2D editor. Stretch mode settings also use this as a reference when using the ``canvas_items`` or ``viewport`` stretch modes. See also :ref:`display/window/size/viewport_height`, :ref:`display/window/size/window_width_override` and :ref:`display/window/size/window_height_override`. ---- @@ -2635,9 +2767,9 @@ Sets the game's main viewport width. On desktop platforms, this is also the init | *Default* | ``0`` | +-----------+-------+ -On desktop platforms, sets the game's initial window height. +On desktop platforms, overrides the game's initial window height. See also :ref:`display/window/size/window_width_override`, :ref:`display/window/size/viewport_width` and :ref:`display/window/size/viewport_height`. -\ **Note:** By default, or when set to 0, the initial window height is the :ref:`display/window/size/viewport_height`. This setting is ignored on iOS, Android, and HTML5. +\ **Note:** By default, or when set to ``0``, the initial window height is the :ref:`display/window/size/viewport_height`. This setting is ignored on iOS, Android, and Web. ---- @@ -2649,9 +2781,9 @@ On desktop platforms, sets the game's initial window height. | *Default* | ``0`` | +-----------+-------+ -On desktop platforms, sets the game's initial window width. +On desktop platforms, overrides the game's initial window width. See also :ref:`display/window/size/window_height_override`, :ref:`display/window/size/viewport_width` and :ref:`display/window/size/viewport_height`. -\ **Note:** By default, or when set to 0, the initial window width is the viewport :ref:`display/window/size/viewport_width`. This setting is ignored on iOS, Android, and HTML5. +\ **Note:** By default, or when set to ``0``, the initial window width is the viewport :ref:`display/window/size/viewport_width`. This setting is ignored on iOS, Android, and Web. ---- @@ -2663,7 +2795,7 @@ On desktop platforms, sets the game's initial window width. | *Default* | ``1`` | +-----------+-------+ -Sets the VSync mode for the main game window. +Sets the V-Sync mode for the main game window. See :ref:`VSyncMode` for possible values and how they affect the behavior of your application. @@ -2909,15 +3041,15 @@ Path to a custom :ref:`Font` resource to use as default for all GUI ---- -.. _class_ProjectSettings_property_gui/theme/default_font_antialiased: +.. _class_ProjectSettings_property_gui/theme/default_font_antialiasing: -- :ref:`bool` **gui/theme/default_font_antialiased** +- :ref:`int` **gui/theme/default_font_antialiasing** -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ ++-----------+-------+ +| *Default* | ``1`` | ++-----------+-------+ -If set to ``true``, default font uses 8-bit anitialiased glyph rendering. See :ref:`FontFile.antialiased`. +Font anti-aliasing mode. See :ref:`FontFile.antialiasing`, ---- @@ -2987,6 +3119,18 @@ Default font glyph sub-pixel positioning mode. See :ref:`FontFile.subpixel_posit ---- +.. _class_ProjectSettings_property_gui/theme/lcd_subpixel_layout: + +- :ref:`int` **gui/theme/lcd_subpixel_layout** + ++-----------+-------+ +| *Default* | ``1`` | ++-----------+-------+ + +LCD sub-pixel layout used for font anti-aliasing. See :ref:`FontLCDSubpixelLayout`. + +---- + .. _class_ProjectSettings_property_gui/timers/incremental_search_max_interval_msec: - :ref:`int` **gui/timers/incremental_search_max_interval_msec** @@ -3517,6 +3661,8 @@ Enabling this can greatly improve the responsiveness to input, specially in devi Specifies the tablet driver to use. If left empty, the default driver will be used. +\ **Note:** The driver in use can be overridden at runtime via the ``--tablet-driver`` command line argument. + ---- .. _class_ProjectSettings_property_input_devices/pen_tablet/driver.windows: @@ -3751,6 +3897,12 @@ Force layout direction and text writing direction to RTL for all locales. Specifies the :ref:`TextServer` to use. If left empty, the default will be used. +"ICU / HarfBuzz / Graphite" is the most advanced text driver, supporting right-to-left typesetting and complex scripts (for languages like Arabic, Hebrew, etc). The "Fallback" text driver does not support right-to-left typesetting and complex scripts. + +\ **Note:** The driver in use can be overridden at runtime via the ``--text-driver`` command line argument. + +\ **Note:** There is an additional ``Dummy`` text driver available, which disables all text rendering and font-related functionality. This driver is not listed in the project settings, but it can be enabled when running the editor or project using the ``--text-driver Dummy`` command line argument. + ---- .. _class_ProjectSettings_property_layer_names/2d_navigation/layer_1: @@ -5793,70 +5945,6 @@ This is used by servers when used in multi-threading mode (servers and visual). ---- -.. _class_ProjectSettings_property_mono/debugger_agent/port: - -- :ref:`int` **mono/debugger_agent/port** - -+-----------+-----------+ -| *Default* | ``23685`` | -+-----------+-----------+ - ----- - -.. _class_ProjectSettings_property_mono/debugger_agent/wait_for_debugger: - -- :ref:`bool` **mono/debugger_agent/wait_for_debugger** - -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ - ----- - -.. _class_ProjectSettings_property_mono/debugger_agent/wait_timeout: - -- :ref:`int` **mono/debugger_agent/wait_timeout** - -+-----------+----------+ -| *Default* | ``3000`` | -+-----------+----------+ - ----- - -.. _class_ProjectSettings_property_mono/profiler/args: - -- :ref:`String` **mono/profiler/args** - -+-----------+-------------------------------------------------+ -| *Default* | ``"log:calls,alloc,sample,output=output.mlpd"`` | -+-----------+-------------------------------------------------+ - ----- - -.. _class_ProjectSettings_property_mono/profiler/enabled: - -- :ref:`bool` **mono/profiler/enabled** - -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ - ----- - -.. _class_ProjectSettings_property_mono/runtime/unhandled_exception_policy: - -- :ref:`int` **mono/runtime/unhandled_exception_policy** - -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ - -The policy to use for unhandled Mono (C#) exceptions. The default "Terminate Application" exits the project as soon as an unhandled exception is thrown. "Log Error" logs an error message to the console instead, and will not interrupt the project execution when an unhandled exception is thrown. - -\ **Note:** The unhandled exception policy is always set to "Log Error" in the editor, which also includes C# ``tool`` scripts running within the editor as well as editor plugin code. - ----- - .. _class_ProjectSettings_property_navigation/2d/default_cell_size: - :ref:`int` **navigation/2d/default_cell_size** @@ -5913,7 +6001,7 @@ Default edge connection margin for 3D navigation maps. See :ref:`NavigationServe | *Default* | ``32768`` | +-----------+-----------+ -Maximum amount of characters allowed to send as output from the debugger. Over this value, content is dropped. This helps not to stall the debugger connection. +Maximum number of characters allowed to send as output from the debugger. Over this value, content is dropped. This helps not to stall the debugger connection. ---- @@ -5937,7 +6025,7 @@ Maximum number of errors allowed to be sent from the debugger. Over this value, | *Default* | ``2048`` | +-----------+----------+ -Maximum amount of messages in the debugger queue. Over this value, content is dropped. This helps to limit the debugger memory usage. +Maximum number of messages in the debugger queue. Over this value, content is dropped. This helps to limit the debugger memory usage. ---- @@ -6235,7 +6323,7 @@ Individual shapes can have a specific bias value (see :ref:`Shape2D.custom_solve | *Default* | ``16`` | +-----------+--------+ -Number of solver iterations for all contacts and constraints. The greater the amount of iterations, the more accurate the collisions will be. However, a greater amount of iterations requires more CPU power, which can decrease performance. See :ref:`PhysicsServer2D.SPACE_PARAM_SOLVER_ITERATIONS`. +Number of solver iterations for all contacts and constraints. The greater the number of iterations, the more accurate the collisions will be. However, a greater number of iterations requires more CPU power, which can decrease performance. See :ref:`PhysicsServer2D.SPACE_PARAM_SOLVER_ITERATIONS`. ---- @@ -6445,7 +6533,7 @@ Individual shapes can have a specific bias value (see :ref:`Shape3D.custom_solve | *Default* | ``16`` | +-----------+--------+ -Number of solver iterations for all contacts and constraints. The greater the amount of iterations, the more accurate the collisions will be. However, a greater amount of iterations requires more CPU power, which can decrease performance. See :ref:`PhysicsServer3D.SPACE_PARAM_SOLVER_ITERATIONS`. +Number of solver iterations for all contacts and constraints. The greater the number of iterations, the more accurate the collisions will be. However, a greater number of iterations requires more CPU power, which can decrease performance. See :ref:`PhysicsServer3D.SPACE_PARAM_SOLVER_ITERATIONS`. ---- @@ -6555,15 +6643,27 @@ The number of fixed iterations per second. This controls how often physics simul ---- -.. _class_ProjectSettings_property_rendering/anti_aliasing/quality/msaa: +.. _class_ProjectSettings_property_rendering/anti_aliasing/quality/msaa_2d: -- :ref:`int` **rendering/anti_aliasing/quality/msaa** +- :ref:`int` **rendering/anti_aliasing/quality/msaa_2d** +-----------+-------+ | *Default* | ``0`` | +-----------+-------+ -Sets the number of MSAA samples to use (as a power of two). MSAA is used to reduce aliasing around the edges of polygons. A higher MSAA value results in smoother edges but can be significantly slower on some hardware. See also bilinear scaling 3d :ref:`rendering/scaling_3d/mode` for supersampling, which provides higher quality but is much more expensive. +Sets the number of MSAA samples to use for 2D/Canvas rendering (as a power of two). MSAA is used to reduce aliasing around the edges of polygons. A higher MSAA value results in smoother edges but can be significantly slower on some hardware. This has no effect on shader-induced aliasing or texture aliasing. + +---- + +.. _class_ProjectSettings_property_rendering/anti_aliasing/quality/msaa_3d: + +- :ref:`int` **rendering/anti_aliasing/quality/msaa_3d** + ++-----------+-------+ +| *Default* | ``0`` | ++-----------+-------+ + +Sets the number of MSAA samples to use for 3D rendering (as a power of two). MSAA is used to reduce aliasing around the edges of polygons. A higher MSAA value results in smoother edges but can be significantly slower on some hardware. See also bilinear scaling 3d :ref:`rendering/scaling_3d/mode` for supersampling, which provides higher quality but is much more expensive. This has no effect on shader-induced aliasing or texture aliasing. ---- @@ -6575,7 +6675,7 @@ Sets the number of MSAA samples to use (as a power of two). MSAA is used to redu | *Default* | ``0`` | +-----------+-------+ -Sets the screen-space antialiasing mode for the default screen :ref:`Viewport`. Screen-space antialiasing works by selectively blurring edges in a post-process shader. It differs from MSAA which takes multiple coverage samples while rendering objects. Screen-space AA methods are typically faster than MSAA and will smooth out specular aliasing, but tend to make scenes appear blurry. +Sets the screen-space antialiasing mode for the default screen :ref:`Viewport`. Screen-space antialiasing works by selectively blurring edges in a post-process shader. It differs from MSAA which takes multiple coverage samples while rendering objects. Screen-space AA methods are typically faster than MSAA and will smooth out specular aliasing, but tend to make scenes appear blurry. The blurriness is partially counteracted by automatically using a negative mipmap LOD bias (see :ref:`rendering/textures/default_filters/texture_mipmap_bias`). Another way to combat specular aliasing is to enable :ref:`rendering/anti_aliasing/screen_space_roughness_limiter/enabled`. @@ -6599,7 +6699,7 @@ Another way to combat specular aliasing is to enable :ref:`rendering/anti_aliasi | *Default* | ``false`` | +-----------+-----------+ -Enables Temporal Anti-Aliasing for the default screen :ref:`Viewport`. TAA works by jittering the camera and accumulating the images of the last rendered frames, motion vector rendering is used to account for camera and object motion. +Enables Temporal Anti-Aliasing for the default screen :ref:`Viewport`. TAA works by jittering the camera and accumulating the images of the last rendered frames, motion vector rendering is used to account for camera and object motion. Enabling TAA can make the image blurrier, which is partially counteracted by automatically using a negative mipmap LOD bias (see :ref:`rendering/textures/default_filters/texture_mipmap_bias`). \ **Note:** The implementation is not complete yet, some visual instances such as particles and skinned meshes may show artifacts. @@ -7265,7 +7365,7 @@ Max number of omnilights and spotlights renderable per object. At the default va | *Default* | ``65536`` | +-----------+-----------+ -Max amount of elements renderable in a frame. If more elements than this are visible per frame, they will not be drawn. Keep in mind elements refer to mesh surfaces and not meshes themselves. Setting this low will slightly reduce memory usage and may decrease shader compile times, particularly on web. For most uses, the default value is suitable, but consider lowering as much as possible on web export. +Max number of elements renderable in a frame. If more elements than this are visible per frame, they will not be drawn. Keep in mind elements refer to mesh surfaces and not meshes themselves. Setting this low will slightly reduce memory usage and may decrease shader compile times, particularly on web. For most uses, the default value is suitable, but consider lowering as much as possible on web export. ---- @@ -7473,18 +7573,6 @@ Lower-end override for :ref:`rendering/reflections/sky_reflections/texture_array ---- -.. _class_ProjectSettings_property_rendering/scaling_3d/fsr_mipmap_bias: - -- :ref:`float` **rendering/scaling_3d/fsr_mipmap_bias** - -+-----------+---------+ -| *Default* | ``0.0`` | -+-----------+---------+ - -Affects the final texture sharpness by reading from a lower or higher mipmap. Negative values make textures sharper, while positive values make textures blurrier. When using FSR, this value is used to adjust the mipmap bias calculated internally which is based on the selected quality. The formula for this is ``-log2(1.0 / scale) + mipmap_bias`` - ----- - .. _class_ProjectSettings_property_rendering/scaling_3d/fsr_sharpness: - :ref:`float` **rendering/scaling_3d/fsr_sharpness** @@ -7517,7 +7605,7 @@ Sets the scaling 3D mode. Bilinear scaling renders at different resolution to ei | *Default* | ``1.0`` | +-----------+---------+ -Scales the 3D render buffer based on the viewport size uses an image filter specified in :ref:`rendering/scaling_3d/mode` to scale the output image to the full viewport size. Values lower than ``1.0`` can be used to speed up 3D rendering at the cost of quality (undersampling). Values greater than ``1.0`` are only valid for bilinear mode and can be used to improve 3D rendering quality at a high performance cost (supersampling). See also :ref:`rendering/anti_aliasing/quality/msaa` for multi-sample antialiasing, which is significantly cheaper but only smoothens the edges of polygons. +Scales the 3D render buffer based on the viewport size uses an image filter specified in :ref:`rendering/scaling_3d/mode` to scale the output image to the full viewport size. Values lower than ``1.0`` can be used to speed up 3D rendering at the cost of quality (undersampling). Values greater than ``1.0`` are only valid for bilinear mode and can be used to improve 3D rendering quality at a high performance cost (supersampling). See also :ref:`rendering/anti_aliasing/quality/msaa_3d` for multi-sample antialiasing, which is significantly cheaper but only smooths the edges of polygons. ---- @@ -7799,6 +7887,8 @@ Lower-end override for :ref:`rendering/shadows/positional_shadow/soft_shadow_fil | *Default* | ``3`` | +-----------+-------+ +The filtering quality to use for :ref:`Decal` nodes. When using one of the anisotropic filtering modes, the anisotropic filtering level is controlled by :ref:`rendering/textures/default_filters/anisotropic_filtering_level`. + ---- .. _class_ProjectSettings_property_rendering/textures/default_filters/anisotropic_filtering_level: @@ -7811,10 +7901,32 @@ Lower-end override for :ref:`rendering/shadows/positional_shadow/soft_shadow_fil Sets the maximum number of samples to take when using anisotropic filtering on textures (as a power of two). A higher sample count will result in sharper textures at oblique angles, but is more expensive to compute. A value of ``0`` forcibly disables anisotropic filtering, even on materials where it is enabled. +The anisotropic filtering level also affects decals and light projectors if they are configured to use anisotropic filtering. See :ref:`rendering/textures/decals/filter` and :ref:`rendering/textures/light_projectors/filter`. + +\ **Note:** For performance reasons, anisotropic filtering *is not enabled by default* on 2D and 3D materials. For this setting to have an effect in 3D, set :ref:`BaseMaterial3D.texture_filter` to :ref:`BaseMaterial3D.TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC` or :ref:`BaseMaterial3D.TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC` on materials. For this setting to have an effect in 2D, set :ref:`CanvasItem.texture_filter` to :ref:`CanvasItem.TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC` or :ref:`CanvasItem.TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC` on the :ref:`CanvasItem` node displaying the texture (or in :ref:`CanvasTexture`). However, anisotropic filtering is rarely useful in 2D, so only enable it for textures in 2D if it makes a meaningful visual difference. + \ **Note:** This property is only read when the project starts. There is currently no way to change this setting at run-time. ---- +.. _class_ProjectSettings_property_rendering/textures/default_filters/texture_mipmap_bias: + +- :ref:`float` **rendering/textures/default_filters/texture_mipmap_bias** + ++-----------+---------+ +| *Default* | ``0.0`` | ++-----------+---------+ + +Affects the final texture sharpness by reading from a lower or higher mipmap (also called "texture LOD bias"). Negative values make mipmapped textures sharper but grainier when viewed at a distance, while positive values make mipmapped textures blurrier (even when up close). + +Enabling temporal antialiasing (:ref:`rendering/anti_aliasing/quality/use_taa`) will automatically apply a ``-0.5`` offset to this value, while enabling FXAA (:ref:`rendering/anti_aliasing/quality/screen_space_aa`) will automatically apply a ``-0.25`` offset to this value. If both TAA and FXAA are enbled at the same time, an offset of ``-0.75`` is applied to this value. + +\ **Note:** If :ref:`rendering/scaling_3d/scale` is lower than ``1.0`` (exclusive), :ref:`rendering/textures/default_filters/texture_mipmap_bias` is used to adjust the automatic mipmap bias which is calculated internally based on the scale factor. The formula for this is ``log2(scaling_3d_scale) + mipmap_bias``. + +\ **Note:** This property is only read when the project starts. To change the mipmap LOD bias at run-time, set :ref:`Viewport.texture_mipmap_bias` instead. + +---- + .. _class_ProjectSettings_property_rendering/textures/default_filters/use_nearest_mipmap_filter: - :ref:`bool` **rendering/textures/default_filters/use_nearest_mipmap_filter** @@ -7837,6 +7949,8 @@ If ``true``, uses nearest-neighbor mipmap filtering when using mipmaps (also cal | *Default* | ``3`` | +-----------+-------+ +The filtering quality to use for :ref:`OmniLight3D` and :ref:`SpotLight3D` projectors. When using one of the anisotropic filtering modes, the anisotropic filtering level is controlled by :ref:`rendering/textures/default_filters/anisotropic_filtering_level`. + ---- .. _class_ProjectSettings_property_rendering/textures/lossless_compression/force_png: @@ -8213,7 +8327,7 @@ Returns the absolute, native OS path corresponding to the localized ``path`` (st # `path` will contain the absolute path to `hello.txt` next to the executable. # This is *not* identical to using `ProjectSettings.globalize_path()` with a `res://` path, # but is close enough in spirit. - path = OS.get_executable_path().get_base_dir().plus_file("hello.txt") + path = OS.get_executable_path().get_base_dir().path_join("hello.txt") ---- @@ -8245,22 +8359,6 @@ Returns the localized path (starting with ``res://``) corresponding to the absol ---- -.. _class_ProjectSettings_method_property_can_revert: - -- :ref:`bool` **property_can_revert** **(** :ref:`String` name **)** - -Returns ``true`` if the specified property exists and its initial value differs from the current value. - ----- - -.. _class_ProjectSettings_method_property_get_revert: - -- :ref:`Variant` **property_get_revert** **(** :ref:`String` name **)** - -Returns the specified property's initial value. Returns ``null`` if the property does not exist. - ----- - .. _class_ProjectSettings_method_save: - :ref:`Error` **save** **(** **)** diff --git a/classes/class_proxytexture.rst b/classes/class_proxytexture.rst deleted file mode 100644 index 787a5fa5a..000000000 --- a/classes/class_proxytexture.rst +++ /dev/null @@ -1,42 +0,0 @@ -: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/ProxyTexture.xml. - -.. _class_ProxyTexture: - -ProxyTexture -============ - -**Inherits:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - - - -Properties ----------- - -+-----------------------------------+-----------------------------------------------+ -| :ref:`Texture2D` | :ref:`base` | -+-----------------------------------+-----------------------------------------------+ - -Property Descriptions ---------------------- - -.. _class_ProxyTexture_property_base: - -- :ref:`Texture2D` **base** - -+----------+-----------------+ -| *Setter* | set_base(value) | -+----------+-----------------+ -| *Getter* | get_base() | -+----------+-----------------+ - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_quadmesh.rst b/classes/class_quadmesh.rst deleted file mode 100644 index 7f9ff7452..000000000 --- a/classes/class_quadmesh.rst +++ /dev/null @@ -1,76 +0,0 @@ -: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/QuadMesh.xml. - -.. _class_QuadMesh: - -QuadMesh -======== - -**Inherits:** :ref:`PrimitiveMesh` **<** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -Class representing a square mesh. - -Description ------------ - -Class representing a square :ref:`PrimitiveMesh`. This flat mesh does not have a thickness. By default, this mesh is aligned on the X and Y axes; this default rotation is more suited for use with billboarded materials. Unlike :ref:`PlaneMesh`, this mesh doesn't provide subdivision options. - -Tutorials ---------- - -- `GUI in 3D Demo `__ - -- `2D in 3D Demo `__ - -Properties ----------- - -+-------------------------------+-------------------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`center_offset` | ``Vector3(0, 0, 0)`` | -+-------------------------------+-------------------------------------------------------------+----------------------+ -| :ref:`Vector2` | :ref:`size` | ``Vector2(1, 1)`` | -+-------------------------------+-------------------------------------------------------------+----------------------+ - -Property Descriptions ---------------------- - -.. _class_QuadMesh_property_center_offset: - -- :ref:`Vector3` **center_offset** - -+-----------+--------------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+--------------------------+ -| *Setter* | set_center_offset(value) | -+-----------+--------------------------+ -| *Getter* | get_center_offset() | -+-----------+--------------------------+ - -Offset of the generated Quad. Useful for particles. - ----- - -.. _class_QuadMesh_property_size: - -- :ref:`Vector2` **size** - -+-----------+-------------------+ -| *Default* | ``Vector2(1, 1)`` | -+-----------+-------------------+ -| *Setter* | set_size(value) | -+-----------+-------------------+ -| *Getter* | get_size() | -+-----------+-------------------+ - -Size on the X and Y axes. - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_quaternion.rst b/classes/class_quaternion.rst index b961aeca4..36a5afddf 100644 --- a/classes/class_quaternion.rst +++ b/classes/class_quaternion.rst @@ -63,39 +63,41 @@ Constructors Methods ------- -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`angle_to` **(** :ref:`Quaternion` to **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Quaternion` | :ref:`cubic_slerp` **(** :ref:`Quaternion` b, :ref:`Quaternion` pre_a, :ref:`Quaternion` post_b, :ref:`float` weight **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`dot` **(** :ref:`Quaternion` with **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Quaternion` | :ref:`exp` **(** **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_angle` **(** **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_axis` **(** **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_euler` **(** **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Quaternion` | :ref:`inverse` **(** **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Quaternion` to **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_normalized` **(** **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`length` **(** **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`length_squared` **(** **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Quaternion` | :ref:`log` **(** **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Quaternion` | :ref:`normalized` **(** **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Quaternion` | :ref:`slerp` **(** :ref:`Quaternion` to, :ref:`float` weight **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Quaternion` | :ref:`slerpni` **(** :ref:`Quaternion` to, :ref:`float` weight **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`angle_to` **(** :ref:`Quaternion` to **)** |const| | ++-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`dot` **(** :ref:`Quaternion` with **)** |const| | ++-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Quaternion` | :ref:`exp` **(** **)** |const| | ++-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_angle` **(** **)** |const| | ++-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_axis` **(** **)** |const| | ++-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_euler` **(** **)** |const| | ++-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Quaternion` | :ref:`inverse` **(** **)** |const| | ++-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Quaternion` to **)** |const| | ++-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_normalized` **(** **)** |const| | ++-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`length` **(** **)** |const| | ++-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`length_squared` **(** **)** |const| | ++-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Quaternion` | :ref:`log` **(** **)** |const| | ++-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Quaternion` | :ref:`normalized` **(** **)** |const| | ++-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Quaternion` | :ref:`slerp` **(** :ref:`Quaternion` to, :ref:`float` weight **)** |const| | ++-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Quaternion` | :ref:`slerpni` **(** :ref:`Quaternion` to, :ref:`float` weight **)** |const| | ++-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Quaternion` | :ref:`spherical_cubic_interpolate` **(** :ref:`Quaternion` b, :ref:`Quaternion` pre_a, :ref:`Quaternion` post_b, :ref:`float` weight **)** |const| | ++-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Quaternion` | :ref:`spherical_cubic_interpolate_in_time` **(** :ref:`Quaternion` b, :ref:`Quaternion` pre_a, :ref:`Quaternion` post_b, :ref:`float` weight, :ref:`float` b_t, :ref:`float` pre_a_t, :ref:`float` post_b_t **)** |const| | ++-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Operators --------- @@ -242,15 +244,7 @@ Method Descriptions Returns the angle between this quaternion and ``to``. This is the magnitude of the angle you would need to rotate by to get from one to the other. -\ **Note:** This method has an abnormally high amount of floating-point error, so methods such as ``is_zero_approx`` will not work reliably. - ----- - -.. _class_Quaternion_method_cubic_slerp: - -- :ref:`Quaternion` **cubic_slerp** **(** :ref:`Quaternion` b, :ref:`Quaternion` pre_a, :ref:`Quaternion` post_b, :ref:`float` weight **)** |const| - -Performs a cubic spherical interpolation between quaternions ``pre_a``, this vector, ``b``, and ``post_b``, by the given amount ``weight``. +\ **Note:** This method has an abnormally high number of floating-point errors, so methods such as ``is_zero_approx`` will not work reliably. ---- @@ -300,7 +294,7 @@ Returns the inverse of the quaternion. - :ref:`bool` **is_equal_approx** **(** :ref:`Quaternion` to **)** |const| -Returns ``true`` if this quaternion and ``quat`` are approximately equal, by running :ref:`@GlobalScope.is_equal_approx` on each component. +Returns ``true`` if this quaternion and ``to`` are approximately equal, by running :ref:`@GlobalScope.is_equal_approx` on each component. ---- @@ -358,6 +352,24 @@ Returns the result of the spherical linear interpolation between this quaternion Returns the result of the spherical linear interpolation between this quaternion and ``to`` by amount ``weight``, but without checking if the rotation path is not bigger than 90 degrees. +---- + +.. _class_Quaternion_method_spherical_cubic_interpolate: + +- :ref:`Quaternion` **spherical_cubic_interpolate** **(** :ref:`Quaternion` b, :ref:`Quaternion` pre_a, :ref:`Quaternion` post_b, :ref:`float` weight **)** |const| + +Performs a spherical cubic interpolation between quaternions ``pre_a``, this vector, ``b``, and ``post_b``, by the given amount ``weight``. + +---- + +.. _class_Quaternion_method_spherical_cubic_interpolate_in_time: + +- :ref:`Quaternion` **spherical_cubic_interpolate_in_time** **(** :ref:`Quaternion` b, :ref:`Quaternion` pre_a, :ref:`Quaternion` post_b, :ref:`float` weight, :ref:`float` b_t, :ref:`float` pre_a_t, :ref:`float` post_b_t **)** |const| + +Performs a spherical cubic interpolation between quaternions ``pre_a``, this vector, ``b``, and ``post_b``, by the given amount ``weight``. + +It can perform smoother interpolation than ``spherical_cubic_interpolate()`` by the time values. + Operator Descriptions --------------------- diff --git a/classes/class_raycast2d.rst b/classes/class_raycast2d.rst index 6a296fadd..a854618d9 100644 --- a/classes/class_raycast2d.rst +++ b/classes/class_raycast2d.rst @@ -65,6 +65,8 @@ Methods +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Object` | :ref:`get_collider` **(** **)** |const| | +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`get_collider_rid` **(** **)** |const| | ++-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_collider_shape` **(** **)** |const| | +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`get_collision_mask_value` **(** :ref:`int` layer_number **)** |const| | @@ -240,6 +242,14 @@ Returns the first object that the ray intersects, or ``null`` if no object is in ---- +.. _class_RayCast2D_method_get_collider_rid: + +- :ref:`RID` **get_collider_rid** **(** **)** |const| + +Returns the :ref:`RID` of the first object that the ray intersects, or an empty :ref:`RID` if no object is intersecting the ray (i.e. :ref:`is_colliding` returns ``false``). + +---- + .. _class_RayCast2D_method_get_collider_shape: - :ref:`int` **get_collider_shape** **(** **)** |const| diff --git a/classes/class_raycast3d.rst b/classes/class_raycast3d.rst index 39ce71564..5be799f60 100644 --- a/classes/class_raycast3d.rst +++ b/classes/class_raycast3d.rst @@ -71,6 +71,8 @@ Methods +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Object` | :ref:`get_collider` **(** **)** |const| | +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`get_collider_rid` **(** **)** |const| | ++-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_collider_shape` **(** **)** |const| | +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`get_collision_mask_value` **(** :ref:`int` layer_number **)** |const| | @@ -280,6 +282,14 @@ Returns the first object that the ray intersects, or ``null`` if no object is in ---- +.. _class_RayCast3D_method_get_collider_rid: + +- :ref:`RID` **get_collider_rid** **(** **)** |const| + +Returns the :ref:`RID` of the first object that the ray intersects, or an empty :ref:`RID` if no object is intersecting the ray (i.e. :ref:`is_colliding` returns ``false``). + +---- + .. _class_RayCast3D_method_get_collider_shape: - :ref:`int` **get_collider_shape** **(** **)** |const| diff --git a/classes/class_rduniform.rst b/classes/class_rduniform.rst index b39c77830..33f27d596 100644 --- a/classes/class_rduniform.rst +++ b/classes/class_rduniform.rst @@ -26,13 +26,13 @@ Properties Methods ------- -+---------------------------+-----------------------------------------------------------------------------------+ -| void | :ref:`add_id` **(** :ref:`RID` id **)** | -+---------------------------+-----------------------------------------------------------------------------------+ -| void | :ref:`clear_ids` **(** **)** | -+---------------------------+-----------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_ids` **(** **)** |const| | -+---------------------------+-----------------------------------------------------------------------------------+ ++-------------------------+-----------------------------------------------------------------------------------+ +| void | :ref:`add_id` **(** :ref:`RID` id **)** | ++-------------------------+-----------------------------------------------------------------------------------+ +| void | :ref:`clear_ids` **(** **)** | ++-------------------------+-----------------------------------------------------------------------------------+ +| :ref:`RID[]` | :ref:`get_ids` **(** **)** |const| | ++-------------------------+-----------------------------------------------------------------------------------+ Property Descriptions --------------------- @@ -80,7 +80,7 @@ Method Descriptions .. _class_RDUniform_method_get_ids: -- :ref:`Array` **get_ids** **(** **)** |const| +- :ref:`RID[]` **get_ids** **(** **)** |const| .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_refcounted.rst b/classes/class_refcounted.rst index 43f8c948d..8f966fe25 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:`AnimationTrackEditPlugin`, :ref:`AudioEffectInstance`, :ref:`AudioStreamPlayback`, :ref:`CameraFeed`, :ref:`CharFXTransform`, :ref:`ConfigFile`, :ref:`Crypto`, :ref:`DTLSServer`, :ref:`Directory`, :ref:`ENetConnection`, :ref:`EditorExportPlugin`, :ref:`EditorFeatureProfile`, :ref:`EditorFileSystemImportFormatSupportQuery`, :ref:`EditorInspectorPlugin`, :ref:`EditorResourceConversionPlugin`, :ref:`EditorResourcePreviewGenerator`, :ref:`EditorSceneFormatImporter`, :ref:`EditorScenePostImport`, :ref:`EditorScenePostImportPlugin`, :ref:`EditorScript`, :ref:`EditorTranslationParserPlugin`, :ref:`EncodedObjectAsID`, :ref:`EngineProfiler`, :ref:`Expression`, :ref:`File`, :ref:`HMACContext`, :ref:`HTTPClient`, :ref:`HashingContext`, :ref:`JSON`, :ref:`JavaClass`, :ref:`JavaScriptObject`, :ref:`KinematicCollision2D`, :ref:`KinematicCollision3D`, :ref:`Lightmapper`, :ref:`MeshDataTool`, :ref:`MultiplayerAPI`, :ref:`Mutex`, :ref:`Node3DGizmo`, :ref:`OGGPacketSequencePlayback`, :ref:`PCKPacker`, :ref:`PackedDataContainerRef`, :ref:`PacketPeer`, :ref:`PhysicsPointQueryParameters2D`, :ref:`PhysicsPointQueryParameters3D`, :ref:`PhysicsRayQueryParameters2D`, :ref:`PhysicsRayQueryParameters3D`, :ref:`PhysicsShapeQueryParameters2D`, :ref:`PhysicsShapeQueryParameters3D`, :ref:`PhysicsTestMotionParameters2D`, :ref:`PhysicsTestMotionParameters3D`, :ref:`PhysicsTestMotionResult2D`, :ref:`PhysicsTestMotionResult3D`, :ref:`RDAttachmentFormat`, :ref:`RDFramebufferPass`, :ref:`RDPipelineColorBlendState`, :ref:`RDPipelineColorBlendStateAttachment`, :ref:`RDPipelineDepthStencilState`, :ref:`RDPipelineMultisampleState`, :ref:`RDPipelineRasterizationState`, :ref:`RDPipelineSpecializationConstant`, :ref:`RDSamplerState`, :ref:`RDShaderSource`, :ref:`RDTextureFormat`, :ref:`RDTextureView`, :ref:`RDUniform`, :ref:`RDVertexAttribute`, :ref:`RandomNumberGenerator`, :ref:`RegEx`, :ref:`RegExMatch`, :ref:`Resource`, :ref:`ResourceFormatLoader`, :ref:`ResourceFormatSaver`, :ref:`ResourceImporter`, :ref:`SceneState`, :ref:`SceneTreeTimer`, :ref:`Semaphore`, :ref:`SkinReference`, :ref:`StreamPeer`, :ref:`SurfaceTool`, :ref:`TCPServer`, :ref:`TextLine`, :ref:`TextParagraph`, :ref:`TextServer`, :ref:`Thread`, :ref:`TriangleMesh`, :ref:`Tween`, :ref:`Tweener`, :ref:`UDPServer`, :ref:`UPNP`, :ref:`UPNPDevice`, :ref:`VelocityTracker3D`, :ref:`VisualScriptFunctionState`, :ref:`WeakRef`, :ref:`WebRTCPeerConnection`, :ref:`XMLParser`, :ref:`XRInterface`, :ref:`XRPose`, :ref:`XRPositionalTracker` +**Inherited By:** :ref:`AESContext`, :ref:`AStar2D`, :ref:`AStar3D`, :ref:`AStarGrid2D`, :ref:`AnimationTrackEditPlugin`, :ref:`AudioEffectInstance`, :ref:`AudioStreamPlayback`, :ref:`CameraFeed`, :ref:`CharFXTransform`, :ref:`ConfigFile`, :ref:`Crypto`, :ref:`DTLSServer`, :ref:`Directory`, :ref:`ENetConnection`, :ref:`EditorExportPlugin`, :ref:`EditorFeatureProfile`, :ref:`EditorFileSystemImportFormatSupportQuery`, :ref:`EditorInspectorPlugin`, :ref:`EditorResourceConversionPlugin`, :ref:`EditorResourcePreviewGenerator`, :ref:`EditorSceneFormatImporter`, :ref:`EditorScenePostImport`, :ref:`EditorScenePostImportPlugin`, :ref:`EditorScript`, :ref:`EditorTranslationParserPlugin`, :ref:`EditorUndoRedoManager`, :ref:`EncodedObjectAsID`, :ref:`EngineProfiler`, :ref:`Expression`, :ref:`File`, :ref:`HMACContext`, :ref:`HTTPClient`, :ref:`HashingContext`, :ref:`JSON`, :ref:`JavaClass`, :ref:`JavaScriptObject`, :ref:`KinematicCollision2D`, :ref:`KinematicCollision3D`, :ref:`Lightmapper`, :ref:`MeshDataTool`, :ref:`MultiplayerAPI`, :ref:`Mutex`, :ref:`Node3DGizmo`, :ref:`OggPacketSequencePlayback`, :ref:`PCKPacker`, :ref:`PackedDataContainerRef`, :ref:`PacketPeer`, :ref:`PhysicsPointQueryParameters2D`, :ref:`PhysicsPointQueryParameters3D`, :ref:`PhysicsRayQueryParameters2D`, :ref:`PhysicsRayQueryParameters3D`, :ref:`PhysicsShapeQueryParameters2D`, :ref:`PhysicsShapeQueryParameters3D`, :ref:`PhysicsTestMotionParameters2D`, :ref:`PhysicsTestMotionParameters3D`, :ref:`PhysicsTestMotionResult2D`, :ref:`PhysicsTestMotionResult3D`, :ref:`RDAttachmentFormat`, :ref:`RDFramebufferPass`, :ref:`RDPipelineColorBlendState`, :ref:`RDPipelineColorBlendStateAttachment`, :ref:`RDPipelineDepthStencilState`, :ref:`RDPipelineMultisampleState`, :ref:`RDPipelineRasterizationState`, :ref:`RDPipelineSpecializationConstant`, :ref:`RDSamplerState`, :ref:`RDShaderSource`, :ref:`RDTextureFormat`, :ref:`RDTextureView`, :ref:`RDUniform`, :ref:`RDVertexAttribute`, :ref:`RandomNumberGenerator`, :ref:`RegEx`, :ref:`RegExMatch`, :ref:`Resource`, :ref:`ResourceFormatLoader`, :ref:`ResourceFormatSaver`, :ref:`ResourceImporter`, :ref:`SceneState`, :ref:`SceneTreeTimer`, :ref:`Semaphore`, :ref:`SkinReference`, :ref:`StreamPeer`, :ref:`SurfaceTool`, :ref:`TCPServer`, :ref:`TextLine`, :ref:`TextParagraph`, :ref:`TextServer`, :ref:`Thread`, :ref:`TriangleMesh`, :ref:`Tween`, :ref:`Tweener`, :ref:`UDPServer`, :ref:`UPNP`, :ref:`UPNPDevice`, :ref:`WeakRef`, :ref:`WebRTCPeerConnection`, :ref:`XMLParser`, :ref:`XRInterface`, :ref:`XRPose`, :ref:`XRPositionalTracker` Base class for reference-counted objects. diff --git a/classes/class_reflectionprobe.rst b/classes/class_reflectionprobe.rst index acf3ad75f..cb7e66dc5 100644 --- a/classes/class_reflectionprobe.rst +++ b/classes/class_reflectionprobe.rst @@ -291,7 +291,7 @@ The automatic LOD bias to use for meshes rendered within the ``ReflectionProbe`` | *Getter* | get_origin_offset() | +-----------+--------------------------+ -Sets the origin offset to be used when this ``ReflectionProbe`` is in :ref:`box_projection` mode. This can be set to a non-zero value to ensure a reflection fits a rectangle-shaped room, while reducing the amount of objects that "get in the way" of the reflection. +Sets the origin offset to be used when this ``ReflectionProbe`` is in :ref:`box_projection` mode. This can be set to a non-zero value to ensure a reflection fits a rectangle-shaped room, while reducing the number of objects that "get in the way" of the reflection. ---- diff --git a/classes/class_regex.rst b/classes/class_regex.rst index 4100bd395..2bb31f4d0 100644 --- a/classes/class_regex.rst +++ b/classes/class_regex.rst @@ -76,25 +76,27 @@ If you need to process multiple results, :ref:`search_all` **(** **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`compile` **(** :ref:`String` pattern **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_group_count` **(** **)** |const| | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_names` **(** **)** |const| | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_pattern` **(** **)** |const| | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_valid` **(** **)** |const| | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RegExMatch` | :ref:`search` **(** :ref:`String` subject, :ref:`int` offset=0, :ref:`int` end=-1 **)** |const| | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`search_all` **(** :ref:`String` subject, :ref:`int` offset=0, :ref:`int` end=-1 **)** |const| | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`sub` **(** :ref:`String` subject, :ref:`String` replacement, :ref:`bool` all=false, :ref:`int` offset=0, :ref:`int` end=-1 **)** |const| | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Error` | :ref:`compile` **(** :ref:`String` pattern **)** | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RegEx` | :ref:`create_from_string` **(** :ref:`String` pattern **)** |static| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_group_count` **(** **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedStringArray` | :ref:`get_names` **(** **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_pattern` **(** **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_valid` **(** **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RegExMatch` | :ref:`search` **(** :ref:`String` subject, :ref:`int` offset=0, :ref:`int` end=-1 **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RegExMatch[]` | :ref:`search_all` **(** :ref:`String` subject, :ref:`int` offset=0, :ref:`int` end=-1 **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`sub` **(** :ref:`String` subject, :ref:`String` replacement, :ref:`bool` all=false, :ref:`int` offset=0, :ref:`int` end=-1 **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Method Descriptions ------------------- @@ -115,6 +117,14 @@ Compiles and assign the search pattern to use. Returns :ref:`@GlobalScope.OK` **create_from_string** **(** :ref:`String` pattern **)** |static| + +Creates and compiles a new ``RegEx`` object. + +---- + .. _class_RegEx_method_get_group_count: - :ref:`int` **get_group_count** **(** **)** |const| @@ -125,7 +135,7 @@ Returns the number of capturing groups in compiled pattern. .. _class_RegEx_method_get_names: -- :ref:`Array` **get_names** **(** **)** |const| +- :ref:`PackedStringArray` **get_names** **(** **)** |const| Returns an array of names of named capturing groups in the compiled pattern. They are ordered by appearance. @@ -157,7 +167,7 @@ Searches the text for the compiled pattern. Returns a :ref:`RegExMatch` **search_all** **(** :ref:`String` subject, :ref:`int` offset=0, :ref:`int` end=-1 **)** |const| +- :ref:`RegExMatch[]` **search_all** **(** :ref:`String` subject, :ref:`int` offset=0, :ref:`int` end=-1 **)** |const| Searches the text for the compiled pattern. Returns an array of :ref:`RegExMatch` containers for each non-overlapping result. If no results were found, an empty array is returned instead. The region to search within can be specified without modifying where the start and end anchor would be. diff --git a/classes/class_renderingdevice.rst b/classes/class_renderingdevice.rst index e227b7666..4d995d60a 100644 --- a/classes/class_renderingdevice.rst +++ b/classes/class_renderingdevice.rst @@ -76,6 +76,8 @@ Methods +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`draw_list_end` **(** :ref:`int` post_barrier=7 **)** | +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`draw_list_set_blend_constants` **(** :ref:`int` draw_list, :ref:`Color` color **)** | ++------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`draw_list_set_push_constant` **(** :ref:`int` draw_list, :ref:`PackedByteArray` buffer, :ref:`int` size_bytes **)** | +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`draw_list_switch_to_next_pass` **(** **)** | @@ -98,6 +100,8 @@ Methods +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`framebuffer_get_format` **(** :ref:`RID` framebuffer **)** | +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`framebuffer_is_valid` **(** :ref:`RID` framebuffer **)** |const| | ++------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`free_rid` **(** :ref:`RID` rid **)** | +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`full_barrier` **(** **)** | @@ -2414,6 +2418,14 @@ Method Descriptions ---- +.. _class_RenderingDevice_method_draw_list_set_blend_constants: + +- void **draw_list_set_blend_constants** **(** :ref:`int` draw_list, :ref:`Color` color **)** + +Sets blend constants for draw list, blend constants are used only if the graphics pipeline is created with ``DYNAMIC_STATE_BLEND_CONSTANTS`` flag set. + +---- + .. _class_RenderingDevice_method_draw_list_set_push_constant: - void **draw_list_set_push_constant** **(** :ref:`int` draw_list, :ref:`PackedByteArray` buffer, :ref:`int` size_bytes **)** @@ -2480,6 +2492,12 @@ Method Descriptions ---- +.. _class_RenderingDevice_method_framebuffer_is_valid: + +- :ref:`bool` **framebuffer_is_valid** **(** :ref:`RID` framebuffer **)** |const| + +---- + .. _class_RenderingDevice_method_free_rid: - void **free_rid** **(** :ref:`RID` rid **)** diff --git a/classes/class_renderingserver.rst b/classes/class_renderingserver.rst index 85a28a55f..675097c04 100644 --- a/classes/class_renderingserver.rst +++ b/classes/class_renderingserver.rst @@ -50,899 +50,903 @@ Properties Methods ------- -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Image[]` | :ref:`bake_render_uv2` **(** :ref:`RID` base, :ref:`Array` material_overrides, :ref:`Vector2i` image_size **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`camera_create` **(** **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`camera_effects_create` **(** **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`camera_effects_set_custom_exposure` **(** :ref:`RID` camera_effects, :ref:`bool` enable, :ref:`float` exposure **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`camera_effects_set_dof_blur` **(** :ref:`RID` camera_effects, :ref:`bool` far_enable, :ref:`float` far_distance, :ref:`float` far_transition, :ref:`bool` near_enable, :ref:`float` near_distance, :ref:`float` near_transition, :ref:`float` amount **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`camera_effects_set_dof_blur_bokeh_shape` **(** :ref:`DOFBokehShape` shape **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`camera_effects_set_dof_blur_quality` **(** :ref:`DOFBlurQuality` quality, :ref:`bool` use_jitter **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`camera_set_camera_effects` **(** :ref:`RID` camera, :ref:`RID` effects **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`camera_set_cull_mask` **(** :ref:`RID` camera, :ref:`int` layers **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`camera_set_environment` **(** :ref:`RID` camera, :ref:`RID` env **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`camera_set_frustum` **(** :ref:`RID` camera, :ref:`float` size, :ref:`Vector2` offset, :ref:`float` z_near, :ref:`float` z_far **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`camera_set_orthogonal` **(** :ref:`RID` camera, :ref:`float` size, :ref:`float` z_near, :ref:`float` z_far **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`camera_set_perspective` **(** :ref:`RID` camera, :ref:`float` fovy_degrees, :ref:`float` z_near, :ref:`float` z_far **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`camera_set_transform` **(** :ref:`RID` camera, :ref:`Transform3D` transform **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`camera_set_use_vertical_aspect` **(** :ref:`RID` camera, :ref:`bool` enable **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`canvas_create` **(** **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_add_animation_slice` **(** :ref:`RID` item, :ref:`float` animation_length, :ref:`float` slice_begin, :ref:`float` slice_end, :ref:`float` offset=0.0 **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_add_circle` **(** :ref:`RID` item, :ref:`Vector2` pos, :ref:`float` radius, :ref:`Color` color **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_add_clip_ignore` **(** :ref:`RID` item, :ref:`bool` ignore **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_add_line` **(** :ref:`RID` item, :ref:`Vector2` from, :ref:`Vector2` to, :ref:`Color` color, :ref:`float` width=1.0, :ref:`bool` antialiased=false **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_add_mesh` **(** :ref:`RID` item, :ref:`RID` mesh, :ref:`Transform2D` transform=Transform2D(1, 0, 0, 1, 0, 0), :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`RID` texture **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_add_msdf_texture_rect_region` **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`RID` texture, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`int` outline_size=0, :ref:`float` px_range=1.0 **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_add_multimesh` **(** :ref:`RID` item, :ref:`RID` mesh, :ref:`RID` texture **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_add_nine_patch` **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`Rect2` source, :ref:`RID` texture, :ref:`Vector2` topleft, :ref:`Vector2` bottomright, :ref:`NinePatchAxisMode` x_axis_mode=0, :ref:`NinePatchAxisMode` y_axis_mode=0, :ref:`bool` draw_center=true, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_add_particles` **(** :ref:`RID` item, :ref:`RID` particles, :ref:`RID` texture **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_add_polygon` **(** :ref:`RID` item, :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`PackedVector2Array` uvs=PackedVector2Array(), :ref:`RID` texture **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_add_polyline` **(** :ref:`RID` item, :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`float` width=1.0, :ref:`bool` antialiased=false **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_add_primitive` **(** :ref:`RID` item, :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`PackedVector2Array` uvs, :ref:`RID` texture, :ref:`float` width=1.0 **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_add_rect` **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`Color` color **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_add_set_transform` **(** :ref:`RID` item, :ref:`Transform2D` transform **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_add_texture_rect` **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`RID` texture, :ref:`bool` tile=false, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`bool` transpose=false **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_add_texture_rect_region` **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`RID` texture, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`bool` transpose=false, :ref:`bool` clip_uv=true **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_add_triangle_array` **(** :ref:`RID` item, :ref:`PackedInt32Array` indices, :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`PackedVector2Array` uvs=PackedVector2Array(), :ref:`PackedInt32Array` bones=PackedInt32Array(), :ref:`PackedFloat32Array` weights=PackedFloat32Array(), :ref:`RID` texture, :ref:`int` count=-1 **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_clear` **(** :ref:`RID` item **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`canvas_item_create` **(** **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_set_canvas_group_mode` **(** :ref:`RID` item, :ref:`CanvasGroupMode` mode, :ref:`float` clear_margin=5.0, :ref:`bool` fit_empty=false, :ref:`float` fit_margin=0.0, :ref:`bool` blur_mipmaps=false **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_set_clip` **(** :ref:`RID` item, :ref:`bool` clip **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_set_copy_to_backbuffer` **(** :ref:`RID` item, :ref:`bool` enabled, :ref:`Rect2` rect **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_set_custom_rect` **(** :ref:`RID` item, :ref:`bool` use_custom_rect, :ref:`Rect2` rect=Rect2(0, 0, 0, 0) **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_set_default_texture_filter` **(** :ref:`RID` item, :ref:`CanvasItemTextureFilter` filter **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_set_default_texture_repeat` **(** :ref:`RID` item, :ref:`CanvasItemTextureRepeat` repeat **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_set_distance_field_mode` **(** :ref:`RID` item, :ref:`bool` enabled **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_set_draw_behind_parent` **(** :ref:`RID` item, :ref:`bool` enabled **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_set_draw_index` **(** :ref:`RID` item, :ref:`int` index **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_set_light_mask` **(** :ref:`RID` item, :ref:`int` mask **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_set_material` **(** :ref:`RID` item, :ref:`RID` material **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_set_modulate` **(** :ref:`RID` item, :ref:`Color` color **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_set_parent` **(** :ref:`RID` item, :ref:`RID` parent **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_set_self_modulate` **(** :ref:`RID` item, :ref:`Color` color **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_set_sort_children_by_y` **(** :ref:`RID` item, :ref:`bool` enabled **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_set_transform` **(** :ref:`RID` item, :ref:`Transform2D` transform **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_set_use_parent_material` **(** :ref:`RID` item, :ref:`bool` enabled **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_set_visibility_notifier` **(** :ref:`RID` item, :ref:`bool` enable, :ref:`Rect2` area, :ref:`Callable` enter_callable, :ref:`Callable` exit_callable **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_set_visible` **(** :ref:`RID` item, :ref:`bool` visible **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_set_z_as_relative_to_parent` **(** :ref:`RID` item, :ref:`bool` enabled **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_set_z_index` **(** :ref:`RID` item, :ref:`int` z_index **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_attach_to_canvas` **(** :ref:`RID` light, :ref:`RID` canvas **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`canvas_light_create` **(** **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_occluder_attach_to_canvas` **(** :ref:`RID` occluder, :ref:`RID` canvas **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`canvas_light_occluder_create` **(** **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_occluder_set_as_sdf_collision` **(** :ref:`RID` occluder, :ref:`bool` enable **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_occluder_set_enabled` **(** :ref:`RID` occluder, :ref:`bool` enabled **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_occluder_set_light_mask` **(** :ref:`RID` occluder, :ref:`int` mask **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_occluder_set_polygon` **(** :ref:`RID` occluder, :ref:`RID` polygon **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_occluder_set_transform` **(** :ref:`RID` occluder, :ref:`Transform2D` transform **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_set_color` **(** :ref:`RID` light, :ref:`Color` color **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_set_enabled` **(** :ref:`RID` light, :ref:`bool` enabled **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_set_energy` **(** :ref:`RID` light, :ref:`float` energy **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_set_height` **(** :ref:`RID` light, :ref:`float` height **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_set_item_cull_mask` **(** :ref:`RID` light, :ref:`int` mask **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_set_item_shadow_cull_mask` **(** :ref:`RID` light, :ref:`int` mask **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_set_layer_range` **(** :ref:`RID` light, :ref:`int` min_layer, :ref:`int` max_layer **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_set_mode` **(** :ref:`RID` light, :ref:`CanvasLightMode` mode **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_set_shadow_color` **(** :ref:`RID` light, :ref:`Color` color **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_set_shadow_enabled` **(** :ref:`RID` light, :ref:`bool` enabled **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_set_shadow_filter` **(** :ref:`RID` light, :ref:`CanvasLightShadowFilter` filter **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_set_shadow_smooth` **(** :ref:`RID` light, :ref:`float` smooth **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_set_texture` **(** :ref:`RID` light, :ref:`RID` texture **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_set_texture_offset` **(** :ref:`RID` light, :ref:`Vector2` offset **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_set_texture_scale` **(** :ref:`RID` light, :ref:`float` scale **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_set_transform` **(** :ref:`RID` light, :ref:`Transform2D` transform **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_set_z_range` **(** :ref:`RID` light, :ref:`int` min_z, :ref:`int` max_z **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`canvas_occluder_polygon_create` **(** **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_occluder_polygon_set_cull_mode` **(** :ref:`RID` occluder_polygon, :ref:`CanvasOccluderPolygonCullMode` mode **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_occluder_polygon_set_shape` **(** :ref:`RID` occluder_polygon, :ref:`PackedVector2Array` shape, :ref:`bool` closed **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_set_disable_scale` **(** :ref:`bool` disable **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_set_item_mirroring` **(** :ref:`RID` canvas, :ref:`RID` item, :ref:`Vector2` mirroring **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_set_modulate` **(** :ref:`RID` canvas, :ref:`Color` color **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_set_shadow_texture_size` **(** :ref:`int` size **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`canvas_texture_create` **(** **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_texture_set_channel` **(** :ref:`RID` canvas_texture, :ref:`CanvasTextureChannel` channel, :ref:`RID` texture **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_texture_set_shading_parameters` **(** :ref:`RID` canvas_texture, :ref:`Color` base_color, :ref:`float` shininess **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_texture_set_texture_filter` **(** :ref:`RID` canvas_texture, :ref:`CanvasItemTextureFilter` filter **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_texture_set_texture_repeat` **(** :ref:`RID` canvas_texture, :ref:`CanvasItemTextureRepeat` repeat **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RenderingDevice` | :ref:`create_local_rendering_device` **(** **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`decal_create` **(** **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`decal_set_albedo_mix` **(** :ref:`RID` decal, :ref:`float` albedo_mix **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`decal_set_cull_mask` **(** :ref:`RID` decal, :ref:`int` mask **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`decal_set_distance_fade` **(** :ref:`RID` decal, :ref:`bool` enabled, :ref:`float` begin, :ref:`float` length **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`decal_set_emission_energy` **(** :ref:`RID` decal, :ref:`float` energy **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`decal_set_extents` **(** :ref:`RID` decal, :ref:`Vector3` extents **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`decal_set_fade` **(** :ref:`RID` decal, :ref:`float` above, :ref:`float` below **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`decal_set_modulate` **(** :ref:`RID` decal, :ref:`Color` color **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`decal_set_normal_fade` **(** :ref:`RID` decal, :ref:`float` fade **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`decal_set_texture` **(** :ref:`RID` decal, :ref:`DecalTexture` type, :ref:`RID` texture **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`decals_set_filter` **(** :ref:`DecalFilter` filter **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`directional_light_create` **(** **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`directional_shadow_atlas_set_size` **(** :ref:`int` size, :ref:`bool` is_16bits **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`directional_soft_shadow_filter_set_quality` **(** :ref:`ShadowQuality` quality **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Image` | :ref:`environment_bake_panorama` **(** :ref:`RID` environment, :ref:`bool` bake_irradiance, :ref:`Vector2i` size **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`environment_create` **(** **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_glow_set_use_bicubic_upscale` **(** :ref:`bool` enable **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_glow_set_use_high_quality` **(** :ref:`bool` enable **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_adjustment` **(** :ref:`RID` env, :ref:`bool` enable, :ref:`float` brightness, :ref:`float` contrast, :ref:`float` saturation, :ref:`bool` use_1d_color_correction, :ref:`RID` color_correction **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_ambient_light` **(** :ref:`RID` env, :ref:`Color` color, :ref:`EnvironmentAmbientSource` ambient=0, :ref:`float` energy=1.0, :ref:`float` sky_contibution=0.0, :ref:`EnvironmentReflectionSource` reflection_source=0 **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_background` **(** :ref:`RID` env, :ref:`EnvironmentBG` bg **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_bg_color` **(** :ref:`RID` env, :ref:`Color` color **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_bg_energy` **(** :ref:`RID` env, :ref:`float` energy **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_canvas_max_layer` **(** :ref:`RID` env, :ref:`int` max_layer **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_fog` **(** :ref:`RID` env, :ref:`bool` enable, :ref:`Color` light_color, :ref:`float` light_energy, :ref:`float` sun_scatter, :ref:`float` density, :ref:`float` height, :ref:`float` height_density, :ref:`float` aerial_perspective **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_glow` **(** :ref:`RID` env, :ref:`bool` enable, :ref:`PackedFloat32Array` levels, :ref:`float` intensity, :ref:`float` strength, :ref:`float` mix, :ref:`float` bloom_threshold, :ref:`EnvironmentGlowBlendMode` blend_mode, :ref:`float` hdr_bleed_threshold, :ref:`float` hdr_bleed_scale, :ref:`float` hdr_luminance_cap, :ref:`float` glow_map_strength, :ref:`RID` glow_map **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_sdfgi` **(** :ref:`RID` env, :ref:`bool` enable, :ref:`int` cascades, :ref:`float` min_cell_size, :ref:`EnvironmentSDFGIYScale` y_scale, :ref:`bool` use_occlusion, :ref:`float` bounce_feedback, :ref:`bool` read_sky, :ref:`float` energy, :ref:`float` normal_bias, :ref:`float` probe_bias **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_sdfgi_frames_to_converge` **(** :ref:`EnvironmentSDFGIFramesToConverge` frames **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_sdfgi_frames_to_update_light` **(** :ref:`EnvironmentSDFGIFramesToUpdateLight` frames **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_sdfgi_ray_count` **(** :ref:`EnvironmentSDFGIRayCount` ray_count **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_sky` **(** :ref:`RID` env, :ref:`RID` sky **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_sky_custom_fov` **(** :ref:`RID` env, :ref:`float` scale **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_sky_orientation` **(** :ref:`RID` env, :ref:`Basis` orientation **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_ssao` **(** :ref:`RID` env, :ref:`bool` enable, :ref:`float` radius, :ref:`float` intensity, :ref:`float` power, :ref:`float` detail, :ref:`float` horizon, :ref:`float` sharpness, :ref:`float` light_affect, :ref:`float` ao_channel_affect **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_ssao_quality` **(** :ref:`EnvironmentSSAOQuality` quality, :ref:`bool` half_size, :ref:`float` adaptive_target, :ref:`int` blur_passes, :ref:`float` fadeout_from, :ref:`float` fadeout_to **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_ssil_quality` **(** :ref:`EnvironmentSSILQuality` quality, :ref:`bool` half_size, :ref:`float` adaptive_target, :ref:`int` blur_passes, :ref:`float` fadeout_from, :ref:`float` fadeout_to **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_ssr` **(** :ref:`RID` env, :ref:`bool` enable, :ref:`int` max_steps, :ref:`float` fade_in, :ref:`float` fade_out, :ref:`float` depth_tolerance **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_ssr_roughness_quality` **(** :ref:`EnvironmentSSRRoughnessQuality` quality **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_tonemap` **(** :ref:`RID` env, :ref:`EnvironmentToneMapper` tone_mapper, :ref:`float` exposure, :ref:`float` white, :ref:`bool` auto_exposure, :ref:`float` min_luminance, :ref:`float` max_luminance, :ref:`float` auto_exp_speed, :ref:`float` auto_exp_grey **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_volumetric_fog` **(** :ref:`RID` env, :ref:`bool` enable, :ref:`float` density, :ref:`Color` albedo, :ref:`Color` emission, :ref:`float` emission_energy, :ref:`float` anisotropy, :ref:`float` length, :ref:`float` p_detail_spread, :ref:`float` gi_inject, :ref:`bool` temporal_reprojection, :ref:`float` temporal_reprojection_amount, :ref:`float` ambient_inject **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_volumetric_fog_filter_active` **(** :ref:`bool` active **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_volumetric_fog_volume_size` **(** :ref:`int` size, :ref:`int` depth **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`fog_volume_create` **(** **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`fog_volume_set_extents` **(** :ref:`RID` fog_volume, :ref:`Vector3` extents **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`fog_volume_set_material` **(** :ref:`RID` fog_volume, :ref:`RID` material **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`fog_volume_set_shape` **(** :ref:`RID` fog_volume, :ref:`FogVolumeShape` shape **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`force_draw` **(** :ref:`bool` swap_buffers=true, :ref:`float` frame_step=0.0 **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`force_sync` **(** **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`free_rid` **(** :ref:`RID` rid **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_frame_setup_time_cpu` **(** **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RenderingDevice` | :ref:`get_rendering_device` **(** **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_rendering_info` **(** :ref:`RenderingInfo` info **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_test_cube` **(** **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_test_texture` **(** **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_video_adapter_api_version` **(** **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_video_adapter_name` **(** **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`DeviceType` | :ref:`get_video_adapter_type` **(** **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_video_adapter_vendor` **(** **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_white_texture` **(** **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`gi_set_use_half_resolution` **(** :ref:`bool` half_resolution **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`global_variable_add` **(** :ref:`StringName` name, :ref:`GlobalVariableType` type, :ref:`Variant` default_value **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`global_variable_get` **(** :ref:`StringName` name **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`global_variable_get_list` **(** **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`GlobalVariableType` | :ref:`global_variable_get_type` **(** :ref:`StringName` name **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`global_variable_remove` **(** :ref:`StringName` name **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`global_variable_set` **(** :ref:`StringName` name, :ref:`Variant` value **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`global_variable_set_override` **(** :ref:`StringName` name, :ref:`Variant` value **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_changed` **(** **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_feature` **(** :ref:`Features` feature **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_os_feature` **(** :ref:`String` feature **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`instance_attach_object_instance_id` **(** :ref:`RID` instance, :ref:`int` id **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`instance_attach_skeleton` **(** :ref:`RID` instance, :ref:`RID` skeleton **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`instance_create` **(** **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`instance_create2` **(** :ref:`RID` base, :ref:`RID` scenario **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`instance_geometry_get_shader_parameter` **(** :ref:`RID` instance, :ref:`StringName` parameter **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`instance_geometry_get_shader_parameter_default_value` **(** :ref:`RID` instance, :ref:`StringName` parameter **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`instance_geometry_get_shader_parameter_list` **(** :ref:`RID` instance **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`instance_geometry_set_cast_shadows_setting` **(** :ref:`RID` instance, :ref:`ShadowCastingSetting` shadow_casting_setting **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`instance_geometry_set_flag` **(** :ref:`RID` instance, :ref:`InstanceFlags` flag, :ref:`bool` enabled **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`instance_geometry_set_lightmap` **(** :ref:`RID` instance, :ref:`RID` lightmap, :ref:`Rect2` lightmap_uv_scale, :ref:`int` lightmap_slice **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`instance_geometry_set_lod_bias` **(** :ref:`RID` instance, :ref:`float` lod_bias **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`instance_geometry_set_material_overlay` **(** :ref:`RID` instance, :ref:`RID` material **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`instance_geometry_set_material_override` **(** :ref:`RID` instance, :ref:`RID` material **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`instance_geometry_set_shader_parameter` **(** :ref:`RID` instance, :ref:`StringName` parameter, :ref:`Variant` value **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`instance_geometry_set_transparency` **(** :ref:`RID` instance, :ref:`float` transparency **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`instance_geometry_set_visibility_range` **(** :ref:`RID` instance, :ref:`float` min, :ref:`float` max, :ref:`float` min_margin, :ref:`float` max_margin, :ref:`VisibilityRangeFadeMode` fade_mode **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`instance_set_base` **(** :ref:`RID` instance, :ref:`RID` base **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`instance_set_blend_shape_weight` **(** :ref:`RID` instance, :ref:`int` shape, :ref:`float` weight **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`instance_set_custom_aabb` **(** :ref:`RID` instance, :ref:`AABB` aabb **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`instance_set_extra_visibility_margin` **(** :ref:`RID` instance, :ref:`float` margin **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`instance_set_ignore_culling` **(** :ref:`RID` instance, :ref:`bool` enabled **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`instance_set_layer_mask` **(** :ref:`RID` instance, :ref:`int` mask **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`instance_set_scenario` **(** :ref:`RID` instance, :ref:`RID` scenario **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`instance_set_surface_override_material` **(** :ref:`RID` instance, :ref:`int` surface, :ref:`RID` material **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`instance_set_transform` **(** :ref:`RID` instance, :ref:`Transform3D` transform **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`instance_set_visibility_parent` **(** :ref:`RID` instance, :ref:`RID` parent **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`instance_set_visible` **(** :ref:`RID` instance, :ref:`bool` visible **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`instances_cull_aabb` **(** :ref:`AABB` aabb, :ref:`RID` scenario **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`instances_cull_convex` **(** :ref:`Array` convex, :ref:`RID` scenario **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`instances_cull_ray` **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`RID` scenario **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`light_directional_set_blend_splits` **(** :ref:`RID` light, :ref:`bool` enable **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`light_directional_set_shadow_mode` **(** :ref:`RID` light, :ref:`LightDirectionalShadowMode` mode **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`light_directional_set_sky_mode` **(** :ref:`RID` light, :ref:`LightDirectionalSkyMode` mode **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`light_omni_set_shadow_mode` **(** :ref:`RID` light, :ref:`LightOmniShadowMode` mode **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`light_projectors_set_filter` **(** :ref:`LightProjectorFilter` filter **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`light_set_bake_mode` **(** :ref:`RID` light, :ref:`LightBakeMode` bake_mode **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`light_set_color` **(** :ref:`RID` light, :ref:`Color` color **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`light_set_cull_mask` **(** :ref:`RID` light, :ref:`int` mask **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`light_set_distance_fade` **(** :ref:`RID` decal, :ref:`bool` enabled, :ref:`float` begin, :ref:`float` shadow, :ref:`float` length **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`light_set_max_sdfgi_cascade` **(** :ref:`RID` light, :ref:`int` cascade **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`light_set_negative` **(** :ref:`RID` light, :ref:`bool` enable **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`light_set_param` **(** :ref:`RID` light, :ref:`LightParam` param, :ref:`float` value **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`light_set_projector` **(** :ref:`RID` light, :ref:`RID` texture **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`light_set_reverse_cull_face_mode` **(** :ref:`RID` light, :ref:`bool` enabled **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`light_set_shadow` **(** :ref:`RID` light, :ref:`bool` enabled **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`lightmap_create` **(** **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`lightmap_get_probe_capture_bsp_tree` **(** :ref:`RID` lightmap **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector3Array` | :ref:`lightmap_get_probe_capture_points` **(** :ref:`RID` lightmap **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedColorArray` | :ref:`lightmap_get_probe_capture_sh` **(** :ref:`RID` lightmap **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`lightmap_get_probe_capture_tetrahedra` **(** :ref:`RID` lightmap **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`lightmap_set_probe_bounds` **(** :ref:`RID` lightmap, :ref:`AABB` bounds **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`lightmap_set_probe_capture_data` **(** :ref:`RID` lightmap, :ref:`PackedVector3Array` points, :ref:`PackedColorArray` point_sh, :ref:`PackedInt32Array` tetrahedra, :ref:`PackedInt32Array` bsp_tree **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`lightmap_set_probe_capture_update_speed` **(** :ref:`float` speed **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`lightmap_set_probe_interior` **(** :ref:`RID` lightmap, :ref:`bool` interior **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`lightmap_set_textures` **(** :ref:`RID` lightmap, :ref:`RID` light, :ref:`bool` uses_sh **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`make_sphere_mesh` **(** :ref:`int` latitudes, :ref:`int` longitudes, :ref:`float` radius **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`material_create` **(** **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`material_get_param` **(** :ref:`RID` material, :ref:`StringName` parameter **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`material_set_next_pass` **(** :ref:`RID` material, :ref:`RID` next_material **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`material_set_param` **(** :ref:`RID` material, :ref:`StringName` parameter, :ref:`Variant` value **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`material_set_render_priority` **(** :ref:`RID` material, :ref:`int` priority **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`material_set_shader` **(** :ref:`RID` shader_material, :ref:`RID` shader **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`mesh_add_surface` **(** :ref:`RID` mesh, :ref:`Dictionary` surface **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`mesh_add_surface_from_arrays` **(** :ref:`RID` mesh, :ref:`PrimitiveType` primitive, :ref:`Array` arrays, :ref:`Array` blend_shapes=[], :ref:`Dictionary` lods={}, :ref:`int` compress_format=0 **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`mesh_clear` **(** :ref:`RID` mesh **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`mesh_create` **(** **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`mesh_create_from_surfaces` **(** :ref:`Dictionary[]` surfaces, :ref:`int` blend_shape_count=0 **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`mesh_get_blend_shape_count` **(** :ref:`RID` mesh **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`BlendShapeMode` | :ref:`mesh_get_blend_shape_mode` **(** :ref:`RID` mesh **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`AABB` | :ref:`mesh_get_custom_aabb` **(** :ref:`RID` mesh **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`mesh_get_surface` **(** :ref:`RID` mesh, :ref:`int` surface **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`mesh_get_surface_count` **(** :ref:`RID` mesh **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`mesh_set_blend_shape_mode` **(** :ref:`RID` mesh, :ref:`BlendShapeMode` mode **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`mesh_set_custom_aabb` **(** :ref:`RID` mesh, :ref:`AABB` aabb **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`mesh_set_shadow_mesh` **(** :ref:`RID` mesh, :ref:`RID` shadow_mesh **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`mesh_surface_get_arrays` **(** :ref:`RID` mesh, :ref:`int` surface **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`mesh_surface_get_blend_shape_arrays` **(** :ref:`RID` mesh, :ref:`int` surface **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`mesh_surface_get_format_attribute_stride` **(** :ref:`int` format, :ref:`int` vertex_count **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`mesh_surface_get_format_offset` **(** :ref:`int` format, :ref:`int` vertex_count, :ref:`int` array_index **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`mesh_surface_get_format_skin_stride` **(** :ref:`int` format, :ref:`int` vertex_count **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`mesh_surface_get_format_vertex_stride` **(** :ref:`int` format, :ref:`int` vertex_count **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`mesh_surface_get_material` **(** :ref:`RID` mesh, :ref:`int` surface **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`mesh_surface_set_material` **(** :ref:`RID` mesh, :ref:`int` surface, :ref:`RID` material **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`mesh_surface_update_attribute_region` **(** :ref:`RID` mesh, :ref:`int` surface, :ref:`int` offset, :ref:`PackedByteArray` data **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`mesh_surface_update_skin_region` **(** :ref:`RID` mesh, :ref:`int` surface, :ref:`int` offset, :ref:`PackedByteArray` data **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`mesh_surface_update_vertex_region` **(** :ref:`RID` mesh, :ref:`int` surface, :ref:`int` offset, :ref:`PackedByteArray` data **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`multimesh_allocate_data` **(** :ref:`RID` multimesh, :ref:`int` instances, :ref:`MultimeshTransformFormat` transform_format, :ref:`bool` color_format=false, :ref:`bool` custom_data_format=false **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`multimesh_create` **(** **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`AABB` | :ref:`multimesh_get_aabb` **(** :ref:`RID` multimesh **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedFloat32Array` | :ref:`multimesh_get_buffer` **(** :ref:`RID` multimesh **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`multimesh_get_instance_count` **(** :ref:`RID` multimesh **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`multimesh_get_mesh` **(** :ref:`RID` multimesh **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`multimesh_get_visible_instances` **(** :ref:`RID` multimesh **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`multimesh_instance_get_color` **(** :ref:`RID` multimesh, :ref:`int` index **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`multimesh_instance_get_custom_data` **(** :ref:`RID` multimesh, :ref:`int` index **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`multimesh_instance_get_transform` **(** :ref:`RID` multimesh, :ref:`int` index **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform2D` | :ref:`multimesh_instance_get_transform_2d` **(** :ref:`RID` multimesh, :ref:`int` index **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`multimesh_instance_set_color` **(** :ref:`RID` multimesh, :ref:`int` index, :ref:`Color` color **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`multimesh_instance_set_custom_data` **(** :ref:`RID` multimesh, :ref:`int` index, :ref:`Color` custom_data **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`multimesh_instance_set_transform` **(** :ref:`RID` multimesh, :ref:`int` index, :ref:`Transform3D` transform **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`multimesh_instance_set_transform_2d` **(** :ref:`RID` multimesh, :ref:`int` index, :ref:`Transform2D` transform **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`multimesh_set_buffer` **(** :ref:`RID` multimesh, :ref:`PackedFloat32Array` buffer **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`multimesh_set_mesh` **(** :ref:`RID` multimesh, :ref:`RID` mesh **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`multimesh_set_visible_instances` **(** :ref:`RID` multimesh, :ref:`int` visible **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`occluder_create` **(** **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`occluder_set_mesh` **(** :ref:`RID` occluder, :ref:`PackedVector3Array` vertices, :ref:`PackedInt32Array` indices **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`omni_light_create` **(** **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`particles_collision_create` **(** **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_collision_height_field_update` **(** :ref:`RID` particles_collision **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_collision_set_attractor_attenuation` **(** :ref:`RID` particles_collision, :ref:`float` curve **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_collision_set_attractor_directionality` **(** :ref:`RID` particles_collision, :ref:`float` amount **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_collision_set_attractor_strength` **(** :ref:`RID` particles_collision, :ref:`float` setrngth **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_collision_set_box_extents` **(** :ref:`RID` particles_collision, :ref:`Vector3` extents **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_collision_set_collision_type` **(** :ref:`RID` particles_collision, :ref:`ParticlesCollisionType` type **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_collision_set_cull_mask` **(** :ref:`RID` particles_collision, :ref:`int` mask **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_collision_set_field_texture` **(** :ref:`RID` particles_collision, :ref:`RID` texture **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_collision_set_height_field_resolution` **(** :ref:`RID` particles_collision, :ref:`ParticlesCollisionHeightfieldResolution` resolution **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_collision_set_sphere_radius` **(** :ref:`RID` particles_collision, :ref:`float` radius **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`particles_create` **(** **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_emit` **(** :ref:`RID` particles, :ref:`Transform3D` transform, :ref:`Vector3` velocity, :ref:`Color` color, :ref:`Color` custom, :ref:`int` emit_flags **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`AABB` | :ref:`particles_get_current_aabb` **(** :ref:`RID` particles **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`particles_get_emitting` **(** :ref:`RID` particles **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`particles_is_inactive` **(** :ref:`RID` particles **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_request_process` **(** :ref:`RID` particles **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_restart` **(** :ref:`RID` particles **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_amount` **(** :ref:`RID` particles, :ref:`int` amount **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_collision_base_size` **(** :ref:`RID` particles, :ref:`float` size **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_custom_aabb` **(** :ref:`RID` particles, :ref:`AABB` aabb **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_draw_order` **(** :ref:`RID` particles, :ref:`ParticlesDrawOrder` order **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_draw_pass_mesh` **(** :ref:`RID` particles, :ref:`int` pass, :ref:`RID` mesh **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_draw_passes` **(** :ref:`RID` particles, :ref:`int` count **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_emission_transform` **(** :ref:`RID` particles, :ref:`Transform3D` transform **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_emitting` **(** :ref:`RID` particles, :ref:`bool` emitting **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_explosiveness_ratio` **(** :ref:`RID` particles, :ref:`float` ratio **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_fixed_fps` **(** :ref:`RID` particles, :ref:`int` fps **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_fractional_delta` **(** :ref:`RID` particles, :ref:`bool` enable **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_interpolate` **(** :ref:`RID` particles, :ref:`bool` enable **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_lifetime` **(** :ref:`RID` particles, :ref:`float` lifetime **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_mode` **(** :ref:`RID` particles, :ref:`ParticlesMode` mode **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_one_shot` **(** :ref:`RID` particles, :ref:`bool` one_shot **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_pre_process_time` **(** :ref:`RID` particles, :ref:`float` time **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_process_material` **(** :ref:`RID` particles, :ref:`RID` material **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_randomness_ratio` **(** :ref:`RID` particles, :ref:`float` ratio **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_speed_scale` **(** :ref:`RID` particles, :ref:`float` scale **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_subemitter` **(** :ref:`RID` particles, :ref:`RID` subemitter_particles **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_trail_bind_poses` **(** :ref:`RID` particles, :ref:`Transform3D[]` bind_poses **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_trails` **(** :ref:`RID` particles, :ref:`bool` enable, :ref:`float` length_sec **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_transform_align` **(** :ref:`RID` particles, :ref:`ParticlesTransformAlign` align **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_use_local_coordinates` **(** :ref:`RID` particles, :ref:`bool` enable **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`positional_soft_shadow_filter_set_quality` **(** :ref:`ShadowQuality` quality **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`reflection_probe_create` **(** **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reflection_probe_set_ambient_color` **(** :ref:`RID` probe, :ref:`Color` color **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reflection_probe_set_ambient_energy` **(** :ref:`RID` probe, :ref:`float` energy **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reflection_probe_set_ambient_mode` **(** :ref:`RID` probe, :ref:`ReflectionProbeAmbientMode` mode **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reflection_probe_set_as_interior` **(** :ref:`RID` probe, :ref:`bool` enable **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reflection_probe_set_cull_mask` **(** :ref:`RID` probe, :ref:`int` layers **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reflection_probe_set_enable_box_projection` **(** :ref:`RID` probe, :ref:`bool` enable **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reflection_probe_set_enable_shadows` **(** :ref:`RID` probe, :ref:`bool` enable **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reflection_probe_set_extents` **(** :ref:`RID` probe, :ref:`Vector3` extents **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reflection_probe_set_intensity` **(** :ref:`RID` probe, :ref:`float` intensity **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reflection_probe_set_max_distance` **(** :ref:`RID` probe, :ref:`float` distance **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reflection_probe_set_mesh_lod_threshold` **(** :ref:`RID` probe, :ref:`float` pixels **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reflection_probe_set_origin_offset` **(** :ref:`RID` probe, :ref:`Vector3` offset **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reflection_probe_set_resolution` **(** :ref:`RID` probe, :ref:`int` resolution **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reflection_probe_set_update_mode` **(** :ref:`RID` probe, :ref:`ReflectionProbeUpdateMode` mode **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`request_frame_drawn_callback` **(** :ref:`Callable` callable **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`scenario_create` **(** **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`scenario_set_camera_effects` **(** :ref:`RID` scenario, :ref:`RID` effects **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`scenario_set_environment` **(** :ref:`RID` scenario, :ref:`RID` environment **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`scenario_set_fallback_environment` **(** :ref:`RID` scenario, :ref:`RID` environment **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`screen_space_roughness_limiter_set_active` **(** :ref:`bool` enable, :ref:`float` amount, :ref:`float` limit **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_boot_image` **(** :ref:`Image` image, :ref:`Color` color, :ref:`bool` scale, :ref:`bool` use_filter=true **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_debug_generate_wireframes` **(** :ref:`bool` generate **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_default_clear_color` **(** :ref:`Color` color **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`shader_create` **(** **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`shader_get_code` **(** :ref:`RID` shader **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`shader_get_default_texture_param` **(** :ref:`RID` shader, :ref:`StringName` param, :ref:`int` index=0 **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`shader_get_param_default` **(** :ref:`RID` shader, :ref:`StringName` param **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary[]` | :ref:`shader_get_param_list` **(** :ref:`RID` shader **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`shader_set_code` **(** :ref:`RID` shader, :ref:`String` code **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`shader_set_default_texture_param` **(** :ref:`RID` shader, :ref:`StringName` param, :ref:`RID` texture, :ref:`int` index=0 **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`shader_set_path_hint` **(** :ref:`RID` shader, :ref:`String` path **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`skeleton_allocate_data` **(** :ref:`RID` skeleton, :ref:`int` bones, :ref:`bool` is_2d_skeleton=false **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`skeleton_bone_get_transform` **(** :ref:`RID` skeleton, :ref:`int` bone **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform2D` | :ref:`skeleton_bone_get_transform_2d` **(** :ref:`RID` skeleton, :ref:`int` bone **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`skeleton_bone_set_transform` **(** :ref:`RID` skeleton, :ref:`int` bone, :ref:`Transform3D` transform **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`skeleton_bone_set_transform_2d` **(** :ref:`RID` skeleton, :ref:`int` bone, :ref:`Transform2D` transform **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`skeleton_create` **(** **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`skeleton_get_bone_count` **(** :ref:`RID` skeleton **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`skeleton_set_base_transform_2d` **(** :ref:`RID` skeleton, :ref:`Transform2D` base_transform **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Image` | :ref:`sky_bake_panorama` **(** :ref:`RID` sky, :ref:`float` energy, :ref:`bool` bake_irradiance, :ref:`Vector2i` size **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`sky_create` **(** **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`sky_set_material` **(** :ref:`RID` sky, :ref:`RID` material **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`sky_set_mode` **(** :ref:`RID` sky, :ref:`SkyMode` mode **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`sky_set_radiance_size` **(** :ref:`RID` sky, :ref:`int` radiance_size **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`spot_light_create` **(** **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`sub_surface_scattering_set_quality` **(** :ref:`SubSurfaceScatteringQuality` quality **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`sub_surface_scattering_set_scale` **(** :ref:`float` scale, :ref:`float` depth_scale **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`texture_2d_create` **(** :ref:`Image` image **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Image` | :ref:`texture_2d_get` **(** :ref:`RID` texture **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Image` | :ref:`texture_2d_layer_get` **(** :ref:`RID` texture, :ref:`int` layer **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`texture_2d_layered_create` **(** :ref:`Image[]` layers, :ref:`TextureLayeredType` layered_type **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`texture_2d_layered_placeholder_create` **(** :ref:`TextureLayeredType` layered_type **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`texture_2d_placeholder_create` **(** **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`texture_2d_update` **(** :ref:`RID` texture, :ref:`Image` image, :ref:`int` layer **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`texture_3d_create` **(** :ref:`Format` format, :ref:`int` width, :ref:`int` height, :ref:`int` depth, :ref:`bool` mipmaps, :ref:`Image[]` data **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Image[]` | :ref:`texture_3d_get` **(** :ref:`RID` texture **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`texture_3d_placeholder_create` **(** **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`texture_3d_update` **(** :ref:`RID` texture, :ref:`Image[]` data **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`texture_get_path` **(** :ref:`RID` texture **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`texture_proxy_create` **(** :ref:`RID` base **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`texture_proxy_update` **(** :ref:`RID` texture, :ref:`RID` proxy_to **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`texture_replace` **(** :ref:`RID` texture, :ref:`RID` by_texture **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`texture_set_force_redraw_if_visible` **(** :ref:`RID` texture, :ref:`bool` enable **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`texture_set_path` **(** :ref:`RID` texture, :ref:`String` path **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`texture_set_size_override` **(** :ref:`RID` texture, :ref:`int` width, :ref:`int` height **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_attach_camera` **(** :ref:`RID` viewport, :ref:`RID` camera **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_attach_canvas` **(** :ref:`RID` viewport, :ref:`RID` canvas **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_attach_to_screen` **(** :ref:`RID` viewport, :ref:`Rect2` rect=Rect2(0, 0, 0, 0), :ref:`int` screen=0 **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`viewport_create` **(** **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`viewport_get_measured_render_time_cpu` **(** :ref:`RID` viewport **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`viewport_get_measured_render_time_gpu` **(** :ref:`RID` viewport **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`viewport_get_render_info` **(** :ref:`RID` viewport, :ref:`ViewportRenderInfoType` type, :ref:`ViewportRenderInfo` info **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`viewport_get_texture` **(** :ref:`RID` viewport **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_remove_canvas` **(** :ref:`RID` viewport, :ref:`RID` canvas **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_active` **(** :ref:`RID` viewport, :ref:`bool` active **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_canvas_stacking` **(** :ref:`RID` viewport, :ref:`RID` canvas, :ref:`int` layer, :ref:`int` sublayer **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_canvas_transform` **(** :ref:`RID` viewport, :ref:`RID` canvas, :ref:`Transform2D` offset **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_clear_mode` **(** :ref:`RID` viewport, :ref:`ViewportClearMode` clear_mode **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_debug_draw` **(** :ref:`RID` viewport, :ref:`ViewportDebugDraw` draw **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_default_canvas_item_texture_filter` **(** :ref:`RID` viewport, :ref:`CanvasItemTextureFilter` filter **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_default_canvas_item_texture_repeat` **(** :ref:`RID` viewport, :ref:`CanvasItemTextureRepeat` repeat **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_disable_2d` **(** :ref:`RID` viewport, :ref:`bool` disable **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_disable_3d` **(** :ref:`RID` viewport, :ref:`bool` disable **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_disable_environment` **(** :ref:`RID` viewport, :ref:`bool` disabled **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_fsr_mipmap_bias` **(** :ref:`RID` viewport, :ref:`float` mipmap_bias **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_fsr_sharpness` **(** :ref:`RID` viewport, :ref:`float` sharpness **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_global_canvas_transform` **(** :ref:`RID` viewport, :ref:`Transform2D` transform **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_measure_render_time` **(** :ref:`RID` viewport, :ref:`bool` enable **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_msaa` **(** :ref:`RID` viewport, :ref:`ViewportMSAA` msaa **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_occlusion_culling_build_quality` **(** :ref:`ViewportOcclusionCullingBuildQuality` quality **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_occlusion_rays_per_thread` **(** :ref:`int` rays_per_thread **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_parent_viewport` **(** :ref:`RID` viewport, :ref:`RID` parent_viewport **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_positional_shadow_atlas_quadrant_subdivision` **(** :ref:`RID` viewport, :ref:`int` quadrant, :ref:`int` subdivision **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_positional_shadow_atlas_size` **(** :ref:`RID` viewport, :ref:`int` size, :ref:`bool` use_16_bits=false **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_render_direct_to_screen` **(** :ref:`RID` viewport, :ref:`bool` enabled **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_scaling_3d_mode` **(** :ref:`RID` viewport, :ref:`ViewportScaling3DMode` scaling_3d_mode **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_scaling_3d_scale` **(** :ref:`RID` viewport, :ref:`float` scale **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_scenario` **(** :ref:`RID` viewport, :ref:`RID` scenario **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_screen_space_aa` **(** :ref:`RID` viewport, :ref:`ViewportScreenSpaceAA` mode **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_sdf_oversize_and_scale` **(** :ref:`RID` viewport, :ref:`ViewportSDFOversize` oversize, :ref:`ViewportSDFScale` scale **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_size` **(** :ref:`RID` viewport, :ref:`int` width, :ref:`int` height **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_snap_2d_transforms_to_pixel` **(** :ref:`RID` viewport, :ref:`bool` enabled **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_snap_2d_vertices_to_pixel` **(** :ref:`RID` viewport, :ref:`bool` enabled **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_transparent_background` **(** :ref:`RID` viewport, :ref:`bool` enabled **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_update_mode` **(** :ref:`RID` viewport, :ref:`ViewportUpdateMode` update_mode **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_use_debanding` **(** :ref:`RID` viewport, :ref:`bool` enable **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_use_occlusion_culling` **(** :ref:`RID` viewport, :ref:`bool` enable **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_use_taa` **(** :ref:`RID` viewport, :ref:`bool` enable **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_use_xr` **(** :ref:`RID` viewport, :ref:`bool` use_xr **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_vrs_mode` **(** :ref:`RID` viewport, :ref:`ViewportVRSMode` mode **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_vrs_texture` **(** :ref:`RID` viewport, :ref:`RID` texture **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`visibility_notifier_create` **(** **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`visibility_notifier_set_aabb` **(** :ref:`RID` notifier, :ref:`AABB` aabb **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`visibility_notifier_set_callbacks` **(** :ref:`RID` notifier, :ref:`Callable` enter_callable, :ref:`Callable` exit_callable **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`voxel_gi_allocate_data` **(** :ref:`RID` voxel_gi, :ref:`Transform3D` to_cell_xform, :ref:`AABB` aabb, :ref:`Vector3i` octree_size, :ref:`PackedByteArray` octree_cells, :ref:`PackedByteArray` data_cells, :ref:`PackedByteArray` distance_field, :ref:`PackedInt32Array` level_counts **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`voxel_gi_create` **(** **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`voxel_gi_get_data_cells` **(** :ref:`RID` voxel_gi **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`voxel_gi_get_distance_field` **(** :ref:`RID` voxel_gi **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`voxel_gi_get_level_counts` **(** :ref:`RID` voxel_gi **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`voxel_gi_get_octree_cells` **(** :ref:`RID` voxel_gi **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3i` | :ref:`voxel_gi_get_octree_size` **(** :ref:`RID` voxel_gi **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`voxel_gi_get_to_cell_xform` **(** :ref:`RID` voxel_gi **)** |const| | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`voxel_gi_set_bias` **(** :ref:`RID` voxel_gi, :ref:`float` bias **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`voxel_gi_set_dynamic_range` **(** :ref:`RID` voxel_gi, :ref:`float` range **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`voxel_gi_set_energy` **(** :ref:`RID` voxel_gi, :ref:`float` energy **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`voxel_gi_set_interior` **(** :ref:`RID` voxel_gi, :ref:`bool` enable **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`voxel_gi_set_normal_bias` **(** :ref:`RID` voxel_gi, :ref:`float` bias **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`voxel_gi_set_propagation` **(** :ref:`RID` voxel_gi, :ref:`float` amount **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`voxel_gi_set_quality` **(** :ref:`VoxelGIQuality` quality **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`voxel_gi_set_use_two_bounces` **(** :ref:`RID` voxel_gi, :ref:`bool` enable **)** | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Image[]` | :ref:`bake_render_uv2` **(** :ref:`RID` base, :ref:`Array` material_overrides, :ref:`Vector2i` image_size **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`camera_create` **(** **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`camera_effects_create` **(** **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`camera_effects_set_custom_exposure` **(** :ref:`RID` camera_effects, :ref:`bool` enable, :ref:`float` exposure **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`camera_effects_set_dof_blur` **(** :ref:`RID` camera_effects, :ref:`bool` far_enable, :ref:`float` far_distance, :ref:`float` far_transition, :ref:`bool` near_enable, :ref:`float` near_distance, :ref:`float` near_transition, :ref:`float` amount **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`camera_effects_set_dof_blur_bokeh_shape` **(** :ref:`DOFBokehShape` shape **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`camera_effects_set_dof_blur_quality` **(** :ref:`DOFBlurQuality` quality, :ref:`bool` use_jitter **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`camera_set_camera_effects` **(** :ref:`RID` camera, :ref:`RID` effects **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`camera_set_cull_mask` **(** :ref:`RID` camera, :ref:`int` layers **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`camera_set_environment` **(** :ref:`RID` camera, :ref:`RID` env **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`camera_set_frustum` **(** :ref:`RID` camera, :ref:`float` size, :ref:`Vector2` offset, :ref:`float` z_near, :ref:`float` z_far **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`camera_set_orthogonal` **(** :ref:`RID` camera, :ref:`float` size, :ref:`float` z_near, :ref:`float` z_far **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`camera_set_perspective` **(** :ref:`RID` camera, :ref:`float` fovy_degrees, :ref:`float` z_near, :ref:`float` z_far **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`camera_set_transform` **(** :ref:`RID` camera, :ref:`Transform3D` transform **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`camera_set_use_vertical_aspect` **(** :ref:`RID` camera, :ref:`bool` enable **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`canvas_create` **(** **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_add_animation_slice` **(** :ref:`RID` item, :ref:`float` animation_length, :ref:`float` slice_begin, :ref:`float` slice_end, :ref:`float` offset=0.0 **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_add_circle` **(** :ref:`RID` item, :ref:`Vector2` pos, :ref:`float` radius, :ref:`Color` color **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_add_clip_ignore` **(** :ref:`RID` item, :ref:`bool` ignore **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_add_lcd_texture_rect_region` **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`RID` texture, :ref:`Rect2` src_rect, :ref:`Color` modulate **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_add_line` **(** :ref:`RID` item, :ref:`Vector2` from, :ref:`Vector2` to, :ref:`Color` color, :ref:`float` width=1.0, :ref:`bool` antialiased=false **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_add_mesh` **(** :ref:`RID` item, :ref:`RID` mesh, :ref:`Transform2D` transform=Transform2D(1, 0, 0, 1, 0, 0), :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`RID` texture **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_add_msdf_texture_rect_region` **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`RID` texture, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`int` outline_size=0, :ref:`float` px_range=1.0 **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_add_multimesh` **(** :ref:`RID` item, :ref:`RID` mesh, :ref:`RID` texture **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_add_nine_patch` **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`Rect2` source, :ref:`RID` texture, :ref:`Vector2` topleft, :ref:`Vector2` bottomright, :ref:`NinePatchAxisMode` x_axis_mode=0, :ref:`NinePatchAxisMode` y_axis_mode=0, :ref:`bool` draw_center=true, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_add_particles` **(** :ref:`RID` item, :ref:`RID` particles, :ref:`RID` texture **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_add_polygon` **(** :ref:`RID` item, :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`PackedVector2Array` uvs=PackedVector2Array(), :ref:`RID` texture **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_add_polyline` **(** :ref:`RID` item, :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`float` width=1.0, :ref:`bool` antialiased=false **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_add_primitive` **(** :ref:`RID` item, :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`PackedVector2Array` uvs, :ref:`RID` texture, :ref:`float` width=1.0 **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_add_rect` **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`Color` color **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_add_set_transform` **(** :ref:`RID` item, :ref:`Transform2D` transform **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_add_texture_rect` **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`RID` texture, :ref:`bool` tile=false, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`bool` transpose=false **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_add_texture_rect_region` **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`RID` texture, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`bool` transpose=false, :ref:`bool` clip_uv=true **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_add_triangle_array` **(** :ref:`RID` item, :ref:`PackedInt32Array` indices, :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`PackedVector2Array` uvs=PackedVector2Array(), :ref:`PackedInt32Array` bones=PackedInt32Array(), :ref:`PackedFloat32Array` weights=PackedFloat32Array(), :ref:`RID` texture, :ref:`int` count=-1 **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_clear` **(** :ref:`RID` item **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`canvas_item_create` **(** **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_set_canvas_group_mode` **(** :ref:`RID` item, :ref:`CanvasGroupMode` mode, :ref:`float` clear_margin=5.0, :ref:`bool` fit_empty=false, :ref:`float` fit_margin=0.0, :ref:`bool` blur_mipmaps=false **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_set_clip` **(** :ref:`RID` item, :ref:`bool` clip **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_set_copy_to_backbuffer` **(** :ref:`RID` item, :ref:`bool` enabled, :ref:`Rect2` rect **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_set_custom_rect` **(** :ref:`RID` item, :ref:`bool` use_custom_rect, :ref:`Rect2` rect=Rect2(0, 0, 0, 0) **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_set_default_texture_filter` **(** :ref:`RID` item, :ref:`CanvasItemTextureFilter` filter **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_set_default_texture_repeat` **(** :ref:`RID` item, :ref:`CanvasItemTextureRepeat` repeat **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_set_distance_field_mode` **(** :ref:`RID` item, :ref:`bool` enabled **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_set_draw_behind_parent` **(** :ref:`RID` item, :ref:`bool` enabled **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_set_draw_index` **(** :ref:`RID` item, :ref:`int` index **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_set_light_mask` **(** :ref:`RID` item, :ref:`int` mask **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_set_material` **(** :ref:`RID` item, :ref:`RID` material **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_set_modulate` **(** :ref:`RID` item, :ref:`Color` color **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_set_parent` **(** :ref:`RID` item, :ref:`RID` parent **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_set_self_modulate` **(** :ref:`RID` item, :ref:`Color` color **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_set_sort_children_by_y` **(** :ref:`RID` item, :ref:`bool` enabled **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_set_transform` **(** :ref:`RID` item, :ref:`Transform2D` transform **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_set_use_parent_material` **(** :ref:`RID` item, :ref:`bool` enabled **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_set_visibility_notifier` **(** :ref:`RID` item, :ref:`bool` enable, :ref:`Rect2` area, :ref:`Callable` enter_callable, :ref:`Callable` exit_callable **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_set_visible` **(** :ref:`RID` item, :ref:`bool` visible **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_set_z_as_relative_to_parent` **(** :ref:`RID` item, :ref:`bool` enabled **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_set_z_index` **(** :ref:`RID` item, :ref:`int` z_index **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_attach_to_canvas` **(** :ref:`RID` light, :ref:`RID` canvas **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`canvas_light_create` **(** **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_occluder_attach_to_canvas` **(** :ref:`RID` occluder, :ref:`RID` canvas **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`canvas_light_occluder_create` **(** **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_occluder_set_as_sdf_collision` **(** :ref:`RID` occluder, :ref:`bool` enable **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_occluder_set_enabled` **(** :ref:`RID` occluder, :ref:`bool` enabled **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_occluder_set_light_mask` **(** :ref:`RID` occluder, :ref:`int` mask **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_occluder_set_polygon` **(** :ref:`RID` occluder, :ref:`RID` polygon **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_occluder_set_transform` **(** :ref:`RID` occluder, :ref:`Transform2D` transform **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_set_color` **(** :ref:`RID` light, :ref:`Color` color **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_set_enabled` **(** :ref:`RID` light, :ref:`bool` enabled **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_set_energy` **(** :ref:`RID` light, :ref:`float` energy **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_set_height` **(** :ref:`RID` light, :ref:`float` height **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_set_item_cull_mask` **(** :ref:`RID` light, :ref:`int` mask **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_set_item_shadow_cull_mask` **(** :ref:`RID` light, :ref:`int` mask **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_set_layer_range` **(** :ref:`RID` light, :ref:`int` min_layer, :ref:`int` max_layer **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_set_mode` **(** :ref:`RID` light, :ref:`CanvasLightMode` mode **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_set_shadow_color` **(** :ref:`RID` light, :ref:`Color` color **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_set_shadow_enabled` **(** :ref:`RID` light, :ref:`bool` enabled **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_set_shadow_filter` **(** :ref:`RID` light, :ref:`CanvasLightShadowFilter` filter **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_set_shadow_smooth` **(** :ref:`RID` light, :ref:`float` smooth **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_set_texture` **(** :ref:`RID` light, :ref:`RID` texture **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_set_texture_offset` **(** :ref:`RID` light, :ref:`Vector2` offset **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_set_texture_scale` **(** :ref:`RID` light, :ref:`float` scale **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_set_transform` **(** :ref:`RID` light, :ref:`Transform2D` transform **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_set_z_range` **(** :ref:`RID` light, :ref:`int` min_z, :ref:`int` max_z **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`canvas_occluder_polygon_create` **(** **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_occluder_polygon_set_cull_mode` **(** :ref:`RID` occluder_polygon, :ref:`CanvasOccluderPolygonCullMode` mode **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_occluder_polygon_set_shape` **(** :ref:`RID` occluder_polygon, :ref:`PackedVector2Array` shape, :ref:`bool` closed **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_set_disable_scale` **(** :ref:`bool` disable **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_set_item_mirroring` **(** :ref:`RID` canvas, :ref:`RID` item, :ref:`Vector2` mirroring **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_set_modulate` **(** :ref:`RID` canvas, :ref:`Color` color **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_set_shadow_texture_size` **(** :ref:`int` size **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`canvas_texture_create` **(** **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_texture_set_channel` **(** :ref:`RID` canvas_texture, :ref:`CanvasTextureChannel` channel, :ref:`RID` texture **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_texture_set_shading_parameters` **(** :ref:`RID` canvas_texture, :ref:`Color` base_color, :ref:`float` shininess **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_texture_set_texture_filter` **(** :ref:`RID` canvas_texture, :ref:`CanvasItemTextureFilter` filter **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_texture_set_texture_repeat` **(** :ref:`RID` canvas_texture, :ref:`CanvasItemTextureRepeat` repeat **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RenderingDevice` | :ref:`create_local_rendering_device` **(** **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`decal_create` **(** **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`decal_set_albedo_mix` **(** :ref:`RID` decal, :ref:`float` albedo_mix **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`decal_set_cull_mask` **(** :ref:`RID` decal, :ref:`int` mask **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`decal_set_distance_fade` **(** :ref:`RID` decal, :ref:`bool` enabled, :ref:`float` begin, :ref:`float` length **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`decal_set_emission_energy` **(** :ref:`RID` decal, :ref:`float` energy **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`decal_set_extents` **(** :ref:`RID` decal, :ref:`Vector3` extents **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`decal_set_fade` **(** :ref:`RID` decal, :ref:`float` above, :ref:`float` below **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`decal_set_modulate` **(** :ref:`RID` decal, :ref:`Color` color **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`decal_set_normal_fade` **(** :ref:`RID` decal, :ref:`float` fade **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`decal_set_texture` **(** :ref:`RID` decal, :ref:`DecalTexture` type, :ref:`RID` texture **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`decals_set_filter` **(** :ref:`DecalFilter` filter **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`directional_light_create` **(** **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`directional_shadow_atlas_set_size` **(** :ref:`int` size, :ref:`bool` is_16bits **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`directional_soft_shadow_filter_set_quality` **(** :ref:`ShadowQuality` quality **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Image` | :ref:`environment_bake_panorama` **(** :ref:`RID` environment, :ref:`bool` bake_irradiance, :ref:`Vector2i` size **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`environment_create` **(** **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`environment_glow_set_use_bicubic_upscale` **(** :ref:`bool` enable **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`environment_glow_set_use_high_quality` **(** :ref:`bool` enable **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`environment_set_adjustment` **(** :ref:`RID` env, :ref:`bool` enable, :ref:`float` brightness, :ref:`float` contrast, :ref:`float` saturation, :ref:`bool` use_1d_color_correction, :ref:`RID` color_correction **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`environment_set_ambient_light` **(** :ref:`RID` env, :ref:`Color` color, :ref:`EnvironmentAmbientSource` ambient=0, :ref:`float` energy=1.0, :ref:`float` sky_contibution=0.0, :ref:`EnvironmentReflectionSource` reflection_source=0 **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`environment_set_background` **(** :ref:`RID` env, :ref:`EnvironmentBG` bg **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`environment_set_bg_color` **(** :ref:`RID` env, :ref:`Color` color **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`environment_set_bg_energy` **(** :ref:`RID` env, :ref:`float` energy **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`environment_set_canvas_max_layer` **(** :ref:`RID` env, :ref:`int` max_layer **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`environment_set_fog` **(** :ref:`RID` env, :ref:`bool` enable, :ref:`Color` light_color, :ref:`float` light_energy, :ref:`float` sun_scatter, :ref:`float` density, :ref:`float` height, :ref:`float` height_density, :ref:`float` aerial_perspective **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`environment_set_glow` **(** :ref:`RID` env, :ref:`bool` enable, :ref:`PackedFloat32Array` levels, :ref:`float` intensity, :ref:`float` strength, :ref:`float` mix, :ref:`float` bloom_threshold, :ref:`EnvironmentGlowBlendMode` blend_mode, :ref:`float` hdr_bleed_threshold, :ref:`float` hdr_bleed_scale, :ref:`float` hdr_luminance_cap, :ref:`float` glow_map_strength, :ref:`RID` glow_map **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`environment_set_sdfgi` **(** :ref:`RID` env, :ref:`bool` enable, :ref:`int` cascades, :ref:`float` min_cell_size, :ref:`EnvironmentSDFGIYScale` y_scale, :ref:`bool` use_occlusion, :ref:`float` bounce_feedback, :ref:`bool` read_sky, :ref:`float` energy, :ref:`float` normal_bias, :ref:`float` probe_bias **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`environment_set_sdfgi_frames_to_converge` **(** :ref:`EnvironmentSDFGIFramesToConverge` frames **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`environment_set_sdfgi_frames_to_update_light` **(** :ref:`EnvironmentSDFGIFramesToUpdateLight` frames **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`environment_set_sdfgi_ray_count` **(** :ref:`EnvironmentSDFGIRayCount` ray_count **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`environment_set_sky` **(** :ref:`RID` env, :ref:`RID` sky **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`environment_set_sky_custom_fov` **(** :ref:`RID` env, :ref:`float` scale **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`environment_set_sky_orientation` **(** :ref:`RID` env, :ref:`Basis` orientation **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`environment_set_ssao` **(** :ref:`RID` env, :ref:`bool` enable, :ref:`float` radius, :ref:`float` intensity, :ref:`float` power, :ref:`float` detail, :ref:`float` horizon, :ref:`float` sharpness, :ref:`float` light_affect, :ref:`float` ao_channel_affect **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`environment_set_ssao_quality` **(** :ref:`EnvironmentSSAOQuality` quality, :ref:`bool` half_size, :ref:`float` adaptive_target, :ref:`int` blur_passes, :ref:`float` fadeout_from, :ref:`float` fadeout_to **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`environment_set_ssil_quality` **(** :ref:`EnvironmentSSILQuality` quality, :ref:`bool` half_size, :ref:`float` adaptive_target, :ref:`int` blur_passes, :ref:`float` fadeout_from, :ref:`float` fadeout_to **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`environment_set_ssr` **(** :ref:`RID` env, :ref:`bool` enable, :ref:`int` max_steps, :ref:`float` fade_in, :ref:`float` fade_out, :ref:`float` depth_tolerance **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`environment_set_ssr_roughness_quality` **(** :ref:`EnvironmentSSRRoughnessQuality` quality **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`environment_set_tonemap` **(** :ref:`RID` env, :ref:`EnvironmentToneMapper` tone_mapper, :ref:`float` exposure, :ref:`float` white, :ref:`bool` auto_exposure, :ref:`float` min_luminance, :ref:`float` max_luminance, :ref:`float` auto_exp_speed, :ref:`float` auto_exp_grey **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`environment_set_volumetric_fog` **(** :ref:`RID` env, :ref:`bool` enable, :ref:`float` density, :ref:`Color` albedo, :ref:`Color` emission, :ref:`float` emission_energy, :ref:`float` anisotropy, :ref:`float` length, :ref:`float` p_detail_spread, :ref:`float` gi_inject, :ref:`bool` temporal_reprojection, :ref:`float` temporal_reprojection_amount, :ref:`float` ambient_inject **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`environment_set_volumetric_fog_filter_active` **(** :ref:`bool` active **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`environment_set_volumetric_fog_volume_size` **(** :ref:`int` size, :ref:`int` depth **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`fog_volume_create` **(** **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`fog_volume_set_extents` **(** :ref:`RID` fog_volume, :ref:`Vector3` extents **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`fog_volume_set_material` **(** :ref:`RID` fog_volume, :ref:`RID` material **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`fog_volume_set_shape` **(** :ref:`RID` fog_volume, :ref:`FogVolumeShape` shape **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`force_draw` **(** :ref:`bool` swap_buffers=true, :ref:`float` frame_step=0.0 **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`force_sync` **(** **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`free_rid` **(** :ref:`RID` rid **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_frame_setup_time_cpu` **(** **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RenderingDevice` | :ref:`get_rendering_device` **(** **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_rendering_info` **(** :ref:`RenderingInfo` info **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`get_test_cube` **(** **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`get_test_texture` **(** **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_video_adapter_api_version` **(** **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_video_adapter_name` **(** **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`DeviceType` | :ref:`get_video_adapter_type` **(** **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_video_adapter_vendor` **(** **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`get_white_texture` **(** **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`gi_set_use_half_resolution` **(** :ref:`bool` half_resolution **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`global_shader_uniform_add` **(** :ref:`StringName` name, :ref:`GlobalShaderUniformType` type, :ref:`Variant` default_value **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`global_shader_uniform_get` **(** :ref:`StringName` name **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedStringArray` | :ref:`global_shader_uniform_get_list` **(** **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`GlobalShaderUniformType` | :ref:`global_shader_uniform_get_type` **(** :ref:`StringName` name **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`global_shader_uniform_remove` **(** :ref:`StringName` name **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`global_shader_uniform_set` **(** :ref:`StringName` name, :ref:`Variant` value **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`global_shader_uniform_set_override` **(** :ref:`StringName` name, :ref:`Variant` value **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_changed` **(** **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_feature` **(** :ref:`Features` feature **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_os_feature` **(** :ref:`String` feature **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`instance_attach_object_instance_id` **(** :ref:`RID` instance, :ref:`int` id **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`instance_attach_skeleton` **(** :ref:`RID` instance, :ref:`RID` skeleton **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`instance_create` **(** **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`instance_create2` **(** :ref:`RID` base, :ref:`RID` scenario **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`instance_geometry_get_shader_uniform` **(** :ref:`RID` instance, :ref:`StringName` parameter **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`instance_geometry_get_shader_uniform_default_value` **(** :ref:`RID` instance, :ref:`StringName` parameter **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary[]` | :ref:`instance_geometry_get_shader_uniform_list` **(** :ref:`RID` instance **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`instance_geometry_set_cast_shadows_setting` **(** :ref:`RID` instance, :ref:`ShadowCastingSetting` shadow_casting_setting **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`instance_geometry_set_flag` **(** :ref:`RID` instance, :ref:`InstanceFlags` flag, :ref:`bool` enabled **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`instance_geometry_set_lightmap` **(** :ref:`RID` instance, :ref:`RID` lightmap, :ref:`Rect2` lightmap_uv_scale, :ref:`int` lightmap_slice **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`instance_geometry_set_lod_bias` **(** :ref:`RID` instance, :ref:`float` lod_bias **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`instance_geometry_set_material_overlay` **(** :ref:`RID` instance, :ref:`RID` material **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`instance_geometry_set_material_override` **(** :ref:`RID` instance, :ref:`RID` material **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`instance_geometry_set_shader_uniform` **(** :ref:`RID` instance, :ref:`StringName` parameter, :ref:`Variant` value **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`instance_geometry_set_transparency` **(** :ref:`RID` instance, :ref:`float` transparency **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`instance_geometry_set_visibility_range` **(** :ref:`RID` instance, :ref:`float` min, :ref:`float` max, :ref:`float` min_margin, :ref:`float` max_margin, :ref:`VisibilityRangeFadeMode` fade_mode **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`instance_set_base` **(** :ref:`RID` instance, :ref:`RID` base **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`instance_set_blend_shape_weight` **(** :ref:`RID` instance, :ref:`int` shape, :ref:`float` weight **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`instance_set_custom_aabb` **(** :ref:`RID` instance, :ref:`AABB` aabb **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`instance_set_extra_visibility_margin` **(** :ref:`RID` instance, :ref:`float` margin **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`instance_set_ignore_culling` **(** :ref:`RID` instance, :ref:`bool` enabled **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`instance_set_layer_mask` **(** :ref:`RID` instance, :ref:`int` mask **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`instance_set_scenario` **(** :ref:`RID` instance, :ref:`RID` scenario **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`instance_set_surface_override_material` **(** :ref:`RID` instance, :ref:`int` surface, :ref:`RID` material **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`instance_set_transform` **(** :ref:`RID` instance, :ref:`Transform3D` transform **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`instance_set_visibility_parent` **(** :ref:`RID` instance, :ref:`RID` parent **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`instance_set_visible` **(** :ref:`RID` instance, :ref:`bool` visible **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedInt64Array` | :ref:`instances_cull_aabb` **(** :ref:`AABB` aabb, :ref:`RID` scenario **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedInt64Array` | :ref:`instances_cull_convex` **(** :ref:`Array` convex, :ref:`RID` scenario **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedInt64Array` | :ref:`instances_cull_ray` **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`RID` scenario **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`light_directional_set_blend_splits` **(** :ref:`RID` light, :ref:`bool` enable **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`light_directional_set_shadow_mode` **(** :ref:`RID` light, :ref:`LightDirectionalShadowMode` mode **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`light_directional_set_sky_mode` **(** :ref:`RID` light, :ref:`LightDirectionalSkyMode` mode **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`light_omni_set_shadow_mode` **(** :ref:`RID` light, :ref:`LightOmniShadowMode` mode **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`light_projectors_set_filter` **(** :ref:`LightProjectorFilter` filter **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`light_set_bake_mode` **(** :ref:`RID` light, :ref:`LightBakeMode` bake_mode **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`light_set_color` **(** :ref:`RID` light, :ref:`Color` color **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`light_set_cull_mask` **(** :ref:`RID` light, :ref:`int` mask **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`light_set_distance_fade` **(** :ref:`RID` decal, :ref:`bool` enabled, :ref:`float` begin, :ref:`float` shadow, :ref:`float` length **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`light_set_max_sdfgi_cascade` **(** :ref:`RID` light, :ref:`int` cascade **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`light_set_negative` **(** :ref:`RID` light, :ref:`bool` enable **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`light_set_param` **(** :ref:`RID` light, :ref:`LightParam` param, :ref:`float` value **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`light_set_projector` **(** :ref:`RID` light, :ref:`RID` texture **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`light_set_reverse_cull_face_mode` **(** :ref:`RID` light, :ref:`bool` enabled **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`light_set_shadow` **(** :ref:`RID` light, :ref:`bool` enabled **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`lightmap_create` **(** **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedInt32Array` | :ref:`lightmap_get_probe_capture_bsp_tree` **(** :ref:`RID` lightmap **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedVector3Array` | :ref:`lightmap_get_probe_capture_points` **(** :ref:`RID` lightmap **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedColorArray` | :ref:`lightmap_get_probe_capture_sh` **(** :ref:`RID` lightmap **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedInt32Array` | :ref:`lightmap_get_probe_capture_tetrahedra` **(** :ref:`RID` lightmap **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`lightmap_set_probe_bounds` **(** :ref:`RID` lightmap, :ref:`AABB` bounds **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`lightmap_set_probe_capture_data` **(** :ref:`RID` lightmap, :ref:`PackedVector3Array` points, :ref:`PackedColorArray` point_sh, :ref:`PackedInt32Array` tetrahedra, :ref:`PackedInt32Array` bsp_tree **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`lightmap_set_probe_capture_update_speed` **(** :ref:`float` speed **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`lightmap_set_probe_interior` **(** :ref:`RID` lightmap, :ref:`bool` interior **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`lightmap_set_textures` **(** :ref:`RID` lightmap, :ref:`RID` light, :ref:`bool` uses_sh **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`make_sphere_mesh` **(** :ref:`int` latitudes, :ref:`int` longitudes, :ref:`float` radius **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`material_create` **(** **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`material_get_param` **(** :ref:`RID` material, :ref:`StringName` parameter **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`material_set_next_pass` **(** :ref:`RID` material, :ref:`RID` next_material **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`material_set_param` **(** :ref:`RID` material, :ref:`StringName` parameter, :ref:`Variant` value **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`material_set_render_priority` **(** :ref:`RID` material, :ref:`int` priority **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`material_set_shader` **(** :ref:`RID` shader_material, :ref:`RID` shader **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`mesh_add_surface` **(** :ref:`RID` mesh, :ref:`Dictionary` surface **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`mesh_add_surface_from_arrays` **(** :ref:`RID` mesh, :ref:`PrimitiveType` primitive, :ref:`Array` arrays, :ref:`Array` blend_shapes=[], :ref:`Dictionary` lods={}, :ref:`int` compress_format=0 **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`mesh_clear` **(** :ref:`RID` mesh **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`mesh_create` **(** **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`mesh_create_from_surfaces` **(** :ref:`Dictionary[]` surfaces, :ref:`int` blend_shape_count=0 **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`mesh_get_blend_shape_count` **(** :ref:`RID` mesh **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`BlendShapeMode` | :ref:`mesh_get_blend_shape_mode` **(** :ref:`RID` mesh **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`AABB` | :ref:`mesh_get_custom_aabb` **(** :ref:`RID` mesh **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`mesh_get_surface` **(** :ref:`RID` mesh, :ref:`int` surface **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`mesh_get_surface_count` **(** :ref:`RID` mesh **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`mesh_set_blend_shape_mode` **(** :ref:`RID` mesh, :ref:`BlendShapeMode` mode **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`mesh_set_custom_aabb` **(** :ref:`RID` mesh, :ref:`AABB` aabb **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`mesh_set_shadow_mesh` **(** :ref:`RID` mesh, :ref:`RID` shadow_mesh **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`mesh_surface_get_arrays` **(** :ref:`RID` mesh, :ref:`int` surface **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array[]` | :ref:`mesh_surface_get_blend_shape_arrays` **(** :ref:`RID` mesh, :ref:`int` surface **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`mesh_surface_get_format_attribute_stride` **(** :ref:`int` format, :ref:`int` vertex_count **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`mesh_surface_get_format_offset` **(** :ref:`int` format, :ref:`int` vertex_count, :ref:`int` array_index **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`mesh_surface_get_format_skin_stride` **(** :ref:`int` format, :ref:`int` vertex_count **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`mesh_surface_get_format_vertex_stride` **(** :ref:`int` format, :ref:`int` vertex_count **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`mesh_surface_get_material` **(** :ref:`RID` mesh, :ref:`int` surface **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`mesh_surface_set_material` **(** :ref:`RID` mesh, :ref:`int` surface, :ref:`RID` material **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`mesh_surface_update_attribute_region` **(** :ref:`RID` mesh, :ref:`int` surface, :ref:`int` offset, :ref:`PackedByteArray` data **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`mesh_surface_update_skin_region` **(** :ref:`RID` mesh, :ref:`int` surface, :ref:`int` offset, :ref:`PackedByteArray` data **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`mesh_surface_update_vertex_region` **(** :ref:`RID` mesh, :ref:`int` surface, :ref:`int` offset, :ref:`PackedByteArray` data **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`multimesh_allocate_data` **(** :ref:`RID` multimesh, :ref:`int` instances, :ref:`MultimeshTransformFormat` transform_format, :ref:`bool` color_format=false, :ref:`bool` custom_data_format=false **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`multimesh_create` **(** **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`AABB` | :ref:`multimesh_get_aabb` **(** :ref:`RID` multimesh **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedFloat32Array` | :ref:`multimesh_get_buffer` **(** :ref:`RID` multimesh **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`multimesh_get_instance_count` **(** :ref:`RID` multimesh **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`multimesh_get_mesh` **(** :ref:`RID` multimesh **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`multimesh_get_visible_instances` **(** :ref:`RID` multimesh **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`multimesh_instance_get_color` **(** :ref:`RID` multimesh, :ref:`int` index **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`multimesh_instance_get_custom_data` **(** :ref:`RID` multimesh, :ref:`int` index **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform3D` | :ref:`multimesh_instance_get_transform` **(** :ref:`RID` multimesh, :ref:`int` index **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform2D` | :ref:`multimesh_instance_get_transform_2d` **(** :ref:`RID` multimesh, :ref:`int` index **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`multimesh_instance_set_color` **(** :ref:`RID` multimesh, :ref:`int` index, :ref:`Color` color **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`multimesh_instance_set_custom_data` **(** :ref:`RID` multimesh, :ref:`int` index, :ref:`Color` custom_data **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`multimesh_instance_set_transform` **(** :ref:`RID` multimesh, :ref:`int` index, :ref:`Transform3D` transform **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`multimesh_instance_set_transform_2d` **(** :ref:`RID` multimesh, :ref:`int` index, :ref:`Transform2D` transform **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`multimesh_set_buffer` **(** :ref:`RID` multimesh, :ref:`PackedFloat32Array` buffer **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`multimesh_set_mesh` **(** :ref:`RID` multimesh, :ref:`RID` mesh **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`multimesh_set_visible_instances` **(** :ref:`RID` multimesh, :ref:`int` visible **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`occluder_create` **(** **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`occluder_set_mesh` **(** :ref:`RID` occluder, :ref:`PackedVector3Array` vertices, :ref:`PackedInt32Array` indices **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`omni_light_create` **(** **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`particles_collision_create` **(** **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_collision_height_field_update` **(** :ref:`RID` particles_collision **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_collision_set_attractor_attenuation` **(** :ref:`RID` particles_collision, :ref:`float` curve **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_collision_set_attractor_directionality` **(** :ref:`RID` particles_collision, :ref:`float` amount **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_collision_set_attractor_strength` **(** :ref:`RID` particles_collision, :ref:`float` setrngth **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_collision_set_box_extents` **(** :ref:`RID` particles_collision, :ref:`Vector3` extents **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_collision_set_collision_type` **(** :ref:`RID` particles_collision, :ref:`ParticlesCollisionType` type **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_collision_set_cull_mask` **(** :ref:`RID` particles_collision, :ref:`int` mask **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_collision_set_field_texture` **(** :ref:`RID` particles_collision, :ref:`RID` texture **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_collision_set_height_field_resolution` **(** :ref:`RID` particles_collision, :ref:`ParticlesCollisionHeightfieldResolution` resolution **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_collision_set_sphere_radius` **(** :ref:`RID` particles_collision, :ref:`float` radius **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`particles_create` **(** **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_emit` **(** :ref:`RID` particles, :ref:`Transform3D` transform, :ref:`Vector3` velocity, :ref:`Color` color, :ref:`Color` custom, :ref:`int` emit_flags **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`AABB` | :ref:`particles_get_current_aabb` **(** :ref:`RID` particles **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`particles_get_emitting` **(** :ref:`RID` particles **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`particles_is_inactive` **(** :ref:`RID` particles **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_request_process` **(** :ref:`RID` particles **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_restart` **(** :ref:`RID` particles **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_set_amount` **(** :ref:`RID` particles, :ref:`int` amount **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_set_collision_base_size` **(** :ref:`RID` particles, :ref:`float` size **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_set_custom_aabb` **(** :ref:`RID` particles, :ref:`AABB` aabb **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_set_draw_order` **(** :ref:`RID` particles, :ref:`ParticlesDrawOrder` order **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_set_draw_pass_mesh` **(** :ref:`RID` particles, :ref:`int` pass, :ref:`RID` mesh **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_set_draw_passes` **(** :ref:`RID` particles, :ref:`int` count **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_set_emission_transform` **(** :ref:`RID` particles, :ref:`Transform3D` transform **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_set_emitting` **(** :ref:`RID` particles, :ref:`bool` emitting **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_set_explosiveness_ratio` **(** :ref:`RID` particles, :ref:`float` ratio **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_set_fixed_fps` **(** :ref:`RID` particles, :ref:`int` fps **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_set_fractional_delta` **(** :ref:`RID` particles, :ref:`bool` enable **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_set_interpolate` **(** :ref:`RID` particles, :ref:`bool` enable **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_set_lifetime` **(** :ref:`RID` particles, :ref:`float` lifetime **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_set_mode` **(** :ref:`RID` particles, :ref:`ParticlesMode` mode **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_set_one_shot` **(** :ref:`RID` particles, :ref:`bool` one_shot **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_set_pre_process_time` **(** :ref:`RID` particles, :ref:`float` time **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_set_process_material` **(** :ref:`RID` particles, :ref:`RID` material **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_set_randomness_ratio` **(** :ref:`RID` particles, :ref:`float` ratio **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_set_speed_scale` **(** :ref:`RID` particles, :ref:`float` scale **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_set_subemitter` **(** :ref:`RID` particles, :ref:`RID` subemitter_particles **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_set_trail_bind_poses` **(** :ref:`RID` particles, :ref:`Transform3D[]` bind_poses **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_set_trails` **(** :ref:`RID` particles, :ref:`bool` enable, :ref:`float` length_sec **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_set_transform_align` **(** :ref:`RID` particles, :ref:`ParticlesTransformAlign` align **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_set_use_local_coordinates` **(** :ref:`RID` particles, :ref:`bool` enable **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`positional_soft_shadow_filter_set_quality` **(** :ref:`ShadowQuality` quality **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`reflection_probe_create` **(** **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`reflection_probe_set_ambient_color` **(** :ref:`RID` probe, :ref:`Color` color **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`reflection_probe_set_ambient_energy` **(** :ref:`RID` probe, :ref:`float` energy **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`reflection_probe_set_ambient_mode` **(** :ref:`RID` probe, :ref:`ReflectionProbeAmbientMode` mode **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`reflection_probe_set_as_interior` **(** :ref:`RID` probe, :ref:`bool` enable **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`reflection_probe_set_cull_mask` **(** :ref:`RID` probe, :ref:`int` layers **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`reflection_probe_set_enable_box_projection` **(** :ref:`RID` probe, :ref:`bool` enable **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`reflection_probe_set_enable_shadows` **(** :ref:`RID` probe, :ref:`bool` enable **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`reflection_probe_set_extents` **(** :ref:`RID` probe, :ref:`Vector3` extents **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`reflection_probe_set_intensity` **(** :ref:`RID` probe, :ref:`float` intensity **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`reflection_probe_set_max_distance` **(** :ref:`RID` probe, :ref:`float` distance **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`reflection_probe_set_mesh_lod_threshold` **(** :ref:`RID` probe, :ref:`float` pixels **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`reflection_probe_set_origin_offset` **(** :ref:`RID` probe, :ref:`Vector3` offset **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`reflection_probe_set_resolution` **(** :ref:`RID` probe, :ref:`int` resolution **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`reflection_probe_set_update_mode` **(** :ref:`RID` probe, :ref:`ReflectionProbeUpdateMode` mode **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`request_frame_drawn_callback` **(** :ref:`Callable` callable **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`scenario_create` **(** **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`scenario_set_camera_effects` **(** :ref:`RID` scenario, :ref:`RID` effects **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`scenario_set_environment` **(** :ref:`RID` scenario, :ref:`RID` environment **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`scenario_set_fallback_environment` **(** :ref:`RID` scenario, :ref:`RID` environment **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`screen_space_roughness_limiter_set_active` **(** :ref:`bool` enable, :ref:`float` amount, :ref:`float` limit **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_boot_image` **(** :ref:`Image` image, :ref:`Color` color, :ref:`bool` scale, :ref:`bool` use_filter=true **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_debug_generate_wireframes` **(** :ref:`bool` generate **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_default_clear_color` **(** :ref:`Color` color **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`shader_create` **(** **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`shader_get_code` **(** :ref:`RID` shader **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`shader_get_default_texture_param` **(** :ref:`RID` shader, :ref:`StringName` param, :ref:`int` index=0 **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`shader_get_param_default` **(** :ref:`RID` shader, :ref:`StringName` param **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary[]` | :ref:`shader_get_shader_uniform_list` **(** :ref:`RID` shader **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`shader_set_code` **(** :ref:`RID` shader, :ref:`String` code **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`shader_set_default_texture_param` **(** :ref:`RID` shader, :ref:`StringName` param, :ref:`RID` texture, :ref:`int` index=0 **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`shader_set_path_hint` **(** :ref:`RID` shader, :ref:`String` path **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`skeleton_allocate_data` **(** :ref:`RID` skeleton, :ref:`int` bones, :ref:`bool` is_2d_skeleton=false **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform3D` | :ref:`skeleton_bone_get_transform` **(** :ref:`RID` skeleton, :ref:`int` bone **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform2D` | :ref:`skeleton_bone_get_transform_2d` **(** :ref:`RID` skeleton, :ref:`int` bone **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`skeleton_bone_set_transform` **(** :ref:`RID` skeleton, :ref:`int` bone, :ref:`Transform3D` transform **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`skeleton_bone_set_transform_2d` **(** :ref:`RID` skeleton, :ref:`int` bone, :ref:`Transform2D` transform **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`skeleton_create` **(** **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`skeleton_get_bone_count` **(** :ref:`RID` skeleton **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`skeleton_set_base_transform_2d` **(** :ref:`RID` skeleton, :ref:`Transform2D` base_transform **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Image` | :ref:`sky_bake_panorama` **(** :ref:`RID` sky, :ref:`float` energy, :ref:`bool` bake_irradiance, :ref:`Vector2i` size **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`sky_create` **(** **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`sky_set_material` **(** :ref:`RID` sky, :ref:`RID` material **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`sky_set_mode` **(** :ref:`RID` sky, :ref:`SkyMode` mode **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`sky_set_radiance_size` **(** :ref:`RID` sky, :ref:`int` radiance_size **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`spot_light_create` **(** **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`sub_surface_scattering_set_quality` **(** :ref:`SubSurfaceScatteringQuality` quality **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`sub_surface_scattering_set_scale` **(** :ref:`float` scale, :ref:`float` depth_scale **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`texture_2d_create` **(** :ref:`Image` image **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Image` | :ref:`texture_2d_get` **(** :ref:`RID` texture **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Image` | :ref:`texture_2d_layer_get` **(** :ref:`RID` texture, :ref:`int` layer **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`texture_2d_layered_create` **(** :ref:`Image[]` layers, :ref:`TextureLayeredType` layered_type **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`texture_2d_layered_placeholder_create` **(** :ref:`TextureLayeredType` layered_type **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`texture_2d_placeholder_create` **(** **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`texture_2d_update` **(** :ref:`RID` texture, :ref:`Image` image, :ref:`int` layer **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`texture_3d_create` **(** :ref:`Format` format, :ref:`int` width, :ref:`int` height, :ref:`int` depth, :ref:`bool` mipmaps, :ref:`Image[]` data **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Image[]` | :ref:`texture_3d_get` **(** :ref:`RID` texture **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`texture_3d_placeholder_create` **(** **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`texture_3d_update` **(** :ref:`RID` texture, :ref:`Image[]` data **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`texture_get_path` **(** :ref:`RID` texture **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`texture_proxy_create` **(** :ref:`RID` base **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`texture_proxy_update` **(** :ref:`RID` texture, :ref:`RID` proxy_to **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`texture_replace` **(** :ref:`RID` texture, :ref:`RID` by_texture **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`texture_set_force_redraw_if_visible` **(** :ref:`RID` texture, :ref:`bool` enable **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`texture_set_path` **(** :ref:`RID` texture, :ref:`String` path **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`texture_set_size_override` **(** :ref:`RID` texture, :ref:`int` width, :ref:`int` height **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_attach_camera` **(** :ref:`RID` viewport, :ref:`RID` camera **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_attach_canvas` **(** :ref:`RID` viewport, :ref:`RID` canvas **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_attach_to_screen` **(** :ref:`RID` viewport, :ref:`Rect2` rect=Rect2(0, 0, 0, 0), :ref:`int` screen=0 **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`viewport_create` **(** **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`viewport_get_measured_render_time_cpu` **(** :ref:`RID` viewport **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`viewport_get_measured_render_time_gpu` **(** :ref:`RID` viewport **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`viewport_get_render_info` **(** :ref:`RID` viewport, :ref:`ViewportRenderInfoType` type, :ref:`ViewportRenderInfo` info **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`viewport_get_texture` **(** :ref:`RID` viewport **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_remove_canvas` **(** :ref:`RID` viewport, :ref:`RID` canvas **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_active` **(** :ref:`RID` viewport, :ref:`bool` active **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_canvas_stacking` **(** :ref:`RID` viewport, :ref:`RID` canvas, :ref:`int` layer, :ref:`int` sublayer **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_canvas_transform` **(** :ref:`RID` viewport, :ref:`RID` canvas, :ref:`Transform2D` offset **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_clear_mode` **(** :ref:`RID` viewport, :ref:`ViewportClearMode` clear_mode **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_debug_draw` **(** :ref:`RID` viewport, :ref:`ViewportDebugDraw` draw **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_default_canvas_item_texture_filter` **(** :ref:`RID` viewport, :ref:`CanvasItemTextureFilter` filter **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_default_canvas_item_texture_repeat` **(** :ref:`RID` viewport, :ref:`CanvasItemTextureRepeat` repeat **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_disable_2d` **(** :ref:`RID` viewport, :ref:`bool` disable **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_disable_3d` **(** :ref:`RID` viewport, :ref:`bool` disable **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_disable_environment` **(** :ref:`RID` viewport, :ref:`bool` disabled **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_fsr_sharpness` **(** :ref:`RID` viewport, :ref:`float` sharpness **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_global_canvas_transform` **(** :ref:`RID` viewport, :ref:`Transform2D` transform **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_measure_render_time` **(** :ref:`RID` viewport, :ref:`bool` enable **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_msaa_2d` **(** :ref:`RID` viewport, :ref:`ViewportMSAA` msaa **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_msaa_3d` **(** :ref:`RID` viewport, :ref:`ViewportMSAA` msaa **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_occlusion_culling_build_quality` **(** :ref:`ViewportOcclusionCullingBuildQuality` quality **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_occlusion_rays_per_thread` **(** :ref:`int` rays_per_thread **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_parent_viewport` **(** :ref:`RID` viewport, :ref:`RID` parent_viewport **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_positional_shadow_atlas_quadrant_subdivision` **(** :ref:`RID` viewport, :ref:`int` quadrant, :ref:`int` subdivision **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_positional_shadow_atlas_size` **(** :ref:`RID` viewport, :ref:`int` size, :ref:`bool` use_16_bits=false **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_render_direct_to_screen` **(** :ref:`RID` viewport, :ref:`bool` enabled **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_scaling_3d_mode` **(** :ref:`RID` viewport, :ref:`ViewportScaling3DMode` scaling_3d_mode **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_scaling_3d_scale` **(** :ref:`RID` viewport, :ref:`float` scale **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_scenario` **(** :ref:`RID` viewport, :ref:`RID` scenario **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_screen_space_aa` **(** :ref:`RID` viewport, :ref:`ViewportScreenSpaceAA` mode **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_sdf_oversize_and_scale` **(** :ref:`RID` viewport, :ref:`ViewportSDFOversize` oversize, :ref:`ViewportSDFScale` scale **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_size` **(** :ref:`RID` viewport, :ref:`int` width, :ref:`int` height **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_snap_2d_transforms_to_pixel` **(** :ref:`RID` viewport, :ref:`bool` enabled **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_snap_2d_vertices_to_pixel` **(** :ref:`RID` viewport, :ref:`bool` enabled **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_texture_mipmap_bias` **(** :ref:`RID` viewport, :ref:`float` mipmap_bias **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_transparent_background` **(** :ref:`RID` viewport, :ref:`bool` enabled **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_update_mode` **(** :ref:`RID` viewport, :ref:`ViewportUpdateMode` update_mode **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_use_debanding` **(** :ref:`RID` viewport, :ref:`bool` enable **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_use_occlusion_culling` **(** :ref:`RID` viewport, :ref:`bool` enable **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_use_taa` **(** :ref:`RID` viewport, :ref:`bool` enable **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_use_xr` **(** :ref:`RID` viewport, :ref:`bool` use_xr **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_vrs_mode` **(** :ref:`RID` viewport, :ref:`ViewportVRSMode` mode **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_vrs_texture` **(** :ref:`RID` viewport, :ref:`RID` texture **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`visibility_notifier_create` **(** **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`visibility_notifier_set_aabb` **(** :ref:`RID` notifier, :ref:`AABB` aabb **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`visibility_notifier_set_callbacks` **(** :ref:`RID` notifier, :ref:`Callable` enter_callable, :ref:`Callable` exit_callable **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`voxel_gi_allocate_data` **(** :ref:`RID` voxel_gi, :ref:`Transform3D` to_cell_xform, :ref:`AABB` aabb, :ref:`Vector3i` octree_size, :ref:`PackedByteArray` octree_cells, :ref:`PackedByteArray` data_cells, :ref:`PackedByteArray` distance_field, :ref:`PackedInt32Array` level_counts **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`voxel_gi_create` **(** **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedByteArray` | :ref:`voxel_gi_get_data_cells` **(** :ref:`RID` voxel_gi **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedByteArray` | :ref:`voxel_gi_get_distance_field` **(** :ref:`RID` voxel_gi **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedInt32Array` | :ref:`voxel_gi_get_level_counts` **(** :ref:`RID` voxel_gi **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedByteArray` | :ref:`voxel_gi_get_octree_cells` **(** :ref:`RID` voxel_gi **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3i` | :ref:`voxel_gi_get_octree_size` **(** :ref:`RID` voxel_gi **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform3D` | :ref:`voxel_gi_get_to_cell_xform` **(** :ref:`RID` voxel_gi **)** |const| | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`voxel_gi_set_bias` **(** :ref:`RID` voxel_gi, :ref:`float` bias **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`voxel_gi_set_dynamic_range` **(** :ref:`RID` voxel_gi, :ref:`float` range **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`voxel_gi_set_energy` **(** :ref:`RID` voxel_gi, :ref:`float` energy **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`voxel_gi_set_interior` **(** :ref:`RID` voxel_gi, :ref:`bool` enable **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`voxel_gi_set_normal_bias` **(** :ref:`RID` voxel_gi, :ref:`float` bias **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`voxel_gi_set_propagation` **(** :ref:`RID` voxel_gi, :ref:`float` amount **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`voxel_gi_set_quality` **(** :ref:`VoxelGIQuality` quality **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`voxel_gi_set_use_two_bounces` **(** :ref:`RID` voxel_gi, :ref:`bool` enable **)** | ++------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- @@ -1314,25 +1318,29 @@ enum **MultimeshTransformFormat**: .. _class_RenderingServer_constant_LIGHT_PROJECTOR_FILTER_NEAREST: -.. _class_RenderingServer_constant_LIGHT_PROJECTOR_FILTER_NEAREST_MIPMAPS: - .. _class_RenderingServer_constant_LIGHT_PROJECTOR_FILTER_LINEAR: +.. _class_RenderingServer_constant_LIGHT_PROJECTOR_FILTER_NEAREST_MIPMAPS: + .. _class_RenderingServer_constant_LIGHT_PROJECTOR_FILTER_LINEAR_MIPMAPS: +.. _class_RenderingServer_constant_LIGHT_PROJECTOR_FILTER_NEAREST_MIPMAPS_ANISOTROPIC: + .. _class_RenderingServer_constant_LIGHT_PROJECTOR_FILTER_LINEAR_MIPMAPS_ANISOTROPIC: enum **LightProjectorFilter**: -- **LIGHT_PROJECTOR_FILTER_NEAREST** = **0** +- **LIGHT_PROJECTOR_FILTER_NEAREST** = **0** --- Nearest-neighbor filter for light projectors (use for pixel art light projectors). No mipmaps are used for rendering, which means light projectors at a distance will look sharp but grainy. This has roughly the same performance cost as using mipmaps. -- **LIGHT_PROJECTOR_FILTER_NEAREST_MIPMAPS** = **1** +- **LIGHT_PROJECTOR_FILTER_LINEAR** = **1** --- Linear filter for light projectors (use for non-pixel art light projectors). No mipmaps are used for rendering, which means light projectors at a distance will look smooth but blurry. This has roughly the same performance cost as using mipmaps. -- **LIGHT_PROJECTOR_FILTER_LINEAR** = **2** +- **LIGHT_PROJECTOR_FILTER_NEAREST_MIPMAPS** = **2** --- Nearest-neighbor filter for light projectors (use for pixel art light projectors). Isotropic mipmaps are used for rendering, which means light projectors at a distance will look smooth but blurry. This has roughly the same performance cost as not using mipmaps. -- **LIGHT_PROJECTOR_FILTER_LINEAR_MIPMAPS** = **3** +- **LIGHT_PROJECTOR_FILTER_LINEAR_MIPMAPS** = **3** --- Linear filter for light projectors (use for non-pixel art light projectors). Isotropic mipmaps are used for rendering, which means light projectors at a distance will look smooth but blurry. This has roughly the same performance cost as not using mipmaps. -- **LIGHT_PROJECTOR_FILTER_LINEAR_MIPMAPS_ANISOTROPIC** = **4** +- **LIGHT_PROJECTOR_FILTER_NEAREST_MIPMAPS_ANISOTROPIC** = **4** --- Nearest-neighbor filter for light projectors (use for pixel art light projectors). Anisotropic mipmaps are used for rendering, which means light projectors at a distance will look smooth and sharp when viewed from oblique angles. This looks better compared to isotropic mipmaps, but is slower. The level of anisotropic filtering is defined by :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. + +- **LIGHT_PROJECTOR_FILTER_LINEAR_MIPMAPS_ANISOTROPIC** = **5** --- Linear filter for light projectors (use for non-pixel art light projectors). Anisotropic mipmaps are used for rendering, which means light projectors at a distance will look smooth and sharp when viewed from oblique angles. This looks better compared to isotropic mipmaps, but is slower. The level of anisotropic filtering is defined by :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. ---- @@ -1360,6 +1368,8 @@ enum **LightType**: .. _class_RenderingServer_constant_LIGHT_PARAM_INDIRECT_ENERGY: +.. _class_RenderingServer_constant_LIGHT_PARAM_VOLUMETRIC_FOG_ENERGY: + .. _class_RenderingServer_constant_LIGHT_PARAM_SPECULAR: .. _class_RenderingServer_constant_LIGHT_PARAM_RANGE: @@ -1388,9 +1398,9 @@ enum **LightType**: .. _class_RenderingServer_constant_LIGHT_PARAM_SHADOW_PANCAKE_SIZE: -.. _class_RenderingServer_constant_LIGHT_PARAM_SHADOW_BLUR: +.. _class_RenderingServer_constant_LIGHT_PARAM_SHADOW_OPACITY: -.. _class_RenderingServer_constant_LIGHT_PARAM_SHADOW_VOLUMETRIC_FOG_FADE: +.. _class_RenderingServer_constant_LIGHT_PARAM_SHADOW_BLUR: .. _class_RenderingServer_constant_LIGHT_PARAM_TRANSMITTANCE_BIAS: @@ -1398,45 +1408,47 @@ enum **LightType**: enum **LightParam**: -- **LIGHT_PARAM_ENERGY** = **0** --- The light's energy. +- **LIGHT_PARAM_ENERGY** = **0** --- The light's energy multiplier. -- **LIGHT_PARAM_INDIRECT_ENERGY** = **1** +- **LIGHT_PARAM_INDIRECT_ENERGY** = **1** --- The light's indirect energy multiplier (final indirect energy is :ref:`LIGHT_PARAM_ENERGY` \* :ref:`LIGHT_PARAM_INDIRECT_ENERGY`). -- **LIGHT_PARAM_SPECULAR** = **2** --- The light's influence on specularity. +- **LIGHT_PARAM_VOLUMETRIC_FOG_ENERGY** = **2** --- The light's volumetric fog energy multiplier (final volumetric fog energy is :ref:`LIGHT_PARAM_ENERGY` \* :ref:`LIGHT_PARAM_VOLUMETRIC_FOG_ENERGY`). -- **LIGHT_PARAM_RANGE** = **3** --- The light's range. +- **LIGHT_PARAM_SPECULAR** = **3** --- The light's influence on specularity. -- **LIGHT_PARAM_SIZE** = **4** --- The size of the light when using spot light or omni light. The angular size of the light when using directional light. +- **LIGHT_PARAM_RANGE** = **4** --- The light's range. -- **LIGHT_PARAM_ATTENUATION** = **5** --- The light's attenuation. +- **LIGHT_PARAM_SIZE** = **5** --- The size of the light when using spot light or omni light. The angular size of the light when using directional light. -- **LIGHT_PARAM_SPOT_ANGLE** = **6** --- The spotlight's angle. +- **LIGHT_PARAM_ATTENUATION** = **6** --- The light's attenuation. -- **LIGHT_PARAM_SPOT_ATTENUATION** = **7** --- The spotlight's attenuation. +- **LIGHT_PARAM_SPOT_ANGLE** = **7** --- The spotlight's angle. -- **LIGHT_PARAM_SHADOW_MAX_DISTANCE** = **8** --- Max distance that shadows will be rendered. +- **LIGHT_PARAM_SPOT_ATTENUATION** = **8** --- The spotlight's attenuation. -- **LIGHT_PARAM_SHADOW_SPLIT_1_OFFSET** = **9** --- Proportion of shadow atlas occupied by the first split. +- **LIGHT_PARAM_SHADOW_MAX_DISTANCE** = **9** --- Max distance that shadows will be rendered. -- **LIGHT_PARAM_SHADOW_SPLIT_2_OFFSET** = **10** --- Proportion of shadow atlas occupied by the second split. +- **LIGHT_PARAM_SHADOW_SPLIT_1_OFFSET** = **10** --- Proportion of shadow atlas occupied by the first split. -- **LIGHT_PARAM_SHADOW_SPLIT_3_OFFSET** = **11** --- Proportion of shadow atlas occupied by the third split. The fourth split occupies the rest. +- **LIGHT_PARAM_SHADOW_SPLIT_2_OFFSET** = **11** --- Proportion of shadow atlas occupied by the second split. -- **LIGHT_PARAM_SHADOW_FADE_START** = **12** --- Proportion of shadow max distance where the shadow will start to fade out. +- **LIGHT_PARAM_SHADOW_SPLIT_3_OFFSET** = **12** --- Proportion of shadow atlas occupied by the third split. The fourth split occupies the rest. -- **LIGHT_PARAM_SHADOW_NORMAL_BIAS** = **13** --- Normal bias used to offset shadow lookup by object normal. Can be used to fix self-shadowing artifacts. +- **LIGHT_PARAM_SHADOW_FADE_START** = **13** --- Proportion of shadow max distance where the shadow will start to fade out. -- **LIGHT_PARAM_SHADOW_BIAS** = **14** --- Bias the shadow lookup to fix self-shadowing artifacts. +- **LIGHT_PARAM_SHADOW_NORMAL_BIAS** = **14** --- Normal bias used to offset shadow lookup by object normal. Can be used to fix self-shadowing artifacts. -- **LIGHT_PARAM_SHADOW_PANCAKE_SIZE** = **15** --- Sets the size of the directional shadow pancake. The pancake offsets the start of the shadow's camera frustum to provide a higher effective depth resolution for the shadow. However, a high pancake size can cause artifacts in the shadows of large objects that are close to the edge of the frustum. Reducing the pancake size can help. Setting the size to ``0`` turns off the pancaking effect. +- **LIGHT_PARAM_SHADOW_BIAS** = **15** --- Bias the shadow lookup to fix self-shadowing artifacts. -- **LIGHT_PARAM_SHADOW_BLUR** = **16** --- Blurs the edges of the shadow. Can be used to hide pixel artifacts in low resolution shadow maps. A high value can make shadows appear grainy and can cause other unwanted artifacts. Try to keep as near default as possible. +- **LIGHT_PARAM_SHADOW_PANCAKE_SIZE** = **16** --- Sets the size of the directional shadow pancake. The pancake offsets the start of the shadow's camera frustum to provide a higher effective depth resolution for the shadow. However, a high pancake size can cause artifacts in the shadows of large objects that are close to the edge of the frustum. Reducing the pancake size can help. Setting the size to ``0`` turns off the pancaking effect. -- **LIGHT_PARAM_SHADOW_VOLUMETRIC_FOG_FADE** = **17** +- **LIGHT_PARAM_SHADOW_OPACITY** = **17** --- The light's shadow opacity. Values lower than ``1.0`` make the light appear through shadows. This can be used to fake global illumination at a low performance cost. -- **LIGHT_PARAM_TRANSMITTANCE_BIAS** = **18** +- **LIGHT_PARAM_SHADOW_BLUR** = **18** --- Blurs the edges of the shadow. Can be used to hide pixel artifacts in low resolution shadow maps. A high value can make shadows appear grainy and can cause other unwanted artifacts. Try to keep as near default as possible. -- **LIGHT_PARAM_MAX** = **19** --- Represents the size of the :ref:`LightParam` enum. +- **LIGHT_PARAM_TRANSMITTANCE_BIAS** = **19** + +- **LIGHT_PARAM_MAX** = **20** --- Represents the size of the :ref:`LightParam` enum. ---- @@ -1606,25 +1618,29 @@ enum **DecalTexture**: .. _class_RenderingServer_constant_DECAL_FILTER_NEAREST: -.. _class_RenderingServer_constant_DECAL_FILTER_NEAREST_MIPMAPS: - .. _class_RenderingServer_constant_DECAL_FILTER_LINEAR: +.. _class_RenderingServer_constant_DECAL_FILTER_NEAREST_MIPMAPS: + .. _class_RenderingServer_constant_DECAL_FILTER_LINEAR_MIPMAPS: +.. _class_RenderingServer_constant_DECAL_FILTER_NEAREST_MIPMAPS_ANISOTROPIC: + .. _class_RenderingServer_constant_DECAL_FILTER_LINEAR_MIPMAPS_ANISOTROPIC: enum **DecalFilter**: -- **DECAL_FILTER_NEAREST** = **0** +- **DECAL_FILTER_NEAREST** = **0** --- Nearest-neighbor filter for decals (use for pixel art decals). No mipmaps are used for rendering, which means decals at a distance will look sharp but grainy. This has roughly the same performance cost as using mipmaps. -- **DECAL_FILTER_NEAREST_MIPMAPS** = **1** +- **DECAL_FILTER_LINEAR** = **1** --- Linear filter for decals (use for non-pixel art decals). No mipmaps are used for rendering, which means decals at a distance will look smooth but blurry. This has roughly the same performance cost as using mipmaps. -- **DECAL_FILTER_LINEAR** = **2** +- **DECAL_FILTER_NEAREST_MIPMAPS** = **2** --- Nearest-neighbor filter for decals (use for pixel art decals). Isotropic mipmaps are used for rendering, which means decals at a distance will look smooth but blurry. This has roughly the same performance cost as not using mipmaps. -- **DECAL_FILTER_LINEAR_MIPMAPS** = **3** +- **DECAL_FILTER_LINEAR_MIPMAPS** = **3** --- Linear filter for decals (use for non-pixel art decals). Isotropic mipmaps are used for rendering, which means decals at a distance will look smooth but blurry. This has roughly the same performance cost as not using mipmaps. -- **DECAL_FILTER_LINEAR_MIPMAPS_ANISOTROPIC** = **4** +- **DECAL_FILTER_NEAREST_MIPMAPS_ANISOTROPIC** = **4** --- Nearest-neighbor filter for decals (use for pixel art decals). Anisotropic mipmaps are used for rendering, which means decals at a distance will look smooth and sharp when viewed from oblique angles. This looks better compared to isotropic mipmaps, but is slower. The level of anisotropic filtering is defined by :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. + +- **DECAL_FILTER_LINEAR_MIPMAPS_ANISOTROPIC** = **5** --- Linear filter for decals (use for non-pixel art decals). Anisotropic mipmaps are used for rendering, which means decals at a distance will look smooth and sharp when viewed from oblique angles. This looks better compared to isotropic mipmaps, but is slower. The level of anisotropic filtering is defined by :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. ---- @@ -2892,7 +2908,7 @@ enum **CanvasOccluderPolygonCullMode**: ---- -.. _enum_RenderingServer_GlobalVariableType: +.. _enum_RenderingServer_GlobalShaderUniformType: .. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_BOOL: @@ -2952,7 +2968,7 @@ enum **CanvasOccluderPolygonCullMode**: .. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_MAX: -enum **GlobalVariableType**: +enum **GlobalShaderUniformType**: - **GLOBAL_VAR_TYPE_BOOL** = **0** @@ -3275,6 +3291,12 @@ Subsequent drawing commands will be ignored unless they fall within the specifie ---- +.. _class_RenderingServer_method_canvas_item_add_lcd_texture_rect_region: + +- void **canvas_item_add_lcd_texture_rect_region** **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`RID` texture, :ref:`Rect2` src_rect, :ref:`Color` modulate **)** + +---- + .. _class_RenderingServer_method_canvas_item_add_line: - void **canvas_item_add_line** **(** :ref:`RID` item, :ref:`Vector2` from, :ref:`Vector2` to, :ref:`Color` color, :ref:`float` width=1.0, :ref:`bool` antialiased=false **)** @@ -4245,45 +4267,45 @@ If ``half_resolution`` is ``true``, renders :ref:`VoxelGI` and SD ---- -.. _class_RenderingServer_method_global_variable_add: +.. _class_RenderingServer_method_global_shader_uniform_add: -- void **global_variable_add** **(** :ref:`StringName` name, :ref:`GlobalVariableType` type, :ref:`Variant` default_value **)** +- void **global_shader_uniform_add** **(** :ref:`StringName` name, :ref:`GlobalShaderUniformType` type, :ref:`Variant` default_value **)** ---- -.. _class_RenderingServer_method_global_variable_get: +.. _class_RenderingServer_method_global_shader_uniform_get: -- :ref:`Variant` **global_variable_get** **(** :ref:`StringName` name **)** |const| +- :ref:`Variant` **global_shader_uniform_get** **(** :ref:`StringName` name **)** |const| ---- -.. _class_RenderingServer_method_global_variable_get_list: +.. _class_RenderingServer_method_global_shader_uniform_get_list: -- :ref:`PackedStringArray` **global_variable_get_list** **(** **)** |const| +- :ref:`PackedStringArray` **global_shader_uniform_get_list** **(** **)** |const| ---- -.. _class_RenderingServer_method_global_variable_get_type: +.. _class_RenderingServer_method_global_shader_uniform_get_type: -- :ref:`GlobalVariableType` **global_variable_get_type** **(** :ref:`StringName` name **)** |const| +- :ref:`GlobalShaderUniformType` **global_shader_uniform_get_type** **(** :ref:`StringName` name **)** |const| ---- -.. _class_RenderingServer_method_global_variable_remove: +.. _class_RenderingServer_method_global_shader_uniform_remove: -- void **global_variable_remove** **(** :ref:`StringName` name **)** +- void **global_shader_uniform_remove** **(** :ref:`StringName` name **)** ---- -.. _class_RenderingServer_method_global_variable_set: +.. _class_RenderingServer_method_global_shader_uniform_set: -- void **global_variable_set** **(** :ref:`StringName` name, :ref:`Variant` value **)** +- void **global_shader_uniform_set** **(** :ref:`StringName` name, :ref:`Variant` value **)** ---- -.. _class_RenderingServer_method_global_variable_set_override: +.. _class_RenderingServer_method_global_shader_uniform_set_override: -- void **global_variable_set_override** **(** :ref:`StringName` name, :ref:`Variant` value **)** +- void **global_shader_uniform_set_override** **(** :ref:`StringName` name, :ref:`Variant` value **)** ---- @@ -4307,7 +4329,7 @@ Not yet implemented. Always returns ``false``. - :ref:`bool` **has_os_feature** **(** :ref:`String` feature **)** |const| -Returns ``true`` if the OS supports a certain feature. Features might be ``s3tc``, ``etc``, and ``etc2``. +Returns ``true`` if the OS supports a certain ``feature``. Features might be ``s3tc``, ``etc``, and ``etc2``. ---- @@ -4349,21 +4371,21 @@ Once finished with your RID, you will want to free the RID using the RenderingSe ---- -.. _class_RenderingServer_method_instance_geometry_get_shader_parameter: +.. _class_RenderingServer_method_instance_geometry_get_shader_uniform: -- :ref:`Variant` **instance_geometry_get_shader_parameter** **(** :ref:`RID` instance, :ref:`StringName` parameter **)** |const| +- :ref:`Variant` **instance_geometry_get_shader_uniform** **(** :ref:`RID` instance, :ref:`StringName` parameter **)** |const| ---- -.. _class_RenderingServer_method_instance_geometry_get_shader_parameter_default_value: +.. _class_RenderingServer_method_instance_geometry_get_shader_uniform_default_value: -- :ref:`Variant` **instance_geometry_get_shader_parameter_default_value** **(** :ref:`RID` instance, :ref:`StringName` parameter **)** |const| +- :ref:`Variant` **instance_geometry_get_shader_uniform_default_value** **(** :ref:`RID` instance, :ref:`StringName` parameter **)** |const| ---- -.. _class_RenderingServer_method_instance_geometry_get_shader_parameter_list: +.. _class_RenderingServer_method_instance_geometry_get_shader_uniform_list: -- :ref:`Array` **instance_geometry_get_shader_parameter_list** **(** :ref:`RID` instance **)** |const| +- :ref:`Dictionary[]` **instance_geometry_get_shader_uniform_list** **(** :ref:`RID` instance **)** |const| ---- @@ -4411,9 +4433,9 @@ Sets a material that will override the material for all surfaces on the mesh ass ---- -.. _class_RenderingServer_method_instance_geometry_set_shader_parameter: +.. _class_RenderingServer_method_instance_geometry_set_shader_uniform: -- void **instance_geometry_set_shader_parameter** **(** :ref:`RID` instance, :ref:`StringName` parameter, :ref:`Variant` value **)** +- void **instance_geometry_set_shader_uniform** **(** :ref:`RID` instance, :ref:`StringName` parameter, :ref:`Variant` value **)** ---- @@ -4527,7 +4549,7 @@ Sets whether an instance is drawn or not. Equivalent to :ref:`Node3D.visible` **instances_cull_aabb** **(** :ref:`AABB` aabb, :ref:`RID` scenario **)** |const| +- :ref:`PackedInt64Array` **instances_cull_aabb** **(** :ref:`AABB` aabb, :ref:`RID` scenario **)** |const| Returns an array of object IDs intersecting with the provided AABB. Only visual 3D nodes are considered, such as :ref:`MeshInstance3D` or :ref:`DirectionalLight3D`. Use :ref:`@GlobalScope.instance_from_id` to obtain the actual nodes. A scenario RID must be provided, which is available in the :ref:`World3D` you want to query. This forces an update for all resources queued to update. @@ -4537,7 +4559,7 @@ Returns an array of object IDs intersecting with the provided AABB. Only visual .. _class_RenderingServer_method_instances_cull_convex: -- :ref:`Array` **instances_cull_convex** **(** :ref:`Array` convex, :ref:`RID` scenario **)** |const| +- :ref:`PackedInt64Array` **instances_cull_convex** **(** :ref:`Array` convex, :ref:`RID` scenario **)** |const| Returns an array of object IDs intersecting with the provided convex shape. Only visual 3D nodes are considered, such as :ref:`MeshInstance3D` or :ref:`DirectionalLight3D`. Use :ref:`@GlobalScope.instance_from_id` to obtain the actual nodes. A scenario RID must be provided, which is available in the :ref:`World3D` you want to query. This forces an update for all resources queued to update. @@ -4547,7 +4569,7 @@ Returns an array of object IDs intersecting with the provided convex shape. Only .. _class_RenderingServer_method_instances_cull_ray: -- :ref:`Array` **instances_cull_ray** **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`RID` scenario **)** |const| +- :ref:`PackedInt64Array` **instances_cull_ray** **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`RID` scenario **)** |const| Returns an array of object IDs intersecting with the provided 3D ray. Only visual 3D nodes are considered, such as :ref:`MeshInstance3D` or :ref:`DirectionalLight3D`. Use :ref:`@GlobalScope.instance_from_id` to obtain the actual nodes. A scenario RID must be provided, which is available in the :ref:`World3D` you want to query. This forces an update for all resources queued to update. @@ -4733,7 +4755,7 @@ If ``true``, light will cast shadows. Equivalent to :ref:`Light3D.shadow_enabled - :ref:`RID` **make_sphere_mesh** **(** :ref:`int` latitudes, :ref:`int` longitudes, :ref:`float` radius **)** -Returns a mesh of a sphere with the given amount of horizontal and vertical subdivisions. +Returns a mesh of a sphere with the given number of horizontal and vertical subdivisions. ---- @@ -4895,7 +4917,7 @@ Returns a mesh's surface's buffer arrays. .. _class_RenderingServer_method_mesh_surface_get_blend_shape_arrays: -- :ref:`Array` **mesh_surface_get_blend_shape_arrays** **(** :ref:`RID` mesh, :ref:`int` surface **)** |const| +- :ref:`Array[]` **mesh_surface_get_blend_shape_arrays** **(** :ref:`RID` mesh, :ref:`int` surface **)** |const| Returns a mesh's surface's arrays for blend shapes. @@ -5655,9 +5677,9 @@ Returns a default texture from a shader searched by name. ---- -.. _class_RenderingServer_method_shader_get_param_list: +.. _class_RenderingServer_method_shader_get_shader_uniform_list: -- :ref:`Dictionary[]` **shader_get_param_list** **(** :ref:`RID` shader **)** |const| +- :ref:`Dictionary[]` **shader_get_shader_uniform_list** **(** :ref:`RID` shader **)** |const| Returns the parameters of a shader. @@ -6014,7 +6036,7 @@ If ``true``, sets the viewport active, else sets it inactive. Sets the stacking order for a viewport's canvas. -\ ``layer`` is the actual canvas layer, while ``sublayer`` specifies the stacking order of the canvas among those in the same layer. +``layer`` is the actual canvas layer, while ``sublayer`` specifies the stacking order of the canvas among those in the same layer. ---- @@ -6076,14 +6098,6 @@ If ``true``, rendering of a viewport's environment is disabled. ---- -.. _class_RenderingServer_method_viewport_set_fsr_mipmap_bias: - -- void **viewport_set_fsr_mipmap_bias** **(** :ref:`RID` viewport, :ref:`float` mipmap_bias **)** - -Affects the final texture sharpness by reading from a lower or higher mipmap. Negative values make textures sharper, while positive values make textures blurrier. When using FSR, this value is used to adjust the mipmap bias calculated internally which is based on the selected quality. The formula for this is ``-log2(1.0 / scale) + mipmap_bias`` - ----- - .. _class_RenderingServer_method_viewport_set_fsr_sharpness: - void **viewport_set_fsr_sharpness** **(** :ref:`RID` viewport, :ref:`float` sharpness **)** @@ -6106,11 +6120,19 @@ Sets the viewport's global transformation matrix. ---- -.. _class_RenderingServer_method_viewport_set_msaa: +.. _class_RenderingServer_method_viewport_set_msaa_2d: -- void **viewport_set_msaa** **(** :ref:`RID` viewport, :ref:`ViewportMSAA` msaa **)** +- void **viewport_set_msaa_2d** **(** :ref:`RID` viewport, :ref:`ViewportMSAA` msaa **)** -Sets the anti-aliasing mode. See :ref:`ViewportMSAA` for options. +Sets the multisample anti-aliasing mode for 2D/Canvas. See :ref:`ViewportMSAA` for options. + +---- + +.. _class_RenderingServer_method_viewport_set_msaa_3d: + +- void **viewport_set_msaa_3d** **(** :ref:`RID` viewport, :ref:`ViewportMSAA` msaa **)** + +Sets the multisample anti-aliasing mode for 3D. See :ref:`ViewportMSAA` for options. ---- @@ -6220,6 +6242,16 @@ Sets the viewport's width and height. ---- +.. _class_RenderingServer_method_viewport_set_texture_mipmap_bias: + +- void **viewport_set_texture_mipmap_bias** **(** :ref:`RID` viewport, :ref:`float` mipmap_bias **)** + +Affects the final texture sharpness by reading from a lower or higher mipmap (also called "texture LOD bias"). Negative values make mipmapped textures sharper but grainier when viewed at a distance, while positive values make mipmapped textures blurrier (even when up close). To get sharper textures at a distance without introducing too much graininess, set this between ``-0.75`` and ``0.0``. Enabling temporal antialiasing (:ref:`ProjectSettings.rendering/anti_aliasing/quality/use_taa`) can help reduce the graininess visible when using negative mipmap bias. + +\ **Note:** When the 3D scaling mode is set to FSR 1.0, this value is used to adjust the automatic mipmap bias which is calculated internally based on the scale factor. The formula for this is ``-log2(1.0 / scale) + mipmap_bias``. + +---- + .. _class_RenderingServer_method_viewport_set_transparent_background: - void **viewport_set_transparent_background** **(** :ref:`RID` viewport, :ref:`bool` enabled **)** diff --git a/classes/class_resource.rst b/classes/class_resource.rst index 11dcf7487..464828cd2 100644 --- a/classes/class_resource.rst +++ b/classes/class_resource.rst @@ -12,7 +12,7 @@ Resource **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`Animation`, :ref:`AnimationLibrary`, :ref:`AnimationNode`, :ref:`AnimationNodeStateMachinePlayback`, :ref:`AnimationNodeStateMachineTransition`, :ref:`AudioBusLayout`, :ref:`AudioEffect`, :ref:`AudioStream`, :ref:`BitMap`, :ref:`BoneMap`, :ref:`ButtonGroup`, :ref:`CameraEffects`, :ref:`CryptoKey`, :ref:`Curve`, :ref:`Curve2D`, :ref:`Curve3D`, :ref:`EditorNode3DGizmoPlugin`, :ref:`EditorSettings`, :ref:`Environment`, :ref:`Font`, :ref:`GLTFAccessor`, :ref:`GLTFAnimation`, :ref:`GLTFBufferView`, :ref:`GLTFCamera`, :ref:`GLTFDocument`, :ref:`GLTFDocumentExtension`, :ref:`GLTFLight`, :ref:`GLTFMesh`, :ref:`GLTFNode`, :ref:`GLTFSkeleton`, :ref:`GLTFSkin`, :ref:`GLTFSpecGloss`, :ref:`GLTFState`, :ref:`GLTFTexture`, :ref:`Gradient`, :ref:`Image`, :ref:`ImporterMesh`, :ref:`InputEvent`, :ref:`LabelSettings`, :ref:`LightmapGIData`, :ref:`Material`, :ref:`Mesh`, :ref:`MeshLibrary`, :ref:`MissingResource`, :ref:`MultiMesh`, :ref:`NativeExtension`, :ref:`NavigationMesh`, :ref:`NavigationPolygon`, :ref:`Noise`, :ref:`OGGPacketSequence`, :ref:`Occluder3D`, :ref:`OccluderPolygon2D`, :ref:`OpenXRAction`, :ref:`OpenXRActionMap`, :ref:`OpenXRActionSet`, :ref:`OpenXRIPBinding`, :ref:`OpenXRInteractionProfile`, :ref:`PackedDataContainer`, :ref:`PackedScene`, :ref:`PhysicsMaterial`, :ref:`PolygonPathFinder`, :ref:`RDShaderFile`, :ref:`RDShaderSPIRV`, :ref:`RichTextEffect`, :ref:`SceneReplicationConfig`, :ref:`Script`, :ref:`Shader`, :ref:`ShaderInclude`, :ref:`Shape2D`, :ref:`Shape3D`, :ref:`Shortcut`, :ref:`SkeletonModification2D`, :ref:`SkeletonModification3D`, :ref:`SkeletonModificationStack2D`, :ref:`SkeletonModificationStack3D`, :ref:`SkeletonProfile`, :ref:`Skin`, :ref:`Sky`, :ref:`SpriteFrames`, :ref:`StyleBox`, :ref:`SyntaxHighlighter`, :ref:`Texture`, :ref:`Theme`, :ref:`TileMapPattern`, :ref:`TileSet`, :ref:`TileSetSource`, :ref:`Translation`, :ref:`VideoStream`, :ref:`VisualScriptNode`, :ref:`VisualShaderNode`, :ref:`VoxelGIData`, :ref:`World2D`, :ref:`World3D`, :ref:`X509Certificate` +**Inherited By:** :ref:`Animation`, :ref:`AnimationLibrary`, :ref:`AnimationNode`, :ref:`AnimationNodeStateMachinePlayback`, :ref:`AnimationNodeStateMachineTransition`, :ref:`AudioBusLayout`, :ref:`AudioEffect`, :ref:`AudioStream`, :ref:`BitMap`, :ref:`BoneMap`, :ref:`ButtonGroup`, :ref:`CameraEffects`, :ref:`CryptoKey`, :ref:`Curve`, :ref:`Curve2D`, :ref:`Curve3D`, :ref:`EditorNode3DGizmoPlugin`, :ref:`EditorSettings`, :ref:`Environment`, :ref:`Font`, :ref:`GLTFAccessor`, :ref:`GLTFAnimation`, :ref:`GLTFBufferView`, :ref:`GLTFCamera`, :ref:`GLTFDocument`, :ref:`GLTFDocumentExtension`, :ref:`GLTFLight`, :ref:`GLTFMesh`, :ref:`GLTFNode`, :ref:`GLTFSkeleton`, :ref:`GLTFSkin`, :ref:`GLTFSpecGloss`, :ref:`GLTFState`, :ref:`GLTFTexture`, :ref:`Gradient`, :ref:`Image`, :ref:`ImporterMesh`, :ref:`InputEvent`, :ref:`LabelSettings`, :ref:`LightmapGIData`, :ref:`Material`, :ref:`Mesh`, :ref:`MeshLibrary`, :ref:`MissingResource`, :ref:`MultiMesh`, :ref:`NativeExtension`, :ref:`NavigationMesh`, :ref:`NavigationPolygon`, :ref:`Noise`, :ref:`Occluder3D`, :ref:`OccluderPolygon2D`, :ref:`OggPacketSequence`, :ref:`OpenXRAction`, :ref:`OpenXRActionMap`, :ref:`OpenXRActionSet`, :ref:`OpenXRIPBinding`, :ref:`OpenXRInteractionProfile`, :ref:`PackedDataContainer`, :ref:`PackedScene`, :ref:`PhysicsMaterial`, :ref:`PolygonPathFinder`, :ref:`RDShaderFile`, :ref:`RDShaderSPIRV`, :ref:`RichTextEffect`, :ref:`SceneReplicationConfig`, :ref:`Script`, :ref:`Shader`, :ref:`ShaderInclude`, :ref:`Shape2D`, :ref:`Shape3D`, :ref:`Shortcut`, :ref:`SkeletonModification2D`, :ref:`SkeletonModification3D`, :ref:`SkeletonModificationStack2D`, :ref:`SkeletonModificationStack3D`, :ref:`SkeletonProfile`, :ref:`Skin`, :ref:`Sky`, :ref:`SpriteFrames`, :ref:`StyleBox`, :ref:`SyntaxHighlighter`, :ref:`Texture`, :ref:`Theme`, :ref:`TileMapPattern`, :ref:`TileSet`, :ref:`TileSetSource`, :ref:`Translation`, :ref:`VideoStream`, :ref:`VisualShaderNode`, :ref:`VoxelGIData`, :ref:`World2D`, :ref:`World3D`, :ref:`X509Certificate` Base class for all resources. diff --git a/classes/class_resourceformatsaver.rst b/classes/class_resourceformatsaver.rst index 33b82e9e7..c93f0f8e2 100644 --- a/classes/class_resourceformatsaver.rst +++ b/classes/class_resourceformatsaver.rst @@ -29,7 +29,7 @@ Methods +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`_recognize` **(** :ref:`Resource` resource **)** |virtual| |const| | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_save` **(** :ref:`String` path, :ref:`Resource` resource, :ref:`int` flags **)** |virtual| | +| :ref:`int` | :ref:`_save` **(** :ref:`Resource` resource, :ref:`String` path, :ref:`int` flags **)** |virtual| | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Method Descriptions @@ -53,7 +53,7 @@ Returns whether the given resource object can be saved by this saver. .. _class_ResourceFormatSaver_method__save: -- :ref:`int` **_save** **(** :ref:`String` path, :ref:`Resource` resource, :ref:`int` flags **)** |virtual| +- :ref:`int` **_save** **(** :ref:`Resource` resource, :ref:`String` path, :ref:`int` flags **)** |virtual| Saves the given resource object to a file at the target ``path``. ``flags`` is a bitmask composed with :ref:`SaverFlags` constants. diff --git a/classes/class_resourceloader.rst b/classes/class_resourceloader.rst index 2f0b6edd4..053afe1c6 100644 --- a/classes/class_resourceloader.rst +++ b/classes/class_resourceloader.rst @@ -31,31 +31,31 @@ Tutorials Methods ------- -+---------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_resource_format_loader` **(** :ref:`ResourceFormatLoader` format_loader, :ref:`bool` at_front=false **)** | -+---------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`exists` **(** :ref:`String` path, :ref:`String` type_hint="" **)** | -+---------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_dependencies` **(** :ref:`String` path **)** | -+---------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_recognized_extensions_for_type` **(** :ref:`String` type **)** | -+---------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_resource_uid` **(** :ref:`String` path **)** | -+---------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_cached` **(** :ref:`String` path **)** | -+---------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Resource` | :ref:`load` **(** :ref:`String` path, :ref:`String` type_hint="", :ref:`CacheMode` cache_mode=1 **)** | -+---------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Resource` | :ref:`load_threaded_get` **(** :ref:`String` path **)** | -+---------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`ThreadLoadStatus` | :ref:`load_threaded_get_status` **(** :ref:`String` path, :ref:`Array` progress=[] **)** | -+---------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`load_threaded_request` **(** :ref:`String` path, :ref:`String` type_hint="", :ref:`bool` use_sub_threads=false **)** | -+---------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_resource_format_loader` **(** :ref:`ResourceFormatLoader` format_loader **)** | -+---------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_abort_on_missing_resources` **(** :ref:`bool` abort **)** | -+---------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_resource_format_loader` **(** :ref:`ResourceFormatLoader` format_loader, :ref:`bool` at_front=false **)** | ++---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`exists` **(** :ref:`String` path, :ref:`String` type_hint="" **)** | ++---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedStringArray` | :ref:`get_dependencies` **(** :ref:`String` path **)** | ++---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedStringArray` | :ref:`get_recognized_extensions_for_type` **(** :ref:`String` type **)** | ++---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_resource_uid` **(** :ref:`String` path **)** | ++---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_cached` **(** :ref:`String` path **)** | ++---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Resource` | :ref:`load` **(** :ref:`String` path, :ref:`String` type_hint="", :ref:`CacheMode` cache_mode=1 **)** | ++---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Resource` | :ref:`load_threaded_get` **(** :ref:`String` path **)** | ++---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`ThreadLoadStatus` | :ref:`load_threaded_get_status` **(** :ref:`String` path, :ref:`Array` progress=[] **)** | ++---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Error` | :ref:`load_threaded_request` **(** :ref:`String` path, :ref:`String` type_hint="", :ref:`bool` use_sub_threads=false, :ref:`CacheMode` cache_mode=1 **)** | ++---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_resource_format_loader` **(** :ref:`ResourceFormatLoader` format_loader **)** | ++---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_abort_on_missing_resources` **(** :ref:`bool` abort **)** | ++---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Enumerations ------------ @@ -195,10 +195,12 @@ An array variable can optionally be passed via ``progress``, and will return a o .. _class_ResourceLoader_method_load_threaded_request: -- :ref:`Error` **load_threaded_request** **(** :ref:`String` path, :ref:`String` type_hint="", :ref:`bool` use_sub_threads=false **)** +- :ref:`Error` **load_threaded_request** **(** :ref:`String` path, :ref:`String` type_hint="", :ref:`bool` use_sub_threads=false, :ref:`CacheMode` cache_mode=1 **)** Loads the resource using threads. If ``use_sub_threads`` is ``true``, multiple threads will be used to load the resource, which makes loading faster, but may affect the main thread (and thus cause game slowdowns). +The ``cache_mode`` property defines whether and how the cache should be used or updated when loading the resource. See :ref:`CacheMode` for details. + ---- .. _class_ResourceLoader_method_remove_resource_format_loader: diff --git a/classes/class_resourcesaver.rst b/classes/class_resourcesaver.rst index cea380a6d..9734daa7e 100644 --- a/classes/class_resourcesaver.rst +++ b/classes/class_resourcesaver.rst @@ -31,7 +31,7 @@ Methods +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`remove_resource_format_saver` **(** :ref:`ResourceFormatSaver` format_saver **)** | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`save` **(** :ref:`String` path, :ref:`Resource` resource, :ref:`SaverFlags` flags=0 **)** | +| :ref:`Error` | :ref:`save` **(** :ref:`Resource` resource, :ref:`String` path="", :ref:`SaverFlags` flags=0 **)** | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Enumerations @@ -104,9 +104,9 @@ Unregisters the given :ref:`ResourceFormatSaver`. .. _class_ResourceSaver_method_save: -- :ref:`Error` **save** **(** :ref:`String` path, :ref:`Resource` resource, :ref:`SaverFlags` flags=0 **)** +- :ref:`Error` **save** **(** :ref:`Resource` resource, :ref:`String` path="", :ref:`SaverFlags` flags=0 **)** -Saves a resource to disk to the given path, using a :ref:`ResourceFormatSaver` that recognizes the resource object. +Saves a resource to disk to the given path, using a :ref:`ResourceFormatSaver` that recognizes the resource object. If ``path`` is empty, ``ResourceSaver`` will try to use :ref:`Resource.resource_path`. The ``flags`` bitmask can be specified to customize the save behavior using :ref:`SaverFlags` flags. diff --git a/classes/class_resourceuid.rst b/classes/class_resourceuid.rst index afec66e08..c713bc8fa 100644 --- a/classes/class_resourceuid.rst +++ b/classes/class_resourceuid.rst @@ -12,7 +12,16 @@ ResourceUID **Inherits:** :ref:`Object` +Singleton for managing a cache of resource UIDs within a project. +Description +----------- + +Resources can not only be referenced using their resource paths ``res://``, but alternatively through a unique identifier specified via ``uid://``. + +Using UIDs allows for the engine to keep references between resources intact, even if the files get renamed or moved. + +This singleton is responsible for keeping track of all registered resource UIDs of a project, generating new UIDs and converting between the string and integer representation. Methods ------- @@ -40,7 +49,9 @@ Constants .. _class_ResourceUID_constant_INVALID_ID: -- **INVALID_ID** = **-1** +- **INVALID_ID** = **-1** --- The value to use for an invalid UID, for example if the resource could not be loaded. + +Its text representation is ``uid://``. Method Descriptions ------------------- @@ -49,48 +60,74 @@ Method Descriptions - void **add_id** **(** :ref:`int` id, :ref:`String` path **)** +Adds a new UID value which is mapped to the given resource path. + +Fails with an error if the UID already exists, so be sure to check :ref:`has_id` beforehand, or use :ref:`set_id` instead. + ---- .. _class_ResourceUID_method_create_id: - :ref:`int` **create_id** **(** **)** +Generates a random resource UID which is guaranteed to be unique within the list of currently loaded UIDs. + +In order for this UID to be registered, you must call :ref:`add_id` or :ref:`set_id`. + ---- .. _class_ResourceUID_method_get_id_path: - :ref:`String` **get_id_path** **(** :ref:`int` id **)** |const| +Returns the path that the given UID value refers to. + +Fails with an error if the UID does not exist, so be sure to check :ref:`has_id` beforehand. + ---- .. _class_ResourceUID_method_has_id: - :ref:`bool` **has_id** **(** :ref:`int` id **)** |const| +Returns whether the given UID value is known to the cache. + ---- .. _class_ResourceUID_method_id_to_text: - :ref:`String` **id_to_text** **(** :ref:`int` id **)** |const| +Converts the given UID to a ``uid://`` string value. + ---- .. _class_ResourceUID_method_remove_id: - void **remove_id** **(** :ref:`int` id **)** +Removes a loaded UID value from the cache. + +Fails with an error if the UID does not exist, so be sure to check :ref:`has_id` beforehand. + ---- .. _class_ResourceUID_method_set_id: - void **set_id** **(** :ref:`int` id, :ref:`String` path **)** +Updates the resource path of an existing UID. + +Fails with an error if the UID does not exist, so be sure to check :ref:`has_id` beforehand, or use :ref:`add_id` instead. + ---- .. _class_ResourceUID_method_text_to_id: - :ref:`int` **text_to_id** **(** :ref:`String` text_id **)** |const| +Extracts the UID value from the given ``uid://`` string. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_richtextlabel.rst b/classes/class_richtextlabel.rst index c5601b46a..173765a59 100644 --- a/classes/class_richtextlabel.rst +++ b/classes/class_richtextlabel.rst @@ -62,8 +62,6 @@ Properties +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | :ref:`override_selected_font_color` | ``false`` | +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`float` | :ref:`percent_visible` | ``1.0`` | -+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`int` | :ref:`progress_bar_delay` | ``1000`` | +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | :ref:`scroll_active` | ``true`` | @@ -90,6 +88,8 @@ Properties +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`VisibleCharactersBehavior` | :ref:`visible_characters_behavior` | ``0`` | +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`float` | :ref:`visible_ratio` | ``1.0`` | ++-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ Methods ------- @@ -612,24 +612,6 @@ If ``true``, the label uses the custom font color. ---- -.. _class_RichTextLabel_property_percent_visible: - -- :ref:`float` **percent_visible** - -+-----------+----------------------------+ -| *Default* | ``1.0`` | -+-----------+----------------------------+ -| *Setter* | set_percent_visible(value) | -+-----------+----------------------------+ -| *Getter* | get_percent_visible() | -+-----------+----------------------------+ - -The range of characters to display, as a :ref:`float` between 0.0 and 1.0. When assigned an out of range value, it's the same as assigning 1.0. - -\ **Note:** Setting this property updates :ref:`visible_characters` based on current :ref:`get_total_character_count`. - ----- - .. _class_RichTextLabel_property_progress_bar_delay: - :ref:`int` **progress_bar_delay** @@ -822,9 +804,9 @@ If ``true``, text processing is done in a background thread. | *Getter* | get_visible_characters() | +-----------+-------------------------------+ -The restricted number of characters to display in the label. If ``-1``, all characters will be displayed. +The number of characters to display. If set to ``-1``, all characters are displayed. This can be useful when animating the text appearing in a dialog box. -\ **Note:** Setting this property updates :ref:`percent_visible` based on current :ref:`get_total_character_count`. +\ **Note:** Setting this property updates :ref:`visible_ratio` accordingly. ---- @@ -840,7 +822,25 @@ The restricted number of characters to display in the label. If ``-1``, all char | *Getter* | get_visible_characters_behavior() | +-----------+----------------------------------------+ -Sets the clipping behavior when :ref:`visible_characters` or :ref:`percent_visible` is set. See :ref:`VisibleCharactersBehavior` for more info. +Sets the clipping behavior when :ref:`visible_characters` or :ref:`visible_ratio` is set. See :ref:`VisibleCharactersBehavior` for more info. + +---- + +.. _class_RichTextLabel_property_visible_ratio: + +- :ref:`float` **visible_ratio** + ++-----------+--------------------------+ +| *Default* | ``1.0`` | ++-----------+--------------------------+ +| *Setter* | set_visible_ratio(value) | ++-----------+--------------------------+ +| *Getter* | get_visible_ratio() | ++-----------+--------------------------+ + +The fraction of characters to display, relative to the total number of characters (see :ref:`get_total_character_count`). If set to ``1.0``, all characters are displayed. If set to ``0.5``, only half of the characters will be displayed. This can be useful when animating the text appearing in a dialog box. + +\ **Note:** Setting this property updates :ref:`visible_characters` accordingly. Method Descriptions ------------------- diff --git a/classes/class_rid.rst b/classes/class_rid.rst index 69a9d2d59..e7cc29424 100644 --- a/classes/class_rid.rst +++ b/classes/class_rid.rst @@ -38,19 +38,19 @@ Methods Operators --------- -+-------------------------+-----------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** :ref:`RID` right **)** | -+-------------------------+-----------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator <` **(** :ref:`RID` right **)** | -+-------------------------+-----------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator <=` **(** :ref:`RID` right **)** | -+-------------------------+-----------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** :ref:`RID` right **)** | -+-------------------------+-----------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator >` **(** :ref:`RID` right **)** | -+-------------------------+-----------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator >=` **(** :ref:`RID` right **)** | -+-------------------------+-----------------------------------------------------------------------------------------+ ++-------------------------+------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`operator !=` **(** :ref:`RID` right **)** | ++-------------------------+------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`operator \<` **(** :ref:`RID` right **)** | ++-------------------------+------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`operator \<=` **(** :ref:`RID` right **)** | ++-------------------------+------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`operator ==` **(** :ref:`RID` right **)** | ++-------------------------+------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`operator >` **(** :ref:`RID` right **)** | ++-------------------------+------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`operator >=` **(** :ref:`RID` right **)** | ++-------------------------+------------------------------------------------------------------------------------------+ Constructor Descriptions ------------------------ diff --git a/classes/class_rigidbody2d.rst b/classes/class_rigidbody2d.rst new file mode 100644 index 000000000..355e8f1e5 --- /dev/null +++ b/classes/class_rigidbody2d.rst @@ -0,0 +1,770 @@ +: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/RigidBody2D.xml. + +.. _class_RigidBody2D: + +RigidBody2D +=========== + +**Inherits:** :ref:`PhysicsBody2D` **<** :ref:`CollisionObject2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` + +**Inherited By:** :ref:`PhysicalBone2D` + +Physics Body which is moved by 2D physics simulation. Useful for objects that have gravity and can be pushed by other objects. + +Description +----------- + +This node implements simulated 2D physics. You do not control a RigidBody2D directly. Instead, you apply forces to it (gravity, impulses, etc.) and the physics simulation calculates the resulting movement based on its mass, friction, and other physical properties. + +You can switch the body's behavior using :ref:`lock_rotation`, :ref:`freeze`, and :ref:`freeze_mode`. + +\ **Note:** You should not change a RigidBody2D's ``position`` or ``linear_velocity`` every frame or even very often. If you need to directly affect the body's state, use :ref:`_integrate_forces`, which allows you to directly access the physics state. + +Please also keep in mind that physics bodies manage their own transform which overwrites the ones you set. So any direct or indirect transformation (including scaling of the node or its parent) will be visible in the editor only, and immediately reset at runtime. + +If you need to override the default physics behavior or add a transformation at runtime, you can write a custom force integration. See :ref:`custom_integrator`. + +Tutorials +--------- + +- `2D Physics Platformer Demo `__ + +- `Instancing Demo `__ + +Properties +---------- + ++------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ +| :ref:`float` | :ref:`angular_damp` | ``0.0`` | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ +| :ref:`DampMode` | :ref:`angular_damp_mode` | ``0`` | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ +| :ref:`float` | :ref:`angular_velocity` | ``0.0`` | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ +| :ref:`bool` | :ref:`can_sleep` | ``true`` | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ +| :ref:`Vector2` | :ref:`center_of_mass` | ``Vector2(0, 0)`` | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ +| :ref:`CenterOfMassMode` | :ref:`center_of_mass_mode` | ``0`` | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ +| :ref:`Vector2` | :ref:`constant_force` | ``Vector2(0, 0)`` | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ +| :ref:`float` | :ref:`constant_torque` | ``0.0`` | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ +| :ref:`bool` | :ref:`contact_monitor` | ``false`` | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ +| :ref:`CCDMode` | :ref:`continuous_cd` | ``0`` | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ +| :ref:`bool` | :ref:`custom_integrator` | ``false`` | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ +| :ref:`bool` | :ref:`freeze` | ``false`` | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ +| :ref:`FreezeMode` | :ref:`freeze_mode` | ``0`` | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ +| :ref:`float` | :ref:`gravity_scale` | ``1.0`` | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ +| :ref:`float` | :ref:`inertia` | ``0.0`` | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ +| :ref:`float` | :ref:`linear_damp` | ``0.0`` | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ +| :ref:`DampMode` | :ref:`linear_damp_mode` | ``0`` | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ +| :ref:`Vector2` | :ref:`linear_velocity` | ``Vector2(0, 0)`` | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ +| :ref:`bool` | :ref:`lock_rotation` | ``false`` | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ +| :ref:`float` | :ref:`mass` | ``1.0`` | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ +| :ref:`int` | :ref:`max_contacts_reported` | ``0`` | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ +| :ref:`PhysicsMaterial` | :ref:`physics_material_override` | | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ +| :ref:`bool` | :ref:`sleeping` | ``false`` | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ + +Methods +------- + ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_integrate_forces` **(** :ref:`PhysicsDirectBodyState2D` state **)** |virtual| | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_constant_central_force` **(** :ref:`Vector2` force **)** | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_constant_force` **(** :ref:`Vector2` force, :ref:`Vector2` position=Vector2(0, 0) **)** | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_constant_torque` **(** :ref:`float` torque **)** | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`apply_central_force` **(** :ref:`Vector2` force **)** | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`apply_central_impulse` **(** :ref:`Vector2` impulse=Vector2(0, 0) **)** | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`apply_force` **(** :ref:`Vector2` force, :ref:`Vector2` position=Vector2(0, 0) **)** | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`apply_impulse` **(** :ref:`Vector2` impulse, :ref:`Vector2` position=Vector2(0, 0) **)** | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`apply_torque` **(** :ref:`float` torque **)** | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`apply_torque_impulse` **(** :ref:`float` torque **)** | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Node2D[]` | :ref:`get_colliding_bodies` **(** **)** |const| | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_contact_count` **(** **)** |const| | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_axis_velocity` **(** :ref:`Vector2` axis_velocity **)** | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +.. _class_RigidBody2D_signal_body_entered: + +- **body_entered** **(** :ref:`Node` body **)** + +Emitted when a collision with another :ref:`PhysicsBody2D` or :ref:`TileMap` occurs. Requires :ref:`contact_monitor` to be set to ``true`` and :ref:`max_contacts_reported` to be set high enough to detect all the collisions. :ref:`TileMap`\ s are detected if the :ref:`TileSet` has Collision :ref:`Shape2D`\ s. + +``body`` the :ref:`Node`, if it exists in the tree, of the other :ref:`PhysicsBody2D` or :ref:`TileMap`. + +---- + +.. _class_RigidBody2D_signal_body_exited: + +- **body_exited** **(** :ref:`Node` body **)** + +Emitted when the collision with another :ref:`PhysicsBody2D` or :ref:`TileMap` ends. Requires :ref:`contact_monitor` to be set to ``true`` and :ref:`max_contacts_reported` to be set high enough to detect all the collisions. :ref:`TileMap`\ s are detected if the :ref:`TileSet` has Collision :ref:`Shape2D`\ s. + +``body`` the :ref:`Node`, if it exists in the tree, of the other :ref:`PhysicsBody2D` or :ref:`TileMap`. + +---- + +.. _class_RigidBody2D_signal_body_shape_entered: + +- **body_shape_entered** **(** :ref:`RID` body_rid, :ref:`Node` body, :ref:`int` body_shape_index, :ref:`int` local_shape_index **)** + +Emitted when one of this RigidBody2D's :ref:`Shape2D`\ s collides with another :ref:`PhysicsBody2D` or :ref:`TileMap`'s :ref:`Shape2D`\ s. Requires :ref:`contact_monitor` to be set to ``true`` and :ref:`max_contacts_reported` to be set high enough to detect all the collisions. :ref:`TileMap`\ s are detected if the :ref:`TileSet` has Collision :ref:`Shape2D`\ s. + +``body_rid`` the :ref:`RID` of the other :ref:`PhysicsBody2D` or :ref:`TileSet`'s :ref:`CollisionObject2D` used by the :ref:`PhysicsServer2D`. + +``body`` the :ref:`Node`, if it exists in the tree, of the other :ref:`PhysicsBody2D` or :ref:`TileMap`. + +``body_shape_index`` the index of the :ref:`Shape2D` of the other :ref:`PhysicsBody2D` or :ref:`TileMap` used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))``. + +``local_shape_index`` the index of the :ref:`Shape2D` of this RigidBody2D used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. + +---- + +.. _class_RigidBody2D_signal_body_shape_exited: + +- **body_shape_exited** **(** :ref:`RID` body_rid, :ref:`Node` body, :ref:`int` body_shape_index, :ref:`int` local_shape_index **)** + +Emitted when the collision between one of this RigidBody2D's :ref:`Shape2D`\ s and another :ref:`PhysicsBody2D` or :ref:`TileMap`'s :ref:`Shape2D`\ s ends. Requires :ref:`contact_monitor` to be set to ``true`` and :ref:`max_contacts_reported` to be set high enough to detect all the collisions. :ref:`TileMap`\ s are detected if the :ref:`TileSet` has Collision :ref:`Shape2D`\ s. + +``body_rid`` the :ref:`RID` of the other :ref:`PhysicsBody2D` or :ref:`TileSet`'s :ref:`CollisionObject2D` used by the :ref:`PhysicsServer2D`. + +``body`` the :ref:`Node`, if it exists in the tree, of the other :ref:`PhysicsBody2D` or :ref:`TileMap`. + +``body_shape_index`` the index of the :ref:`Shape2D` of the other :ref:`PhysicsBody2D` or :ref:`TileMap` used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))``. + +``local_shape_index`` the index of the :ref:`Shape2D` of this RigidBody2D used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. + +---- + +.. _class_RigidBody2D_signal_sleeping_state_changed: + +- **sleeping_state_changed** **(** **)** + +Emitted when the physics engine changes the body's sleeping state. + +\ **Note:** Changing the value :ref:`sleeping` will not trigger this signal. It is only emitted if the sleeping state is changed by the physics engine or ``emit_signal("sleeping_state_changed")`` is used. + +Enumerations +------------ + +.. _enum_RigidBody2D_FreezeMode: + +.. _class_RigidBody2D_constant_FREEZE_MODE_STATIC: + +.. _class_RigidBody2D_constant_FREEZE_MODE_KINEMATIC: + +enum **FreezeMode**: + +- **FREEZE_MODE_STATIC** = **0** --- Static body freeze mode (default). The body is not affected by gravity and forces. It can be only moved by user code and doesn't collide with other bodies along its path. + +- **FREEZE_MODE_KINEMATIC** = **1** --- Kinematic body freeze mode. Similar to :ref:`FREEZE_MODE_STATIC`, but collides with other bodies along its path when moved. Useful for a frozen body that needs to be animated. + +---- + +.. _enum_RigidBody2D_CenterOfMassMode: + +.. _class_RigidBody2D_constant_CENTER_OF_MASS_MODE_AUTO: + +.. _class_RigidBody2D_constant_CENTER_OF_MASS_MODE_CUSTOM: + +enum **CenterOfMassMode**: + +- **CENTER_OF_MASS_MODE_AUTO** = **0** --- In this mode, the body's center of mass is calculated automatically based on its shapes. + +- **CENTER_OF_MASS_MODE_CUSTOM** = **1** --- In this mode, the body's center of mass is set through :ref:`center_of_mass`. Defaults to the body's origin position. + +---- + +.. _enum_RigidBody2D_DampMode: + +.. _class_RigidBody2D_constant_DAMP_MODE_COMBINE: + +.. _class_RigidBody2D_constant_DAMP_MODE_REPLACE: + +enum **DampMode**: + +- **DAMP_MODE_COMBINE** = **0** --- In this mode, the body's damping value is added to any value set in areas or the default value. + +- **DAMP_MODE_REPLACE** = **1** --- In this mode, the body's damping value replaces any value set in areas or the default value. + +---- + +.. _enum_RigidBody2D_CCDMode: + +.. _class_RigidBody2D_constant_CCD_MODE_DISABLED: + +.. _class_RigidBody2D_constant_CCD_MODE_CAST_RAY: + +.. _class_RigidBody2D_constant_CCD_MODE_CAST_SHAPE: + +enum **CCDMode**: + +- **CCD_MODE_DISABLED** = **0** --- Continuous collision detection disabled. This is the fastest way to detect body collisions, but can miss small, fast-moving objects. + +- **CCD_MODE_CAST_RAY** = **1** --- Continuous collision detection enabled using raycasting. This is faster than shapecasting but less precise. + +- **CCD_MODE_CAST_SHAPE** = **2** --- Continuous collision detection enabled using shapecasting. This is the slowest CCD method and the most precise. + +Property Descriptions +--------------------- + +.. _class_RigidBody2D_property_angular_damp: + +- :ref:`float` **angular_damp** + ++-----------+-------------------------+ +| *Default* | ``0.0`` | ++-----------+-------------------------+ +| *Setter* | set_angular_damp(value) | ++-----------+-------------------------+ +| *Getter* | get_angular_damp() | ++-----------+-------------------------+ + +Damps the body's rotation. By default, the body will use the **Default Angular Damp** in **Project > Project Settings > Physics > 2d** or any value override set by an :ref:`Area2D` the body is in. Depending on :ref:`angular_damp_mode`, you can set :ref:`angular_damp` to be added to or to replace the body's damping value. + +See :ref:`ProjectSettings.physics/2d/default_angular_damp` for more details about damping. + +---- + +.. _class_RigidBody2D_property_angular_damp_mode: + +- :ref:`DampMode` **angular_damp_mode** + ++-----------+------------------------------+ +| *Default* | ``0`` | ++-----------+------------------------------+ +| *Setter* | set_angular_damp_mode(value) | ++-----------+------------------------------+ +| *Getter* | get_angular_damp_mode() | ++-----------+------------------------------+ + +Defines how :ref:`angular_damp` is applied. See :ref:`DampMode` for possible values. + +---- + +.. _class_RigidBody2D_property_angular_velocity: + +- :ref:`float` **angular_velocity** + ++-----------+-----------------------------+ +| *Default* | ``0.0`` | ++-----------+-----------------------------+ +| *Setter* | set_angular_velocity(value) | ++-----------+-----------------------------+ +| *Getter* | get_angular_velocity() | ++-----------+-----------------------------+ + +The body's rotational velocity in *radians* per second. + +---- + +.. _class_RigidBody2D_property_can_sleep: + +- :ref:`bool` **can_sleep** + ++-----------+----------------------+ +| *Default* | ``true`` | ++-----------+----------------------+ +| *Setter* | set_can_sleep(value) | ++-----------+----------------------+ +| *Getter* | is_able_to_sleep() | ++-----------+----------------------+ + +If ``true``, the body can enter sleep mode when there is no movement. See :ref:`sleeping`. + +---- + +.. _class_RigidBody2D_property_center_of_mass: + +- :ref:`Vector2` **center_of_mass** + ++-----------+---------------------------+ +| *Default* | ``Vector2(0, 0)`` | ++-----------+---------------------------+ +| *Setter* | set_center_of_mass(value) | ++-----------+---------------------------+ +| *Getter* | get_center_of_mass() | ++-----------+---------------------------+ + +The body's custom center of mass, relative to the body's origin position, when :ref:`center_of_mass_mode` is set to :ref:`CENTER_OF_MASS_MODE_CUSTOM`. This is the balanced point of the body, where applied forces only cause linear acceleration. Applying forces outside of the center of mass causes angular acceleration. + +When :ref:`center_of_mass_mode` is set to :ref:`CENTER_OF_MASS_MODE_AUTO` (default value), the center of mass is automatically computed. + +---- + +.. _class_RigidBody2D_property_center_of_mass_mode: + +- :ref:`CenterOfMassMode` **center_of_mass_mode** + ++-----------+--------------------------------+ +| *Default* | ``0`` | ++-----------+--------------------------------+ +| *Setter* | set_center_of_mass_mode(value) | ++-----------+--------------------------------+ +| *Getter* | get_center_of_mass_mode() | ++-----------+--------------------------------+ + +Defines the way the body's center of mass is set. See :ref:`CenterOfMassMode` for possible values. + +---- + +.. _class_RigidBody2D_property_constant_force: + +- :ref:`Vector2` **constant_force** + ++-----------+---------------------------+ +| *Default* | ``Vector2(0, 0)`` | ++-----------+---------------------------+ +| *Setter* | set_constant_force(value) | ++-----------+---------------------------+ +| *Getter* | get_constant_force() | ++-----------+---------------------------+ + +The body's total constant positional forces applied during each physics update. + +See :ref:`add_constant_force` and :ref:`add_constant_central_force`. + +---- + +.. _class_RigidBody2D_property_constant_torque: + +- :ref:`float` **constant_torque** + ++-----------+----------------------------+ +| *Default* | ``0.0`` | ++-----------+----------------------------+ +| *Setter* | set_constant_torque(value) | ++-----------+----------------------------+ +| *Getter* | get_constant_torque() | ++-----------+----------------------------+ + +The body's total constant rotational forces applied during each physics update. + +See :ref:`add_constant_torque`. + +---- + +.. _class_RigidBody2D_property_contact_monitor: + +- :ref:`bool` **contact_monitor** + ++-----------+------------------------------+ +| *Default* | ``false`` | ++-----------+------------------------------+ +| *Setter* | set_contact_monitor(value) | ++-----------+------------------------------+ +| *Getter* | is_contact_monitor_enabled() | ++-----------+------------------------------+ + +If ``true``, the RigidBody2D will emit signals when it collides with another RigidBody2D. + +\ **Note:** By default the maximum contacts reported is set to 0, meaning nothing will be recorded, see :ref:`max_contacts_reported`. + +---- + +.. _class_RigidBody2D_property_continuous_cd: + +- :ref:`CCDMode` **continuous_cd** + ++-----------+------------------------------------------------+ +| *Default* | ``0`` | ++-----------+------------------------------------------------+ +| *Setter* | set_continuous_collision_detection_mode(value) | ++-----------+------------------------------------------------+ +| *Getter* | get_continuous_collision_detection_mode() | ++-----------+------------------------------------------------+ + +Continuous collision detection mode. + +Continuous collision detection tries to predict where a moving body will collide instead of moving it and correcting its movement after collision. Continuous collision detection is slower, but more precise and misses fewer collisions with small, fast-moving objects. Raycasting and shapecasting methods are available. See :ref:`CCDMode` for details. + +---- + +.. _class_RigidBody2D_property_custom_integrator: + +- :ref:`bool` **custom_integrator** + ++-----------+----------------------------------+ +| *Default* | ``false`` | ++-----------+----------------------------------+ +| *Setter* | set_use_custom_integrator(value) | ++-----------+----------------------------------+ +| *Getter* | is_using_custom_integrator() | ++-----------+----------------------------------+ + +If ``true``, internal force integration is disabled for this body. Aside from collision response, the body will only move as determined by the :ref:`_integrate_forces` function. + +---- + +.. _class_RigidBody2D_property_freeze: + +- :ref:`bool` **freeze** + ++-----------+---------------------------+ +| *Default* | ``false`` | ++-----------+---------------------------+ +| *Setter* | set_freeze_enabled(value) | ++-----------+---------------------------+ +| *Getter* | is_freeze_enabled() | ++-----------+---------------------------+ + +If ``true``, the body is frozen. Gravity and forces are not applied anymore. + +See :ref:`freeze_mode` to set the body's behavior when frozen. + +For a body that is always frozen, use :ref:`StaticBody2D` or :ref:`AnimatableBody2D` instead. + +---- + +.. _class_RigidBody2D_property_freeze_mode: + +- :ref:`FreezeMode` **freeze_mode** + ++-----------+------------------------+ +| *Default* | ``0`` | ++-----------+------------------------+ +| *Setter* | set_freeze_mode(value) | ++-----------+------------------------+ +| *Getter* | get_freeze_mode() | ++-----------+------------------------+ + +The body's freeze mode. Can be used to set the body's behavior when :ref:`freeze` is enabled. See :ref:`FreezeMode` for possible values. + +For a body that is always frozen, use :ref:`StaticBody2D` or :ref:`AnimatableBody2D` instead. + +---- + +.. _class_RigidBody2D_property_gravity_scale: + +- :ref:`float` **gravity_scale** + ++-----------+--------------------------+ +| *Default* | ``1.0`` | ++-----------+--------------------------+ +| *Setter* | set_gravity_scale(value) | ++-----------+--------------------------+ +| *Getter* | get_gravity_scale() | ++-----------+--------------------------+ + +Multiplies the gravity applied to the body. The body's gravity is calculated from the **Default Gravity** value in **Project > Project Settings > Physics > 2d** and/or any additional gravity vector applied by :ref:`Area2D`\ s. + +---- + +.. _class_RigidBody2D_property_inertia: + +- :ref:`float` **inertia** + ++-----------+--------------------+ +| *Default* | ``0.0`` | ++-----------+--------------------+ +| *Setter* | set_inertia(value) | ++-----------+--------------------+ +| *Getter* | get_inertia() | ++-----------+--------------------+ + +The body's moment of inertia. This is like mass, but for rotation: it determines how much torque it takes to rotate the body. The moment of inertia is usually computed automatically from the mass and the shapes, but this property allows you to set a custom value. + +If set to ``0``, inertia is automatically computed (default value). + +---- + +.. _class_RigidBody2D_property_linear_damp: + +- :ref:`float` **linear_damp** + ++-----------+------------------------+ +| *Default* | ``0.0`` | ++-----------+------------------------+ +| *Setter* | set_linear_damp(value) | ++-----------+------------------------+ +| *Getter* | get_linear_damp() | ++-----------+------------------------+ + +Damps the body's movement. By default, the body will use the **Default Linear Damp** in **Project > Project Settings > Physics > 2d** or any value override set by an :ref:`Area2D` the body is in. Depending on :ref:`linear_damp_mode`, you can set :ref:`linear_damp` to be added to or to replace the body's damping value. + +See :ref:`ProjectSettings.physics/2d/default_linear_damp` for more details about damping. + +---- + +.. _class_RigidBody2D_property_linear_damp_mode: + +- :ref:`DampMode` **linear_damp_mode** + ++-----------+-----------------------------+ +| *Default* | ``0`` | ++-----------+-----------------------------+ +| *Setter* | set_linear_damp_mode(value) | ++-----------+-----------------------------+ +| *Getter* | get_linear_damp_mode() | ++-----------+-----------------------------+ + +Defines how :ref:`linear_damp` is applied. See :ref:`DampMode` for possible values. + +---- + +.. _class_RigidBody2D_property_linear_velocity: + +- :ref:`Vector2` **linear_velocity** + ++-----------+----------------------------+ +| *Default* | ``Vector2(0, 0)`` | ++-----------+----------------------------+ +| *Setter* | set_linear_velocity(value) | ++-----------+----------------------------+ +| *Getter* | get_linear_velocity() | ++-----------+----------------------------+ + +The body's linear velocity in pixels per second. Can be used sporadically, but **don't set this every frame**, because physics may run in another thread and runs at a different granularity. Use :ref:`_integrate_forces` as your process loop for precise control of the body state. + +---- + +.. _class_RigidBody2D_property_lock_rotation: + +- :ref:`bool` **lock_rotation** + ++-----------+----------------------------------+ +| *Default* | ``false`` | ++-----------+----------------------------------+ +| *Setter* | set_lock_rotation_enabled(value) | ++-----------+----------------------------------+ +| *Getter* | is_lock_rotation_enabled() | ++-----------+----------------------------------+ + +If ``true``, the body cannot rotate. Gravity and forces only apply linear movement. + +---- + +.. _class_RigidBody2D_property_mass: + +- :ref:`float` **mass** + ++-----------+-----------------+ +| *Default* | ``1.0`` | ++-----------+-----------------+ +| *Setter* | set_mass(value) | ++-----------+-----------------+ +| *Getter* | get_mass() | ++-----------+-----------------+ + +The body's mass. + +---- + +.. _class_RigidBody2D_property_max_contacts_reported: + +- :ref:`int` **max_contacts_reported** + ++-----------+----------------------------------+ +| *Default* | ``0`` | ++-----------+----------------------------------+ +| *Setter* | set_max_contacts_reported(value) | ++-----------+----------------------------------+ +| *Getter* | get_max_contacts_reported() | ++-----------+----------------------------------+ + +The maximum number of contacts that will be recorded. Requires a value greater than 0 and :ref:`contact_monitor` to be set to ``true`` to start to register contacts. Use :ref:`get_contact_count` to retrieve the count or :ref:`get_colliding_bodies` to retrieve bodies that have been collided with. + +\ **Note:** The number of contacts is different from the number of collisions. Collisions between parallel edges will result in two contacts (one at each end), and collisions between parallel faces will result in four contacts (one at each corner). + +---- + +.. _class_RigidBody2D_property_physics_material_override: + +- :ref:`PhysicsMaterial` **physics_material_override** + ++----------+--------------------------------------+ +| *Setter* | set_physics_material_override(value) | ++----------+--------------------------------------+ +| *Getter* | get_physics_material_override() | ++----------+--------------------------------------+ + +The physics material override for the body. + +If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one. + +---- + +.. _class_RigidBody2D_property_sleeping: + +- :ref:`bool` **sleeping** + ++-----------+---------------------+ +| *Default* | ``false`` | ++-----------+---------------------+ +| *Setter* | set_sleeping(value) | ++-----------+---------------------+ +| *Getter* | is_sleeping() | ++-----------+---------------------+ + +If ``true``, the body will not move and will not calculate forces until woken up by another body through, for example, a collision, or by using the :ref:`apply_impulse` or :ref:`apply_force` methods. + +Method Descriptions +------------------- + +.. _class_RigidBody2D_method__integrate_forces: + +- void **_integrate_forces** **(** :ref:`PhysicsDirectBodyState2D` state **)** |virtual| + +Allows you to read and safely modify the simulation state for the object. Use this instead of :ref:`Node._physics_process` if you need to directly change the body's ``position`` or other physics properties. By default, it works in addition to the usual physics behavior, but :ref:`custom_integrator` allows you to disable the default behavior and write custom force integration for a body. + +---- + +.. _class_RigidBody2D_method_add_constant_central_force: + +- void **add_constant_central_force** **(** :ref:`Vector2` force **)** + +Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with ``constant_force = Vector2(0, 0)``. + +This is equivalent to using :ref:`add_constant_force` at the body's center of mass. + +---- + +.. _class_RigidBody2D_method_add_constant_force: + +- void **add_constant_force** **(** :ref:`Vector2` force, :ref:`Vector2` position=Vector2(0, 0) **)** + +Adds a constant positioned force to the body that keeps being applied over time until cleared with ``constant_force = Vector2(0, 0)``. + +``position`` is the offset from the body origin in global coordinates. + +---- + +.. _class_RigidBody2D_method_add_constant_torque: + +- void **add_constant_torque** **(** :ref:`float` torque **)** + +Adds a constant rotational force without affecting position that keeps being applied over time until cleared with ``constant_torque = 0``. + +---- + +.. _class_RigidBody2D_method_apply_central_force: + +- void **apply_central_force** **(** :ref:`Vector2` force **)** + +Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update. + +This is equivalent to using :ref:`apply_force` at the body's center of mass. + +---- + +.. _class_RigidBody2D_method_apply_central_impulse: + +- void **apply_central_impulse** **(** :ref:`Vector2` impulse=Vector2(0, 0) **)** + +Applies a directional impulse without affecting rotation. + +An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + +This is equivalent to using :ref:`apply_impulse` at the body's center of mass. + +---- + +.. _class_RigidBody2D_method_apply_force: + +- void **apply_force** **(** :ref:`Vector2` force, :ref:`Vector2` position=Vector2(0, 0) **)** + +Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update. + +``position`` is the offset from the body origin in global coordinates. + +---- + +.. _class_RigidBody2D_method_apply_impulse: + +- void **apply_impulse** **(** :ref:`Vector2` impulse, :ref:`Vector2` position=Vector2(0, 0) **)** + +Applies a positioned impulse to the body. + +An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + +``position`` is the offset from the body origin in global coordinates. + +---- + +.. _class_RigidBody2D_method_apply_torque: + +- void **apply_torque** **(** :ref:`float` torque **)** + +Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update. + +---- + +.. _class_RigidBody2D_method_apply_torque_impulse: + +- void **apply_torque_impulse** **(** :ref:`float` torque **)** + +Applies a rotational impulse to the body without affecting the position. + +An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + +---- + +.. _class_RigidBody2D_method_get_colliding_bodies: + +- :ref:`Node2D[]` **get_colliding_bodies** **(** **)** |const| + +Returns a list of the bodies colliding with this one. Requires :ref:`contact_monitor` to be set to ``true`` and :ref:`max_contacts_reported` to be set high enough to detect all the collisions. + +\ **Note:** The result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead. + +---- + +.. _class_RigidBody2D_method_get_contact_count: + +- :ref:`int` **get_contact_count** **(** **)** |const| + +Returns the number of contacts this body has with other bodies. By default, this returns 0 unless bodies are configured to monitor contacts (see :ref:`contact_monitor`). + +\ **Note:** To retrieve the colliding bodies, use :ref:`get_colliding_bodies`. + +---- + +.. _class_RigidBody2D_method_set_axis_velocity: + +- void **set_axis_velocity** **(** :ref:`Vector2` axis_velocity **)** + +Sets the body's velocity on the given axis. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_rigidbody3d.rst b/classes/class_rigidbody3d.rst new file mode 100644 index 000000000..f1fa417b8 --- /dev/null +++ b/classes/class_rigidbody3d.rst @@ -0,0 +1,762 @@ +: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/RigidBody3D.xml. + +.. _class_RigidBody3D: + +RigidBody3D +=========== + +**Inherits:** :ref:`PhysicsBody3D` **<** :ref:`CollisionObject3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` + +**Inherited By:** :ref:`VehicleBody3D` + +Physics Body which is moved by 3D physics simulation. Useful for objects that have gravity and can be pushed by other objects. + +Description +----------- + +This is the node that implements full 3D physics. This means that you do not control a RigidBody3D directly. Instead, you can apply forces to it (gravity, impulses, etc.), and the physics simulation will calculate the resulting movement, collision, bouncing, rotating, etc. + +You can switch the body's behavior using :ref:`lock_rotation`, :ref:`freeze`, and :ref:`freeze_mode`. + +\ **Note:** Don't change a RigidBody3D's position every frame or very often. Sporadic changes work fine, but physics runs at a different granularity (fixed Hz) than usual rendering (process callback) and maybe even in a separate thread, so changing this from a process loop may result in strange behavior. If you need to directly affect the body's state, use :ref:`_integrate_forces`, which allows you to directly access the physics state. + +If you need to override the default physics behavior, you can write a custom force integration function. See :ref:`custom_integrator`. + +Tutorials +--------- + +- :doc:`Physics introduction <../tutorials/physics/physics_introduction>` + +- `3D Truck Town Demo `__ + +- `3D Physics Tests Demo `__ + +Properties +---------- + ++------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ +| :ref:`float` | :ref:`angular_damp` | ``0.0`` | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ +| :ref:`DampMode` | :ref:`angular_damp_mode` | ``0`` | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ +| :ref:`Vector3` | :ref:`angular_velocity` | ``Vector3(0, 0, 0)`` | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ +| :ref:`bool` | :ref:`can_sleep` | ``true`` | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ +| :ref:`Vector3` | :ref:`center_of_mass` | ``Vector3(0, 0, 0)`` | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ +| :ref:`CenterOfMassMode` | :ref:`center_of_mass_mode` | ``0`` | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ +| :ref:`Vector3` | :ref:`constant_force` | ``Vector3(0, 0, 0)`` | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ +| :ref:`Vector3` | :ref:`constant_torque` | ``Vector3(0, 0, 0)`` | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ +| :ref:`bool` | :ref:`contact_monitor` | ``false`` | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ +| :ref:`bool` | :ref:`continuous_cd` | ``false`` | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ +| :ref:`bool` | :ref:`custom_integrator` | ``false`` | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ +| :ref:`bool` | :ref:`freeze` | ``false`` | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ +| :ref:`FreezeMode` | :ref:`freeze_mode` | ``0`` | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ +| :ref:`float` | :ref:`gravity_scale` | ``1.0`` | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ +| :ref:`Vector3` | :ref:`inertia` | ``Vector3(0, 0, 0)`` | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ +| :ref:`float` | :ref:`linear_damp` | ``0.0`` | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ +| :ref:`DampMode` | :ref:`linear_damp_mode` | ``0`` | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ +| :ref:`Vector3` | :ref:`linear_velocity` | ``Vector3(0, 0, 0)`` | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ +| :ref:`bool` | :ref:`lock_rotation` | ``false`` | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ +| :ref:`float` | :ref:`mass` | ``1.0`` | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ +| :ref:`int` | :ref:`max_contacts_reported` | ``0`` | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ +| :ref:`PhysicsMaterial` | :ref:`physics_material_override` | | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ +| :ref:`bool` | :ref:`sleeping` | ``false`` | ++------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ + +Methods +------- + ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_integrate_forces` **(** :ref:`PhysicsDirectBodyState3D` state **)** |virtual| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_constant_central_force` **(** :ref:`Vector3` force **)** | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_constant_force` **(** :ref:`Vector3` force, :ref:`Vector3` position=Vector3(0, 0, 0) **)** | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_constant_torque` **(** :ref:`Vector3` torque **)** | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`apply_central_force` **(** :ref:`Vector3` force **)** | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`apply_central_impulse` **(** :ref:`Vector3` impulse **)** | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`apply_force` **(** :ref:`Vector3` force, :ref:`Vector3` position=Vector3(0, 0, 0) **)** | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`apply_impulse` **(** :ref:`Vector3` impulse, :ref:`Vector3` position=Vector3(0, 0, 0) **)** | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`apply_torque` **(** :ref:`Vector3` torque **)** | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`apply_torque_impulse` **(** :ref:`Vector3` impulse **)** | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Node3D[]` | :ref:`get_colliding_bodies` **(** **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_contact_count` **(** **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Basis` | :ref:`get_inverse_inertia_tensor` **(** **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_axis_velocity` **(** :ref:`Vector3` axis_velocity **)** | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +.. _class_RigidBody3D_signal_body_entered: + +- **body_entered** **(** :ref:`Node` body **)** + +Emitted when a collision with another :ref:`PhysicsBody3D` or :ref:`GridMap` occurs. Requires :ref:`contact_monitor` to be set to ``true`` and :ref:`max_contacts_reported` to be set high enough to detect all the collisions. :ref:`GridMap`\ s are detected if the :ref:`MeshLibrary` has Collision :ref:`Shape3D`\ s. + +``body`` the :ref:`Node`, if it exists in the tree, of the other :ref:`PhysicsBody3D` or :ref:`GridMap`. + +---- + +.. _class_RigidBody3D_signal_body_exited: + +- **body_exited** **(** :ref:`Node` body **)** + +Emitted when the collision with another :ref:`PhysicsBody3D` or :ref:`GridMap` ends. Requires :ref:`contact_monitor` to be set to ``true`` and :ref:`max_contacts_reported` to be set high enough to detect all the collisions. :ref:`GridMap`\ s are detected if the :ref:`MeshLibrary` has Collision :ref:`Shape3D`\ s. + +``body`` the :ref:`Node`, if it exists in the tree, of the other :ref:`PhysicsBody3D` or :ref:`GridMap`. + +---- + +.. _class_RigidBody3D_signal_body_shape_entered: + +- **body_shape_entered** **(** :ref:`RID` body_rid, :ref:`Node` body, :ref:`int` body_shape_index, :ref:`int` local_shape_index **)** + +Emitted when one of this RigidBody3D's :ref:`Shape3D`\ s collides with another :ref:`PhysicsBody3D` or :ref:`GridMap`'s :ref:`Shape3D`\ s. Requires :ref:`contact_monitor` to be set to ``true`` and :ref:`max_contacts_reported` to be set high enough to detect all the collisions. :ref:`GridMap`\ s are detected if the :ref:`MeshLibrary` has Collision :ref:`Shape3D`\ s. + +``body_rid`` the :ref:`RID` of the other :ref:`PhysicsBody3D` or :ref:`MeshLibrary`'s :ref:`CollisionObject3D` used by the :ref:`PhysicsServer3D`. + +``body`` the :ref:`Node`, if it exists in the tree, of the other :ref:`PhysicsBody3D` or :ref:`GridMap`. + +``body_shape_index`` the index of the :ref:`Shape3D` of the other :ref:`PhysicsBody3D` or :ref:`GridMap` used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))``. + +``local_shape_index`` the index of the :ref:`Shape3D` of this RigidBody3D used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. + +---- + +.. _class_RigidBody3D_signal_body_shape_exited: + +- **body_shape_exited** **(** :ref:`RID` body_rid, :ref:`Node` body, :ref:`int` body_shape_index, :ref:`int` local_shape_index **)** + +Emitted when the collision between one of this RigidBody3D's :ref:`Shape3D`\ s and another :ref:`PhysicsBody3D` or :ref:`GridMap`'s :ref:`Shape3D`\ s ends. Requires :ref:`contact_monitor` to be set to ``true`` and :ref:`max_contacts_reported` to be set high enough to detect all the collisions. :ref:`GridMap`\ s are detected if the :ref:`MeshLibrary` has Collision :ref:`Shape3D`\ s. + +``body_rid`` the :ref:`RID` of the other :ref:`PhysicsBody3D` or :ref:`MeshLibrary`'s :ref:`CollisionObject3D` used by the :ref:`PhysicsServer3D`. :ref:`GridMap`\ s are detected if the Meshes have :ref:`Shape3D`\ s. + +``body`` the :ref:`Node`, if it exists in the tree, of the other :ref:`PhysicsBody3D` or :ref:`GridMap`. + +``body_shape_index`` the index of the :ref:`Shape3D` of the other :ref:`PhysicsBody3D` or :ref:`GridMap` used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))``. + +``local_shape_index`` the index of the :ref:`Shape3D` of this RigidBody3D used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. + +---- + +.. _class_RigidBody3D_signal_sleeping_state_changed: + +- **sleeping_state_changed** **(** **)** + +Emitted when the physics engine changes the body's sleeping state. + +\ **Note:** Changing the value :ref:`sleeping` will not trigger this signal. It is only emitted if the sleeping state is changed by the physics engine or ``emit_signal("sleeping_state_changed")`` is used. + +Enumerations +------------ + +.. _enum_RigidBody3D_FreezeMode: + +.. _class_RigidBody3D_constant_FREEZE_MODE_STATIC: + +.. _class_RigidBody3D_constant_FREEZE_MODE_KINEMATIC: + +enum **FreezeMode**: + +- **FREEZE_MODE_STATIC** = **0** --- Static body freeze mode (default). The body is not affected by gravity and forces. It can be only moved by user code and doesn't collide with other bodies along its path. + +- **FREEZE_MODE_KINEMATIC** = **1** --- Kinematic body freeze mode. Similar to :ref:`FREEZE_MODE_STATIC`, but collides with other bodies along its path when moved. Useful for a frozen body that needs to be animated. + +---- + +.. _enum_RigidBody3D_CenterOfMassMode: + +.. _class_RigidBody3D_constant_CENTER_OF_MASS_MODE_AUTO: + +.. _class_RigidBody3D_constant_CENTER_OF_MASS_MODE_CUSTOM: + +enum **CenterOfMassMode**: + +- **CENTER_OF_MASS_MODE_AUTO** = **0** --- In this mode, the body's center of mass is calculated automatically based on its shapes. + +- **CENTER_OF_MASS_MODE_CUSTOM** = **1** --- In this mode, the body's center of mass is set through :ref:`center_of_mass`. Defaults to the body's origin position. + +---- + +.. _enum_RigidBody3D_DampMode: + +.. _class_RigidBody3D_constant_DAMP_MODE_COMBINE: + +.. _class_RigidBody3D_constant_DAMP_MODE_REPLACE: + +enum **DampMode**: + +- **DAMP_MODE_COMBINE** = **0** --- In this mode, the body's damping value is added to any value set in areas or the default value. + +- **DAMP_MODE_REPLACE** = **1** --- In this mode, the body's damping value replaces any value set in areas or the default value. + +Property Descriptions +--------------------- + +.. _class_RigidBody3D_property_angular_damp: + +- :ref:`float` **angular_damp** + ++-----------+-------------------------+ +| *Default* | ``0.0`` | ++-----------+-------------------------+ +| *Setter* | set_angular_damp(value) | ++-----------+-------------------------+ +| *Getter* | get_angular_damp() | ++-----------+-------------------------+ + +Damps the body's rotation. By default, the body will use the **Default Angular Damp** in **Project > Project Settings > Physics > 3d** or any value override set by an :ref:`Area3D` the body is in. Depending on :ref:`angular_damp_mode`, you can set :ref:`angular_damp` to be added to or to replace the body's damping value. + +See :ref:`ProjectSettings.physics/3d/default_angular_damp` for more details about damping. + +---- + +.. _class_RigidBody3D_property_angular_damp_mode: + +- :ref:`DampMode` **angular_damp_mode** + ++-----------+------------------------------+ +| *Default* | ``0`` | ++-----------+------------------------------+ +| *Setter* | set_angular_damp_mode(value) | ++-----------+------------------------------+ +| *Getter* | get_angular_damp_mode() | ++-----------+------------------------------+ + +Defines how :ref:`angular_damp` is applied. See :ref:`DampMode` for possible values. + +---- + +.. _class_RigidBody3D_property_angular_velocity: + +- :ref:`Vector3` **angular_velocity** + ++-----------+-----------------------------+ +| *Default* | ``Vector3(0, 0, 0)`` | ++-----------+-----------------------------+ +| *Setter* | set_angular_velocity(value) | ++-----------+-----------------------------+ +| *Getter* | get_angular_velocity() | ++-----------+-----------------------------+ + +The RigidBody3D's rotational velocity in *radians* per second. + +---- + +.. _class_RigidBody3D_property_can_sleep: + +- :ref:`bool` **can_sleep** + ++-----------+----------------------+ +| *Default* | ``true`` | ++-----------+----------------------+ +| *Setter* | set_can_sleep(value) | ++-----------+----------------------+ +| *Getter* | is_able_to_sleep() | ++-----------+----------------------+ + +If ``true``, the body can enter sleep mode when there is no movement. See :ref:`sleeping`. + +---- + +.. _class_RigidBody3D_property_center_of_mass: + +- :ref:`Vector3` **center_of_mass** + ++-----------+---------------------------+ +| *Default* | ``Vector3(0, 0, 0)`` | ++-----------+---------------------------+ +| *Setter* | set_center_of_mass(value) | ++-----------+---------------------------+ +| *Getter* | get_center_of_mass() | ++-----------+---------------------------+ + +The body's custom center of mass, relative to the body's origin position, when :ref:`center_of_mass_mode` is set to :ref:`CENTER_OF_MASS_MODE_CUSTOM`. This is the balanced point of the body, where applied forces only cause linear acceleration. Applying forces outside of the center of mass causes angular acceleration. + +When :ref:`center_of_mass_mode` is set to :ref:`CENTER_OF_MASS_MODE_AUTO` (default value), the center of mass is automatically computed. + +---- + +.. _class_RigidBody3D_property_center_of_mass_mode: + +- :ref:`CenterOfMassMode` **center_of_mass_mode** + ++-----------+--------------------------------+ +| *Default* | ``0`` | ++-----------+--------------------------------+ +| *Setter* | set_center_of_mass_mode(value) | ++-----------+--------------------------------+ +| *Getter* | get_center_of_mass_mode() | ++-----------+--------------------------------+ + +Defines the way the body's center of mass is set. See :ref:`CenterOfMassMode` for possible values. + +---- + +.. _class_RigidBody3D_property_constant_force: + +- :ref:`Vector3` **constant_force** + ++-----------+---------------------------+ +| *Default* | ``Vector3(0, 0, 0)`` | ++-----------+---------------------------+ +| *Setter* | set_constant_force(value) | ++-----------+---------------------------+ +| *Getter* | get_constant_force() | ++-----------+---------------------------+ + +The body's total constant positional forces applied during each physics update. + +See :ref:`add_constant_force` and :ref:`add_constant_central_force`. + +---- + +.. _class_RigidBody3D_property_constant_torque: + +- :ref:`Vector3` **constant_torque** + ++-----------+----------------------------+ +| *Default* | ``Vector3(0, 0, 0)`` | ++-----------+----------------------------+ +| *Setter* | set_constant_torque(value) | ++-----------+----------------------------+ +| *Getter* | get_constant_torque() | ++-----------+----------------------------+ + +The body's total constant rotational forces applied during each physics update. + +See :ref:`add_constant_torque`. + +---- + +.. _class_RigidBody3D_property_contact_monitor: + +- :ref:`bool` **contact_monitor** + ++-----------+------------------------------+ +| *Default* | ``false`` | ++-----------+------------------------------+ +| *Setter* | set_contact_monitor(value) | ++-----------+------------------------------+ +| *Getter* | is_contact_monitor_enabled() | ++-----------+------------------------------+ + +If ``true``, the RigidBody3D will emit signals when it collides with another RigidBody3D. + +\ **Note:** By default the maximum contacts reported is set to 0, meaning nothing will be recorded, see :ref:`max_contacts_reported`. + +---- + +.. _class_RigidBody3D_property_continuous_cd: + +- :ref:`bool` **continuous_cd** + ++-----------+-----------------------------------------------+ +| *Default* | ``false`` | ++-----------+-----------------------------------------------+ +| *Setter* | set_use_continuous_collision_detection(value) | ++-----------+-----------------------------------------------+ +| *Getter* | is_using_continuous_collision_detection() | ++-----------+-----------------------------------------------+ + +If ``true``, continuous collision detection is used. + +Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. Continuous collision detection is more precise, and misses fewer impacts by small, fast-moving objects. Not using continuous collision detection is faster to compute, but can miss small, fast-moving objects. + +---- + +.. _class_RigidBody3D_property_custom_integrator: + +- :ref:`bool` **custom_integrator** + ++-----------+----------------------------------+ +| *Default* | ``false`` | ++-----------+----------------------------------+ +| *Setter* | set_use_custom_integrator(value) | ++-----------+----------------------------------+ +| *Getter* | is_using_custom_integrator() | ++-----------+----------------------------------+ + +If ``true``, internal force integration will be disabled (like gravity or air friction) for this body. Other than collision response, the body will only move as determined by the :ref:`_integrate_forces` function, if defined. + +---- + +.. _class_RigidBody3D_property_freeze: + +- :ref:`bool` **freeze** + ++-----------+---------------------------+ +| *Default* | ``false`` | ++-----------+---------------------------+ +| *Setter* | set_freeze_enabled(value) | ++-----------+---------------------------+ +| *Getter* | is_freeze_enabled() | ++-----------+---------------------------+ + +If ``true``, the body is frozen. Gravity and forces are not applied anymore. + +See :ref:`freeze_mode` to set the body's behavior when frozen. + +For a body that is always frozen, use :ref:`StaticBody3D` or :ref:`AnimatableBody3D` instead. + +---- + +.. _class_RigidBody3D_property_freeze_mode: + +- :ref:`FreezeMode` **freeze_mode** + ++-----------+------------------------+ +| *Default* | ``0`` | ++-----------+------------------------+ +| *Setter* | set_freeze_mode(value) | ++-----------+------------------------+ +| *Getter* | get_freeze_mode() | ++-----------+------------------------+ + +The body's freeze mode. Can be used to set the body's behavior when :ref:`freeze` is enabled. See :ref:`FreezeMode` for possible values. + +For a body that is always frozen, use :ref:`StaticBody3D` or :ref:`AnimatableBody3D` instead. + +---- + +.. _class_RigidBody3D_property_gravity_scale: + +- :ref:`float` **gravity_scale** + ++-----------+--------------------------+ +| *Default* | ``1.0`` | ++-----------+--------------------------+ +| *Setter* | set_gravity_scale(value) | ++-----------+--------------------------+ +| *Getter* | get_gravity_scale() | ++-----------+--------------------------+ + +This is multiplied by the global 3D gravity setting found in **Project > Project Settings > Physics > 3d** to produce RigidBody3D's gravity. For example, a value of 1 will be normal gravity, 2 will apply double gravity, and 0.5 will apply half gravity to this object. + +---- + +.. _class_RigidBody3D_property_inertia: + +- :ref:`Vector3` **inertia** + ++-----------+----------------------+ +| *Default* | ``Vector3(0, 0, 0)`` | ++-----------+----------------------+ +| *Setter* | set_inertia(value) | ++-----------+----------------------+ +| *Getter* | get_inertia() | ++-----------+----------------------+ + +The body's moment of inertia. This is like mass, but for rotation: it determines how much torque it takes to rotate the body on each axis. The moment of inertia is usually computed automatically from the mass and the shapes, but this property allows you to set a custom value. + +If set to ``Vector3.ZERO``, inertia is automatically computed (default value). + +---- + +.. _class_RigidBody3D_property_linear_damp: + +- :ref:`float` **linear_damp** + ++-----------+------------------------+ +| *Default* | ``0.0`` | ++-----------+------------------------+ +| *Setter* | set_linear_damp(value) | ++-----------+------------------------+ +| *Getter* | get_linear_damp() | ++-----------+------------------------+ + +Damps the body's movement. By default, the body will use the **Default Linear Damp** in **Project > Project Settings > Physics > 3d** or any value override set by an :ref:`Area3D` the body is in. Depending on :ref:`linear_damp_mode`, you can set :ref:`linear_damp` to be added to or to replace the body's damping value. + +See :ref:`ProjectSettings.physics/3d/default_linear_damp` for more details about damping. + +---- + +.. _class_RigidBody3D_property_linear_damp_mode: + +- :ref:`DampMode` **linear_damp_mode** + ++-----------+-----------------------------+ +| *Default* | ``0`` | ++-----------+-----------------------------+ +| *Setter* | set_linear_damp_mode(value) | ++-----------+-----------------------------+ +| *Getter* | get_linear_damp_mode() | ++-----------+-----------------------------+ + +Defines how :ref:`linear_damp` is applied. See :ref:`DampMode` for possible values. + +---- + +.. _class_RigidBody3D_property_linear_velocity: + +- :ref:`Vector3` **linear_velocity** + ++-----------+----------------------------+ +| *Default* | ``Vector3(0, 0, 0)`` | ++-----------+----------------------------+ +| *Setter* | set_linear_velocity(value) | ++-----------+----------------------------+ +| *Getter* | get_linear_velocity() | ++-----------+----------------------------+ + +The body's linear velocity in units per second. Can be used sporadically, but **don't set this every frame**, because physics may run in another thread and runs at a different granularity. Use :ref:`_integrate_forces` as your process loop for precise control of the body state. + +---- + +.. _class_RigidBody3D_property_lock_rotation: + +- :ref:`bool` **lock_rotation** + ++-----------+----------------------------------+ +| *Default* | ``false`` | ++-----------+----------------------------------+ +| *Setter* | set_lock_rotation_enabled(value) | ++-----------+----------------------------------+ +| *Getter* | is_lock_rotation_enabled() | ++-----------+----------------------------------+ + +If ``true``, the body cannot rotate. Gravity and forces only apply linear movement. + +---- + +.. _class_RigidBody3D_property_mass: + +- :ref:`float` **mass** + ++-----------+-----------------+ +| *Default* | ``1.0`` | ++-----------+-----------------+ +| *Setter* | set_mass(value) | ++-----------+-----------------+ +| *Getter* | get_mass() | ++-----------+-----------------+ + +The body's mass. + +---- + +.. _class_RigidBody3D_property_max_contacts_reported: + +- :ref:`int` **max_contacts_reported** + ++-----------+----------------------------------+ +| *Default* | ``0`` | ++-----------+----------------------------------+ +| *Setter* | set_max_contacts_reported(value) | ++-----------+----------------------------------+ +| *Getter* | get_max_contacts_reported() | ++-----------+----------------------------------+ + +The maximum number of contacts that will be recorded. Requires a value greater than 0 and :ref:`contact_monitor` to be set to ``true`` to start to register contacts. Use :ref:`get_contact_count` to retrieve the count or :ref:`get_colliding_bodies` to retrieve bodies that have been collided with. + +\ **Note:** The number of contacts is different from the number of collisions. Collisions between parallel edges will result in two contacts (one at each end), and collisions between parallel faces will result in four contacts (one at each corner). + +---- + +.. _class_RigidBody3D_property_physics_material_override: + +- :ref:`PhysicsMaterial` **physics_material_override** + ++----------+--------------------------------------+ +| *Setter* | set_physics_material_override(value) | ++----------+--------------------------------------+ +| *Getter* | get_physics_material_override() | ++----------+--------------------------------------+ + +The physics material override for the body. + +If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one. + +---- + +.. _class_RigidBody3D_property_sleeping: + +- :ref:`bool` **sleeping** + ++-----------+---------------------+ +| *Default* | ``false`` | ++-----------+---------------------+ +| *Setter* | set_sleeping(value) | ++-----------+---------------------+ +| *Getter* | is_sleeping() | ++-----------+---------------------+ + +If ``true``, the body will not move and will not calculate forces until woken up by another body through, for example, a collision, or by using the :ref:`apply_impulse` or :ref:`apply_force` methods. + +Method Descriptions +------------------- + +.. _class_RigidBody3D_method__integrate_forces: + +- void **_integrate_forces** **(** :ref:`PhysicsDirectBodyState3D` state **)** |virtual| + +Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default, it works in addition to the usual physics behavior, but the :ref:`custom_integrator` property allows you to disable the default behavior and do fully custom force integration for a body. + +---- + +.. _class_RigidBody3D_method_add_constant_central_force: + +- void **add_constant_central_force** **(** :ref:`Vector3` force **)** + +Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with ``constant_force = Vector3(0, 0, 0)``. + +This is equivalent to using :ref:`add_constant_force` at the body's center of mass. + +---- + +.. _class_RigidBody3D_method_add_constant_force: + +- void **add_constant_force** **(** :ref:`Vector3` force, :ref:`Vector3` position=Vector3(0, 0, 0) **)** + +Adds a constant positioned force to the body that keeps being applied over time until cleared with ``constant_force = Vector3(0, 0, 0)``. + +``position`` is the offset from the body origin in global coordinates. + +---- + +.. _class_RigidBody3D_method_add_constant_torque: + +- void **add_constant_torque** **(** :ref:`Vector3` torque **)** + +Adds a constant rotational force without affecting position that keeps being applied over time until cleared with ``constant_torque = Vector3(0, 0, 0)``. + +---- + +.. _class_RigidBody3D_method_apply_central_force: + +- void **apply_central_force** **(** :ref:`Vector3` force **)** + +Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update. + +This is equivalent to using :ref:`apply_force` at the body's center of mass. + +---- + +.. _class_RigidBody3D_method_apply_central_impulse: + +- void **apply_central_impulse** **(** :ref:`Vector3` impulse **)** + +Applies a directional impulse without affecting rotation. + +An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + +This is equivalent to using :ref:`apply_impulse` at the body's center of mass. + +---- + +.. _class_RigidBody3D_method_apply_force: + +- void **apply_force** **(** :ref:`Vector3` force, :ref:`Vector3` position=Vector3(0, 0, 0) **)** + +Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update. + +``position`` is the offset from the body origin in global coordinates. + +---- + +.. _class_RigidBody3D_method_apply_impulse: + +- void **apply_impulse** **(** :ref:`Vector3` impulse, :ref:`Vector3` position=Vector3(0, 0, 0) **)** + +Applies a positioned impulse to the body. + +An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + +``position`` is the offset from the body origin in global coordinates. + +---- + +.. _class_RigidBody3D_method_apply_torque: + +- void **apply_torque** **(** :ref:`Vector3` torque **)** + +Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update. + +---- + +.. _class_RigidBody3D_method_apply_torque_impulse: + +- void **apply_torque_impulse** **(** :ref:`Vector3` impulse **)** + +Applies a rotational impulse to the body without affecting the position. + +An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + +---- + +.. _class_RigidBody3D_method_get_colliding_bodies: + +- :ref:`Node3D[]` **get_colliding_bodies** **(** **)** |const| + +Returns a list of the bodies colliding with this one. Requires :ref:`contact_monitor` to be set to ``true`` and :ref:`max_contacts_reported` to be set high enough to detect all the collisions. + +\ **Note:** The result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead. + +---- + +.. _class_RigidBody3D_method_get_contact_count: + +- :ref:`int` **get_contact_count** **(** **)** |const| + +Returns the number of contacts this body has with other bodies. By default, this returns 0 unless bodies are configured to monitor contacts (see :ref:`contact_monitor`). + +\ **Note:** To retrieve the colliding bodies, use :ref:`get_colliding_bodies`. + +---- + +.. _class_RigidBody3D_method_get_inverse_inertia_tensor: + +- :ref:`Basis` **get_inverse_inertia_tensor** **(** **)** |const| + +Returns the inverse inertia tensor basis. This is used to calculate the angular acceleration resulting from a torque applied to the ``RigidBody3D``. + +---- + +.. _class_RigidBody3D_method_set_axis_velocity: + +- void **set_axis_velocity** **(** :ref:`Vector3` axis_velocity **)** + +Sets an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_rigiddynamicbody2d.rst b/classes/class_rigiddynamicbody2d.rst deleted file mode 100644 index a224b0297..000000000 --- a/classes/class_rigiddynamicbody2d.rst +++ /dev/null @@ -1,756 +0,0 @@ -: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/RigidDynamicBody2D.xml. - -.. _class_RigidDynamicBody2D: - -RigidDynamicBody2D -================== - -**Inherits:** :ref:`PhysicsBody2D` **<** :ref:`CollisionObject2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` - -**Inherited By:** :ref:`PhysicalBone2D` - -Physics Body which is moved by 2D physics simulation. Useful for objects that have gravity and can be pushed by other objects. - -Description ------------ - -This node implements simulated 2D physics. You do not control a RigidDynamicBody2D directly. Instead, you apply forces to it (gravity, impulses, etc.) and the physics simulation calculates the resulting movement based on its mass, friction, and other physical properties. - -You can switch the body's behavior using :ref:`lock_rotation`, :ref:`freeze`, and :ref:`freeze_mode`. - -\ **Note:** You should not change a RigidDynamicBody2D's ``position`` or ``linear_velocity`` every frame or even very often. If you need to directly affect the body's state, use :ref:`_integrate_forces`, which allows you to directly access the physics state. - -Please also keep in mind that physics bodies manage their own transform which overwrites the ones you set. So any direct or indirect transformation (including scaling of the node or its parent) will be visible in the editor only, and immediately reset at runtime. - -If you need to override the default physics behavior or add a transformation at runtime, you can write a custom force integration. See :ref:`custom_integrator`. - -Tutorials ---------- - -- `2D Physics Platformer Demo `__ - -- `Instancing Demo `__ - -Properties ----------- - -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`angular_damp` | ``0.0`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+-------------------+ -| :ref:`DampMode` | :ref:`angular_damp_mode` | ``0`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`angular_velocity` | ``0.0`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`can_sleep` | ``true`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`center_of_mass` | ``Vector2(0, 0)`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+-------------------+ -| :ref:`CenterOfMassMode` | :ref:`center_of_mass_mode` | ``0`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`constant_force` | ``Vector2(0, 0)`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`constant_torque` | ``0.0`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`contact_monitor` | ``false`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+-------------------+ -| :ref:`int` | :ref:`contacts_reported` | ``0`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+-------------------+ -| :ref:`CCDMode` | :ref:`continuous_cd` | ``0`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`custom_integrator` | ``false`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`freeze` | ``false`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+-------------------+ -| :ref:`FreezeMode` | :ref:`freeze_mode` | ``0`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`gravity_scale` | ``1.0`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`inertia` | ``0.0`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`linear_damp` | ``0.0`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+-------------------+ -| :ref:`DampMode` | :ref:`linear_damp_mode` | ``0`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`linear_velocity` | ``Vector2(0, 0)`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`lock_rotation` | ``false`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`mass` | ``1.0`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+-------------------+ -| :ref:`PhysicsMaterial` | :ref:`physics_material_override` | | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`sleeping` | ``false`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+-------------------+ - -Methods -------- - -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_integrate_forces` **(** :ref:`PhysicsDirectBodyState2D` state **)** |virtual| | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_constant_central_force` **(** :ref:`Vector2` force **)** | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_constant_force` **(** :ref:`Vector2` force, :ref:`Vector2` position=Vector2(0, 0) **)** | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_constant_torque` **(** :ref:`float` torque **)** | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`apply_central_force` **(** :ref:`Vector2` force **)** | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`apply_central_impulse` **(** :ref:`Vector2` impulse=Vector2(0, 0) **)** | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`apply_force` **(** :ref:`Vector2` force, :ref:`Vector2` position=Vector2(0, 0) **)** | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`apply_impulse` **(** :ref:`Vector2` impulse, :ref:`Vector2` position=Vector2(0, 0) **)** | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`apply_torque` **(** :ref:`float` torque **)** | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`apply_torque_impulse` **(** :ref:`float` torque **)** | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Node2D[]` | :ref:`get_colliding_bodies` **(** **)** |const| | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_axis_velocity` **(** :ref:`Vector2` axis_velocity **)** | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - -Signals -------- - -.. _class_RigidDynamicBody2D_signal_body_entered: - -- **body_entered** **(** :ref:`Node` body **)** - -Emitted when a collision with another :ref:`PhysicsBody2D` or :ref:`TileMap` occurs. Requires :ref:`contact_monitor` to be set to ``true`` and :ref:`contacts_reported` to be set high enough to detect all the collisions. :ref:`TileMap`\ s are detected if the :ref:`TileSet` has Collision :ref:`Shape2D`\ s. - -\ ``body`` the :ref:`Node`, if it exists in the tree, of the other :ref:`PhysicsBody2D` or :ref:`TileMap`. - ----- - -.. _class_RigidDynamicBody2D_signal_body_exited: - -- **body_exited** **(** :ref:`Node` body **)** - -Emitted when the collision with another :ref:`PhysicsBody2D` or :ref:`TileMap` ends. Requires :ref:`contact_monitor` to be set to ``true`` and :ref:`contacts_reported` to be set high enough to detect all the collisions. :ref:`TileMap`\ s are detected if the :ref:`TileSet` has Collision :ref:`Shape2D`\ s. - -\ ``body`` the :ref:`Node`, if it exists in the tree, of the other :ref:`PhysicsBody2D` or :ref:`TileMap`. - ----- - -.. _class_RigidDynamicBody2D_signal_body_shape_entered: - -- **body_shape_entered** **(** :ref:`RID` body_rid, :ref:`Node` body, :ref:`int` body_shape_index, :ref:`int` local_shape_index **)** - -Emitted when one of this RigidDynamicBody2D's :ref:`Shape2D`\ s collides with another :ref:`PhysicsBody2D` or :ref:`TileMap`'s :ref:`Shape2D`\ s. Requires :ref:`contact_monitor` to be set to ``true`` and :ref:`contacts_reported` to be set high enough to detect all the collisions. :ref:`TileMap`\ s are detected if the :ref:`TileSet` has Collision :ref:`Shape2D`\ s. - -\ ``body_rid`` the :ref:`RID` of the other :ref:`PhysicsBody2D` or :ref:`TileSet`'s :ref:`CollisionObject2D` used by the :ref:`PhysicsServer2D`. - -\ ``body`` the :ref:`Node`, if it exists in the tree, of the other :ref:`PhysicsBody2D` or :ref:`TileMap`. - -\ ``body_shape_index`` the index of the :ref:`Shape2D` of the other :ref:`PhysicsBody2D` or :ref:`TileMap` used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))``. - -\ ``local_shape_index`` the index of the :ref:`Shape2D` of this RigidDynamicBody2D used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. - ----- - -.. _class_RigidDynamicBody2D_signal_body_shape_exited: - -- **body_shape_exited** **(** :ref:`RID` body_rid, :ref:`Node` body, :ref:`int` body_shape_index, :ref:`int` local_shape_index **)** - -Emitted when the collision between one of this RigidDynamicBody2D's :ref:`Shape2D`\ s and another :ref:`PhysicsBody2D` or :ref:`TileMap`'s :ref:`Shape2D`\ s ends. Requires :ref:`contact_monitor` to be set to ``true`` and :ref:`contacts_reported` to be set high enough to detect all the collisions. :ref:`TileMap`\ s are detected if the :ref:`TileSet` has Collision :ref:`Shape2D`\ s. - -\ ``body_rid`` the :ref:`RID` of the other :ref:`PhysicsBody2D` or :ref:`TileSet`'s :ref:`CollisionObject2D` used by the :ref:`PhysicsServer2D`. - -\ ``body`` the :ref:`Node`, if it exists in the tree, of the other :ref:`PhysicsBody2D` or :ref:`TileMap`. - -\ ``body_shape_index`` the index of the :ref:`Shape2D` of the other :ref:`PhysicsBody2D` or :ref:`TileMap` used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))``. - -\ ``local_shape_index`` the index of the :ref:`Shape2D` of this RigidDynamicBody2D used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. - ----- - -.. _class_RigidDynamicBody2D_signal_sleeping_state_changed: - -- **sleeping_state_changed** **(** **)** - -Emitted when the physics engine changes the body's sleeping state. - -\ **Note:** Changing the value :ref:`sleeping` will not trigger this signal. It is only emitted if the sleeping state is changed by the physics engine or ``emit_signal("sleeping_state_changed")`` is used. - -Enumerations ------------- - -.. _enum_RigidDynamicBody2D_FreezeMode: - -.. _class_RigidDynamicBody2D_constant_FREEZE_MODE_STATIC: - -.. _class_RigidDynamicBody2D_constant_FREEZE_MODE_KINEMATIC: - -enum **FreezeMode**: - -- **FREEZE_MODE_STATIC** = **0** --- Static body freeze mode (default). The body is not affected by gravity and forces. It can be only moved by user code and doesn't collide with other bodies along its path. - -- **FREEZE_MODE_KINEMATIC** = **1** --- Kinematic body freeze mode. Similar to :ref:`FREEZE_MODE_STATIC`, but collides with other bodies along its path when moved. Useful for a frozen body that needs to be animated. - ----- - -.. _enum_RigidDynamicBody2D_CenterOfMassMode: - -.. _class_RigidDynamicBody2D_constant_CENTER_OF_MASS_MODE_AUTO: - -.. _class_RigidDynamicBody2D_constant_CENTER_OF_MASS_MODE_CUSTOM: - -enum **CenterOfMassMode**: - -- **CENTER_OF_MASS_MODE_AUTO** = **0** --- In this mode, the body's center of mass is calculated automatically based on its shapes. - -- **CENTER_OF_MASS_MODE_CUSTOM** = **1** --- In this mode, the body's center of mass is set through :ref:`center_of_mass`. Defaults to the body's origin position. - ----- - -.. _enum_RigidDynamicBody2D_DampMode: - -.. _class_RigidDynamicBody2D_constant_DAMP_MODE_COMBINE: - -.. _class_RigidDynamicBody2D_constant_DAMP_MODE_REPLACE: - -enum **DampMode**: - -- **DAMP_MODE_COMBINE** = **0** --- In this mode, the body's damping value is added to any value set in areas or the default value. - -- **DAMP_MODE_REPLACE** = **1** --- In this mode, the body's damping value replaces any value set in areas or the default value. - ----- - -.. _enum_RigidDynamicBody2D_CCDMode: - -.. _class_RigidDynamicBody2D_constant_CCD_MODE_DISABLED: - -.. _class_RigidDynamicBody2D_constant_CCD_MODE_CAST_RAY: - -.. _class_RigidDynamicBody2D_constant_CCD_MODE_CAST_SHAPE: - -enum **CCDMode**: - -- **CCD_MODE_DISABLED** = **0** --- Continuous collision detection disabled. This is the fastest way to detect body collisions, but can miss small, fast-moving objects. - -- **CCD_MODE_CAST_RAY** = **1** --- Continuous collision detection enabled using raycasting. This is faster than shapecasting but less precise. - -- **CCD_MODE_CAST_SHAPE** = **2** --- Continuous collision detection enabled using shapecasting. This is the slowest CCD method and the most precise. - -Property Descriptions ---------------------- - -.. _class_RigidDynamicBody2D_property_angular_damp: - -- :ref:`float` **angular_damp** - -+-----------+-------------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------------+ -| *Setter* | set_angular_damp(value) | -+-----------+-------------------------+ -| *Getter* | get_angular_damp() | -+-----------+-------------------------+ - -Damps the body's rotation. By default, the body will use the **Default Angular Damp** in **Project > Project Settings > Physics > 2d** or any value override set by an :ref:`Area2D` the body is in. Depending on :ref:`angular_damp_mode`, you can set :ref:`angular_damp` to be added to or to replace the body's damping value. - -See :ref:`ProjectSettings.physics/2d/default_angular_damp` for more details about damping. - ----- - -.. _class_RigidDynamicBody2D_property_angular_damp_mode: - -- :ref:`DampMode` **angular_damp_mode** - -+-----------+------------------------------+ -| *Default* | ``0`` | -+-----------+------------------------------+ -| *Setter* | set_angular_damp_mode(value) | -+-----------+------------------------------+ -| *Getter* | get_angular_damp_mode() | -+-----------+------------------------------+ - -Defines how :ref:`angular_damp` is applied. See :ref:`DampMode` for possible values. - ----- - -.. _class_RigidDynamicBody2D_property_angular_velocity: - -- :ref:`float` **angular_velocity** - -+-----------+-----------------------------+ -| *Default* | ``0.0`` | -+-----------+-----------------------------+ -| *Setter* | set_angular_velocity(value) | -+-----------+-----------------------------+ -| *Getter* | get_angular_velocity() | -+-----------+-----------------------------+ - -The body's rotational velocity in *radians* per second. - ----- - -.. _class_RigidDynamicBody2D_property_can_sleep: - -- :ref:`bool` **can_sleep** - -+-----------+----------------------+ -| *Default* | ``true`` | -+-----------+----------------------+ -| *Setter* | set_can_sleep(value) | -+-----------+----------------------+ -| *Getter* | is_able_to_sleep() | -+-----------+----------------------+ - -If ``true``, the body can enter sleep mode when there is no movement. See :ref:`sleeping`. - ----- - -.. _class_RigidDynamicBody2D_property_center_of_mass: - -- :ref:`Vector2` **center_of_mass** - -+-----------+---------------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+---------------------------+ -| *Setter* | set_center_of_mass(value) | -+-----------+---------------------------+ -| *Getter* | get_center_of_mass() | -+-----------+---------------------------+ - -The body's custom center of mass, relative to the body's origin position, when :ref:`center_of_mass_mode` is set to :ref:`CENTER_OF_MASS_MODE_CUSTOM`. This is the balanced point of the body, where applied forces only cause linear acceleration. Applying forces outside of the center of mass causes angular acceleration. - -When :ref:`center_of_mass_mode` is set to :ref:`CENTER_OF_MASS_MODE_AUTO` (default value), the center of mass is automatically computed. - ----- - -.. _class_RigidDynamicBody2D_property_center_of_mass_mode: - -- :ref:`CenterOfMassMode` **center_of_mass_mode** - -+-----------+--------------------------------+ -| *Default* | ``0`` | -+-----------+--------------------------------+ -| *Setter* | set_center_of_mass_mode(value) | -+-----------+--------------------------------+ -| *Getter* | get_center_of_mass_mode() | -+-----------+--------------------------------+ - -Defines the way the body's center of mass is set. See :ref:`CenterOfMassMode` for possible values. - ----- - -.. _class_RigidDynamicBody2D_property_constant_force: - -- :ref:`Vector2` **constant_force** - -+-----------+---------------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+---------------------------+ -| *Setter* | set_constant_force(value) | -+-----------+---------------------------+ -| *Getter* | get_constant_force() | -+-----------+---------------------------+ - -The body's total constant positional forces applied during each physics update. - -See :ref:`add_constant_force` and :ref:`add_constant_central_force`. - ----- - -.. _class_RigidDynamicBody2D_property_constant_torque: - -- :ref:`float` **constant_torque** - -+-----------+----------------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------------+ -| *Setter* | set_constant_torque(value) | -+-----------+----------------------------+ -| *Getter* | get_constant_torque() | -+-----------+----------------------------+ - -The body's total constant rotational forces applied during each physics update. - -See :ref:`add_constant_torque`. - ----- - -.. _class_RigidDynamicBody2D_property_contact_monitor: - -- :ref:`bool` **contact_monitor** - -+-----------+------------------------------+ -| *Default* | ``false`` | -+-----------+------------------------------+ -| *Setter* | set_contact_monitor(value) | -+-----------+------------------------------+ -| *Getter* | is_contact_monitor_enabled() | -+-----------+------------------------------+ - -If ``true``, the body will emit signals when it collides with another RigidDynamicBody2D. See also :ref:`contacts_reported`. - ----- - -.. _class_RigidDynamicBody2D_property_contacts_reported: - -- :ref:`int` **contacts_reported** - -+-----------+----------------------------------+ -| *Default* | ``0`` | -+-----------+----------------------------------+ -| *Setter* | set_max_contacts_reported(value) | -+-----------+----------------------------------+ -| *Getter* | get_max_contacts_reported() | -+-----------+----------------------------------+ - -The maximum number of contacts that will be recorded. Requires :ref:`contact_monitor` to be set to ``true``. - -\ **Note:** The number of contacts is different from the number of collisions. Collisions between parallel edges will result in two contacts (one at each end). - ----- - -.. _class_RigidDynamicBody2D_property_continuous_cd: - -- :ref:`CCDMode` **continuous_cd** - -+-----------+------------------------------------------------+ -| *Default* | ``0`` | -+-----------+------------------------------------------------+ -| *Setter* | set_continuous_collision_detection_mode(value) | -+-----------+------------------------------------------------+ -| *Getter* | get_continuous_collision_detection_mode() | -+-----------+------------------------------------------------+ - -Continuous collision detection mode. - -Continuous collision detection tries to predict where a moving body will collide instead of moving it and correcting its movement after collision. Continuous collision detection is slower, but more precise and misses fewer collisions with small, fast-moving objects. Raycasting and shapecasting methods are available. See :ref:`CCDMode` for details. - ----- - -.. _class_RigidDynamicBody2D_property_custom_integrator: - -- :ref:`bool` **custom_integrator** - -+-----------+----------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------+ -| *Setter* | set_use_custom_integrator(value) | -+-----------+----------------------------------+ -| *Getter* | is_using_custom_integrator() | -+-----------+----------------------------------+ - -If ``true``, internal force integration is disabled for this body. Aside from collision response, the body will only move as determined by the :ref:`_integrate_forces` function. - ----- - -.. _class_RigidDynamicBody2D_property_freeze: - -- :ref:`bool` **freeze** - -+-----------+---------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------+ -| *Setter* | set_freeze_enabled(value) | -+-----------+---------------------------+ -| *Getter* | is_freeze_enabled() | -+-----------+---------------------------+ - -If ``true``, the body is frozen. Gravity and forces are not applied anymore. - -See :ref:`freeze_mode` to set the body's behavior when frozen. - -For a body that is always frozen, use :ref:`StaticBody2D` or :ref:`AnimatableBody2D` instead. - ----- - -.. _class_RigidDynamicBody2D_property_freeze_mode: - -- :ref:`FreezeMode` **freeze_mode** - -+-----------+------------------------+ -| *Default* | ``0`` | -+-----------+------------------------+ -| *Setter* | set_freeze_mode(value) | -+-----------+------------------------+ -| *Getter* | get_freeze_mode() | -+-----------+------------------------+ - -The body's freeze mode. Can be used to set the body's behavior when :ref:`freeze` is enabled. See :ref:`FreezeMode` for possible values. - -For a body that is always frozen, use :ref:`StaticBody2D` or :ref:`AnimatableBody2D` instead. - ----- - -.. _class_RigidDynamicBody2D_property_gravity_scale: - -- :ref:`float` **gravity_scale** - -+-----------+--------------------------+ -| *Default* | ``1.0`` | -+-----------+--------------------------+ -| *Setter* | set_gravity_scale(value) | -+-----------+--------------------------+ -| *Getter* | get_gravity_scale() | -+-----------+--------------------------+ - -Multiplies the gravity applied to the body. The body's gravity is calculated from the **Default Gravity** value in **Project > Project Settings > Physics > 2d** and/or any additional gravity vector applied by :ref:`Area2D`\ s. - ----- - -.. _class_RigidDynamicBody2D_property_inertia: - -- :ref:`float` **inertia** - -+-----------+--------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------+ -| *Setter* | set_inertia(value) | -+-----------+--------------------+ -| *Getter* | get_inertia() | -+-----------+--------------------+ - -The body's moment of inertia. This is like mass, but for rotation: it determines how much torque it takes to rotate the body. The moment of inertia is usually computed automatically from the mass and the shapes, but this property allows you to set a custom value. - -If set to ``0``, inertia is automatically computed (default value). - ----- - -.. _class_RigidDynamicBody2D_property_linear_damp: - -- :ref:`float` **linear_damp** - -+-----------+------------------------+ -| *Default* | ``0.0`` | -+-----------+------------------------+ -| *Setter* | set_linear_damp(value) | -+-----------+------------------------+ -| *Getter* | get_linear_damp() | -+-----------+------------------------+ - -Damps the body's movement. By default, the body will use the **Default Linear Damp** in **Project > Project Settings > Physics > 2d** or any value override set by an :ref:`Area2D` the body is in. Depending on :ref:`linear_damp_mode`, you can set :ref:`linear_damp` to be added to or to replace the body's damping value. - -See :ref:`ProjectSettings.physics/2d/default_linear_damp` for more details about damping. - ----- - -.. _class_RigidDynamicBody2D_property_linear_damp_mode: - -- :ref:`DampMode` **linear_damp_mode** - -+-----------+-----------------------------+ -| *Default* | ``0`` | -+-----------+-----------------------------+ -| *Setter* | set_linear_damp_mode(value) | -+-----------+-----------------------------+ -| *Getter* | get_linear_damp_mode() | -+-----------+-----------------------------+ - -Defines how :ref:`linear_damp` is applied. See :ref:`DampMode` for possible values. - ----- - -.. _class_RigidDynamicBody2D_property_linear_velocity: - -- :ref:`Vector2` **linear_velocity** - -+-----------+----------------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+----------------------------+ -| *Setter* | set_linear_velocity(value) | -+-----------+----------------------------+ -| *Getter* | get_linear_velocity() | -+-----------+----------------------------+ - -The body's linear velocity in pixels per second. Can be used sporadically, but **don't set this every frame**, because physics may run in another thread and runs at a different granularity. Use :ref:`_integrate_forces` as your process loop for precise control of the body state. - ----- - -.. _class_RigidDynamicBody2D_property_lock_rotation: - -- :ref:`bool` **lock_rotation** - -+-----------+----------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------+ -| *Setter* | set_lock_rotation_enabled(value) | -+-----------+----------------------------------+ -| *Getter* | is_lock_rotation_enabled() | -+-----------+----------------------------------+ - -If ``true``, the body cannot rotate. Gravity and forces only apply linear movement. - ----- - -.. _class_RigidDynamicBody2D_property_mass: - -- :ref:`float` **mass** - -+-----------+-----------------+ -| *Default* | ``1.0`` | -+-----------+-----------------+ -| *Setter* | set_mass(value) | -+-----------+-----------------+ -| *Getter* | get_mass() | -+-----------+-----------------+ - -The body's mass. - ----- - -.. _class_RigidDynamicBody2D_property_physics_material_override: - -- :ref:`PhysicsMaterial` **physics_material_override** - -+----------+--------------------------------------+ -| *Setter* | set_physics_material_override(value) | -+----------+--------------------------------------+ -| *Getter* | get_physics_material_override() | -+----------+--------------------------------------+ - -The physics material override for the body. - -If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one. - ----- - -.. _class_RigidDynamicBody2D_property_sleeping: - -- :ref:`bool` **sleeping** - -+-----------+---------------------+ -| *Default* | ``false`` | -+-----------+---------------------+ -| *Setter* | set_sleeping(value) | -+-----------+---------------------+ -| *Getter* | is_sleeping() | -+-----------+---------------------+ - -If ``true``, the body will not move and will not calculate forces until woken up by another body through, for example, a collision, or by using the :ref:`apply_impulse` or :ref:`apply_force` methods. - -Method Descriptions -------------------- - -.. _class_RigidDynamicBody2D_method__integrate_forces: - -- void **_integrate_forces** **(** :ref:`PhysicsDirectBodyState2D` state **)** |virtual| - -Allows you to read and safely modify the simulation state for the object. Use this instead of :ref:`Node._physics_process` if you need to directly change the body's ``position`` or other physics properties. By default, it works in addition to the usual physics behavior, but :ref:`custom_integrator` allows you to disable the default behavior and write custom force integration for a body. - ----- - -.. _class_RigidDynamicBody2D_method_add_constant_central_force: - -- void **add_constant_central_force** **(** :ref:`Vector2` force **)** - -Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with ``constant_force = Vector2(0, 0)``. - -This is equivalent to using :ref:`add_constant_force` at the body's center of mass. - ----- - -.. _class_RigidDynamicBody2D_method_add_constant_force: - -- void **add_constant_force** **(** :ref:`Vector2` force, :ref:`Vector2` position=Vector2(0, 0) **)** - -Adds a constant positioned force to the body that keeps being applied over time until cleared with ``constant_force = Vector2(0, 0)``. - -\ ``position`` is the offset from the body origin in global coordinates. - ----- - -.. _class_RigidDynamicBody2D_method_add_constant_torque: - -- void **add_constant_torque** **(** :ref:`float` torque **)** - -Adds a constant rotational force without affecting position that keeps being applied over time until cleared with ``constant_torque = 0``. - ----- - -.. _class_RigidDynamicBody2D_method_apply_central_force: - -- void **apply_central_force** **(** :ref:`Vector2` force **)** - -Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update. - -This is equivalent to using :ref:`apply_force` at the body's center of mass. - ----- - -.. _class_RigidDynamicBody2D_method_apply_central_impulse: - -- void **apply_central_impulse** **(** :ref:`Vector2` impulse=Vector2(0, 0) **)** - -Applies a directional impulse without affecting rotation. - -An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). - -This is equivalent to using :ref:`apply_impulse` at the body's center of mass. - ----- - -.. _class_RigidDynamicBody2D_method_apply_force: - -- void **apply_force** **(** :ref:`Vector2` force, :ref:`Vector2` position=Vector2(0, 0) **)** - -Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update. - -\ ``position`` is the offset from the body origin in global coordinates. - ----- - -.. _class_RigidDynamicBody2D_method_apply_impulse: - -- void **apply_impulse** **(** :ref:`Vector2` impulse, :ref:`Vector2` position=Vector2(0, 0) **)** - -Applies a positioned impulse to the body. - -An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). - -\ ``position`` is the offset from the body origin in global coordinates. - ----- - -.. _class_RigidDynamicBody2D_method_apply_torque: - -- void **apply_torque** **(** :ref:`float` torque **)** - -Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update. - ----- - -.. _class_RigidDynamicBody2D_method_apply_torque_impulse: - -- void **apply_torque_impulse** **(** :ref:`float` torque **)** - -Applies a rotational impulse to the body without affecting the position. - -An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). - ----- - -.. _class_RigidDynamicBody2D_method_get_colliding_bodies: - -- :ref:`Node2D[]` **get_colliding_bodies** **(** **)** |const| - -Returns a list of the bodies colliding with this one. Requires :ref:`contact_monitor` to be set to ``true`` and :ref:`contacts_reported` to be set high enough to detect all the collisions. - -\ **Note:** The result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead. - ----- - -.. _class_RigidDynamicBody2D_method_set_axis_velocity: - -- void **set_axis_velocity** **(** :ref:`Vector2` axis_velocity **)** - -Sets the body's velocity on the given axis. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior. - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_rigiddynamicbody3d.rst b/classes/class_rigiddynamicbody3d.rst deleted file mode 100644 index 2833cb7b6..000000000 --- a/classes/class_rigiddynamicbody3d.rst +++ /dev/null @@ -1,748 +0,0 @@ -: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/RigidDynamicBody3D.xml. - -.. _class_RigidDynamicBody3D: - -RigidDynamicBody3D -================== - -**Inherits:** :ref:`PhysicsBody3D` **<** :ref:`CollisionObject3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` - -**Inherited By:** :ref:`VehicleBody3D` - -Physics Body which is moved by 3D physics simulation. Useful for objects that have gravity and can be pushed by other objects. - -Description ------------ - -This is the node that implements full 3D physics. This means that you do not control a RigidDynamicBody3D directly. Instead, you can apply forces to it (gravity, impulses, etc.), and the physics simulation will calculate the resulting movement, collision, bouncing, rotating, etc. - -You can switch the body's behavior using :ref:`lock_rotation`, :ref:`freeze`, and :ref:`freeze_mode`. - -\ **Note:** Don't change a RigidDynamicBody3D's position every frame or very often. Sporadic changes work fine, but physics runs at a different granularity (fixed Hz) than usual rendering (process callback) and maybe even in a separate thread, so changing this from a process loop may result in strange behavior. If you need to directly affect the body's state, use :ref:`_integrate_forces`, which allows you to directly access the physics state. - -If you need to override the default physics behavior, you can write a custom force integration function. See :ref:`custom_integrator`. - -Tutorials ---------- - -- :doc:`Physics introduction <../tutorials/physics/physics_introduction>` - -- `3D Truck Town Demo `__ - -- `3D Physics Tests Demo `__ - -Properties ----------- - -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+----------------------+ -| :ref:`float` | :ref:`angular_damp` | ``0.0`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+----------------------+ -| :ref:`DampMode` | :ref:`angular_damp_mode` | ``0`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`angular_velocity` | ``Vector3(0, 0, 0)`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+----------------------+ -| :ref:`bool` | :ref:`can_sleep` | ``true`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`center_of_mass` | ``Vector3(0, 0, 0)`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+----------------------+ -| :ref:`CenterOfMassMode` | :ref:`center_of_mass_mode` | ``0`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`constant_force` | ``Vector3(0, 0, 0)`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`constant_torque` | ``Vector3(0, 0, 0)`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+----------------------+ -| :ref:`bool` | :ref:`contact_monitor` | ``false`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+----------------------+ -| :ref:`int` | :ref:`contacts_reported` | ``0`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+----------------------+ -| :ref:`bool` | :ref:`continuous_cd` | ``false`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+----------------------+ -| :ref:`bool` | :ref:`custom_integrator` | ``false`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+----------------------+ -| :ref:`bool` | :ref:`freeze` | ``false`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+----------------------+ -| :ref:`FreezeMode` | :ref:`freeze_mode` | ``0`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+----------------------+ -| :ref:`float` | :ref:`gravity_scale` | ``1.0`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`inertia` | ``Vector3(0, 0, 0)`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+----------------------+ -| :ref:`float` | :ref:`linear_damp` | ``0.0`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+----------------------+ -| :ref:`DampMode` | :ref:`linear_damp_mode` | ``0`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`linear_velocity` | ``Vector3(0, 0, 0)`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+----------------------+ -| :ref:`bool` | :ref:`lock_rotation` | ``false`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+----------------------+ -| :ref:`float` | :ref:`mass` | ``1.0`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+----------------------+ -| :ref:`PhysicsMaterial` | :ref:`physics_material_override` | | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+----------------------+ -| :ref:`bool` | :ref:`sleeping` | ``false`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+----------------------+ - -Methods -------- - -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_integrate_forces` **(** :ref:`PhysicsDirectBodyState3D` state **)** |virtual| | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_constant_central_force` **(** :ref:`Vector3` force **)** | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_constant_force` **(** :ref:`Vector3` force, :ref:`Vector3` position=Vector3(0, 0, 0) **)** | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_constant_torque` **(** :ref:`Vector3` torque **)** | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`apply_central_force` **(** :ref:`Vector3` force **)** | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`apply_central_impulse` **(** :ref:`Vector3` impulse **)** | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`apply_force` **(** :ref:`Vector3` force, :ref:`Vector3` position=Vector3(0, 0, 0) **)** | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`apply_impulse` **(** :ref:`Vector3` impulse, :ref:`Vector3` position=Vector3(0, 0, 0) **)** | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`apply_torque` **(** :ref:`Vector3` torque **)** | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`apply_torque_impulse` **(** :ref:`Vector3` impulse **)** | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_colliding_bodies` **(** **)** |const| | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Basis` | :ref:`get_inverse_inertia_tensor` **(** **)** |const| | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_axis_velocity` **(** :ref:`Vector3` axis_velocity **)** | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - -Signals -------- - -.. _class_RigidDynamicBody3D_signal_body_entered: - -- **body_entered** **(** :ref:`Node` body **)** - -Emitted when a collision with another :ref:`PhysicsBody3D` or :ref:`GridMap` occurs. Requires :ref:`contact_monitor` to be set to ``true`` and :ref:`contacts_reported` to be set high enough to detect all the collisions. :ref:`GridMap`\ s are detected if the :ref:`MeshLibrary` has Collision :ref:`Shape3D`\ s. - -\ ``body`` the :ref:`Node`, if it exists in the tree, of the other :ref:`PhysicsBody3D` or :ref:`GridMap`. - ----- - -.. _class_RigidDynamicBody3D_signal_body_exited: - -- **body_exited** **(** :ref:`Node` body **)** - -Emitted when the collision with another :ref:`PhysicsBody3D` or :ref:`GridMap` ends. Requires :ref:`contact_monitor` to be set to ``true`` and :ref:`contacts_reported` to be set high enough to detect all the collisions. :ref:`GridMap`\ s are detected if the :ref:`MeshLibrary` has Collision :ref:`Shape3D`\ s. - -\ ``body`` the :ref:`Node`, if it exists in the tree, of the other :ref:`PhysicsBody3D` or :ref:`GridMap`. - ----- - -.. _class_RigidDynamicBody3D_signal_body_shape_entered: - -- **body_shape_entered** **(** :ref:`RID` body_rid, :ref:`Node` body, :ref:`int` body_shape_index, :ref:`int` local_shape_index **)** - -Emitted when one of this RigidDynamicBody3D's :ref:`Shape3D`\ s collides with another :ref:`PhysicsBody3D` or :ref:`GridMap`'s :ref:`Shape3D`\ s. Requires :ref:`contact_monitor` to be set to ``true`` and :ref:`contacts_reported` to be set high enough to detect all the collisions. :ref:`GridMap`\ s are detected if the :ref:`MeshLibrary` has Collision :ref:`Shape3D`\ s. - -\ ``body_rid`` the :ref:`RID` of the other :ref:`PhysicsBody3D` or :ref:`MeshLibrary`'s :ref:`CollisionObject3D` used by the :ref:`PhysicsServer3D`. - -\ ``body`` the :ref:`Node`, if it exists in the tree, of the other :ref:`PhysicsBody3D` or :ref:`GridMap`. - -\ ``body_shape_index`` the index of the :ref:`Shape3D` of the other :ref:`PhysicsBody3D` or :ref:`GridMap` used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))``. - -\ ``local_shape_index`` the index of the :ref:`Shape3D` of this RigidDynamicBody3D used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. - ----- - -.. _class_RigidDynamicBody3D_signal_body_shape_exited: - -- **body_shape_exited** **(** :ref:`RID` body_rid, :ref:`Node` body, :ref:`int` body_shape_index, :ref:`int` local_shape_index **)** - -Emitted when the collision between one of this RigidDynamicBody3D's :ref:`Shape3D`\ s and another :ref:`PhysicsBody3D` or :ref:`GridMap`'s :ref:`Shape3D`\ s ends. Requires :ref:`contact_monitor` to be set to ``true`` and :ref:`contacts_reported` to be set high enough to detect all the collisions. :ref:`GridMap`\ s are detected if the :ref:`MeshLibrary` has Collision :ref:`Shape3D`\ s. - -\ ``body_rid`` the :ref:`RID` of the other :ref:`PhysicsBody3D` or :ref:`MeshLibrary`'s :ref:`CollisionObject3D` used by the :ref:`PhysicsServer3D`. :ref:`GridMap`\ s are detected if the Meshes have :ref:`Shape3D`\ s. - -\ ``body`` the :ref:`Node`, if it exists in the tree, of the other :ref:`PhysicsBody3D` or :ref:`GridMap`. - -\ ``body_shape_index`` the index of the :ref:`Shape3D` of the other :ref:`PhysicsBody3D` or :ref:`GridMap` used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))``. - -\ ``local_shape_index`` the index of the :ref:`Shape3D` of this RigidDynamicBody3D used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. - ----- - -.. _class_RigidDynamicBody3D_signal_sleeping_state_changed: - -- **sleeping_state_changed** **(** **)** - -Emitted when the physics engine changes the body's sleeping state. - -\ **Note:** Changing the value :ref:`sleeping` will not trigger this signal. It is only emitted if the sleeping state is changed by the physics engine or ``emit_signal("sleeping_state_changed")`` is used. - -Enumerations ------------- - -.. _enum_RigidDynamicBody3D_FreezeMode: - -.. _class_RigidDynamicBody3D_constant_FREEZE_MODE_STATIC: - -.. _class_RigidDynamicBody3D_constant_FREEZE_MODE_KINEMATIC: - -enum **FreezeMode**: - -- **FREEZE_MODE_STATIC** = **0** --- Static body freeze mode (default). The body is not affected by gravity and forces. It can be only moved by user code and doesn't collide with other bodies along its path. - -- **FREEZE_MODE_KINEMATIC** = **1** --- Kinematic body freeze mode. Similar to :ref:`FREEZE_MODE_STATIC`, but collides with other bodies along its path when moved. Useful for a frozen body that needs to be animated. - ----- - -.. _enum_RigidDynamicBody3D_CenterOfMassMode: - -.. _class_RigidDynamicBody3D_constant_CENTER_OF_MASS_MODE_AUTO: - -.. _class_RigidDynamicBody3D_constant_CENTER_OF_MASS_MODE_CUSTOM: - -enum **CenterOfMassMode**: - -- **CENTER_OF_MASS_MODE_AUTO** = **0** --- In this mode, the body's center of mass is calculated automatically based on its shapes. - -- **CENTER_OF_MASS_MODE_CUSTOM** = **1** --- In this mode, the body's center of mass is set through :ref:`center_of_mass`. Defaults to the body's origin position. - ----- - -.. _enum_RigidDynamicBody3D_DampMode: - -.. _class_RigidDynamicBody3D_constant_DAMP_MODE_COMBINE: - -.. _class_RigidDynamicBody3D_constant_DAMP_MODE_REPLACE: - -enum **DampMode**: - -- **DAMP_MODE_COMBINE** = **0** --- In this mode, the body's damping value is added to any value set in areas or the default value. - -- **DAMP_MODE_REPLACE** = **1** --- In this mode, the body's damping value replaces any value set in areas or the default value. - -Property Descriptions ---------------------- - -.. _class_RigidDynamicBody3D_property_angular_damp: - -- :ref:`float` **angular_damp** - -+-----------+-------------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------------+ -| *Setter* | set_angular_damp(value) | -+-----------+-------------------------+ -| *Getter* | get_angular_damp() | -+-----------+-------------------------+ - -Damps the body's rotation. By default, the body will use the **Default Angular Damp** in **Project > Project Settings > Physics > 3d** or any value override set by an :ref:`Area3D` the body is in. Depending on :ref:`angular_damp_mode`, you can set :ref:`angular_damp` to be added to or to replace the body's damping value. - -See :ref:`ProjectSettings.physics/3d/default_angular_damp` for more details about damping. - ----- - -.. _class_RigidDynamicBody3D_property_angular_damp_mode: - -- :ref:`DampMode` **angular_damp_mode** - -+-----------+------------------------------+ -| *Default* | ``0`` | -+-----------+------------------------------+ -| *Setter* | set_angular_damp_mode(value) | -+-----------+------------------------------+ -| *Getter* | get_angular_damp_mode() | -+-----------+------------------------------+ - -Defines how :ref:`angular_damp` is applied. See :ref:`DampMode` for possible values. - ----- - -.. _class_RigidDynamicBody3D_property_angular_velocity: - -- :ref:`Vector3` **angular_velocity** - -+-----------+-----------------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+-----------------------------+ -| *Setter* | set_angular_velocity(value) | -+-----------+-----------------------------+ -| *Getter* | get_angular_velocity() | -+-----------+-----------------------------+ - -The RigidDynamicBody3D's rotational velocity in *radians* per second. - ----- - -.. _class_RigidDynamicBody3D_property_can_sleep: - -- :ref:`bool` **can_sleep** - -+-----------+----------------------+ -| *Default* | ``true`` | -+-----------+----------------------+ -| *Setter* | set_can_sleep(value) | -+-----------+----------------------+ -| *Getter* | is_able_to_sleep() | -+-----------+----------------------+ - -If ``true``, the body can enter sleep mode when there is no movement. See :ref:`sleeping`. - ----- - -.. _class_RigidDynamicBody3D_property_center_of_mass: - -- :ref:`Vector3` **center_of_mass** - -+-----------+---------------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+---------------------------+ -| *Setter* | set_center_of_mass(value) | -+-----------+---------------------------+ -| *Getter* | get_center_of_mass() | -+-----------+---------------------------+ - -The body's custom center of mass, relative to the body's origin position, when :ref:`center_of_mass_mode` is set to :ref:`CENTER_OF_MASS_MODE_CUSTOM`. This is the balanced point of the body, where applied forces only cause linear acceleration. Applying forces outside of the center of mass causes angular acceleration. - -When :ref:`center_of_mass_mode` is set to :ref:`CENTER_OF_MASS_MODE_AUTO` (default value), the center of mass is automatically computed. - ----- - -.. _class_RigidDynamicBody3D_property_center_of_mass_mode: - -- :ref:`CenterOfMassMode` **center_of_mass_mode** - -+-----------+--------------------------------+ -| *Default* | ``0`` | -+-----------+--------------------------------+ -| *Setter* | set_center_of_mass_mode(value) | -+-----------+--------------------------------+ -| *Getter* | get_center_of_mass_mode() | -+-----------+--------------------------------+ - -Defines the way the body's center of mass is set. See :ref:`CenterOfMassMode` for possible values. - ----- - -.. _class_RigidDynamicBody3D_property_constant_force: - -- :ref:`Vector3` **constant_force** - -+-----------+---------------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+---------------------------+ -| *Setter* | set_constant_force(value) | -+-----------+---------------------------+ -| *Getter* | get_constant_force() | -+-----------+---------------------------+ - -The body's total constant positional forces applied during each physics update. - -See :ref:`add_constant_force` and :ref:`add_constant_central_force`. - ----- - -.. _class_RigidDynamicBody3D_property_constant_torque: - -- :ref:`Vector3` **constant_torque** - -+-----------+----------------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+----------------------------+ -| *Setter* | set_constant_torque(value) | -+-----------+----------------------------+ -| *Getter* | get_constant_torque() | -+-----------+----------------------------+ - -The body's total constant rotational forces applied during each physics update. - -See :ref:`add_constant_torque`. - ----- - -.. _class_RigidDynamicBody3D_property_contact_monitor: - -- :ref:`bool` **contact_monitor** - -+-----------+------------------------------+ -| *Default* | ``false`` | -+-----------+------------------------------+ -| *Setter* | set_contact_monitor(value) | -+-----------+------------------------------+ -| *Getter* | is_contact_monitor_enabled() | -+-----------+------------------------------+ - -If ``true``, the RigidDynamicBody3D will emit signals when it collides with another RigidDynamicBody3D. See also :ref:`contacts_reported`. - ----- - -.. _class_RigidDynamicBody3D_property_contacts_reported: - -- :ref:`int` **contacts_reported** - -+-----------+----------------------------------+ -| *Default* | ``0`` | -+-----------+----------------------------------+ -| *Setter* | set_max_contacts_reported(value) | -+-----------+----------------------------------+ -| *Getter* | get_max_contacts_reported() | -+-----------+----------------------------------+ - -The maximum number of contacts that will be recorded. Requires :ref:`contact_monitor` to be set to ``true``. - -\ **Note:** The number of contacts is different from the number of collisions. Collisions between parallel edges will result in two contacts (one at each end), and collisions between parallel faces will result in four contacts (one at each corner). - ----- - -.. _class_RigidDynamicBody3D_property_continuous_cd: - -- :ref:`bool` **continuous_cd** - -+-----------+-----------------------------------------------+ -| *Default* | ``false`` | -+-----------+-----------------------------------------------+ -| *Setter* | set_use_continuous_collision_detection(value) | -+-----------+-----------------------------------------------+ -| *Getter* | is_using_continuous_collision_detection() | -+-----------+-----------------------------------------------+ - -If ``true``, continuous collision detection is used. - -Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. Continuous collision detection is more precise, and misses fewer impacts by small, fast-moving objects. Not using continuous collision detection is faster to compute, but can miss small, fast-moving objects. - ----- - -.. _class_RigidDynamicBody3D_property_custom_integrator: - -- :ref:`bool` **custom_integrator** - -+-----------+----------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------+ -| *Setter* | set_use_custom_integrator(value) | -+-----------+----------------------------------+ -| *Getter* | is_using_custom_integrator() | -+-----------+----------------------------------+ - -If ``true``, internal force integration will be disabled (like gravity or air friction) for this body. Other than collision response, the body will only move as determined by the :ref:`_integrate_forces` function, if defined. - ----- - -.. _class_RigidDynamicBody3D_property_freeze: - -- :ref:`bool` **freeze** - -+-----------+---------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------+ -| *Setter* | set_freeze_enabled(value) | -+-----------+---------------------------+ -| *Getter* | is_freeze_enabled() | -+-----------+---------------------------+ - -If ``true``, the body is frozen. Gravity and forces are not applied anymore. - -See :ref:`freeze_mode` to set the body's behavior when frozen. - -For a body that is always frozen, use :ref:`StaticBody3D` or :ref:`AnimatableBody3D` instead. - ----- - -.. _class_RigidDynamicBody3D_property_freeze_mode: - -- :ref:`FreezeMode` **freeze_mode** - -+-----------+------------------------+ -| *Default* | ``0`` | -+-----------+------------------------+ -| *Setter* | set_freeze_mode(value) | -+-----------+------------------------+ -| *Getter* | get_freeze_mode() | -+-----------+------------------------+ - -The body's freeze mode. Can be used to set the body's behavior when :ref:`freeze` is enabled. See :ref:`FreezeMode` for possible values. - -For a body that is always frozen, use :ref:`StaticBody3D` or :ref:`AnimatableBody3D` instead. - ----- - -.. _class_RigidDynamicBody3D_property_gravity_scale: - -- :ref:`float` **gravity_scale** - -+-----------+--------------------------+ -| *Default* | ``1.0`` | -+-----------+--------------------------+ -| *Setter* | set_gravity_scale(value) | -+-----------+--------------------------+ -| *Getter* | get_gravity_scale() | -+-----------+--------------------------+ - -This is multiplied by the global 3D gravity setting found in **Project > Project Settings > Physics > 3d** to produce RigidDynamicBody3D's gravity. For example, a value of 1 will be normal gravity, 2 will apply double gravity, and 0.5 will apply half gravity to this object. - ----- - -.. _class_RigidDynamicBody3D_property_inertia: - -- :ref:`Vector3` **inertia** - -+-----------+----------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+----------------------+ -| *Setter* | set_inertia(value) | -+-----------+----------------------+ -| *Getter* | get_inertia() | -+-----------+----------------------+ - -The body's moment of inertia. This is like mass, but for rotation: it determines how much torque it takes to rotate the body on each axis. The moment of inertia is usually computed automatically from the mass and the shapes, but this property allows you to set a custom value. - -If set to ``Vector3.ZERO``, inertia is automatically computed (default value). - ----- - -.. _class_RigidDynamicBody3D_property_linear_damp: - -- :ref:`float` **linear_damp** - -+-----------+------------------------+ -| *Default* | ``0.0`` | -+-----------+------------------------+ -| *Setter* | set_linear_damp(value) | -+-----------+------------------------+ -| *Getter* | get_linear_damp() | -+-----------+------------------------+ - -Damps the body's movement. By default, the body will use the **Default Linear Damp** in **Project > Project Settings > Physics > 3d** or any value override set by an :ref:`Area3D` the body is in. Depending on :ref:`linear_damp_mode`, you can set :ref:`linear_damp` to be added to or to replace the body's damping value. - -See :ref:`ProjectSettings.physics/3d/default_linear_damp` for more details about damping. - ----- - -.. _class_RigidDynamicBody3D_property_linear_damp_mode: - -- :ref:`DampMode` **linear_damp_mode** - -+-----------+-----------------------------+ -| *Default* | ``0`` | -+-----------+-----------------------------+ -| *Setter* | set_linear_damp_mode(value) | -+-----------+-----------------------------+ -| *Getter* | get_linear_damp_mode() | -+-----------+-----------------------------+ - -Defines how :ref:`linear_damp` is applied. See :ref:`DampMode` for possible values. - ----- - -.. _class_RigidDynamicBody3D_property_linear_velocity: - -- :ref:`Vector3` **linear_velocity** - -+-----------+----------------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+----------------------------+ -| *Setter* | set_linear_velocity(value) | -+-----------+----------------------------+ -| *Getter* | get_linear_velocity() | -+-----------+----------------------------+ - -The body's linear velocity in units per second. Can be used sporadically, but **don't set this every frame**, because physics may run in another thread and runs at a different granularity. Use :ref:`_integrate_forces` as your process loop for precise control of the body state. - ----- - -.. _class_RigidDynamicBody3D_property_lock_rotation: - -- :ref:`bool` **lock_rotation** - -+-----------+----------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------+ -| *Setter* | set_lock_rotation_enabled(value) | -+-----------+----------------------------------+ -| *Getter* | is_lock_rotation_enabled() | -+-----------+----------------------------------+ - -If ``true``, the body cannot rotate. Gravity and forces only apply linear movement. - ----- - -.. _class_RigidDynamicBody3D_property_mass: - -- :ref:`float` **mass** - -+-----------+-----------------+ -| *Default* | ``1.0`` | -+-----------+-----------------+ -| *Setter* | set_mass(value) | -+-----------+-----------------+ -| *Getter* | get_mass() | -+-----------+-----------------+ - -The body's mass. - ----- - -.. _class_RigidDynamicBody3D_property_physics_material_override: - -- :ref:`PhysicsMaterial` **physics_material_override** - -+----------+--------------------------------------+ -| *Setter* | set_physics_material_override(value) | -+----------+--------------------------------------+ -| *Getter* | get_physics_material_override() | -+----------+--------------------------------------+ - -The physics material override for the body. - -If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one. - ----- - -.. _class_RigidDynamicBody3D_property_sleeping: - -- :ref:`bool` **sleeping** - -+-----------+---------------------+ -| *Default* | ``false`` | -+-----------+---------------------+ -| *Setter* | set_sleeping(value) | -+-----------+---------------------+ -| *Getter* | is_sleeping() | -+-----------+---------------------+ - -If ``true``, the body will not move and will not calculate forces until woken up by another body through, for example, a collision, or by using the :ref:`apply_impulse` or :ref:`apply_force` methods. - -Method Descriptions -------------------- - -.. _class_RigidDynamicBody3D_method__integrate_forces: - -- void **_integrate_forces** **(** :ref:`PhysicsDirectBodyState3D` state **)** |virtual| - -Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default, it works in addition to the usual physics behavior, but the :ref:`custom_integrator` property allows you to disable the default behavior and do fully custom force integration for a body. - ----- - -.. _class_RigidDynamicBody3D_method_add_constant_central_force: - -- void **add_constant_central_force** **(** :ref:`Vector3` force **)** - -Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with ``constant_force = Vector3(0, 0, 0)``. - -This is equivalent to using :ref:`add_constant_force` at the body's center of mass. - ----- - -.. _class_RigidDynamicBody3D_method_add_constant_force: - -- void **add_constant_force** **(** :ref:`Vector3` force, :ref:`Vector3` position=Vector3(0, 0, 0) **)** - -Adds a constant positioned force to the body that keeps being applied over time until cleared with ``constant_force = Vector3(0, 0, 0)``. - -\ ``position`` is the offset from the body origin in global coordinates. - ----- - -.. _class_RigidDynamicBody3D_method_add_constant_torque: - -- void **add_constant_torque** **(** :ref:`Vector3` torque **)** - -Adds a constant rotational force without affecting position that keeps being applied over time until cleared with ``constant_torque = Vector3(0, 0, 0)``. - ----- - -.. _class_RigidDynamicBody3D_method_apply_central_force: - -- void **apply_central_force** **(** :ref:`Vector3` force **)** - -Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update. - -This is equivalent to using :ref:`apply_force` at the body's center of mass. - ----- - -.. _class_RigidDynamicBody3D_method_apply_central_impulse: - -- void **apply_central_impulse** **(** :ref:`Vector3` impulse **)** - -Applies a directional impulse without affecting rotation. - -An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). - -This is equivalent to using :ref:`apply_impulse` at the body's center of mass. - ----- - -.. _class_RigidDynamicBody3D_method_apply_force: - -- void **apply_force** **(** :ref:`Vector3` force, :ref:`Vector3` position=Vector3(0, 0, 0) **)** - -Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update. - -\ ``position`` is the offset from the body origin in global coordinates. - ----- - -.. _class_RigidDynamicBody3D_method_apply_impulse: - -- void **apply_impulse** **(** :ref:`Vector3` impulse, :ref:`Vector3` position=Vector3(0, 0, 0) **)** - -Applies a positioned impulse to the body. - -An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). - -\ ``position`` is the offset from the body origin in global coordinates. - ----- - -.. _class_RigidDynamicBody3D_method_apply_torque: - -- void **apply_torque** **(** :ref:`Vector3` torque **)** - -Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update. - ----- - -.. _class_RigidDynamicBody3D_method_apply_torque_impulse: - -- void **apply_torque_impulse** **(** :ref:`Vector3` impulse **)** - -Applies a rotational impulse to the body without affecting the position. - -An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). - ----- - -.. _class_RigidDynamicBody3D_method_get_colliding_bodies: - -- :ref:`Array` **get_colliding_bodies** **(** **)** |const| - -Returns a list of the bodies colliding with this one. Requires :ref:`contact_monitor` to be set to ``true`` and :ref:`contacts_reported` to be set high enough to detect all the collisions. - -\ **Note:** The result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead. - ----- - -.. _class_RigidDynamicBody3D_method_get_inverse_inertia_tensor: - -- :ref:`Basis` **get_inverse_inertia_tensor** **(** **)** |const| - -Returns the inverse inertia tensor basis. This is used to calculate the angular acceleration resulting from a torque applied to the ``RigidDynamicBody3D``. - ----- - -.. _class_RigidDynamicBody3D_method_set_axis_velocity: - -- void **set_axis_velocity** **(** :ref:`Vector3` axis_velocity **)** - -Sets an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior. - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_rootmotionview.rst b/classes/class_rootmotionview.rst index 3c7a65770..6b94971cb 100644 --- a/classes/class_rootmotionview.rst +++ b/classes/class_rootmotionview.rst @@ -19,7 +19,7 @@ Description *Root motion* refers to an animation technique where a mesh's skeleton is used to give impulse to a character. When working with 3D animations, a popular technique is for animators to use the root skeleton bone to give motion to the rest of the skeleton. This allows animating characters in a way where steps actually match the floor below. It also allows precise interaction with objects during cinematics. See also :ref:`AnimationTree`. -\ **Note:** ``RootMotionView`` is only visible in the editor. It will be hidden automatically in the running project, and will also be converted to a plain :ref:`Node` in the running project. This means a script attached to a ``RootMotionView`` node *must* have ``extends Node`` instead of ``extends RootMotionView``. Additionally, it must not be a ``@tool`` script. +\ **Note:** ``RootMotionView`` is only visible in the editor. It will be hidden automatically in the running project. Tutorials --------- @@ -29,17 +29,17 @@ Tutorials Properties ---------- -+---------------------------------+---------------------------------------------------------------------+ -| :ref:`NodePath` | :ref:`animation_path` | -+---------------------------------+---------------------------------------------------------------------+ -| :ref:`float` | :ref:`cell_size` | -+---------------------------------+---------------------------------------------------------------------+ -| :ref:`Color` | :ref:`color` | -+---------------------------------+---------------------------------------------------------------------+ -| :ref:`float` | :ref:`radius` | -+---------------------------------+---------------------------------------------------------------------+ -| :ref:`bool` | :ref:`zero_y` | -+---------------------------------+---------------------------------------------------------------------+ ++---------------------------------+---------------------------------------------------------------------+---------------------------+ +| :ref:`NodePath` | :ref:`animation_path` | ``NodePath("")`` | ++---------------------------------+---------------------------------------------------------------------+---------------------------+ +| :ref:`float` | :ref:`cell_size` | ``1.0`` | ++---------------------------------+---------------------------------------------------------------------+---------------------------+ +| :ref:`Color` | :ref:`color` | ``Color(0.5, 0.5, 1, 1)`` | ++---------------------------------+---------------------------------------------------------------------+---------------------------+ +| :ref:`float` | :ref:`radius` | ``10.0`` | ++---------------------------------+---------------------------------------------------------------------+---------------------------+ +| :ref:`bool` | :ref:`zero_y` | ``true`` | ++---------------------------------+---------------------------------------------------------------------+---------------------------+ Property Descriptions --------------------- @@ -48,11 +48,13 @@ Property Descriptions - :ref:`NodePath` **animation_path** -+----------+---------------------------+ -| *Setter* | set_animation_path(value) | -+----------+---------------------------+ -| *Getter* | get_animation_path() | -+----------+---------------------------+ ++-----------+---------------------------+ +| *Default* | ``NodePath("")`` | ++-----------+---------------------------+ +| *Setter* | set_animation_path(value) | ++-----------+---------------------------+ +| *Getter* | get_animation_path() | ++-----------+---------------------------+ Path to an :ref:`AnimationTree` node to use as a basis for root motion. @@ -62,11 +64,13 @@ Path to an :ref:`AnimationTree` node to use as a basis for - :ref:`float` **cell_size** -+----------+----------------------+ -| *Setter* | set_cell_size(value) | -+----------+----------------------+ -| *Getter* | get_cell_size() | -+----------+----------------------+ ++-----------+----------------------+ +| *Default* | ``1.0`` | ++-----------+----------------------+ +| *Setter* | set_cell_size(value) | ++-----------+----------------------+ +| *Getter* | get_cell_size() | ++-----------+----------------------+ The grid's cell size in 3D units. @@ -76,11 +80,13 @@ The grid's cell size in 3D units. - :ref:`Color` **color** -+----------+------------------+ -| *Setter* | set_color(value) | -+----------+------------------+ -| *Getter* | get_color() | -+----------+------------------+ ++-----------+---------------------------+ +| *Default* | ``Color(0.5, 0.5, 1, 1)`` | ++-----------+---------------------------+ +| *Setter* | set_color(value) | ++-----------+---------------------------+ +| *Getter* | get_color() | ++-----------+---------------------------+ The grid's color. @@ -90,11 +96,13 @@ The grid's color. - :ref:`float` **radius** -+----------+-------------------+ -| *Setter* | set_radius(value) | -+----------+-------------------+ -| *Getter* | get_radius() | -+----------+-------------------+ ++-----------+-------------------+ +| *Default* | ``10.0`` | ++-----------+-------------------+ +| *Setter* | set_radius(value) | ++-----------+-------------------+ +| *Getter* | get_radius() | ++-----------+-------------------+ The grid's radius in 3D units. The grid's opacity will fade gradually as the distance from the origin increases until this :ref:`radius` is reached. @@ -104,11 +112,13 @@ The grid's radius in 3D units. The grid's opacity will fade gradually as the dis - :ref:`bool` **zero_y** -+----------+-------------------+ -| *Setter* | set_zero_y(value) | -+----------+-------------------+ -| *Getter* | get_zero_y() | -+----------+-------------------+ ++-----------+-------------------+ +| *Default* | ``true`` | ++-----------+-------------------+ +| *Setter* | set_zero_y(value) | ++-----------+-------------------+ +| *Getter* | get_zero_y() | ++-----------+-------------------+ If ``true``, the grid's points will all be on the same Y coordinate (*local* Y = 0). If ``false``, the points' original Y coordinate is preserved. diff --git a/classes/class_scenemultiplayer.rst b/classes/class_scenemultiplayer.rst new file mode 100644 index 000000000..1efa86e9a --- /dev/null +++ b/classes/class_scenemultiplayer.rst @@ -0,0 +1,134 @@ +: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/modules/multiplayer/doc_classes/SceneMultiplayer.xml. + +.. _class_SceneMultiplayer: + +SceneMultiplayer +================ + +**Inherits:** :ref:`MultiplayerAPI` **<** :ref:`RefCounted` **<** :ref:`Object` + +High-level multiplayer API implementation. + +Description +----------- + +This class is the default implementation of :ref:`MultiplayerAPI`, used to provide multiplayer functionalities in Godot Engine. + +This implementation supports RPCs via :ref:`Node.rpc` and :ref:`Node.rpc_id` and requires :ref:`MultiplayerAPI.rpc` to be passed a :ref:`Node` (it will fail for other object types). + +This implementation additionally provide :ref:`SceneTree` replication via the :ref:`MultiplayerSpawner` and :ref:`MultiplayerSynchronizer` nodes, and the :ref:`SceneReplicationConfig` resource. + +\ **Note:** The high-level multiplayer API protocol is an implementation detail and isn't meant to be used by non-Godot servers. It may change without notice. + +\ **Note:** When exporting to Android, make sure to enable the ``INTERNET`` permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android. + +Properties +---------- + ++---------------------------------+---------------------------------------------------------------------------------------+------------------+ +| :ref:`bool` | :ref:`allow_object_decoding` | ``false`` | ++---------------------------------+---------------------------------------------------------------------------------------+------------------+ +| :ref:`bool` | :ref:`refuse_new_connections` | ``false`` | ++---------------------------------+---------------------------------------------------------------------------------------+------------------+ +| :ref:`NodePath` | :ref:`root_path` | ``NodePath("")`` | ++---------------------------------+---------------------------------------------------------------------------------------+------------------+ + +Methods +------- + ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Error` | :ref:`send_bytes` **(** :ref:`PackedByteArray` bytes, :ref:`int` id=0, :ref:`TransferMode` mode=2, :ref:`int` channel=0 **)** | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +.. _class_SceneMultiplayer_signal_peer_packet: + +- **peer_packet** **(** :ref:`int` id, :ref:`PackedByteArray` packet **)** + +Emitted when this MultiplayerAPI's :ref:`MultiplayerAPI.multiplayer_peer` receives a ``packet`` with custom data (see :ref:`send_bytes`). ID is the peer ID of the peer that sent the packet. + +Property Descriptions +--------------------- + +.. _class_SceneMultiplayer_property_allow_object_decoding: + +- :ref:`bool` **allow_object_decoding** + ++-----------+----------------------------------+ +| *Default* | ``false`` | ++-----------+----------------------------------+ +| *Setter* | set_allow_object_decoding(value) | ++-----------+----------------------------------+ +| *Getter* | is_object_decoding_allowed() | ++-----------+----------------------------------+ + +If ``true``, the MultiplayerAPI will allow encoding and decoding of object during RPCs. + +\ **Warning:** Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threat such as remote code execution. + +---- + +.. _class_SceneMultiplayer_property_refuse_new_connections: + +- :ref:`bool` **refuse_new_connections** + ++-----------+-----------------------------------+ +| *Default* | ``false`` | ++-----------+-----------------------------------+ +| *Setter* | set_refuse_new_connections(value) | ++-----------+-----------------------------------+ +| *Getter* | is_refusing_new_connections() | ++-----------+-----------------------------------+ + +If ``true``, the MultiplayerAPI's :ref:`MultiplayerAPI.multiplayer_peer` refuses new incoming connections. + +---- + +.. _class_SceneMultiplayer_property_root_path: + +- :ref:`NodePath` **root_path** + ++-----------+----------------------+ +| *Default* | ``NodePath("")`` | ++-----------+----------------------+ +| *Setter* | set_root_path(value) | ++-----------+----------------------+ +| *Getter* | get_root_path() | ++-----------+----------------------+ + +The root path to use for RPCs and replication. Instead of an absolute path, a relative path will be used to find the node upon which the RPC should be executed. + +This effectively allows to have different branches of the scene tree to be managed by different MultiplayerAPI, allowing for example to run both client and server in the same scene. + +Method Descriptions +------------------- + +.. _class_SceneMultiplayer_method_clear: + +- void **clear** **(** **)** + +Clears the current SceneMultiplayer network state (you shouldn't call this unless you know what you are doing). + +---- + +.. _class_SceneMultiplayer_method_send_bytes: + +- :ref:`Error` **send_bytes** **(** :ref:`PackedByteArray` bytes, :ref:`int` id=0, :ref:`TransferMode` mode=2, :ref:`int` channel=0 **)** + +Sends the given raw ``bytes`` to a specific peer identified by ``id`` (see :ref:`MultiplayerPeer.set_target_peer`). Default ID is ``0``, i.e. broadcast to all peers. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_scenereplicationconfig.rst b/classes/class_scenereplicationconfig.rst index 480b73a45..813498db7 100644 --- a/classes/class_scenereplicationconfig.rst +++ b/classes/class_scenereplicationconfig.rst @@ -3,7 +3,7 @@ .. 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/SceneReplicationConfig.xml. +.. XML source: https://github.com/godotengine/godot/tree/master/modules/multiplayer/doc_classes/SceneReplicationConfig.xml. .. _class_SceneReplicationConfig: @@ -12,7 +12,7 @@ SceneReplicationConfig **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - +Configuration for properties to synchronize with a :ref:`MultiplayerSynchronizer`. Methods ------- @@ -44,54 +44,72 @@ Method Descriptions - void **add_property** **(** :ref:`NodePath` path, :ref:`int` index=-1 **)** +Adds the property identified by the given ``path`` to the list of the properties being synchronized, optionally passing an ``index``. + ---- .. _class_SceneReplicationConfig_method_get_properties: - :ref:`NodePath[]` **get_properties** **(** **)** |const| +Returns a list of synchronized property :ref:`NodePath`\ s. + ---- .. _class_SceneReplicationConfig_method_has_property: - :ref:`bool` **has_property** **(** :ref:`NodePath` path **)** |const| +Returns whether the given ``path`` is configured for synchronization. + ---- .. _class_SceneReplicationConfig_method_property_get_index: - :ref:`int` **property_get_index** **(** :ref:`NodePath` path **)** |const| +Finds the index of the given ``path``. + ---- .. _class_SceneReplicationConfig_method_property_get_spawn: - :ref:`bool` **property_get_spawn** **(** :ref:`NodePath` path **)** +Returns whether the property identified by the given ``path`` is configured to be synchronized on spawn. + ---- .. _class_SceneReplicationConfig_method_property_get_sync: - :ref:`bool` **property_get_sync** **(** :ref:`NodePath` path **)** +Returns whether the property identified by the given ``path`` is configured to be synchronized on process. + ---- .. _class_SceneReplicationConfig_method_property_set_spawn: - void **property_set_spawn** **(** :ref:`NodePath` path, :ref:`bool` enabled **)** +Sets whether the property identified by the given ``path`` is configured to be synchronized on spawn. + ---- .. _class_SceneReplicationConfig_method_property_set_sync: - void **property_set_sync** **(** :ref:`NodePath` path, :ref:`bool` enabled **)** +Sets whether the property identified by the given ``path`` is configured to be synchronized on process. + ---- .. _class_SceneReplicationConfig_method_remove_property: - void **remove_property** **(** :ref:`NodePath` path **)** +Removes the property identified by the given ``path`` from the configuration. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_scenetree.rst b/classes/class_scenetree.rst index 3f9d67cbc..8ef4e5b1d 100644 --- a/classes/class_scenetree.rst +++ b/classes/class_scenetree.rst @@ -79,9 +79,9 @@ Methods +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_node_count` **(** **)** |const| | +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_nodes_in_group` **(** :ref:`StringName` group **)** | +| :ref:`Node[]` | :ref:`get_nodes_in_group` **(** :ref:`StringName` group **)** | +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_processed_tweens` **(** **)** | +| :ref:`Tween[]` | :ref:`get_processed_tweens` **(** **)** | +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_group` **(** :ref:`StringName` name **)** |const| | +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -239,6 +239,8 @@ The current scene. If ``true``, collision shapes will be visible when running the game from the editor for debugging purposes. +\ **Note:** This property is not designed to be changed at run-time. Changing the value of :ref:`debug_collisions_hint` while the project is running will not have the desired effect. + ---- .. _class_SceneTree_property_debug_navigation_hint: @@ -255,6 +257,8 @@ If ``true``, collision shapes will be visible when running the game from the edi If ``true``, navigation polygons will be visible when running the game from the editor for debugging purposes. +\ **Note:** This property is not designed to be changed at run-time. Changing the value of :ref:`debug_navigation_hint` while the project is running will not have the desired effect. + ---- .. _class_SceneTree_property_debug_paths_hint: @@ -271,6 +275,8 @@ If ``true``, navigation polygons will be visible when running the game from the If ``true``, curves from :ref:`Path2D` and :ref:`Path3D` nodes will be visible when running the game from the editor for debugging purposes. +\ **Note:** This property is not designed to be changed at run-time. Changing the value of :ref:`debug_paths_hint` while the project is running will not have the desired effect. + ---- .. _class_SceneTree_property_edited_scene_root: @@ -480,7 +486,7 @@ Returns the number of nodes in this ``SceneTree``. .. _class_SceneTree_method_get_nodes_in_group: -- :ref:`Array` **get_nodes_in_group** **(** :ref:`StringName` group **)** +- :ref:`Node[]` **get_nodes_in_group** **(** :ref:`StringName` group **)** Returns a list of all nodes assigned to the given group. @@ -488,7 +494,7 @@ Returns a list of all nodes assigned to the given group. .. _class_SceneTree_method_get_processed_tweens: -- :ref:`Array` **get_processed_tweens** **(** **)** +- :ref:`Tween[]` **get_processed_tweens** **(** **)** Returns an array of currently existing :ref:`Tween`\ s in the ``SceneTree`` (both running and paused). @@ -518,7 +524,7 @@ Sends the given notification to all members of the ``group``. Sends the given notification to all members of the ``group``, respecting the given :ref:`GroupCallFlags`. -\ **Note:** Group call flags are used to control the notification sending behavior. By default, notifications will be sent immediately in a way similar to :ref:`notify_group`. However, if the :ref:`GROUP_CALL_DEFERRED` flag is present in the ``flags`` argument, notifications will be sent with a one-frame delay in a way similar to using ``Object.call_deferred("notification", ...)``. +\ **Note:** Group call flags are used to control the notification sending behavior. By default, notifications will be sent immediately in a way similar to :ref:`notify_group`. However, if the :ref:`GROUP_CALL_DEFERRED` flag is present in the ``call_flags`` argument, notifications will be sent with a one-frame delay in a way similar to using ``Object.call_deferred("notification", ...)``. ---- @@ -570,7 +576,7 @@ Sets the given ``property`` to ``value`` on all members of the given group. Sets the given ``property`` to ``value`` on all members of the given group, respecting the given :ref:`GroupCallFlags`. -\ **Note:** Group call flags are used to control the property setting behavior. By default, properties will be set immediately in a way similar to :ref:`set_group`. However, if the :ref:`GROUP_CALL_DEFERRED` flag is present in the ``flags`` argument, properties will be set with a one-frame delay in a way similar to :ref:`Object.call_deferred`. +\ **Note:** Group call flags are used to control the property setting behavior. By default, properties will be set immediately in a way similar to :ref:`set_group`. However, if the :ref:`GROUP_CALL_DEFERRED` flag is present in the ``call_flags`` argument, properties will be set with a one-frame delay in a way similar to :ref:`Object.call_deferred`. ---- diff --git a/classes/class_script.rst b/classes/class_script.rst index edd0e53a8..2903550af 100644 --- a/classes/class_script.rst +++ b/classes/class_script.rst @@ -12,7 +12,7 @@ Script **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`CSharpScript`, :ref:`GDScript`, :ref:`ScriptExtension`, :ref:`VisualScript` +**Inherited By:** :ref:`CSharpScript`, :ref:`GDScript`, :ref:`ScriptExtension` A class stored as a resource. @@ -51,11 +51,11 @@ Methods +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Dictionary` | :ref:`get_script_constant_map` **(** **)** | +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_script_method_list` **(** **)** | +| :ref:`Dictionary[]` | :ref:`get_script_method_list` **(** **)** | +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_script_property_list` **(** **)** | +| :ref:`Dictionary[]` | :ref:`get_script_property_list` **(** **)** | +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_script_signal_list` **(** **)** | +| :ref:`Dictionary[]` | :ref:`get_script_signal_list` **(** **)** | +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_script_signal` **(** :ref:`StringName` signal_name **)** |const| | +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ @@ -128,7 +128,7 @@ Returns a dictionary containing constant names and their values. .. _class_Script_method_get_script_method_list: -- :ref:`Array` **get_script_method_list** **(** **)** +- :ref:`Dictionary[]` **get_script_method_list** **(** **)** Returns the list of methods in this ``Script``. @@ -136,7 +136,7 @@ Returns the list of methods in this ``Script``. .. _class_Script_method_get_script_property_list: -- :ref:`Array` **get_script_property_list** **(** **)** +- :ref:`Dictionary[]` **get_script_property_list** **(** **)** Returns the list of properties in this ``Script``. @@ -144,7 +144,7 @@ Returns the list of properties in this ``Script``. .. _class_Script_method_get_script_signal_list: -- :ref:`Array` **get_script_signal_list** **(** **)** +- :ref:`Dictionary[]` **get_script_signal_list** **(** **)** Returns the list of user signals defined in this ``Script``. diff --git a/classes/class_scripteditor.rst b/classes/class_scripteditor.rst index f6ed01f10..a266ca254 100644 --- a/classes/class_scripteditor.rst +++ b/classes/class_scripteditor.rst @@ -22,23 +22,23 @@ Description Methods ------- -+-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`ScriptEditorBase` | :ref:`get_current_editor` **(** **)** |const| | -+-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Script` | :ref:`get_current_script` **(** **)** | -+-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_open_script_editors` **(** **)** |const| | -+-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_open_scripts` **(** **)** |const| | -+-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`goto_line` **(** :ref:`int` line_number **)** | -+-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`open_script_create_dialog` **(** :ref:`String` base_name, :ref:`String` base_path **)** | -+-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`register_syntax_highlighter` **(** :ref:`EditorSyntaxHighlighter` syntax_highlighter **)** | -+-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`unregister_syntax_highlighter` **(** :ref:`EditorSyntaxHighlighter` syntax_highlighter **)** | -+-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`ScriptEditorBase` | :ref:`get_current_editor` **(** **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Script` | :ref:`get_current_script` **(** **)** | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`ScriptEditorBase[]` | :ref:`get_open_script_editors` **(** **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Script[]` | :ref:`get_open_scripts` **(** **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`goto_line` **(** :ref:`int` line_number **)** | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`open_script_create_dialog` **(** :ref:`String` base_name, :ref:`String` base_path **)** | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`register_syntax_highlighter` **(** :ref:`EditorSyntaxHighlighter` syntax_highlighter **)** | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`unregister_syntax_highlighter` **(** :ref:`EditorSyntaxHighlighter` syntax_highlighter **)** | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- @@ -78,7 +78,7 @@ Returns a :ref:`Script` that is currently active in editor. .. _class_ScriptEditor_method_get_open_script_editors: -- :ref:`Array` **get_open_script_editors** **(** **)** |const| +- :ref:`ScriptEditorBase[]` **get_open_script_editors** **(** **)** |const| Returns an array with all :ref:`ScriptEditorBase` objects which are currently open in editor. @@ -86,7 +86,7 @@ Returns an array with all :ref:`ScriptEditorBase` object .. _class_ScriptEditor_method_get_open_scripts: -- :ref:`Array` **get_open_scripts** **(** **)** |const| +- :ref:`Script[]` **get_open_scripts** **(** **)** |const| Returns an array with all :ref:`Script` objects which are currently open in editor. diff --git a/classes/class_scriptextension.rst b/classes/class_scriptextension.rst index b4e400ad3..8647b57d8 100644 --- a/classes/class_scriptextension.rst +++ b/classes/class_scriptextension.rst @@ -40,7 +40,7 @@ Methods +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`_get_property_default_value` **(** :ref:`StringName` property **)** |virtual| |const| | +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary[]` | :ref:`_get_rpc_methods` **(** **)** |virtual| |const| | +| :ref:`Variant` | :ref:`_get_rpc_config` **(** **)** |virtual| |const| | +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Dictionary[]` | :ref:`_get_script_method_list` **(** **)** |virtual| |const| | +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -52,6 +52,8 @@ Methods +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`_has_method` **(** :ref:`StringName` method **)** |virtual| |const| | +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_has_property_default_value` **(** :ref:`StringName` property **)** |virtual| |const| | ++---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`_has_script_signal` **(** :ref:`StringName` signal **)** |virtual| |const| | +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`_has_source_code` **(** **)** |virtual| |const| | @@ -148,9 +150,9 @@ Method Descriptions ---- -.. _class_ScriptExtension_method__get_rpc_methods: +.. _class_ScriptExtension_method__get_rpc_config: -- :ref:`Dictionary[]` **_get_rpc_methods** **(** **)** |virtual| |const| +- :ref:`Variant` **_get_rpc_config** **(** **)** |virtual| |const| ---- @@ -184,6 +186,12 @@ Method Descriptions ---- +.. _class_ScriptExtension_method__has_property_default_value: + +- :ref:`bool` **_has_property_default_value** **(** :ref:`StringName` property **)** |virtual| |const| + +---- + .. _class_ScriptExtension_method__has_script_signal: - :ref:`bool` **_has_script_signal** **(** :ref:`StringName` signal **)** |virtual| |const| diff --git a/classes/class_shader.rst b/classes/class_shader.rst index 02cbc07a1..adb531d64 100644 --- a/classes/class_shader.rst +++ b/classes/class_shader.rst @@ -41,7 +41,7 @@ Methods +-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Mode` | :ref:`get_mode` **(** **)** |const| | +-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_param` **(** :ref:`StringName` name **)** |const| | +| :ref:`bool` | :ref:`has_uniform` **(** :ref:`StringName` name **)** |const| | +-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_default_texture_param` **(** :ref:`StringName` param, :ref:`Texture2D` texture, :ref:`int` index=0 **)** | +-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -113,13 +113,13 @@ Returns the shader mode for the shader, either :ref:`MODE_CANVAS_ITEM` **has_param** **(** :ref:`StringName` name **)** |const| +- :ref:`bool` **has_uniform** **(** :ref:`StringName` name **)** |const| Returns ``true`` if the shader has this param defined as a uniform in its code. -\ **Note:** ``param`` must match the name of the uniform in the code exactly. +\ **Note:** ``name`` must match the name of the uniform in the code exactly. ---- diff --git a/classes/class_shadermaterial.rst b/classes/class_shadermaterial.rst index c7ce036b1..432307536 100644 --- a/classes/class_shadermaterial.rst +++ b/classes/class_shadermaterial.rst @@ -34,15 +34,11 @@ Properties Methods ------- -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get_shader_param` **(** :ref:`StringName` param **)** |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`property_can_revert` **(** :ref:`String` name **)** | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`property_get_revert` **(** :ref:`String` name **)** | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_shader_param` **(** :ref:`StringName` param, :ref:`Variant` value **)** | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`get_shader_uniform` **(** :ref:`StringName` param **)** |const| | ++-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_shader_uniform` **(** :ref:`StringName` param, :ref:`Variant` value **)** | ++-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Property Descriptions --------------------- @@ -62,33 +58,17 @@ The :ref:`Shader` program used to render this material. Method Descriptions ------------------- -.. _class_ShaderMaterial_method_get_shader_param: +.. _class_ShaderMaterial_method_get_shader_uniform: -- :ref:`Variant` **get_shader_param** **(** :ref:`StringName` param **)** |const| +- :ref:`Variant` **get_shader_uniform** **(** :ref:`StringName` param **)** |const| Returns the current value set for this material of a uniform in the shader. ---- -.. _class_ShaderMaterial_method_property_can_revert: +.. _class_ShaderMaterial_method_set_shader_uniform: -- :ref:`bool` **property_can_revert** **(** :ref:`String` name **)** - -Returns ``true`` if the property identified by ``name`` can be reverted to a default value. - ----- - -.. _class_ShaderMaterial_method_property_get_revert: - -- :ref:`Variant` **property_get_revert** **(** :ref:`String` name **)** - -Returns the default value of the material property with given ``name``. - ----- - -.. _class_ShaderMaterial_method_set_shader_param: - -- void **set_shader_param** **(** :ref:`StringName` param, :ref:`Variant` value **)** +- void **set_shader_uniform** **(** :ref:`StringName` param, :ref:`Variant` value **)** Changes the value set for this material of a uniform in the shader. diff --git a/classes/class_shape2d.rst b/classes/class_shape2d.rst index 8cc2c7b92..4e7a4c226 100644 --- a/classes/class_shape2d.rst +++ b/classes/class_shape2d.rst @@ -36,17 +36,17 @@ Properties Methods ------- -+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`collide` **(** :ref:`Transform2D` local_xform, :ref:`Shape2D` with_shape, :ref:`Transform2D` shape_xform **)** | -+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`collide_and_get_contacts` **(** :ref:`Transform2D` local_xform, :ref:`Shape2D` with_shape, :ref:`Transform2D` shape_xform **)** | -+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`collide_with_motion` **(** :ref:`Transform2D` local_xform, :ref:`Vector2` local_motion, :ref:`Shape2D` with_shape, :ref:`Transform2D` shape_xform, :ref:`Vector2` shape_motion **)** | -+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`collide_with_motion_and_get_contacts` **(** :ref:`Transform2D` local_xform, :ref:`Vector2` local_motion, :ref:`Shape2D` with_shape, :ref:`Transform2D` shape_xform, :ref:`Vector2` shape_motion **)** | -+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`draw` **(** :ref:`RID` canvas_item, :ref:`Color` color **)** | -+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`collide` **(** :ref:`Transform2D` local_xform, :ref:`Shape2D` with_shape, :ref:`Transform2D` shape_xform **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedVector2Array` | :ref:`collide_and_get_contacts` **(** :ref:`Transform2D` local_xform, :ref:`Shape2D` with_shape, :ref:`Transform2D` shape_xform **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`collide_with_motion` **(** :ref:`Transform2D` local_xform, :ref:`Vector2` local_motion, :ref:`Shape2D` with_shape, :ref:`Transform2D` shape_xform, :ref:`Vector2` shape_motion **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedVector2Array` | :ref:`collide_with_motion_and_get_contacts` **(** :ref:`Transform2D` local_xform, :ref:`Vector2` local_motion, :ref:`Shape2D` with_shape, :ref:`Transform2D` shape_xform, :ref:`Vector2` shape_motion **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`draw` **(** :ref:`RID` canvas_item, :ref:`Color` color **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Property Descriptions --------------------- @@ -82,7 +82,7 @@ This method needs the transformation matrix for this shape (``local_xform``), th .. _class_Shape2D_method_collide_and_get_contacts: -- :ref:`Array` **collide_and_get_contacts** **(** :ref:`Transform2D` local_xform, :ref:`Shape2D` with_shape, :ref:`Transform2D` shape_xform **)** +- :ref:`PackedVector2Array` **collide_and_get_contacts** **(** :ref:`Transform2D` local_xform, :ref:`Shape2D` with_shape, :ref:`Transform2D` shape_xform **)** Returns a list of contact point pairs where this shape touches another. @@ -106,7 +106,7 @@ This method needs the transformation matrix for this shape (``local_xform``), th .. _class_Shape2D_method_collide_with_motion_and_get_contacts: -- :ref:`Array` **collide_with_motion_and_get_contacts** **(** :ref:`Transform2D` local_xform, :ref:`Vector2` local_motion, :ref:`Shape2D` with_shape, :ref:`Transform2D` shape_xform, :ref:`Vector2` shape_motion **)** +- :ref:`PackedVector2Array` **collide_with_motion_and_get_contacts** **(** :ref:`Transform2D` local_xform, :ref:`Vector2` local_motion, :ref:`Shape2D` with_shape, :ref:`Transform2D` shape_xform, :ref:`Vector2` shape_motion **)** Returns a list of contact point pairs where this shape would touch another, if a given movement was applied. diff --git a/classes/class_shapecast2d.rst b/classes/class_shapecast2d.rst index c61ffc7ab..e5accbd41 100644 --- a/classes/class_shapecast2d.rst +++ b/classes/class_shapecast2d.rst @@ -21,7 +21,7 @@ Shape casting allows to detect collision objects by sweeping the :ref:`shape` set to ``Vector2(0, 0)`` and by calling :ref:`force_shapecast_update` within the same **physics_frame**. This also helps to overcome some limitations of :ref:`Area2D` when used as a continuous detection area, often requiring waiting a couple of frames before collision information is available to :ref:`Area2D` nodes, and when using the signals creates unnecessary complexity. -The node can detect multiple collision objects, but usually the first detected collision +The node can detect multiple collision objects, but it's usually used to detect the first collision. \ **Note:** shape casting is more computationally expensive compared to ray casting. @@ -146,7 +146,7 @@ The shape's collision mask. Only objects in at least one collision layer enabled | *Default* | ``[]`` | +-----------+--------+ -A complete collision information. The data returned is the same as in the :ref:`PhysicsDirectSpaceState2D.get_rest_info` method. +Returns the complete collision information from the collision sweep. The data returned is the same as in the :ref:`PhysicsDirectSpaceState2D.get_rest_info` method. ---- @@ -224,7 +224,7 @@ The number of intersections can be limited with this parameter, to reduce the pr | *Getter* | get_shape() | +----------+------------------+ -Any :ref:`Shape2D` derived shape used for collision queries. +The :ref:`Shape2D`-derived shape to be used for collision queries. ---- @@ -283,7 +283,7 @@ Updates the collision information for the shape. Use this method to update the c - :ref:`float` **get_closest_collision_safe_fraction** **(** **)** |const| -The fraction of the motion (between 0 and 1) of how far the shape can move without triggering a collision. The motion is determined by :ref:`target_position`. +The fraction from the ``ShapeCast2D``'s origin to its :ref:`target_position` (between 0 and 1) of how far the shape can move without triggering a collision. ---- @@ -291,7 +291,7 @@ The fraction of the motion (between 0 and 1) of how far the shape can move witho - :ref:`float` **get_closest_collision_unsafe_fraction** **(** **)** |const| -The fraction of the motion (between 0 and 1) when the shape triggers a collision. The motion is determined by :ref:`target_position`. +The fraction from the ``ShapeCast2D``'s origin to its :ref:`target_position` (between 0 and 1) of how far the shape must move to trigger a collision. ---- @@ -299,7 +299,7 @@ The fraction of the motion (between 0 and 1) when the shape triggers a collision - :ref:`Object` **get_collider** **(** :ref:`int` index **)** |const| -Returns the :ref:`Object` of one of the multiple collisions at ``index``, or ``null`` if no object is intersecting the shape (i.e. :ref:`is_colliding` returns ``false``). +Returns the collided :ref:`Object` of one of the multiple collisions at ``index``, or ``null`` if no object is intersecting the shape (i.e. :ref:`is_colliding` returns ``false``). ---- @@ -307,7 +307,7 @@ Returns the :ref:`Object` of one of the multiple collisions at ``i - :ref:`int` **get_collider_shape** **(** :ref:`int` index **)** |const| -Returns the shape ID of one of the multiple collisions at ``index`` that the shape intersects, or ``0`` if no object is intersecting the shape (i.e. :ref:`is_colliding` returns ``false``). +Returns the shape ID of the colliding shape of one of the multiple collisions at ``index``, or ``0`` if no object is intersecting the shape (i.e. :ref:`is_colliding` returns ``false``). ---- @@ -331,7 +331,7 @@ Returns whether or not the specified layer of the :ref:`collision_mask` **get_collision_normal** **(** :ref:`int` index **)** |const| -Returns the normal containing one of the multiple collisions at ``index`` of the intersecting object. +Returns the normal of one of the multiple collisions at ``index`` of the intersecting object. ---- @@ -339,7 +339,7 @@ Returns the normal containing one of the multiple collisions at ``index`` of the - :ref:`Vector2` **get_collision_point** **(** :ref:`int` index **)** |const| -Returns the collision point containing one of the multiple collisions at ``index`` at which the shape intersects the object. +Returns the collision point of one of the multiple collisions at ``index`` where the shape intersects the colliding object. \ **Note:** this point is in the **global** coordinate system. diff --git a/classes/class_shapecast3d.rst b/classes/class_shapecast3d.rst new file mode 100644 index 000000000..2f3a5d271 --- /dev/null +++ b/classes/class_shapecast3d.rst @@ -0,0 +1,413 @@ +: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/ShapeCast3D.xml. + +.. _class_ShapeCast3D: + +ShapeCast3D +=========== + +**Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` + +Node for physics collision sweep and immediate overlap queries. Similar to the :ref:`RayCast3D` node. + +Description +----------- + +Shape casting allows to detect collision objects by sweeping the :ref:`shape` along the cast direction determined by :ref:`target_position` (useful for things like beam weapons). + +Immediate collision overlaps can be done with the :ref:`target_position` set to ``Vector3(0, 0, 0)`` and by calling :ref:`force_shapecast_update` within the same **physics_frame**. This also helps to overcome some limitations of :ref:`Area3D` when used as a continuous detection area, often requiring waiting a couple of frames before collision information is available to :ref:`Area3D` nodes, and when using the signals creates unnecessary complexity. + +The node can detect multiple collision objects, but it's usually used to detect the first collision. + +\ **Note:** Shape casting is more computationally expensive compared to ray casting. + +Properties +---------- + ++-------------------------------+--------------------------------------------------------------------------------------+-----------------------+ +| :ref:`bool` | :ref:`collide_with_areas` | ``false`` | ++-------------------------------+--------------------------------------------------------------------------------------+-----------------------+ +| :ref:`bool` | :ref:`collide_with_bodies` | ``true`` | ++-------------------------------+--------------------------------------------------------------------------------------+-----------------------+ +| :ref:`int` | :ref:`collision_mask` | ``1`` | ++-------------------------------+--------------------------------------------------------------------------------------+-----------------------+ +| :ref:`Array` | :ref:`collision_result` | ``[]`` | ++-------------------------------+--------------------------------------------------------------------------------------+-----------------------+ +| :ref:`Color` | :ref:`debug_shape_custom_color` | ``Color(0, 0, 0, 1)`` | ++-------------------------------+--------------------------------------------------------------------------------------+-----------------------+ +| :ref:`bool` | :ref:`enabled` | ``true`` | ++-------------------------------+--------------------------------------------------------------------------------------+-----------------------+ +| :ref:`bool` | :ref:`exclude_parent` | ``true`` | ++-------------------------------+--------------------------------------------------------------------------------------+-----------------------+ +| :ref:`float` | :ref:`margin` | ``0.0`` | ++-------------------------------+--------------------------------------------------------------------------------------+-----------------------+ +| :ref:`int` | :ref:`max_results` | ``32`` | ++-------------------------------+--------------------------------------------------------------------------------------+-----------------------+ +| :ref:`Shape3D` | :ref:`shape` | | ++-------------------------------+--------------------------------------------------------------------------------------+-----------------------+ +| :ref:`Vector3` | :ref:`target_position` | ``Vector3(0, -1, 0)`` | ++-------------------------------+--------------------------------------------------------------------------------------+-----------------------+ + +Methods +------- + ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_exception` **(** :ref:`Object` node **)** | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_exception_rid` **(** :ref:`RID` rid **)** | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_exceptions` **(** **)** | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`force_shapecast_update` **(** **)** | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_closest_collision_safe_fraction` **(** **)** |const| | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_closest_collision_unsafe_fraction` **(** **)** |const| | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_collider` **(** :ref:`int` index **)** |const| | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_collider_shape` **(** :ref:`int` index **)** |const| | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_collision_count` **(** **)** |const| | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_collision_mask_value` **(** :ref:`int` layer_number **)** |const| | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_collision_normal` **(** :ref:`int` index **)** |const| | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_collision_point` **(** :ref:`int` index **)** |const| | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_colliding` **(** **)** |const| | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_exception` **(** :ref:`Object` node **)** | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_exception_rid` **(** :ref:`RID` rid **)** | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`resource_changed` **(** :ref:`Resource` resource **)** | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_collision_mask_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Property Descriptions +--------------------- + +.. _class_ShapeCast3D_property_collide_with_areas: + +- :ref:`bool` **collide_with_areas** + ++-----------+---------------------------------+ +| *Default* | ``false`` | ++-----------+---------------------------------+ +| *Setter* | set_collide_with_areas(value) | ++-----------+---------------------------------+ +| *Getter* | is_collide_with_areas_enabled() | ++-----------+---------------------------------+ + +If ``true``, collision with :ref:`Area3D`\ s will be reported. + +---- + +.. _class_ShapeCast3D_property_collide_with_bodies: + +- :ref:`bool` **collide_with_bodies** + ++-----------+----------------------------------+ +| *Default* | ``true`` | ++-----------+----------------------------------+ +| *Setter* | set_collide_with_bodies(value) | ++-----------+----------------------------------+ +| *Getter* | is_collide_with_bodies_enabled() | ++-----------+----------------------------------+ + +If ``true``, collision with :ref:`PhysicsBody3D`\ s will be reported. + +---- + +.. _class_ShapeCast3D_property_collision_mask: + +- :ref:`int` **collision_mask** + ++-----------+---------------------------+ +| *Default* | ``1`` | ++-----------+---------------------------+ +| *Setter* | set_collision_mask(value) | ++-----------+---------------------------+ +| *Getter* | get_collision_mask() | ++-----------+---------------------------+ + +The shape's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. See `Collision layers and masks <../tutorials/physics/physics_introduction.html#collision-layers-and-masks>`__ in the documentation for more information. + +---- + +.. _class_ShapeCast3D_property_collision_result: + +- :ref:`Array` **collision_result** + ++-----------+--------+ +| *Default* | ``[]`` | ++-----------+--------+ + +Returns the complete collision information from the collision sweep. The data returned is the same as in the :ref:`PhysicsDirectSpaceState3D.get_rest_info` method. + +---- + +.. _class_ShapeCast3D_property_debug_shape_custom_color: + +- :ref:`Color` **debug_shape_custom_color** + ++-----------+-------------------------------------+ +| *Default* | ``Color(0, 0, 0, 1)`` | ++-----------+-------------------------------------+ +| *Setter* | set_debug_shape_custom_color(value) | ++-----------+-------------------------------------+ +| *Getter* | get_debug_shape_custom_color() | ++-----------+-------------------------------------+ + +The custom color to use to draw the shape in the editor and at run-time if **Visible Collision Shapes** is enabled in the **Debug** menu. This color will be highlighted at run-time if the ``ShapeCast3D`` is colliding with something. + +If set to ``Color(0.0, 0.0, 0.0)`` (by default), the color set in :ref:`ProjectSettings.debug/shapes/collision/shape_color` is used. + +---- + +.. _class_ShapeCast3D_property_enabled: + +- :ref:`bool` **enabled** + ++-----------+--------------------+ +| *Default* | ``true`` | ++-----------+--------------------+ +| *Setter* | set_enabled(value) | ++-----------+--------------------+ +| *Getter* | is_enabled() | ++-----------+--------------------+ + +If ``true``, collisions will be reported. + +---- + +.. _class_ShapeCast3D_property_exclude_parent: + +- :ref:`bool` **exclude_parent** + ++-----------+--------------------------------+ +| *Default* | ``true`` | ++-----------+--------------------------------+ +| *Setter* | set_exclude_parent_body(value) | ++-----------+--------------------------------+ +| *Getter* | get_exclude_parent_body() | ++-----------+--------------------------------+ + +If ``true``, the parent node will be excluded from collision detection. + +---- + +.. _class_ShapeCast3D_property_margin: + +- :ref:`float` **margin** + ++-----------+-------------------+ +| *Default* | ``0.0`` | ++-----------+-------------------+ +| *Setter* | set_margin(value) | ++-----------+-------------------+ +| *Getter* | get_margin() | ++-----------+-------------------+ + +The collision margin for the shape. A larger margin helps detecting collisions more consistently, at the cost of precision. + +---- + +.. _class_ShapeCast3D_property_max_results: + +- :ref:`int` **max_results** + ++-----------+------------------------+ +| *Default* | ``32`` | ++-----------+------------------------+ +| *Setter* | set_max_results(value) | ++-----------+------------------------+ +| *Getter* | get_max_results() | ++-----------+------------------------+ + +The number of intersections can be limited with this parameter, to reduce the processing time. + +---- + +.. _class_ShapeCast3D_property_shape: + +- :ref:`Shape3D` **shape** + ++----------+------------------+ +| *Setter* | set_shape(value) | ++----------+------------------+ +| *Getter* | get_shape() | ++----------+------------------+ + +The :ref:`Shape3D`-derived shape to be used for collision queries. + +---- + +.. _class_ShapeCast3D_property_target_position: + +- :ref:`Vector3` **target_position** + ++-----------+----------------------------+ +| *Default* | ``Vector3(0, -1, 0)`` | ++-----------+----------------------------+ +| *Setter* | set_target_position(value) | ++-----------+----------------------------+ +| *Getter* | get_target_position() | ++-----------+----------------------------+ + +The shape's destination point, relative to this node's ``position``. + +Method Descriptions +------------------- + +.. _class_ShapeCast3D_method_add_exception: + +- void **add_exception** **(** :ref:`Object` node **)** + +Adds a collision exception so the shape does not report collisions with the specified :ref:`CollisionObject3D` node. + +---- + +.. _class_ShapeCast3D_method_add_exception_rid: + +- void **add_exception_rid** **(** :ref:`RID` rid **)** + +Adds a collision exception so the shape does not report collisions with the specified :ref:`RID`. + +---- + +.. _class_ShapeCast3D_method_clear_exceptions: + +- void **clear_exceptions** **(** **)** + +Removes all collision exceptions for this ``ShapeCast3D``. + +---- + +.. _class_ShapeCast3D_method_force_shapecast_update: + +- void **force_shapecast_update** **(** **)** + +Updates the collision information for the shape. Use this method to update the collision information immediately instead of waiting for the next ``_physics_process`` call, for example if the shape or its parent has changed state. + +\ **Note:** ``enabled == true`` is not required for this to work. + +---- + +.. _class_ShapeCast3D_method_get_closest_collision_safe_fraction: + +- :ref:`float` **get_closest_collision_safe_fraction** **(** **)** |const| + +The fraction from the ``ShapeCast3D``'s origin to its :ref:`target_position` (between 0 and 1) of how far the shape can move without triggering a collision. + +---- + +.. _class_ShapeCast3D_method_get_closest_collision_unsafe_fraction: + +- :ref:`float` **get_closest_collision_unsafe_fraction** **(** **)** |const| + +The fraction from the ``ShapeCast3D``'s origin to its :ref:`target_position` (between 0 and 1) of how far the shape must move to trigger a collision. + +---- + +.. _class_ShapeCast3D_method_get_collider: + +- :ref:`Object` **get_collider** **(** :ref:`int` index **)** |const| + +Returns the collided :ref:`Object` of one of the multiple collisions at ``index``, or ``null`` if no object is intersecting the shape (i.e. :ref:`is_colliding` returns ``false``). + +---- + +.. _class_ShapeCast3D_method_get_collider_shape: + +- :ref:`int` **get_collider_shape** **(** :ref:`int` index **)** |const| + +Returns the shape ID of the colliding shape of one of the multiple collisions at ``index``, or ``0`` if no object is intersecting the shape (i.e. :ref:`is_colliding` returns ``false``). + +---- + +.. _class_ShapeCast3D_method_get_collision_count: + +- :ref:`int` **get_collision_count** **(** **)** |const| + +The number of collisions detected at the point of impact. Use this to iterate over multiple collisions as provided by :ref:`get_collider`, :ref:`get_collider_shape`, :ref:`get_collision_point`, and :ref:`get_collision_normal` methods. + +---- + +.. _class_ShapeCast3D_method_get_collision_mask_value: + +- :ref:`bool` **get_collision_mask_value** **(** :ref:`int` layer_number **)** |const| + +Returns whether or not the specified layer of the :ref:`collision_mask` is enabled, given a ``layer_number`` between 1 and 32. + +---- + +.. _class_ShapeCast3D_method_get_collision_normal: + +- :ref:`Vector3` **get_collision_normal** **(** :ref:`int` index **)** |const| + +Returns the normal of one of the multiple collisions at ``index`` of the intersecting object. + +---- + +.. _class_ShapeCast3D_method_get_collision_point: + +- :ref:`Vector3` **get_collision_point** **(** :ref:`int` index **)** |const| + +Returns the collision point of one of the multiple collisions at ``index`` where the shape intersects the colliding object. + +\ **Note:** this point is in the **global** coordinate system. + +---- + +.. _class_ShapeCast3D_method_is_colliding: + +- :ref:`bool` **is_colliding** **(** **)** |const| + +Returns whether any object is intersecting with the shape's vector (considering the vector length). + +---- + +.. _class_ShapeCast3D_method_remove_exception: + +- void **remove_exception** **(** :ref:`Object` node **)** + +Removes a collision exception so the shape does report collisions with the specified :ref:`CollisionObject3D` node. + +---- + +.. _class_ShapeCast3D_method_remove_exception_rid: + +- void **remove_exception_rid** **(** :ref:`RID` rid **)** + +Removes a collision exception so the shape does report collisions with the specified :ref:`RID`. + +---- + +.. _class_ShapeCast3D_method_resource_changed: + +- void **resource_changed** **(** :ref:`Resource` resource **)** + +This method is used internally to update the debug gizmo in the editor. Any code placed in this function will be called whenever the :ref:`shape` resource is modified. + +---- + +.. _class_ShapeCast3D_method_set_collision_mask_value: + +- void **set_collision_mask_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** + +Based on ``value``, enables or disables the specified layer in the :ref:`collision_mask`, given a ``layer_number`` between 1 and 32. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_skeleton2d.rst b/classes/class_skeleton2d.rst index 14664a774..142c17ac5 100644 --- a/classes/class_skeleton2d.rst +++ b/classes/class_skeleton2d.rst @@ -111,9 +111,9 @@ Returns the :ref:`RID` of a Skeleton2D instance. - void **set_bone_local_pose_override** **(** :ref:`int` bone_idx, :ref:`Transform2D` override_pose, :ref:`float` strength, :ref:`bool` persistent **)** -Sets the local pose transform, ``pose``, for the bone at ``bone_idx``. +Sets the local pose transform, ``override_pose``, for the bone at ``bone_idx``. -\ ``amount`` is the interpolation strength that will be used when applying the pose, and ``persistent`` determines if the applied pose will remain. +``strength`` is the interpolation strength that will be used when applying the pose, and ``persistent`` determines if the applied pose will remain. \ **Note:** The pose transform needs to be a local transform relative to the :ref:`Bone2D` node at ``bone_idx``! diff --git a/classes/class_skeleton3d.rst b/classes/class_skeleton3d.rst index 02ab1fb19..e315f23c8 100644 --- a/classes/class_skeleton3d.rst +++ b/classes/class_skeleton3d.rst @@ -33,11 +33,13 @@ Tutorials Properties ---------- -+-------------------------+---------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`animate_physical_bones` | ``true`` | -+-------------------------+---------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`show_rest_only` | ``false`` | -+-------------------------+---------------------------------------------------------------------------------+-----------+ ++---------------------------+---------------------------------------------------------------------------------+-----------+ +| :ref:`bool` | :ref:`animate_physical_bones` | ``true`` | ++---------------------------+---------------------------------------------------------------------------------+-----------+ +| :ref:`float` | :ref:`motion_scale` | ``1.0`` | ++---------------------------+---------------------------------------------------------------------------------+-----------+ +| :ref:`bool` | :ref:`show_rest_only` | ``false`` | ++---------------------------+---------------------------------------------------------------------------------+-----------+ Methods ------- @@ -45,8 +47,6 @@ Methods +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_bone` **(** :ref:`String` name **)** | +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_bone_child` **(** :ref:`int` bone_idx, :ref:`int` child_bone_idx **)** | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`clear_bones` **(** **)** | +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`clear_bones_global_pose_override` **(** **)** | @@ -63,7 +63,7 @@ Methods +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`force_update_bone_child_transform` **(** :ref:`int` bone_idx **)** | +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`get_bone_children` **(** :ref:`int` bone_idx **)** | +| :ref:`PackedInt32Array` | :ref:`get_bone_children` **(** :ref:`int` bone_idx **)** |const| | +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_bone_count` **(** **)** |const| | +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -93,7 +93,7 @@ Methods +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`SkeletonModificationStack3D` | :ref:`get_modification_stack` **(** **)** | +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`get_parentless_bones` **(** **)** | +| :ref:`PackedInt32Array` | :ref:`get_parentless_bones` **(** **)** |const| | +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform3D` | :ref:`global_pose_to_local_pose` **(** :ref:`int` bone_idx, :ref:`Transform3D` global_pose **)** | +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -117,9 +117,9 @@ Methods +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`SkinReference` | :ref:`register_skin` **(** :ref:`Skin` skin **)** | +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_bone_child` **(** :ref:`int` bone_idx, :ref:`int` child_bone_idx **)** | +| void | :ref:`reset_bone_pose` **(** :ref:`int` bone_idx **)** | +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_bone_children` **(** :ref:`int` bone_idx, :ref:`PackedInt32Array` bone_children **)** | +| void | :ref:`reset_bone_poses` **(** **)** | +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_bone_enabled` **(** :ref:`int` bone_idx, :ref:`bool` enabled=true **)** | +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -197,6 +197,24 @@ Property Descriptions ---- +.. _class_Skeleton3D_property_motion_scale: + +- :ref:`float` **motion_scale** + ++-----------+-------------------------+ +| *Default* | ``1.0`` | ++-----------+-------------------------+ +| *Setter* | set_motion_scale(value) | ++-----------+-------------------------+ +| *Getter* | get_motion_scale() | ++-----------+-------------------------+ + +Multiplies the position 3D track animation. + +\ **Note:** Unless this value is ``1.0``, the key value in animation will not match the actual position value. + +---- + .. _class_Skeleton3D_property_show_rest_only: - :ref:`bool` **show_rest_only** @@ -220,16 +238,6 @@ Adds a bone, with name ``name``. :ref:`get_bone_count` bone_idx, :ref:`int` child_bone_idx **)** - -Takes the given bone pose/transform and converts it to a world transform, relative to the ``Skeleton3D`` node. - -This is useful for using the bone transform in calculations with transforms from :ref:`Node3D`-based nodes. - ----- - .. _class_Skeleton3D_method_clear_bones: - void **clear_bones** **(** **)** @@ -294,7 +302,7 @@ Force updates the bone transform for the bone at ``bone_idx`` and all of its chi .. _class_Skeleton3D_method_get_bone_children: -- :ref:`PackedInt32Array` **get_bone_children** **(** :ref:`int` bone_idx **)** +- :ref:`PackedInt32Array` **get_bone_children** **(** :ref:`int` bone_idx **)** |const| Returns an array containing the bone indexes of all the children node of the passed in bone, ``bone_idx``. @@ -304,7 +312,7 @@ Returns an array containing the bone indexes of all the children node of the pas - :ref:`int` **get_bone_count** **(** **)** |const| -Returns the amount of bones in the skeleton. +Returns the number of bones in the skeleton. ---- @@ -352,7 +360,7 @@ Returns the local pose override transform for ``bone_idx``. - :ref:`String` **get_bone_name** **(** :ref:`int` bone_idx **)** |const| -Returns the name of the bone at index ``index``. +Returns the name of the bone at index ``bone_idx``. ---- @@ -410,7 +418,7 @@ Returns the modification stack attached to this skeleton, if one exists. .. _class_Skeleton3D_method_get_parentless_bones: -- :ref:`PackedInt32Array` **get_parentless_bones** **(** **)** +- :ref:`PackedInt32Array` **get_parentless_bones** **(** **)** |const| Returns an array with all of the bones that are parentless. Another way to look at this is that it returns the indexes of all the bones that are not dependent or modified by other bones in the Skeleton. @@ -478,7 +486,7 @@ Returns all bones in the skeleton to their rest poses. Adds a collision exception to the physical bone. -Works just like the :ref:`RigidDynamicBody3D` node. +Works just like the :ref:`RigidBody3D` node. ---- @@ -488,7 +496,7 @@ Works just like the :ref:`RigidDynamicBody3D` node. Removes a collision exception to the physical bone. -Works just like the :ref:`RigidDynamicBody3D` node. +Works just like the :ref:`RigidBody3D` node. ---- @@ -518,21 +526,19 @@ Binds the given Skin to the Skeleton. ---- -.. _class_Skeleton3D_method_remove_bone_child: +.. _class_Skeleton3D_method_reset_bone_pose: -- void **remove_bone_child** **(** :ref:`int` bone_idx, :ref:`int` child_bone_idx **)** +- void **reset_bone_pose** **(** :ref:`int` bone_idx **)** -Removes the passed in child bone index, ``child_bone_idx``, from the passed-in bone, ``bone_idx``, if it exists. - -\ **Note:** This does not remove the child bone, but instead it removes the connection it has to the parent bone. +Sets the bone pose to rest for ``bone_idx``. ---- -.. _class_Skeleton3D_method_set_bone_children: +.. _class_Skeleton3D_method_reset_bone_poses: -- void **set_bone_children** **(** :ref:`int` bone_idx, :ref:`PackedInt32Array` bone_children **)** +- void **reset_bone_poses** **(** **)** -Sets the children for the passed in bone, ``bone_idx``, to the passed-in array of bone indexes, ``bone_children``. +Sets all bone poses to rests. ---- @@ -550,7 +556,7 @@ Disables the pose for the bone at ``bone_idx`` if ``false``, enables the bone po Sets the global pose transform, ``pose``, for the bone at ``bone_idx``. -\ ``amount`` is the interpolation strength that will be used when applying the pose, and ``persistent`` determines if the applied pose will remain. +``amount`` is the interpolation strength that will be used when applying the pose, and ``persistent`` determines if the applied pose will remain. \ **Note:** The pose transform needs to be a global pose! Use :ref:`world_transform_to_global_pose` to convert a world transform, like one you can get from a :ref:`Node3D`, to a global pose. @@ -562,7 +568,7 @@ Sets the global pose transform, ``pose``, for the bone at ``bone_idx``. Sets the local pose transform, ``pose``, for the bone at ``bone_idx``. -\ ``amount`` is the interpolation strength that will be used when applying the pose, and ``persistent`` determines if the applied pose will remain. +``amount`` is the interpolation strength that will be used when applying the pose, and ``persistent`` determines if the applied pose will remain. \ **Note:** The pose transform needs to be a local pose! Use :ref:`global_pose_to_local_pose` to convert a global pose to a local pose. diff --git a/classes/class_skeletonmodification2dccdik.rst b/classes/class_skeletonmodification2dccdik.rst index afc4a7aad..fba4a7ad0 100644 --- a/classes/class_skeletonmodification2dccdik.rst +++ b/classes/class_skeletonmodification2dccdik.rst @@ -84,7 +84,7 @@ Property Descriptions | *Getter* | get_ccdik_data_chain_length() | +-----------+------------------------------------+ -The amount of CCDIK joints in the CCDIK modification. +The number of CCDIK joints in the CCDIK modification. ---- @@ -189,7 +189,7 @@ Sets the :ref:`Bone2D` node assigned to the CCDIK joint at ``joint - void **set_ccdik_joint_bone_index** **(** :ref:`int` joint_idx, :ref:`int` bone_idx **)** -Sets the bone index, ``bone_index``, of the CCDIK joint at ``joint_idx``. When possible, this will also update the ``bone2d_node`` of the CCDIK joint based on data provided by the linked skeleton. +Sets the bone index, ``bone_idx``, of the CCDIK joint at ``joint_idx``. When possible, this will also update the ``bone2d_node`` of the CCDIK joint based on data provided by the linked skeleton. ---- diff --git a/classes/class_skeletonmodification2dfabrik.rst b/classes/class_skeletonmodification2dfabrik.rst index 6178a5e6f..f8545da63 100644 --- a/classes/class_skeletonmodification2dfabrik.rst +++ b/classes/class_skeletonmodification2dfabrik.rst @@ -72,7 +72,7 @@ Property Descriptions | *Getter* | get_fabrik_data_chain_length() | +-----------+-------------------------------------+ -The amount of FABRIK joints in the FABRIK modification. +The number of FABRIK joints in the FABRIK modification. ---- @@ -137,7 +137,7 @@ Sets the :ref:`Bone2D` node assigned to the FABRIK joint at ``join - void **set_fabrik_joint_bone_index** **(** :ref:`int` joint_idx, :ref:`int` bone_idx **)** -Sets the bone index, ``bone_index``, of the FABRIK joint at ``joint_idx``. When possible, this will also update the ``bone2d_node`` of the FABRIK joint based on data provided by the linked skeleton. +Sets the bone index, ``bone_idx``, of the FABRIK joint at ``joint_idx``. When possible, this will also update the ``bone2d_node`` of the FABRIK joint based on data provided by the linked skeleton. ---- diff --git a/classes/class_skeletonmodification2djiggle.rst b/classes/class_skeletonmodification2djiggle.rst index 42ce3b0f7..647211977 100644 --- a/classes/class_skeletonmodification2djiggle.rst +++ b/classes/class_skeletonmodification2djiggle.rst @@ -303,7 +303,7 @@ Sets the :ref:`Bone2D` node assigned to the Jiggle joint at ``join - void **set_jiggle_joint_bone_index** **(** :ref:`int` joint_idx, :ref:`int` bone_idx **)** -Sets the bone index, ``bone_index``, of the Jiggle joint at ``joint_idx``. When possible, this will also update the ``bone2d_node`` of the Jiggle joint based on data provided by the linked skeleton. +Sets the bone index, ``bone_idx``, of the Jiggle joint at ``joint_idx``. When possible, this will also update the ``bone2d_node`` of the Jiggle joint based on data provided by the linked skeleton. ---- diff --git a/classes/class_skeletonmodification2dphysicalbones.rst b/classes/class_skeletonmodification2dphysicalbones.rst index 08150058f..457013cb3 100644 --- a/classes/class_skeletonmodification2dphysicalbones.rst +++ b/classes/class_skeletonmodification2dphysicalbones.rst @@ -56,7 +56,7 @@ Property Descriptions | *Getter* | get_physical_bone_chain_length() | +-----------+---------------------------------------+ -The amount of :ref:`PhysicalBone2D` nodes linked in this modification. +The number of :ref:`PhysicalBone2D` nodes linked in this modification. Method Descriptions ------------------- diff --git a/classes/class_skeletonmodification3dccdik.rst b/classes/class_skeletonmodification3dccdik.rst index 5c637fb30..3a3c9e55a 100644 --- a/classes/class_skeletonmodification3dccdik.rst +++ b/classes/class_skeletonmodification3dccdik.rst @@ -86,7 +86,7 @@ Property Descriptions | *Getter* | get_ccdik_data_chain_length() | +-----------+------------------------------------+ -The amount of CCDIK joints in the CCDIK modification. +The number of CCDIK joints in the CCDIK modification. ---- diff --git a/classes/class_skeletonmodification3djiggle.rst b/classes/class_skeletonmodification3djiggle.rst index 0707d547b..dd619a5cb 100644 --- a/classes/class_skeletonmodification3djiggle.rst +++ b/classes/class_skeletonmodification3djiggle.rst @@ -307,7 +307,7 @@ Sets the collision mask that the Jiggle modifier takes into account when perform - void **set_jiggle_joint_bone_index** **(** :ref:`int` joint_idx, :ref:`int` bone_idx **)** -Sets the bone index, ``bone_index``, of the Jiggle joint at ``joint_idx``. When possible, this will also update the ``bone_name`` of the Jiggle joint based on data provided by the :ref:`Skeleton3D`. +Sets the bone index, ``bone_idx``, of the Jiggle joint at ``joint_idx``. When possible, this will also update the ``bone_name`` of the Jiggle joint based on data provided by the :ref:`Skeleton3D`. ---- @@ -315,7 +315,7 @@ Sets the bone index, ``bone_index``, of the Jiggle joint at ``joint_idx``. When - void **set_jiggle_joint_bone_name** **(** :ref:`int` joint_idx, :ref:`String` name **)** -Sets the bone name, ``bone_name``, of the Jiggle joint at ``joint_idx``. When possible, this will also update the ``bone_index`` of the Jiggle joint based on data provided by the :ref:`Skeleton3D`. +Sets the bone name, ``name``, of the Jiggle joint at ``joint_idx``. When possible, this will also update the ``bone_index`` of the Jiggle joint based on data provided by the :ref:`Skeleton3D`. ---- diff --git a/classes/class_skeletonmodification3dtwoboneik.rst b/classes/class_skeletonmodification3dtwoboneik.rst index c4e433bcc..e5516bb21 100644 --- a/classes/class_skeletonmodification3dtwoboneik.rst +++ b/classes/class_skeletonmodification3dtwoboneik.rst @@ -225,7 +225,7 @@ The second bone will be calculated either using the tip node if that setting is - void **set_joint_one_bone_idx** **(** :ref:`int` bone_idx **)** -Sets the bone index, ``bone_index``, of the first bone. When possible, this will also update the ``bone_name`` of the first bone based on data provided by the :ref:`Skeleton3D`. +Sets the bone index, ``bone_idx``, of the first bone. When possible, this will also update the ``bone_name`` of the first bone based on data provided by the :ref:`Skeleton3D`. ---- @@ -257,7 +257,7 @@ Sets the amount of roll/twist applied to the first bone in the TwoBoneIK modific - void **set_joint_two_bone_idx** **(** :ref:`int` bone_idx **)** -Sets the bone index, ``bone_index``, of the second bone. When possible, this will also update the ``bone_name`` of the second bone based on data provided by the :ref:`Skeleton3D`. +Sets the bone index, ``bone_idx``, of the second bone. When possible, this will also update the ``bone_name`` of the second bone based on data provided by the :ref:`Skeleton3D`. ---- diff --git a/classes/class_skeletonmodificationstack3d.rst b/classes/class_skeletonmodificationstack3d.rst index fea1f1b76..5194de2a0 100644 --- a/classes/class_skeletonmodificationstack3d.rst +++ b/classes/class_skeletonmodificationstack3d.rst @@ -86,7 +86,7 @@ When true, the modification's in the stack will be called. This is handled autom | *Getter* | get_modification_count() | +-----------+-------------------------------+ -The amount of modifications in the stack. +The number of modifications in the stack. ---- diff --git a/classes/class_skeletonprofile.rst b/classes/class_skeletonprofile.rst index 4f9ac002e..264aeb082 100644 --- a/classes/class_skeletonprofile.rst +++ b/classes/class_skeletonprofile.rst @@ -24,11 +24,15 @@ This resource is used in :ref:`EditorScenePostImport` | :ref:`bone_size` | ``0`` | -+-----------------------+--------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`group_size` | ``0`` | -+-----------------------+--------------------------------------------------------------+-------+ ++-------------------------------------+------------------------------------------------------------------------+---------+ +| :ref:`int` | :ref:`bone_size` | ``0`` | ++-------------------------------------+------------------------------------------------------------------------+---------+ +| :ref:`int` | :ref:`group_size` | ``0`` | ++-------------------------------------+------------------------------------------------------------------------+---------+ +| :ref:`StringName` | :ref:`root_bone` | ``&""`` | ++-------------------------------------+------------------------------------------------------------------------+---------+ +| :ref:`StringName` | :ref:`scale_base_bone` | ``&""`` | ++-------------------------------------+------------------------------------------------------------------------+---------+ Methods ------- @@ -82,7 +86,7 @@ Signals This signal is emitted when change the value in profile. This is used to update key name in the :ref:`BoneMap` and to redraw the :ref:`BoneMap` editor. -\ **Note**: This signal is not connected directly to editor to simplify the reference, instead it is passed on to editor through the :ref:`BoneMap`. +\ **Note:** This signal is not connected directly to editor to simplify the reference, instead it is passed on to editor through the :ref:`BoneMap`. Enumerations ------------ @@ -132,6 +136,42 @@ Property Descriptions | *Getter* | get_group_size() | +-----------+-----------------------+ +---- + +.. _class_SkeletonProfile_property_root_bone: + +- :ref:`StringName` **root_bone** + ++-----------+----------------------+ +| *Default* | ``&""`` | ++-----------+----------------------+ +| *Setter* | set_root_bone(value) | ++-----------+----------------------+ +| *Getter* | get_root_bone() | ++-----------+----------------------+ + +A name of bone that will be used as the root bone in :ref:`AnimationTree`. + +\ **Note:** In most cases, it is the bone of the parent of the hips that exists at the world origin in the humanoid model. + +---- + +.. _class_SkeletonProfile_property_scale_base_bone: + +- :ref:`StringName` **scale_base_bone** + ++-----------+----------------------------+ +| *Default* | ``&""`` | ++-----------+----------------------------+ +| *Setter* | set_scale_base_bone(value) | ++-----------+----------------------------+ +| *Getter* | get_scale_base_bone() | ++-----------+----------------------------+ + +A name of bone which height will be used as the coefficient for normalization. + +\ **Note:** In most cases, it is hips in the humanoid model. + Method Descriptions ------------------- diff --git a/classes/class_skeletonprofilehumanoid.rst b/classes/class_skeletonprofilehumanoid.rst index ed2b5a2a4..a5f1eb148 100644 --- a/classes/class_skeletonprofilehumanoid.rst +++ b/classes/class_skeletonprofilehumanoid.rst @@ -22,11 +22,15 @@ A :ref:`SkeletonProfile` as a preset that is optimized fo Properties ---------- -+-----------------------+------------+-------------------------------------------------------------------------------------+ -| :ref:`int` | bone_size | ``56`` (overrides :ref:`SkeletonProfile`) | -+-----------------------+------------+-------------------------------------------------------------------------------------+ -| :ref:`int` | group_size | ``4`` (overrides :ref:`SkeletonProfile`) | -+-----------------------+------------+-------------------------------------------------------------------------------------+ ++-------------------------------------+-----------------+------------------------------------------------------------------------------------------------+ +| :ref:`int` | bone_size | ``56`` (overrides :ref:`SkeletonProfile`) | ++-------------------------------------+-----------------+------------------------------------------------------------------------------------------------+ +| :ref:`int` | group_size | ``4`` (overrides :ref:`SkeletonProfile`) | ++-------------------------------------+-----------------+------------------------------------------------------------------------------------------------+ +| :ref:`StringName` | root_bone | ``&"Root"`` (overrides :ref:`SkeletonProfile`) | ++-------------------------------------+-----------------+------------------------------------------------------------------------------------------------+ +| :ref:`StringName` | scale_base_bone | ``&"Hips"`` (overrides :ref:`SkeletonProfile`) | ++-------------------------------------+-----------------+------------------------------------------------------------------------------------------------+ .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_sliderjoint3d.rst b/classes/class_sliderjoint3d.rst index a02b12ee5..d10738e57 100644 --- a/classes/class_sliderjoint3d.rst +++ b/classes/class_sliderjoint3d.rst @@ -201,9 +201,13 @@ A lower damping value allows a rotation initiated by body A to travel to body B - :ref:`float` **angular_limit/lower_angle** -+-----------+---------+ -| *Default* | ``0.0`` | -+-----------+---------+ ++-----------+------------------+ +| *Default* | ``0.0`` | ++-----------+------------------+ +| *Setter* | set_param(value) | ++-----------+------------------+ +| *Getter* | get_param() | ++-----------+------------------+ The lower limit of rotation in the slider. @@ -249,9 +253,13 @@ Makes all rotation slower when between 0 and 1. - :ref:`float` **angular_limit/upper_angle** -+-----------+---------+ -| *Default* | ``0.0`` | -+-----------+---------+ ++-----------+------------------+ +| *Default* | ``0.0`` | ++-----------+------------------+ +| *Setter* | set_param(value) | ++-----------+------------------+ +| *Getter* | get_param() | ++-----------+------------------+ The upper limit of rotation in the slider. diff --git a/classes/class_softdynamicbody3d.rst b/classes/class_softbody3d.rst similarity index 52% rename from classes/class_softdynamicbody3d.rst rename to classes/class_softbody3d.rst index 55bc2329f..110067377 100644 --- a/classes/class_softdynamicbody3d.rst +++ b/classes/class_softbody3d.rst @@ -3,12 +3,12 @@ .. 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/SoftDynamicBody3D.xml. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/SoftBody3D.xml. -.. _class_SoftDynamicBody3D: +.. _class_SoftBody3D: -SoftDynamicBody3D -================= +SoftBody3D +========== **Inherits:** :ref:`MeshInstance3D` **<** :ref:`GeometryInstance3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` @@ -19,7 +19,7 @@ Description A deformable physics body. Used to create elastic or deformable objects such as cloth, rubber, or other flexible materials. -\ **Note:** There are many known bugs in ``SoftDynamicBody3D``. Therefore, it's not recommended to use them for things that can affect gameplay (such as a player character made entirely out of soft bodies). +\ **Note:** There are many known bugs in ``SoftBody3D``. Therefore, it's not recommended to use them for things that can affect gameplay (such as a player character made entirely out of soft bodies). Tutorials --------- @@ -29,69 +29,69 @@ Tutorials Properties ---------- -+--------------------------------------------------------+------------------------------------------------------------------------------------------+------------------+ -| :ref:`int` | :ref:`collision_layer` | ``1`` | -+--------------------------------------------------------+------------------------------------------------------------------------------------------+------------------+ -| :ref:`int` | :ref:`collision_mask` | ``1`` | -+--------------------------------------------------------+------------------------------------------------------------------------------------------+------------------+ -| :ref:`float` | :ref:`damping_coefficient` | ``0.01`` | -+--------------------------------------------------------+------------------------------------------------------------------------------------------+------------------+ -| :ref:`DisableMode` | :ref:`disable_mode` | ``0`` | -+--------------------------------------------------------+------------------------------------------------------------------------------------------+------------------+ -| :ref:`float` | :ref:`drag_coefficient` | ``0.0`` | -+--------------------------------------------------------+------------------------------------------------------------------------------------------+------------------+ -| :ref:`float` | :ref:`linear_stiffness` | ``0.5`` | -+--------------------------------------------------------+------------------------------------------------------------------------------------------+------------------+ -| :ref:`NodePath` | :ref:`parent_collision_ignore` | ``NodePath("")`` | -+--------------------------------------------------------+------------------------------------------------------------------------------------------+------------------+ -| :ref:`float` | :ref:`pressure_coefficient` | ``0.0`` | -+--------------------------------------------------------+------------------------------------------------------------------------------------------+------------------+ -| :ref:`bool` | :ref:`ray_pickable` | ``true`` | -+--------------------------------------------------------+------------------------------------------------------------------------------------------+------------------+ -| :ref:`int` | :ref:`simulation_precision` | ``5`` | -+--------------------------------------------------------+------------------------------------------------------------------------------------------+------------------+ -| :ref:`float` | :ref:`total_mass` | ``1.0`` | -+--------------------------------------------------------+------------------------------------------------------------------------------------------+------------------+ ++-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+ +| :ref:`int` | :ref:`collision_layer` | ``1`` | ++-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+ +| :ref:`int` | :ref:`collision_mask` | ``1`` | ++-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+ +| :ref:`float` | :ref:`damping_coefficient` | ``0.01`` | ++-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+ +| :ref:`DisableMode` | :ref:`disable_mode` | ``0`` | ++-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+ +| :ref:`float` | :ref:`drag_coefficient` | ``0.0`` | ++-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+ +| :ref:`float` | :ref:`linear_stiffness` | ``0.5`` | ++-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+ +| :ref:`NodePath` | :ref:`parent_collision_ignore` | ``NodePath("")`` | ++-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+ +| :ref:`float` | :ref:`pressure_coefficient` | ``0.0`` | ++-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+ +| :ref:`bool` | :ref:`ray_pickable` | ``true`` | ++-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+ +| :ref:`int` | :ref:`simulation_precision` | ``5`` | ++-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+ +| :ref:`float` | :ref:`total_mass` | ``1.0`` | ++-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+ Methods ------- -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_collision_exception_with` **(** :ref:`Node` body **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_collision_exceptions` **(** **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_collision_layer_value` **(** :ref:`int` layer_number **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_collision_mask_value` **(** :ref:`int` layer_number **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_physics_rid` **(** **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_point_transform` **(** :ref:`int` point_index **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_point_pinned` **(** :ref:`int` point_index **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_collision_exception_with` **(** :ref:`Node` body **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_collision_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_collision_mask_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_point_pinned` **(** :ref:`int` point_index, :ref:`bool` pinned, :ref:`NodePath` attachment_path=NodePath("") **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_collision_exception_with` **(** :ref:`Node` body **)** | ++---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PhysicsBody3D[]` | :ref:`get_collision_exceptions` **(** **)** | ++---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_collision_layer_value` **(** :ref:`int` layer_number **)** |const| | ++---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_collision_mask_value` **(** :ref:`int` layer_number **)** |const| | ++---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`get_physics_rid` **(** **)** |const| | ++---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_point_transform` **(** :ref:`int` point_index **)** | ++---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_point_pinned` **(** :ref:`int` point_index **)** |const| | ++---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_collision_exception_with` **(** :ref:`Node` body **)** | ++---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_collision_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | ++---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_collision_mask_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | ++---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_point_pinned` **(** :ref:`int` point_index, :ref:`bool` pinned, :ref:`NodePath` attachment_path=NodePath("") **)** | ++---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Enumerations ------------ -.. _enum_SoftDynamicBody3D_DisableMode: +.. _enum_SoftBody3D_DisableMode: -.. _class_SoftDynamicBody3D_constant_DISABLE_MODE_REMOVE: +.. _class_SoftBody3D_constant_DISABLE_MODE_REMOVE: -.. _class_SoftDynamicBody3D_constant_DISABLE_MODE_KEEP_ACTIVE: +.. _class_SoftBody3D_constant_DISABLE_MODE_KEEP_ACTIVE: enum **DisableMode**: -- **DISABLE_MODE_REMOVE** = **0** --- When :ref:`Node.process_mode` is set to :ref:`Node.PROCESS_MODE_DISABLED`, remove from the physics simulation to stop all physics interactions with this ``SoftDynamicBody3D``. +- **DISABLE_MODE_REMOVE** = **0** --- When :ref:`Node.process_mode` is set to :ref:`Node.PROCESS_MODE_DISABLED`, remove from the physics simulation to stop all physics interactions with this ``SoftBody3D``. Automatically re-added to the physics simulation when the :ref:`Node` is processed again. @@ -100,7 +100,7 @@ Automatically re-added to the physics simulation when the :ref:`Node Property Descriptions --------------------- -.. _class_SoftDynamicBody3D_property_collision_layer: +.. _class_SoftBody3D_property_collision_layer: - :ref:`int` **collision_layer** @@ -112,13 +112,13 @@ Property Descriptions | *Getter* | get_collision_layer() | +-----------+----------------------------+ -The physics layers this SoftDynamicBody3D **is in**. Collision objects can exist in one or more of 32 different layers. See also :ref:`collision_mask`. +The physics layers this SoftBody3D **is in**. Collision objects can exist in one or more of 32 different layers. See also :ref:`collision_mask`. \ **Note:** Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See `Collision layers and masks <../tutorials/physics/physics_introduction.html#collision-layers-and-masks>`__ in the documentation for more information. ---- -.. _class_SoftDynamicBody3D_property_collision_mask: +.. _class_SoftBody3D_property_collision_mask: - :ref:`int` **collision_mask** @@ -130,13 +130,13 @@ The physics layers this SoftDynamicBody3D **is in**. Collision objects can exist | *Getter* | get_collision_mask() | +-----------+---------------------------+ -The physics layers this SoftDynamicBody3D **scans**. Collision objects can scan one or more of 32 different layers. See also :ref:`collision_layer`. +The physics layers this SoftBody3D **scans**. Collision objects can scan one or more of 32 different layers. See also :ref:`collision_layer`. \ **Note:** Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See `Collision layers and masks <../tutorials/physics/physics_introduction.html#collision-layers-and-masks>`__ in the documentation for more information. ---- -.. _class_SoftDynamicBody3D_property_damping_coefficient: +.. _class_SoftBody3D_property_damping_coefficient: - :ref:`float` **damping_coefficient** @@ -150,9 +150,9 @@ The physics layers this SoftDynamicBody3D **scans**. Collision objects can scan ---- -.. _class_SoftDynamicBody3D_property_disable_mode: +.. _class_SoftBody3D_property_disable_mode: -- :ref:`DisableMode` **disable_mode** +- :ref:`DisableMode` **disable_mode** +-----------+-------------------------+ | *Default* | ``0`` | @@ -162,11 +162,11 @@ The physics layers this SoftDynamicBody3D **scans**. Collision objects can scan | *Getter* | get_disable_mode() | +-----------+-------------------------+ -Defines the behavior in physics when :ref:`Node.process_mode` is set to :ref:`Node.PROCESS_MODE_DISABLED`. See :ref:`DisableMode` for more details about the different modes. +Defines the behavior in physics when :ref:`Node.process_mode` is set to :ref:`Node.PROCESS_MODE_DISABLED`. See :ref:`DisableMode` for more details about the different modes. ---- -.. _class_SoftDynamicBody3D_property_drag_coefficient: +.. _class_SoftBody3D_property_drag_coefficient: - :ref:`float` **drag_coefficient** @@ -180,7 +180,7 @@ Defines the behavior in physics when :ref:`Node.process_mode` **linear_stiffness** @@ -194,7 +194,7 @@ Defines the behavior in physics when :ref:`Node.process_mode` **parent_collision_ignore** @@ -206,11 +206,11 @@ Defines the behavior in physics when :ref:`Node.process_mode` to a :ref:`CollisionObject3D` this SoftDynamicBody3D should avoid clipping. +:ref:`NodePath` to a :ref:`CollisionObject3D` this SoftBody3D should avoid clipping. ---- -.. _class_SoftDynamicBody3D_property_pressure_coefficient: +.. _class_SoftBody3D_property_pressure_coefficient: - :ref:`float` **pressure_coefficient** @@ -224,7 +224,7 @@ Defines the behavior in physics when :ref:`Node.process_mode` **ray_pickable** @@ -236,11 +236,11 @@ Defines the behavior in physics when :ref:`Node.process_mode`\ s. +If ``true``, the ``SoftBody3D`` will respond to :ref:`RayCast3D`\ s. ---- -.. _class_SoftDynamicBody3D_property_simulation_precision: +.. _class_SoftBody3D_property_simulation_precision: - :ref:`int` **simulation_precision** @@ -256,7 +256,7 @@ Increasing this value will improve the resulting simulation, but can affect perf ---- -.. _class_SoftDynamicBody3D_property_total_mass: +.. _class_SoftBody3D_property_total_mass: - :ref:`float` **total_mass** @@ -268,12 +268,12 @@ Increasing this value will improve the resulting simulation, but can affect perf | *Getter* | get_total_mass() | +-----------+-----------------------+ -The SoftDynamicBody3D's mass. +The SoftBody3D's mass. Method Descriptions ------------------- -.. _class_SoftDynamicBody3D_method_add_collision_exception_with: +.. _class_SoftBody3D_method_add_collision_exception_with: - void **add_collision_exception_with** **(** :ref:`Node` body **)** @@ -281,37 +281,37 @@ Adds a body to the list of bodies that this body can't collide with. ---- -.. _class_SoftDynamicBody3D_method_get_collision_exceptions: +.. _class_SoftBody3D_method_get_collision_exceptions: -- :ref:`Array` **get_collision_exceptions** **(** **)** +- :ref:`PhysicsBody3D[]` **get_collision_exceptions** **(** **)** Returns an array of nodes that were added as collision exceptions for this body. ---- -.. _class_SoftDynamicBody3D_method_get_collision_layer_value: +.. _class_SoftBody3D_method_get_collision_layer_value: - :ref:`bool` **get_collision_layer_value** **(** :ref:`int` layer_number **)** |const| -Returns whether or not the specified layer of the :ref:`collision_layer` is enabled, given a ``layer_number`` between 1 and 32. +Returns whether or not the specified layer of the :ref:`collision_layer` is enabled, given a ``layer_number`` between 1 and 32. ---- -.. _class_SoftDynamicBody3D_method_get_collision_mask_value: +.. _class_SoftBody3D_method_get_collision_mask_value: - :ref:`bool` **get_collision_mask_value** **(** :ref:`int` layer_number **)** |const| -Returns whether or not the specified layer of the :ref:`collision_mask` is enabled, given a ``layer_number`` between 1 and 32. +Returns whether or not the specified layer of the :ref:`collision_mask` is enabled, given a ``layer_number`` between 1 and 32. ---- -.. _class_SoftDynamicBody3D_method_get_physics_rid: +.. _class_SoftBody3D_method_get_physics_rid: - :ref:`RID` **get_physics_rid** **(** **)** |const| ---- -.. _class_SoftDynamicBody3D_method_get_point_transform: +.. _class_SoftBody3D_method_get_point_transform: - :ref:`Vector3` **get_point_transform** **(** :ref:`int` point_index **)** @@ -319,7 +319,7 @@ Returns local translation of a vertex in the surface array. ---- -.. _class_SoftDynamicBody3D_method_is_point_pinned: +.. _class_SoftBody3D_method_is_point_pinned: - :ref:`bool` **is_point_pinned** **(** :ref:`int` point_index **)** |const| @@ -327,7 +327,7 @@ Returns ``true`` if vertex is set to pinned. ---- -.. _class_SoftDynamicBody3D_method_remove_collision_exception_with: +.. _class_SoftBody3D_method_remove_collision_exception_with: - void **remove_collision_exception_with** **(** :ref:`Node` body **)** @@ -335,23 +335,23 @@ Removes a body from the list of bodies that this body can't collide with. ---- -.. _class_SoftDynamicBody3D_method_set_collision_layer_value: +.. _class_SoftBody3D_method_set_collision_layer_value: - void **set_collision_layer_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** -Based on ``value``, enables or disables the specified layer in the :ref:`collision_layer`, given a ``layer_number`` between 1 and 32. +Based on ``value``, enables or disables the specified layer in the :ref:`collision_layer`, given a ``layer_number`` between 1 and 32. ---- -.. _class_SoftDynamicBody3D_method_set_collision_mask_value: +.. _class_SoftBody3D_method_set_collision_mask_value: - void **set_collision_mask_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** -Based on ``value``, enables or disables the specified layer in the :ref:`collision_mask`, given a ``layer_number`` between 1 and 32. +Based on ``value``, enables or disables the specified layer in the :ref:`collision_mask`, given a ``layer_number`` between 1 and 32. ---- -.. _class_SoftDynamicBody3D_method_set_point_pinned: +.. _class_SoftBody3D_method_set_point_pinned: - void **set_point_pinned** **(** :ref:`int` point_index, :ref:`bool` pinned, :ref:`NodePath` attachment_path=NodePath("") **)** diff --git a/classes/class_spinbox.rst b/classes/class_spinbox.rst index 10af88a31..70cb0ad92 100644 --- a/classes/class_spinbox.rst +++ b/classes/class_spinbox.rst @@ -56,6 +56,8 @@ Properties +-------------------------------------------------------------------+------------------------------------------------------------------------------+-----------+ | :ref:`HorizontalAlignment` | :ref:`alignment` | ``0`` | +-------------------------------------------------------------------+------------------------------------------------------------------------------+-----------+ +| :ref:`float` | :ref:`custom_arrow_step` | ``0.0`` | ++-------------------------------------------------------------------+------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`editable` | ``true`` | +-------------------------------------------------------------------+------------------------------------------------------------------------------+-----------+ | :ref:`String` | :ref:`prefix` | ``""`` | @@ -98,6 +100,22 @@ Property Descriptions ---- +.. _class_SpinBox_property_custom_arrow_step: + +- :ref:`float` **custom_arrow_step** + ++-----------+------------------------------+ +| *Default* | ``0.0`` | ++-----------+------------------------------+ +| *Setter* | set_custom_arrow_step(value) | ++-----------+------------------------------+ +| *Getter* | get_custom_arrow_step() | ++-----------+------------------------------+ + +If not ``0``, ``value`` will always be rounded to a multiple of ``custom_arrow_step`` when interacting with the arrow buttons of the ``SpinBox``. + +---- + .. _class_SpinBox_property_editable: - :ref:`bool` **editable** diff --git a/classes/class_sprite3d.rst b/classes/class_sprite3d.rst index e2d818b24..9250be4a7 100644 --- a/classes/class_sprite3d.rst +++ b/classes/class_sprite3d.rst @@ -146,7 +146,7 @@ The region of the atlas texture to display. :ref:`region_enabled` object to draw. +:ref:`Texture2D` object to draw. If :ref:`GeometryInstance3D.material_override` is used, this will be overridden. The size information is still used. ---- diff --git a/classes/class_spritebase3d.rst b/classes/class_spritebase3d.rst index 4742e5ae5..d5ed27d63 100644 --- a/classes/class_spritebase3d.rst +++ b/classes/class_spritebase3d.rst @@ -331,7 +331,7 @@ The size of one pixel's width on the sprite to scale it in 3D. Sets the render priority for the sprite. Higher priority objects will be sorted in front of lower priority objects. -\ **Node:** This only applies if :ref:`alpha_cut` is set to :ref:`ALPHA_CUT_DISABLED` (default value). +\ **Note:** This only applies if :ref:`alpha_cut` is set to :ref:`ALPHA_CUT_DISABLED` (default value). \ **Note:** This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority). diff --git a/classes/class_staticbody2d.rst b/classes/class_staticbody2d.rst index 4addba8be..e31f208f8 100644 --- a/classes/class_staticbody2d.rst +++ b/classes/class_staticbody2d.rst @@ -21,7 +21,7 @@ Description Static body for 2D physics. -A static body is a simple body that can't be moved by external forces or contacts. It is ideal for implementing objects in the environment, such as walls or platforms. In contrast to :ref:`RigidDynamicBody2D`, it doesn't consume any CPU resources as long as they don't move. +A static body is a simple body that can't be moved by external forces or contacts. It is ideal for implementing objects in the environment, such as walls or platforms. In contrast to :ref:`RigidBody2D`, it doesn't consume any CPU resources as long as they don't move. They have extra functionalities to move and affect other bodies: diff --git a/classes/class_staticbody3d.rst b/classes/class_staticbody3d.rst index 3b1a44f7a..4cf061f3b 100644 --- a/classes/class_staticbody3d.rst +++ b/classes/class_staticbody3d.rst @@ -21,7 +21,7 @@ Description Static body for 3D physics. -A static body is a simple body that can't be moved by external forces or contacts. It is ideal for implementing objects in the environment, such as walls or platforms. In contrast to :ref:`RigidDynamicBody3D`, it doesn't consume any CPU resources as long as they don't move. +A static body is a simple body that can't be moved by external forces or contacts. It is ideal for implementing objects in the environment, such as walls or platforms. In contrast to :ref:`RigidBody3D`, it doesn't consume any CPU resources as long as they don't move. They have extra functionalities to move and affect other bodies: diff --git a/classes/class_streampeer.rst b/classes/class_streampeer.rst index 7c1718720..7fc5e91ce 100644 --- a/classes/class_streampeer.rst +++ b/classes/class_streampeer.rst @@ -153,7 +153,7 @@ Gets a signed byte from the stream. - :ref:`int` **get_available_bytes** **(** **)** |const| -Returns the amount of bytes this ``StreamPeer`` has available. +Returns the number of bytes this ``StreamPeer`` has available. ---- @@ -161,7 +161,7 @@ Returns the amount of bytes this ``StreamPeer`` has available. - :ref:`Array` **get_data** **(** :ref:`int` bytes **)** -Returns a chunk data with the received bytes. The amount of bytes to be received can be requested in the ``bytes`` argument. If not enough bytes are available, the function will block until the desired amount is received. This function returns two values, an :ref:`Error` code and a data array. +Returns a chunk data with the received bytes. The number of bytes to be received can be requested in the ``bytes`` argument. If not enough bytes are available, the function will block until the desired amount is received. This function returns two values, an :ref:`Error` code and a data array. ---- @@ -185,7 +185,7 @@ Gets a single-precision float from the stream. - :ref:`Array` **get_partial_data** **(** :ref:`int` bytes **)** -Returns a chunk data with the received bytes. The amount of bytes to be received can be requested in the "bytes" argument. If not enough bytes are available, the function will return how many were actually received. This function returns two values, an :ref:`Error` code, and a data array. +Returns a chunk data with the received bytes. The number of bytes to be received can be requested in the "bytes" argument. If not enough bytes are available, the function will return how many were actually received. This function returns two values, an :ref:`Error` code, and a data array. ---- diff --git a/classes/class_streampeerssl.rst b/classes/class_streampeerssl.rst index 016589cc0..8aeee2ad2 100644 --- a/classes/class_streampeerssl.rst +++ b/classes/class_streampeerssl.rst @@ -109,7 +109,7 @@ Accepts a peer connection as a server using the given ``private_key`` and provid Connects to a peer using an underlying :ref:`StreamPeer` ``stream``. If ``validate_certs`` is ``true``, ``StreamPeerSSL`` will validate that the certificate presented by the peer matches the ``for_hostname``. -\ **Note:** Specifying a custom ``valid_certificate`` is not supported in HTML5 exports due to browsers restrictions. +\ **Note:** Specifying a custom ``valid_certificate`` is not supported in Web exports due to browsers restrictions. ---- diff --git a/classes/class_string.rst b/classes/class_string.rst index ce333ad32..67221138e 100644 --- a/classes/class_string.rst +++ b/classes/class_string.rst @@ -155,7 +155,7 @@ Methods +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`pad_zeros` **(** :ref:`int` digits **)** |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`plus_file` **(** :ref:`String` file **)** |const| | +| :ref:`String` | :ref:`path_join` **(** :ref:`String` file **)** |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`repeat` **(** :ref:`int` count **)** |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -199,12 +199,18 @@ Methods +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedByteArray` | :ref:`to_ascii_buffer` **(** **)** |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`to_camel_case` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`to_float` **(** **)** |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`to_int` **(** **)** |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`to_lower` **(** **)** |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`to_pascal_case` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`to_snake_case` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`to_upper` **(** **)** |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedByteArray` | :ref:`to_utf16_buffer` **(** **)** |const| | @@ -244,9 +250,9 @@ Operators +-----------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`operator +` **(** :ref:`int` right **)** | +-----------------------------+----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator <` **(** :ref:`String` right **)** | +| :ref:`bool` | :ref:`operator \<` **(** :ref:`String` right **)** | +-----------------------------+----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator <=` **(** :ref:`String` right **)** | +| :ref:`bool` | :ref:`operator \<=` **(** :ref:`String` right **)** | +-----------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`String` right **)** | +-----------------------------+----------------------------------------------------------------------------------------------------------+ @@ -463,7 +469,7 @@ Returns the index of the **first** case-insensitive occurrence of the specified Formats the string by replacing all occurrences of ``placeholder`` with the elements of ``values``. -\ ``values`` can be a :ref:`Dictionary` or an :ref:`Array`. Any underscores in ``placeholder`` will be replaced with the corresponding keys in advance. Array elements use their index as keys. +``values`` can be a :ref:`Dictionary` or an :ref:`Array`. Any underscores in ``placeholder`` will be replaced with the corresponding keys in advance. Array elements use their index as keys. :: @@ -620,7 +626,7 @@ For example, the string can be indented with two tabs using ``"\t\t"``, or four - :ref:`String` **insert** **(** :ref:`int` position, :ref:`String` what **)** |const| -Returns a copy of the string with the substring ``what`` inserted at the given position. +Returns a copy of the string with the substring ``what`` inserted at the given ``position``. ---- @@ -793,7 +799,7 @@ Examples: - :ref:`int` **length** **(** **)** |const| -Returns the string's amount of characters. +Returns the number of characters in the string. ---- @@ -801,7 +807,7 @@ Returns the string's amount of characters. - :ref:`String` **lpad** **(** :ref:`int` min_length, :ref:`String` character=" " **)** |const| -Formats a string to be at least ``min_length`` long by adding ``character``\ s to the left of the string. +Formats a string to be at least ``min_length`` long by adding ``character``s to the left of the string. ---- @@ -897,7 +903,7 @@ Some examples: # Last digit will be rounded up here, which reduces total digit count since # trailing zeros are removed: String.num(42.129999, 5) # "42.13" - # If `decimals` is not specified, the total amount of significant digits is 14: + # If `decimals` is not specified, the total number of significant digits is 14: String.num(-0.0000012345432123454321) # "-0.00000123454321" String.num(-10000.0000012345432123454321) # "-10000.0000012345" @@ -941,11 +947,11 @@ Formats a number to have an exact number of ``digits`` before the decimal point. ---- -.. _class_String_method_plus_file: +.. _class_String_method_path_join: -- :ref:`String` **plus_file** **(** :ref:`String` file **)** |const| +- :ref:`String` **path_join** **(** :ref:`String` file **)** |const| -If the string is a path, this concatenates ``file`` at the end of the string as a subpath. E.g. ``"this/is".plus_file("path") == "this/is/path"``. +If the string is a path, this concatenates ``file`` at the end of the string as a subpath. E.g. ``"this/is".path_join("path") == "this/is/path"``. ---- @@ -1008,7 +1014,7 @@ Examples: - :ref:`String` **rpad** **(** :ref:`int` min_length, :ref:`String` character=" " **)** |const| -Formats a string to be at least ``min_length`` long by adding ``character``\ s to the right of the string. +Formats a string to be at least ``min_length`` long by adding ``character``s to the right of the string. ---- @@ -1020,6 +1026,8 @@ Splits the string by a ``delimiter`` string and returns an array of the substrin The splits in the returned array are sorted in the same order as the original string, from left to right. +If ``allow_empty`` is ``true``, and there are two adjacent delimiters in the string, it will add an empty string to the array of substrings at this position. + If ``maxsplit`` is specified, it defines the number of splits to do from the right up to ``maxsplit``. The default value of 0 means that all items are split, thus giving the same result as :ref:`split`. Example: @@ -1114,6 +1122,8 @@ Returns a simplified canonical path. Splits the string by a ``delimiter`` string and returns an array of the substrings. The ``delimiter`` can be of any length. +If ``allow_empty`` is ``true``, and there are two adjacent delimiters in the string, it will add an empty string to the array of substrings at this position. + If ``maxsplit`` is specified, it defines the number of splits to do from the left up to ``maxsplit``. The default value of ``0`` means that all items are split. If you need only one element from the array at a specific index, :ref:`get_slice` is a more performant option. @@ -1152,6 +1162,8 @@ Splits the string in floats by using a delimiter string and returns an array of For example, ``"1,2.5,3"`` will return ``[1,2.5,3]`` if split by ``","``. +If ``allow_empty`` is ``true``, and there are two adjacent delimiters in the string, it will add an empty string to the array of substrings at this position. + ---- .. _class_String_method_strip_edges: @@ -1186,6 +1198,14 @@ Converts the String (which is a character array) to ASCII/Latin-1 encoded :ref:` ---- +.. _class_String_method_to_camel_case: + +- :ref:`String` **to_camel_case** **(** **)** |const| + +Returns the string converted to ``camelCase``. + +---- + .. _class_String_method_to_float: - :ref:`float` **to_float** **(** **)** |const| @@ -1223,6 +1243,22 @@ Returns the string converted to lowercase. ---- +.. _class_String_method_to_pascal_case: + +- :ref:`String` **to_pascal_case** **(** **)** |const| + +Returns the string converted to ``PascalCase``. + +---- + +.. _class_String_method_to_snake_case: + +- :ref:`String` **to_snake_case** **(** **)** |const| + +Returns the string converted to ``snake_case``. + +---- + .. _class_String_method_to_upper: - :ref:`String` **to_upper** **(** **)** |const| diff --git a/classes/class_stringname.rst b/classes/class_stringname.rst index a98568d06..5c54500dd 100644 --- a/classes/class_stringname.rst +++ b/classes/class_stringname.rst @@ -42,23 +42,23 @@ Methods Operators --------- -+-------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** :ref:`String` right **)** | -+-------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** :ref:`StringName` right **)** | -+-------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator <` **(** :ref:`StringName` right **)** | -+-------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator <=` **(** :ref:`StringName` right **)** | -+-------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** :ref:`String` right **)** | -+-------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** :ref:`StringName` right **)** | -+-------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator >` **(** :ref:`StringName` right **)** | -+-------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator >=` **(** :ref:`StringName` right **)** | -+-------------------------+--------------------------------------------------------------------------------------------------------------+ ++-------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`operator !=` **(** :ref:`String` right **)** | ++-------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`operator !=` **(** :ref:`StringName` right **)** | ++-------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`operator \<` **(** :ref:`StringName` right **)** | ++-------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`operator \<=` **(** :ref:`StringName` right **)** | ++-------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`operator ==` **(** :ref:`String` right **)** | ++-------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`operator ==` **(** :ref:`StringName` right **)** | ++-------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`operator >` **(** :ref:`StringName` right **)** | ++-------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`operator >=` **(** :ref:`StringName` right **)** | ++-------------------------+---------------------------------------------------------------------------------------------------------------+ Constructor Descriptions ------------------------ diff --git a/classes/class_subviewport.rst b/classes/class_subviewport.rst index a48812598..442fa5f7d 100644 --- a/classes/class_subviewport.rst +++ b/classes/class_subviewport.rst @@ -147,7 +147,7 @@ The update mode when the sub-viewport is used as a render target. | *Getter* | get_size() | +-----------+------------------------+ -The width and height of the sub-viewport. +The width and height of the sub-viewport. Must be set to a value greater than or equal to 2 pixels on both dimensions. Otherwise, nothing will be displayed. ---- diff --git a/classes/class_systemfont.rst b/classes/class_systemfont.rst index 3ab3c7339..9edc22807 100644 --- a/classes/class_systemfont.rst +++ b/classes/class_systemfont.rst @@ -30,42 +30,44 @@ You can create :ref:`FontVariation` of the system font for Properties ---------- -+-----------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------+ -| :ref:`bool` | :ref:`antialiased` | ``true`` | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------+ -| :ref:`Font[]` | :ref:`fallbacks` | ``[]`` | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------+ -| :ref:`PackedStringArray` | :ref:`font_names` | ``PackedStringArray()`` | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------+ -| :ref:`FontStyle` | :ref:`font_style` | ``0`` | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------+ -| :ref:`bool` | :ref:`force_autohinter` | ``false`` | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------+ -| :ref:`bool` | :ref:`generate_mipmaps` | ``false`` | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------+ -| :ref:`Hinting` | :ref:`hinting` | ``1`` | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------+ -| :ref:`float` | :ref:`oversampling` | ``0.0`` | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------+ -| :ref:`SubpixelPositioning` | :ref:`subpixel_positioning` | ``1`` | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------+ ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ +| :ref:`FontAntialiasing` | :ref:`antialiasing` | ``1`` | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ +| :ref:`Font[]` | :ref:`fallbacks` | ``[]`` | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ +| :ref:`PackedStringArray` | :ref:`font_names` | ``PackedStringArray()`` | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ +| :ref:`FontStyle` | :ref:`font_style` | ``0`` | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ +| :ref:`bool` | :ref:`force_autohinter` | ``false`` | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ +| :ref:`bool` | :ref:`generate_mipmaps` | ``false`` | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ +| :ref:`Hinting` | :ref:`hinting` | ``1`` | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ +| :ref:`bool` | :ref:`multichannel_signed_distance_field` | ``false`` | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ +| :ref:`float` | :ref:`oversampling` | ``0.0`` | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ +| :ref:`SubpixelPositioning` | :ref:`subpixel_positioning` | ``1`` | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ Property Descriptions --------------------- -.. _class_SystemFont_property_antialiased: +.. _class_SystemFont_property_antialiasing: -- :ref:`bool` **antialiased** +- :ref:`FontAntialiasing` **antialiasing** -+-----------+------------------------+ -| *Default* | ``true`` | -+-----------+------------------------+ -| *Setter* | set_antialiased(value) | -+-----------+------------------------+ -| *Getter* | is_antialiased() | -+-----------+------------------------+ ++-----------+-------------------------+ +| *Default* | ``1`` | ++-----------+-------------------------+ +| *Setter* | set_antialiasing(value) | ++-----------+-------------------------+ +| *Getter* | get_antialiasing() | ++-----------+-------------------------+ -If set to ``true``, font 8-bit anitialiased glyph rendering is supported and enabled. +Font anti-aliasing mode. ---- @@ -165,6 +167,22 @@ Font hinting mode. ---- +.. _class_SystemFont_property_multichannel_signed_distance_field: + +- :ref:`bool` **multichannel_signed_distance_field** + ++-----------+-----------------------------------------------+ +| *Default* | ``false`` | ++-----------+-----------------------------------------------+ +| *Setter* | set_multichannel_signed_distance_field(value) | ++-----------+-----------------------------------------------+ +| *Getter* | is_multichannel_signed_distance_field() | ++-----------+-----------------------------------------------+ + +If set to ``true``, glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data. + +---- + .. _class_SystemFont_property_oversampling: - :ref:`float` **oversampling** diff --git a/classes/class_tabcontainer.rst b/classes/class_tabcontainer.rst index 0fdd3583c..dd8cf7bfa 100644 --- a/classes/class_tabcontainer.rst +++ b/classes/class_tabcontainer.rst @@ -136,6 +136,8 @@ Theme Properties +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`StyleBox` | :ref:`tab_unselected` | | +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ +| :ref:`StyleBox` | :ref:`tabbar_background` | | ++-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ Signals ------- @@ -651,6 +653,14 @@ The style of the currently selected tab. The style of the other, unselected tabs. +---- + +.. _class_TabContainer_theme_style_tabbar_background: + +- :ref:`StyleBox` **tabbar_background** + +The style for the background fill of the :ref:`TabBar` area. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_textedit.rst b/classes/class_textedit.rst index 9f582c4ef..6dcc1ac60 100644 --- a/classes/class_textedit.rst +++ b/classes/class_textedit.rst @@ -1278,7 +1278,7 @@ Override this method to define what happens when the user performs a cut operati - void **_handle_unicode_input** **(** :ref:`int` unicode_char **)** |virtual| -Override this method to define what happens when the types in the provided key ``unicode``. +Override this method to define what happens when the user types in the provided key ``unicode_char``. ---- @@ -1448,7 +1448,7 @@ Returns the first visible line. - :ref:`int` **get_gutter_count** **(** **)** |const| -Returns the total amount of gutters registered. +Returns the number of gutters registered. ---- @@ -1480,7 +1480,7 @@ Returns the width of the gutter at the given index. - :ref:`int` **get_indent_level** **(** :ref:`int` line **)** |const| -Returns the amount of spaces and ``tab * tab_size`` before the first char. +Returns the number of spaces and ``tab * tab_size`` before the first char. ---- @@ -1536,7 +1536,7 @@ Returns the line and column at the given position. In the returned vector, ``x`` - :ref:`int` **get_line_count** **(** **)** |const| -Returns the amount of total lines in the text. +Returns the number of lines in the text. ---- @@ -1642,7 +1642,7 @@ Returns the equivalent minimap line at ``position`` - :ref:`int` **get_minimap_visible_lines** **(** **)** |const| -Returns the total amount of lines that can be draw on the minimap. +Returns the number of lines that may be drawn on the minimap. ---- @@ -1782,7 +1782,7 @@ Returns the total width of all gutters and internal padding. - :ref:`int` **get_total_visible_line_count** **(** **)** |const| -Returns the total amount of lines that could be draw. +Returns the number of lines that may be drawn. ---- @@ -2187,7 +2187,7 @@ Sets the current background color of the line. Set to ``Color(0, 0, 0, 0)`` for - void **set_line_gutter_clickable** **(** :ref:`int` line, :ref:`int` gutter, :ref:`bool` clickable **)** -Sets the ``gutter`` on ``line`` as clickable. +If ``clickable`` is ``true``, makes the ``gutter`` on ``line`` clickable. See :ref:`gutter_clicked`. ---- @@ -2195,7 +2195,7 @@ Sets the ``gutter`` on ``line`` as clickable. - void **set_line_gutter_icon** **(** :ref:`int` line, :ref:`int` gutter, :ref:`Texture2D` icon **)** -Sets the icon for ``gutter`` on ``line``. +Sets the icon for ``gutter`` on ``line`` to ``icon``. ---- @@ -2203,7 +2203,7 @@ Sets the icon for ``gutter`` on ``line``. - void **set_line_gutter_item_color** **(** :ref:`int` line, :ref:`int` gutter, :ref:`Color` color **)** -Sets the color for ``gutter`` on ``line``. +Sets the color for ``gutter`` on ``line`` to ``color``. ---- @@ -2211,7 +2211,7 @@ Sets the color for ``gutter`` on ``line``. - void **set_line_gutter_metadata** **(** :ref:`int` line, :ref:`int` gutter, :ref:`Variant` metadata **)** -Sets the metadata for ``gutter`` on ``line``. +Sets the metadata for ``gutter`` on ``line`` to ``metadata``. ---- @@ -2219,7 +2219,7 @@ Sets the metadata for ``gutter`` on ``line``. - void **set_line_gutter_text** **(** :ref:`int` line, :ref:`int` gutter, :ref:`String` text **)** -Sets the text for ``gutter`` on ``line``. +Sets the text for ``gutter`` on ``line`` to ``text``. ---- @@ -2235,7 +2235,7 @@ If ``true``, sets the user into overtype mode. When the user types in this mode, - void **set_search_flags** **(** :ref:`int` flags **)** -Sets the search flags. This is used with :ref:`set_search_text` to highlight occurrences of the searched text. Search flags can be specified from the :ref:`SearchFlags` enum. +Sets the search ``flags``. This is used with :ref:`set_search_text` to highlight occurrences of the searched text. Search flags can be specified from the :ref:`SearchFlags` enum. ---- diff --git a/classes/class_textmesh.rst b/classes/class_textmesh.rst index 2fe0a7483..549f6ff87 100644 --- a/classes/class_textmesh.rst +++ b/classes/class_textmesh.rst @@ -26,37 +26,61 @@ The UV layout is arranged in 4 horizontal strips, top to bottom: 40% of the heig Properties ---------- -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`curve_step` | ``0.5`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`depth` | ``0.05`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`Font` | :ref:`font` | | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`font_size` | ``16`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`HorizontalAlignment` | :ref:`horizontal_alignment` | ``1`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`String` | :ref:`language` | ``""`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`pixel_size` | ``0.01`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`StructuredTextParser` | :ref:`structured_text_bidi_override` | ``0`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`Array` | :ref:`structured_text_bidi_override_options` | ``[]`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`String` | :ref:`text` | ``""`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`Direction` | :ref:`text_direction` | ``0`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`uppercase` | ``false`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`width` | ``500.0`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-----------+ ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ +| :ref:`AutowrapMode` | :ref:`autowrap_mode` | ``0`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ +| :ref:`float` | :ref:`curve_step` | ``0.5`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ +| :ref:`float` | :ref:`depth` | ``0.05`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ +| :ref:`Font` | :ref:`font` | | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ +| :ref:`int` | :ref:`font_size` | ``16`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ +| :ref:`HorizontalAlignment` | :ref:`horizontal_alignment` | ``1`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ +| :ref:`String` | :ref:`language` | ``""`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ +| :ref:`float` | :ref:`line_spacing` | ``0.0`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ +| :ref:`Vector2` | :ref:`offset` | ``Vector2(0, 0)`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ +| :ref:`float` | :ref:`pixel_size` | ``0.01`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ +| :ref:`StructuredTextParser` | :ref:`structured_text_bidi_override` | ``0`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ +| :ref:`Array` | :ref:`structured_text_bidi_override_options` | ``[]`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ +| :ref:`String` | :ref:`text` | ``""`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ +| :ref:`Direction` | :ref:`text_direction` | ``0`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ +| :ref:`bool` | :ref:`uppercase` | ``false`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ +| :ref:`VerticalAlignment` | :ref:`vertical_alignment` | ``1`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ +| :ref:`float` | :ref:`width` | ``500.0`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ Property Descriptions --------------------- +.. _class_TextMesh_property_autowrap_mode: + +- :ref:`AutowrapMode` **autowrap_mode** + ++-----------+--------------------------+ +| *Default* | ``0`` | ++-----------+--------------------------+ +| *Setter* | set_autowrap_mode(value) | ++-----------+--------------------------+ +| *Getter* | get_autowrap_mode() | ++-----------+--------------------------+ + +If set to something other than :ref:`TextServer.AUTOWRAP_OFF`, the text gets wrapped inside the node's bounding rectangle. If you resize the node, it will change its height automatically to show all the text. To see how each mode behaves, see :ref:`AutowrapMode`. + +---- + .. _class_TextMesh_property_curve_step: - :ref:`float` **curve_step** @@ -151,6 +175,38 @@ Language code used for text shaping algorithms, if left empty current locale is ---- +.. _class_TextMesh_property_line_spacing: + +- :ref:`float` **line_spacing** + ++-----------+-------------------------+ +| *Default* | ``0.0`` | ++-----------+-------------------------+ +| *Setter* | set_line_spacing(value) | ++-----------+-------------------------+ +| *Getter* | get_line_spacing() | ++-----------+-------------------------+ + +Vertical space between lines in multiline ``TextMesh``. + +---- + +.. _class_TextMesh_property_offset: + +- :ref:`Vector2` **offset** + ++-----------+-------------------+ +| *Default* | ``Vector2(0, 0)`` | ++-----------+-------------------+ +| *Setter* | set_offset(value) | ++-----------+-------------------+ +| *Getter* | get_offset() | ++-----------+-------------------+ + +The text drawing offset (in pixels). + +---- + .. _class_TextMesh_property_pixel_size: - :ref:`float` **pixel_size** @@ -247,6 +303,22 @@ If ``true``, all the text displays as UPPERCASE. ---- +.. _class_TextMesh_property_vertical_alignment: + +- :ref:`VerticalAlignment` **vertical_alignment** + ++-----------+-------------------------------+ +| *Default* | ``1`` | ++-----------+-------------------------------+ +| *Setter* | set_vertical_alignment(value) | ++-----------+-------------------------------+ +| *Getter* | get_vertical_alignment() | ++-----------+-------------------------------+ + +Controls the text's vertical alignment. Supports top, center, bottom. Set it to one of the :ref:`VerticalAlignment` constants. + +---- + .. _class_TextMesh_property_width: - :ref:`float` **width** diff --git a/classes/class_textserver.rst b/classes/class_textserver.rst index 9d0311dd0..33615cd5c 100644 --- a/classes/class_textserver.rst +++ b/classes/class_textserver.rst @@ -43,6 +43,8 @@ Methods +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`font_draw_glyph_outline` **(** :ref:`RID` font_rid, :ref:`RID` canvas, :ref:`int` size, :ref:`int` outline_size, :ref:`Vector2` pos, :ref:`int` index, :ref:`Color` color=Color(1, 1, 1, 1) **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`FontAntialiasing` | :ref:`font_get_antialiasing` **(** :ref:`RID` font_rid **)** |const| | ++-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`font_get_ascent` **(** :ref:`RID` font_rid, :ref:`int` size **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`font_get_descent` **(** :ref:`RID` font_rid, :ref:`int` size **)** |const| | @@ -65,7 +67,7 @@ Methods +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`font_get_glyph_index` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` char, :ref:`int` variation_selector **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`font_get_glyph_list` **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |const| | +| :ref:`PackedInt32Array` | :ref:`font_get_glyph_list` **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`font_get_glyph_offset` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -83,7 +85,7 @@ Methods +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`font_get_kerning` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`Vector2i` glyph_pair **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`font_get_kerning_list` **(** :ref:`RID` font_rid, :ref:`int` size **)** |const| | +| :ref:`Vector2i[]` | :ref:`font_get_kerning_list` **(** :ref:`RID` font_rid, :ref:`int` size **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`font_get_language_support_override` **(** :ref:`RID` font_rid, :ref:`String` language **)** | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -105,7 +107,7 @@ Methods +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`font_get_script_support_overrides` **(** :ref:`RID` font_rid **)** | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`font_get_size_cache_list` **(** :ref:`RID` font_rid **)** |const| | +| :ref:`Vector2i[]` | :ref:`font_get_size_cache_list` **(** :ref:`RID` font_rid **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`FontStyle` | :ref:`font_get_style` **(** :ref:`RID` font_rid **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -131,8 +133,6 @@ Methods +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`font_has_char` **(** :ref:`RID` font_rid, :ref:`int` char **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`font_is_antialiased` **(** :ref:`RID` font_rid **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`font_is_force_autohinter` **(** :ref:`RID` font_rid **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`font_is_language_supported` **(** :ref:`RID` font_rid, :ref:`String` language **)** |const| | @@ -157,7 +157,7 @@ Methods +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`font_render_range` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` start, :ref:`int` end **)** | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_set_antialiased` **(** :ref:`RID` font_rid, :ref:`bool` antialiased **)** | +| void | :ref:`font_set_antialiasing` **(** :ref:`RID` font_rid, :ref:`FontAntialiasing` antialiasing **)** | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`font_set_ascent` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` ascent **)** | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -249,15 +249,19 @@ Methods +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_feature` **(** :ref:`Feature` feature **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`is_confusable` **(** :ref:`String` string, :ref:`PackedStringArray` dict **)** |const| | ++-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_locale_right_to_left` **(** :ref:`String` locale **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_valid_identifier` **(** :ref:`String` string **)** |const| | ++-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`load_support_data` **(** :ref:`String` filename **)** | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`name_to_tag` **(** :ref:`String` name **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`parse_number` **(** :ref:`String` number, :ref:`String` language="" **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`parse_structured_text` **(** :ref:`StructuredTextParser` parser_type, :ref:`Array` args, :ref:`String` text **)** |const| | +| :ref:`Vector2i[]` | :ref:`parse_structured_text` **(** :ref:`StructuredTextParser` parser_type, :ref:`Array` args, :ref:`String` text **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`percent_sign` **(** :ref:`String` language="" **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -295,13 +299,13 @@ Methods +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`shaped_text_get_ellipsis_glyph_count` **(** :ref:`RID` shaped **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`shaped_text_get_ellipsis_glyphs` **(** :ref:`RID` shaped **)** |const| | +| :ref:`Dictionary[]` | :ref:`shaped_text_get_ellipsis_glyphs` **(** :ref:`RID` shaped **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`shaped_text_get_ellipsis_pos` **(** :ref:`RID` shaped **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`shaped_text_get_glyph_count` **(** :ref:`RID` shaped **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`shaped_text_get_glyphs` **(** :ref:`RID` shaped **)** |const| | +| :ref:`Dictionary[]` | :ref:`shaped_text_get_glyphs` **(** :ref:`RID` shaped **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`shaped_text_get_grapheme_bounds` **(** :ref:`RID` shaped, :ref:`int` pos **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -371,12 +375,14 @@ Methods +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`shaped_text_shape` **(** :ref:`RID` shaped **)** | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`shaped_text_sort_logical` **(** :ref:`RID` shaped **)** | +| :ref:`Dictionary[]` | :ref:`shaped_text_sort_logical` **(** :ref:`RID` shaped **)** | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`shaped_text_substr` **(** :ref:`RID` shaped, :ref:`int` start, :ref:`int` length **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`shaped_text_tab_align` **(** :ref:`RID` shaped, :ref:`PackedFloat32Array` tab_stops **)** | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`spoof_check` **(** :ref:`String` string **)** |const| | ++-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedInt32Array` | :ref:`string_get_word_breaks` **(** :ref:`String` string, :ref:`String` language="" **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`string_to_lower` **(** :ref:`String` string, :ref:`String` language="" **)** |const| | @@ -391,6 +397,54 @@ Methods Enumerations ------------ +.. _enum_TextServer_FontAntialiasing: + +.. _class_TextServer_constant_FONT_ANTIALIASING_NONE: + +.. _class_TextServer_constant_FONT_ANTIALIASING_GRAY: + +.. _class_TextServer_constant_FONT_ANTIALIASING_LCD: + +enum **FontAntialiasing**: + +- **FONT_ANTIALIASING_NONE** = **0** --- Font glyphs are rasterized as 1-bit bitmaps. + +- **FONT_ANTIALIASING_GRAY** = **1** --- Font glyphs are rasterized as 8-bit grayscale anti-aliased bitmaps. + +- **FONT_ANTIALIASING_LCD** = **2** --- Font glyphs are rasterized for LCD screens. + +LCD sub-pixel layout is determined by the value of ``gui/theme/lcd_subpixel_layout`` project settings. + +LCD sub-pixel anti-aliasing mode is suitable only for rendering horizontal, unscaled text in 2D. + +---- + +.. _enum_TextServer_FontLCDSubpixelLayout: + +.. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_NONE: + +.. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_HRGB: + +.. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_HBGR: + +.. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_VRGB: + +.. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_VBGR: + +enum **FontLCDSubpixelLayout**: + +- **FONT_LCD_SUBPIXEL_LAYOUT_NONE** = **0** --- Unknown or unsupported sub-pixel layout, LCD sub-pixel anti-aliasing is disabled. + +- **FONT_LCD_SUBPIXEL_LAYOUT_HRGB** = **1** --- Horizontal RGB sub-pixel layout. + +- **FONT_LCD_SUBPIXEL_LAYOUT_HBGR** = **2** --- Horizontal BGR sub-pixel layout. + +- **FONT_LCD_SUBPIXEL_LAYOUT_VRGB** = **3** --- Vertical RGB sub-pixel layout. + +- **FONT_LCD_SUBPIXEL_LAYOUT_VBGR** = **4** --- Vertical BGR sub-pixel layout. + +---- + .. _enum_TextServer_Direction: .. _class_TextServer_constant_DIRECTION_AUTO: @@ -521,11 +575,11 @@ enum **VisibleCharactersBehavior**: - **VC_CHARS_AFTER_SHAPING** = **1** --- Displays glyphs that are mapped to the first :ref:`Label.visible_characters` or :ref:`RichTextLabel.visible_characters` characters from the beginning of the text. -- **VC_GLYPHS_AUTO** = **2** --- Displays :ref:`Label.percent_visible` or :ref:`RichTextLabel.percent_visible` glyphs, starting from the left or from the right, depending on :ref:`Control.layout_direction` value. +- **VC_GLYPHS_AUTO** = **2** --- Displays :ref:`Label.visible_ratio` or :ref:`RichTextLabel.visible_ratio` glyphs, starting from the left or from the right, depending on :ref:`Control.layout_direction` value. -- **VC_GLYPHS_LTR** = **3** --- Displays :ref:`Label.percent_visible` or :ref:`RichTextLabel.percent_visible` glyphs, starting from the left. +- **VC_GLYPHS_LTR** = **3** --- Displays :ref:`Label.visible_ratio` or :ref:`RichTextLabel.visible_ratio` glyphs, starting from the left. -- **VC_GLYPHS_RTL** = **4** --- Displays :ref:`Label.percent_visible` or :ref:`RichTextLabel.percent_visible` glyphs, starting from the right. +- **VC_GLYPHS_RTL** = **4** --- Displays :ref:`Label.visible_ratio` or :ref:`RichTextLabel.visible_ratio` glyphs, starting from the right. ---- @@ -609,6 +663,8 @@ flags **TextOverrunFlag**: .. _class_TextServer_constant_GRAPHEME_IS_CONNECTED: +.. _class_TextServer_constant_GRAPHEME_IS_SAFE_TO_INSERT_TATWEEL: + flags **GraphemeFlag**: - **GRAPHEME_IS_VALID** = **1** --- Grapheme is supported by the font, and can be drawn. @@ -633,6 +689,8 @@ flags **GraphemeFlag**: - **GRAPHEME_IS_CONNECTED** = **1024** --- Grapheme is connected to the previous grapheme. Breaking line before this grapheme is not safe. +- **GRAPHEME_IS_SAFE_TO_INSERT_TATWEEL** = **2048** --- It is safe to insert a U+0640 before this grapheme for elongation. + ---- .. _enum_TextServer_Hinting: @@ -717,6 +775,10 @@ enum **SubpixelPositioning**: .. _class_TextServer_constant_FEATURE_USE_SUPPORT_DATA: +.. _class_TextServer_constant_FEATURE_UNICODE_IDENTIFIERS: + +.. _class_TextServer_constant_FEATURE_UNICODE_SECURITY: + enum **Feature**: - **FEATURE_SIMPLE_LAYOUT** = **1** --- TextServer supports simple text layouts. @@ -743,7 +805,11 @@ enum **Feature**: - **FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION** = **2048** --- TextServer supports locale dependent and context sensitive case conversion. -- **FEATURE_USE_SUPPORT_DATA** = **4096** --- TextServer require external data file for some features. +- **FEATURE_USE_SUPPORT_DATA** = **4096** --- TextServer require external data file for some features, see :ref:`load_support_data`. + +- **FEATURE_UNICODE_IDENTIFIERS** = **8192** --- TextServer supports UAX #31 identifier validation, see :ref:`is_valid_identifier`. + +- **FEATURE_UNICODE_SECURITY** = **16384** --- TextServer supports `Unicode Technical Report #36 `__ and `Unicode Technical Standard #39 `__ based spoof detection features. ---- @@ -934,6 +1000,14 @@ Draws single glyph outline of size ``outline_size`` into a canvas item at the po ---- +.. _class_TextServer_method_font_get_antialiasing: + +- :ref:`FontAntialiasing` **font_get_antialiasing** **(** :ref:`RID` font_rid **)** |const| + +Returns font anti-aliasing mode. + +---- + .. _class_TextServer_method_font_get_ascent: - :ref:`float` **font_get_ascent** **(** :ref:`RID` font_rid, :ref:`int` size **)** |const| @@ -1032,7 +1106,7 @@ Returns the glyph index of a ``char``, optionally modified by the ``variation_se .. _class_TextServer_method_font_get_glyph_list: -- :ref:`Array` **font_get_glyph_list** **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |const| +- :ref:`PackedInt32Array` **font_get_glyph_list** **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |const| Returns list of rendered glyphs in the cache entry. @@ -1108,7 +1182,7 @@ Returns kerning for the pair of glyphs. .. _class_TextServer_method_font_get_kerning_list: -- :ref:`Array` **font_get_kerning_list** **(** :ref:`RID` font_rid, :ref:`int` size **)** |const| +- :ref:`Vector2i[]` **font_get_kerning_list** **(** :ref:`RID` font_rid, :ref:`int` size **)** |const| Returns list of the kerning overrides. @@ -1196,7 +1270,7 @@ Returns list of script support overrides. .. _class_TextServer_method_font_get_size_cache_list: -- :ref:`Array` **font_get_size_cache_list** **(** :ref:`RID` font_rid **)** |const| +- :ref:`Vector2i[]` **font_get_size_cache_list** **(** :ref:`RID` font_rid **)** |const| Returns list of the font sizes in the cache. Each size is ``Vector2i`` with font size and outline size. @@ -1298,14 +1372,6 @@ Returns ``true`` if a Unicode ``char`` is available in the font. ---- -.. _class_TextServer_method_font_is_antialiased: - -- :ref:`bool` **font_is_antialiased** **(** :ref:`RID` font_rid **)** |const| - -Returns ``true`` if font 8-bit anitialiased glyph rendering is supported and enabled. - ----- - .. _class_TextServer_method_font_is_force_autohinter: - :ref:`bool` **font_is_force_autohinter** **(** :ref:`RID` font_rid **)** |const| @@ -1406,11 +1472,11 @@ Renders the range of characters to the font cache texture. ---- -.. _class_TextServer_method_font_set_antialiased: +.. _class_TextServer_method_font_set_antialiasing: -- void **font_set_antialiased** **(** :ref:`RID` font_rid, :ref:`bool` antialiased **)** +- void **font_set_antialiasing** **(** :ref:`RID` font_rid, :ref:`FontAntialiasing` antialiasing **)** -If set to ``true``, 8-bit antialiased glyph rendering is used, otherwise 1-bit rendering is used. Used by dynamic fonts only. +Sets font anti-aliasing mode. ---- @@ -1782,6 +1848,18 @@ Returns ``true`` if the server supports a feature. ---- +.. _class_TextServer_method_is_confusable: + +- :ref:`int` **is_confusable** **(** :ref:`String` string, :ref:`PackedStringArray` dict **)** |const| + +Returns index of the first string in ``dict`` which is visually confusable with the ``string``, or ``-1`` if none is found. + +\ **Note:** This method doesn't detect invisible characters, for spoof detection use it in combination with :ref:`spoof_check`. + +\ **Note:** Always returns ``-1`` if the server does not support the :ref:`FEATURE_UNICODE_SECURITY` feature. + +---- + .. _class_TextServer_method_is_locale_right_to_left: - :ref:`bool` **is_locale_right_to_left** **(** :ref:`String` locale **)** |const| @@ -1790,6 +1868,30 @@ Returns ``true`` if locale is right-to-left. ---- +.. _class_TextServer_method_is_valid_identifier: + +- :ref:`bool` **is_valid_identifier** **(** :ref:`String` string **)** |const| + +Returns ``true`` is ``string`` is a valid identifier. + +If the text server supports the :ref:`FEATURE_UNICODE_IDENTIFIERS` feature, a valid identifier must: + +- Conform to normalization form C. + +- Begin with a Unicode character of class XID_Start or ``"_"``. + +- May contain Unicode characters of class XID_Continue in the other positions. + +- Use UAX #31 recommended scripts only (mixed scripts are allowed). + +If the :ref:`FEATURE_UNICODE_IDENTIFIERS` feature is not supported, a valid identifier must: + +- Begin with a Unicode character of class XID_Start or ``"_"``. + +- May contain Unicode characters of class XID_Continue in the other positions. + +---- + .. _class_TextServer_method_load_support_data: - :ref:`bool` **load_support_data** **(** :ref:`String` filename **)** @@ -1812,13 +1914,13 @@ Converts readable feature, variation, script or language name to OpenType tag. - :ref:`String` **parse_number** **(** :ref:`String` number, :ref:`String` language="" **)** |const| -Converts a number from the numeral systems used in ``language`` to Western Arabic (0..9). +Converts ``number`` from the numeral systems used in ``language`` to Western Arabic (0..9). ---- .. _class_TextServer_method_parse_structured_text: -- :ref:`Array` **parse_structured_text** **(** :ref:`StructuredTextParser` parser_type, :ref:`Array` args, :ref:`String` text **)** |const| +- :ref:`Vector2i[]` **parse_structured_text** **(** :ref:`StructuredTextParser` parser_type, :ref:`Array` args, :ref:`String` text **)** |const| Default implementation of the BiDi algorithm override function. See :ref:`StructuredTextParser` for more info. @@ -1976,7 +2078,7 @@ Returns number of glyphs in the ellipsis. .. _class_TextServer_method_shaped_text_get_ellipsis_glyphs: -- :ref:`Array` **shaped_text_get_ellipsis_glyphs** **(** :ref:`RID` shaped **)** |const| +- :ref:`Dictionary[]` **shaped_text_get_ellipsis_glyphs** **(** :ref:`RID` shaped **)** |const| Returns array of the glyphs in the ellipsis. @@ -2000,7 +2102,7 @@ Returns number of glyphs in the buffer. .. _class_TextServer_method_shaped_text_get_glyphs: -- :ref:`Array` **shaped_text_get_glyphs** **(** :ref:`RID` shaped **)** |const| +- :ref:`Dictionary[]` **shaped_text_get_glyphs** **(** :ref:`RID` shaped **)** |const| Returns an array of glyphs in the visual order. @@ -2290,7 +2392,7 @@ Shapes buffer if it's not shaped. Returns ``true`` if the string is shaped succe .. _class_TextServer_method_shaped_text_sort_logical: -- :ref:`Array` **shaped_text_sort_logical** **(** :ref:`RID` shaped **)** +- :ref:`Dictionary[]` **shaped_text_sort_logical** **(** :ref:`RID` shaped **)** Returns text glyphs in the logical order. @@ -2312,6 +2414,16 @@ Aligns shaped text to the given tab-stops. ---- +.. _class_TextServer_method_spoof_check: + +- :ref:`bool` **spoof_check** **(** :ref:`String` string **)** |const| + +Returns ``true`` if ``string`` is likely to be an attempt at confusing the reader. + +\ **Note:** Always returns ``false`` if the server does not support the :ref:`FEATURE_UNICODE_SECURITY` feature. + +---- + .. _class_TextServer_method_string_get_word_breaks: - :ref:`PackedInt32Array` **string_get_word_breaks** **(** :ref:`String` string, :ref:`String` language="" **)** |const| diff --git a/classes/class_textserverextension.rst b/classes/class_textserverextension.rst index 6d59fbf8d..04662c318 100644 --- a/classes/class_textserverextension.rst +++ b/classes/class_textserverextension.rst @@ -43,6 +43,8 @@ Methods +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`font_draw_glyph_outline` **(** :ref:`RID` font_rid, :ref:`RID` canvas, :ref:`int` size, :ref:`int` outline_size, :ref:`Vector2` pos, :ref:`int` index, :ref:`Color` color **)** |virtual| |const| | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`FontAntialiasing` | :ref:`font_get_antialiasing` **(** :ref:`RID` font_rid **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`font_get_ascent` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`font_get_descent` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | @@ -65,7 +67,7 @@ Methods +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`font_get_glyph_index` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` char, :ref:`int` variation_selector **)** |virtual| |const| | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`font_get_glyph_list` **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| |const| | +| :ref:`PackedInt32Array` | :ref:`font_get_glyph_list` **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| |const| | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`font_get_glyph_offset` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -83,7 +85,7 @@ Methods +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`font_get_kerning` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`Vector2i` glyph_pair **)** |virtual| |const| | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`font_get_kerning_list` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | +| :ref:`Vector2i[]` | :ref:`font_get_kerning_list` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`font_get_language_support_override` **(** :ref:`RID` font_rid, :ref:`String` language **)** |virtual| | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -105,7 +107,7 @@ Methods +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`font_get_script_support_overrides` **(** :ref:`RID` font_rid **)** |virtual| | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`font_get_size_cache_list` **(** :ref:`RID` font_rid **)** |virtual| |const| | +| :ref:`Vector2i[]` | :ref:`font_get_size_cache_list` **(** :ref:`RID` font_rid **)** |virtual| |const| | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`FontStyle` | :ref:`font_get_style` **(** :ref:`RID` font_rid **)** |virtual| |const| | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -131,8 +133,6 @@ Methods +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`font_has_char` **(** :ref:`RID` font_rid, :ref:`int` char **)** |virtual| |const| | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`font_is_antialiased` **(** :ref:`RID` font_rid **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`font_is_force_autohinter` **(** :ref:`RID` font_rid **)** |virtual| |const| | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`font_is_language_supported` **(** :ref:`RID` font_rid, :ref:`String` language **)** |virtual| |const| | @@ -157,7 +157,7 @@ Methods +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`font_render_range` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` start, :ref:`int` end **)** |virtual| | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_set_antialiased` **(** :ref:`RID` font_rid, :ref:`bool` antialiased **)** |virtual| | +| void | :ref:`font_set_antialiasing` **(** :ref:`RID` font_rid, :ref:`FontAntialiasing` antialiasing **)** |virtual| | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`font_set_ascent` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` ascent **)** |virtual| | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -251,15 +251,19 @@ Methods +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_feature` **(** :ref:`Feature` feature **)** |virtual| |const| | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`is_confusable` **(** :ref:`String` string, :ref:`PackedStringArray` dict **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_locale_right_to_left` **(** :ref:`String` locale **)** |virtual| |const| | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_valid_identifier` **(** :ref:`String` string **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`load_support_data` **(** :ref:`String` filename **)** |virtual| | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`name_to_tag` **(** :ref:`String` name **)** |virtual| |const| | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`parse_number` **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`parse_structured_text` **(** :ref:`StructuredTextParser` parser_type, :ref:`Array` args, :ref:`String` text **)** |virtual| |const| | +| :ref:`Vector2i[]` | :ref:`parse_structured_text` **(** :ref:`StructuredTextParser` parser_type, :ref:`Array` args, :ref:`String` text **)** |virtual| |const| | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`percent_sign` **(** :ref:`String` language **)** |virtual| |const| | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -383,6 +387,8 @@ Methods +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`shaped_text_update_justification_ops` **(** :ref:`RID` shaped **)** |virtual| | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`spoof_check` **(** :ref:`String` string **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedInt32Array` | :ref:`string_get_word_breaks` **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`string_to_lower` **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| | @@ -471,6 +477,14 @@ Draws single glyph outline of size ``outline_size`` into a canvas item at the po ---- +.. _class_TextServerExtension_method_font_get_antialiasing: + +- :ref:`FontAntialiasing` **font_get_antialiasing** **(** :ref:`RID` font_rid **)** |virtual| |const| + +Returns font anti-aliasing mode. + +---- + .. _class_TextServerExtension_method_font_get_ascent: - :ref:`float` **font_get_ascent** **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| @@ -567,7 +581,7 @@ Returns the glyph index of a ``char``, optionally modified by the ``variation_se .. _class_TextServerExtension_method_font_get_glyph_list: -- :ref:`Array` **font_get_glyph_list** **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| |const| +- :ref:`PackedInt32Array` **font_get_glyph_list** **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| |const| Returns list of rendered glyphs in the cache entry. @@ -639,7 +653,7 @@ Returns kerning for the pair of glyphs. .. _class_TextServerExtension_method_font_get_kerning_list: -- :ref:`Array` **font_get_kerning_list** **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| +- :ref:`Vector2i[]` **font_get_kerning_list** **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| Returns list of the kerning overrides. @@ -727,7 +741,7 @@ Returns list of script support overrides. .. _class_TextServerExtension_method_font_get_size_cache_list: -- :ref:`Array` **font_get_size_cache_list** **(** :ref:`RID` font_rid **)** |virtual| |const| +- :ref:`Vector2i[]` **font_get_size_cache_list** **(** :ref:`RID` font_rid **)** |virtual| |const| Returns list of the font sizes in the cache. Each size is ``Vector2i`` with font size and outline size. @@ -829,14 +843,6 @@ Returns ``true`` if a Unicode ``char`` is available in the font. ---- -.. _class_TextServerExtension_method_font_is_antialiased: - -- :ref:`bool` **font_is_antialiased** **(** :ref:`RID` font_rid **)** |virtual| |const| - -Returns ``true`` if font 8-bit anitialiased glyph rendering is supported and enabled. - ----- - .. _class_TextServerExtension_method_font_is_force_autohinter: - :ref:`bool` **font_is_force_autohinter** **(** :ref:`RID` font_rid **)** |virtual| |const| @@ -933,11 +939,11 @@ Renders the range of characters to the font cache texture. ---- -.. _class_TextServerExtension_method_font_set_antialiased: +.. _class_TextServerExtension_method_font_set_antialiasing: -- void **font_set_antialiased** **(** :ref:`RID` font_rid, :ref:`bool` antialiased **)** |virtual| +- void **font_set_antialiasing** **(** :ref:`RID` font_rid, :ref:`FontAntialiasing` antialiasing **)** |virtual| -If set to ``true``, 8-bit antialiased glyph rendering is used, otherwise 1-bit rendering is used. Used by dynamic fonts only. +Sets font anti-aliasing mode. ---- @@ -1317,6 +1323,14 @@ Returns ``true`` if the server supports a feature. ---- +.. _class_TextServerExtension_method_is_confusable: + +- :ref:`int` **is_confusable** **(** :ref:`String` string, :ref:`PackedStringArray` dict **)** |virtual| |const| + +Returns index of the first string in ``dict`` which is visually confusable with the ``string``, or ``-1`` if none is found. + +---- + .. _class_TextServerExtension_method_is_locale_right_to_left: - :ref:`bool` **is_locale_right_to_left** **(** :ref:`String` locale **)** |virtual| |const| @@ -1325,6 +1339,14 @@ Returns ``true`` if locale is right-to-left. ---- +.. _class_TextServerExtension_method_is_valid_identifier: + +- :ref:`bool` **is_valid_identifier** **(** :ref:`String` string **)** |virtual| |const| + +Returns ``true`` is ``string`` is a valid identifier. + +---- + .. _class_TextServerExtension_method_load_support_data: - :ref:`bool` **load_support_data** **(** :ref:`String` filename **)** |virtual| @@ -1351,7 +1373,7 @@ Converts a number from the numeral systems used in ``language`` to Western Arabi .. _class_TextServerExtension_method_parse_structured_text: -- :ref:`Array` **parse_structured_text** **(** :ref:`StructuredTextParser` parser_type, :ref:`Array` args, :ref:`String` text **)** |virtual| |const| +- :ref:`Vector2i[]` **parse_structured_text** **(** :ref:`StructuredTextParser` parser_type, :ref:`Array` args, :ref:`String` text **)** |virtual| |const| ---- @@ -1791,7 +1813,7 @@ Sets custom punctuation character list, used for word breaking. If set to empty - void **shaped_text_set_direction** **(** :ref:`RID` shaped, :ref:`Direction` direction **)** |virtual| -Sets desired text direction. If set to ``TEXT_DIRECTION_AUTO``, direction will be detected based on the buffer contents and current locale. +Sets desired text ``direction``. If set to ``TEXT_DIRECTION_AUTO``, direction will be detected based on the buffer contents and current locale. ---- @@ -1879,6 +1901,14 @@ Updates line justification positions (word breaks and elongations) in the text b ---- +.. _class_TextServerExtension_method_spoof_check: + +- :ref:`bool` **spoof_check** **(** :ref:`String` string **)** |virtual| |const| + +Returns ``true`` if ``string`` is likely to be an attempt at confusing the reader. + +---- + .. _class_TextServerExtension_method_string_get_word_breaks: - :ref:`PackedInt32Array` **string_get_word_breaks** **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| diff --git a/classes/class_textservermanager.rst b/classes/class_textservermanager.rst index 0ba953cf2..6cf3d1c55 100644 --- a/classes/class_textservermanager.rst +++ b/classes/class_textservermanager.rst @@ -24,23 +24,23 @@ Description Methods ------- -+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_interface` **(** :ref:`TextServer` interface **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TextServer` | :ref:`find_interface` **(** :ref:`String` name **)** |const| | -+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TextServer` | :ref:`get_interface` **(** :ref:`int` idx **)** |const| | -+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_interface_count` **(** **)** |const| | -+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_interfaces` **(** **)** |const| | -+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TextServer` | :ref:`get_primary_interface` **(** **)** |const| | -+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_interface` **(** :ref:`TextServer` interface **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_primary_interface` **(** :ref:`TextServer` index **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ ++---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_interface` **(** :ref:`TextServer` interface **)** | ++---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`TextServer` | :ref:`find_interface` **(** :ref:`String` name **)** |const| | ++---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`TextServer` | :ref:`get_interface` **(** :ref:`int` idx **)** |const| | ++---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_interface_count` **(** **)** |const| | ++---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary[]` | :ref:`get_interfaces` **(** **)** |const| | ++---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`TextServer` | :ref:`get_primary_interface` **(** **)** |const| | ++---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_interface` **(** :ref:`TextServer` interface **)** | ++---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_primary_interface` **(** :ref:`TextServer` index **)** | ++---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- @@ -96,7 +96,7 @@ Returns the number of interfaces currently registered. .. _class_TextServerManager_method_get_interfaces: -- :ref:`Array` **get_interfaces** **(** **)** |const| +- :ref:`Dictionary[]` **get_interfaces** **(** **)** |const| Returns a list of available interfaces the index and name of each interface. diff --git a/classes/class_texture2d.rst b/classes/class_texture2d.rst index e8c16f487..9dccb6ac6 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:`GradientTexture1D`, :ref:`GradientTexture2D`, :ref:`ImageTexture`, :ref:`MeshTexture`, :ref:`NoiseTexture`, :ref:`PlaceholderTexture2D`, :ref:`PortableCompressedTexture2D`, :ref:`ProxyTexture`, :ref:`ViewportTexture` +**Inherited By:** :ref:`AnimatedTexture`, :ref:`AtlasTexture`, :ref:`CameraTexture`, :ref:`CanvasTexture`, :ref:`CompressedTexture2D`, :ref:`CurveTexture`, :ref:`CurveXYZTexture`, :ref:`GradientTexture1D`, :ref:`GradientTexture2D`, :ref:`ImageTexture`, :ref:`MeshTexture`, :ref:`NoiseTexture2D`, :ref:`PlaceholderTexture2D`, :ref:`PortableCompressedTexture2D`, :ref:`ViewportTexture` Texture for 2D and 3D. diff --git a/classes/class_theme.rst b/classes/class_theme.rst index fa226ed30..a66a646fc 100644 --- a/classes/class_theme.rst +++ b/classes/class_theme.rst @@ -220,7 +220,7 @@ Property Descriptions | *Getter* | get_default_base_scale() | +-----------+-------------------------------+ -The default base scale factor of this theme resource. Used by some controls to scale their visual properties based on the global scale factor. If this value is set to ``0.0``, the global scale factor is used. +The default base scale factor of this theme resource. Used by some controls to scale their visual properties based on the global scale factor. If this value is set to ``0.0``, the global scale factor is used (see :ref:`ThemeDB.fallback_base_scale`). Use :ref:`has_default_base_scale` to check if this value is valid. @@ -236,7 +236,7 @@ Use :ref:`has_default_base_scale` to | *Getter* | get_default_font() | +----------+-------------------------+ -The default font of this theme resource. Used as the default value when trying to fetch a font resource that doesn't exist in this theme or is in invalid state. If the default font is also missing or invalid, the engine fallback value is used. +The default font of this theme resource. Used as the default value when trying to fetch a font resource that doesn't exist in this theme or is in invalid state. If the default font is also missing or invalid, the engine fallback value is used (see :ref:`ThemeDB.fallback_font`). Use :ref:`has_default_font` to check if this value is valid. @@ -254,7 +254,7 @@ Use :ref:`has_default_font` to check if thi | *Getter* | get_default_font_size() | +-----------+------------------------------+ -The default font size of this theme resource. Used as the default value when trying to fetch a font size value that doesn't exist in this theme or is in invalid state. If the default font size is also missing or invalid, the engine fallback value is used. +The default font size of this theme resource. Used as the default value when trying to fetch a font size value that doesn't exist in this theme or is in invalid state. If the default font size is also missing or invalid, the engine fallback value is used (see :ref:`ThemeDB.fallback_font_size`). Values below ``0`` are invalid and can be used to unset the property. Use :ref:`has_default_font_size` to check if this value is valid. @@ -419,7 +419,7 @@ Returns the :ref:`Font` property defined by ``name`` and ``theme_typ Returns the default theme font if the property doesn't exist and the default theme font is set up (see :ref:`default_font`). Use :ref:`has_font` to check for existence of the property and :ref:`has_default_font` to check for existence of the default theme font. -Returns the engine fallback font value, if neither exist. +Returns the engine fallback font value, if neither exist (see :ref:`ThemeDB.fallback_font`). ---- @@ -439,7 +439,7 @@ Returns the font size property defined by ``name`` and ``theme_type``, if it exi Returns the default theme font size if the property doesn't exist and the default theme font size is set up (see :ref:`default_font_size`). Use :ref:`has_font_size` to check for existence of the property and :ref:`has_default_font_size` to check for existence of the default theme font. -Returns the engine fallback font size value, if neither exist. +Returns the engine fallback font size value, if neither exist (see :ref:`ThemeDB.fallback_font_size`). ---- @@ -473,7 +473,7 @@ Returns a list of all unique theme type names for :ref:`Font` proper Returns the icon property defined by ``name`` and ``theme_type``, if it exists. -Returns the engine fallback icon value if the property doesn't exist. Use :ref:`has_icon` to check for existence. +Returns the engine fallback icon value if the property doesn't exist (see :ref:`ThemeDB.fallback_icon`). Use :ref:`has_icon` to check for existence. ---- @@ -499,7 +499,7 @@ Returns a list of all unique theme type names for icon properties. Use :ref:`get Returns the :ref:`StyleBox` property defined by ``name`` and ``theme_type``, if it exists. -Returns the engine fallback stylebox value if the property doesn't exist. Use :ref:`has_stylebox` to check for existence. +Returns the engine fallback stylebox value if the property doesn't exist (see :ref:`ThemeDB.fallback_stylebox`). Use :ref:`has_stylebox` to check for existence. ---- @@ -525,7 +525,7 @@ Returns a list of all unique theme type names for :ref:`StyleBox Returns the theme property of ``data_type`` defined by ``name`` and ``theme_type``, if it exists. -Returns the engine fallback icon value if the property doesn't exist. Use :ref:`has_theme_item` to check for existence. +Returns the engine fallback icon value if the property doesn't exist (see :ref:`ThemeDB`). Use :ref:`has_theme_item` to check for existence. \ **Note:** This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic. @@ -639,9 +639,9 @@ Returns ``false`` if neither exist. Use :ref:`set_font` **has_font_size** **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| -Returns ``true`` if :ref:`default_font_size` has a valid value. +Returns ``true`` if the font size property defined by ``name`` and ``theme_type`` exists, or if the default theme font size is set up (see :ref:`has_default_font_size`). -Returns ``false`` if it doesn't. The value must be greater than ``0`` to be considered valid. +Returns ``false`` if neither exist. Use :ref:`set_font_size` to define the property. ---- @@ -737,9 +737,9 @@ Fails if it doesn't exist, or if a similar property with the new name already ex - void **rename_font_size** **(** :ref:`StringName` old_name, :ref:`StringName` name, :ref:`StringName` theme_type **)** -Returns ``true`` if the font size property defined by ``name`` and ``theme_type`` exists, or if the default theme font size is set up (see :ref:`has_default_font_size`). +Renames the font size property defined by ``old_name`` and ``theme_type`` to ``name``, if it exists. -Returns ``false`` if neither exist. Use :ref:`set_font_size` to define the property. +Fails if it doesn't exist, or if a similar property with the new name already exists. Use :ref:`has_font_size` to check for existence, and :ref:`clear_font_size` to remove the existing property. ---- @@ -803,9 +803,7 @@ Creates or changes the value of the :ref:`Font` property defined by - void **set_font_size** **(** :ref:`StringName` name, :ref:`StringName` theme_type, :ref:`int` font_size **)** -Renames the font size property defined by ``old_name`` and ``theme_type`` to ``name``, if it exists. - -Fails if it doesn't exist, or if a similar property with the new name already exists. Use :ref:`has_font_size` to check for existence, and :ref:`clear_font_size` to remove the existing property. +Creates or changes the value of the font size property defined by ``name`` and ``theme_type``. Use :ref:`clear_font_size` to remove the property. ---- diff --git a/classes/class_themedb.rst b/classes/class_themedb.rst new file mode 100644 index 000000000..15660097b --- /dev/null +++ b/classes/class_themedb.rst @@ -0,0 +1,162 @@ +: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/ThemeDB.xml. + +.. _class_ThemeDB: + +ThemeDB +======= + +**Inherits:** :ref:`Object` + +An engine singleton providing access to static :ref:`Theme` information, such as default and project theme, and fallback values. + +Description +----------- + +This engine singleton provides access to static information about :ref:`Theme` resources used by the engine and by your projects. You can fetch the default engine theme, as well as your project configured theme. + +\ ``ThemeDB`` also contains fallback values for theme properties. + +Properties +---------- + ++-----------------------------------+------------------------------------------------------------------------+---------+ +| :ref:`float` | :ref:`fallback_base_scale` | ``1.0`` | ++-----------------------------------+------------------------------------------------------------------------+---------+ +| :ref:`Font` | :ref:`fallback_font` | | ++-----------------------------------+------------------------------------------------------------------------+---------+ +| :ref:`int` | :ref:`fallback_font_size` | ``16`` | ++-----------------------------------+------------------------------------------------------------------------+---------+ +| :ref:`Texture2D` | :ref:`fallback_icon` | | ++-----------------------------------+------------------------------------------------------------------------+---------+ +| :ref:`StyleBox` | :ref:`fallback_stylebox` | | ++-----------------------------------+------------------------------------------------------------------------+---------+ + +Methods +------- + ++---------------------------+------------------------------------------------------------------------------+ +| :ref:`Theme` | :ref:`get_default_theme` **(** **)** | ++---------------------------+------------------------------------------------------------------------------+ +| :ref:`Theme` | :ref:`get_project_theme` **(** **)** | ++---------------------------+------------------------------------------------------------------------------+ + +Signals +------- + +.. _class_ThemeDB_signal_fallback_changed: + +- **fallback_changed** **(** **)** + +Emitted when one of the fallback values had been changed. Use it to refresh the look of controls that may rely on the fallback theme items. + +Property Descriptions +--------------------- + +.. _class_ThemeDB_property_fallback_base_scale: + +- :ref:`float` **fallback_base_scale** + ++-----------+--------------------------------+ +| *Default* | ``1.0`` | ++-----------+--------------------------------+ +| *Setter* | set_fallback_base_scale(value) | ++-----------+--------------------------------+ +| *Getter* | get_fallback_base_scale() | ++-----------+--------------------------------+ + +The fallback base scale factor of every :ref:`Control` node and :ref:`Theme` resource. Used when no other value is available to the control. + +See also :ref:`Theme.default_base_scale`. + +---- + +.. _class_ThemeDB_property_fallback_font: + +- :ref:`Font` **fallback_font** + ++----------+--------------------------+ +| *Setter* | set_fallback_font(value) | ++----------+--------------------------+ +| *Getter* | get_fallback_font() | ++----------+--------------------------+ + +The fallback font of every :ref:`Control` node and :ref:`Theme` resource. Used when no other value is available to the control. + +See also :ref:`Theme.default_font`. + +---- + +.. _class_ThemeDB_property_fallback_font_size: + +- :ref:`int` **fallback_font_size** + ++-----------+-------------------------------+ +| *Default* | ``16`` | ++-----------+-------------------------------+ +| *Setter* | set_fallback_font_size(value) | ++-----------+-------------------------------+ +| *Getter* | get_fallback_font_size() | ++-----------+-------------------------------+ + +The fallback font size of every :ref:`Control` node and :ref:`Theme` resource. Used when no other value is available to the control. + +See also :ref:`Theme.default_font_size`. + +---- + +.. _class_ThemeDB_property_fallback_icon: + +- :ref:`Texture2D` **fallback_icon** + ++----------+--------------------------+ +| *Setter* | set_fallback_icon(value) | ++----------+--------------------------+ +| *Getter* | get_fallback_icon() | ++----------+--------------------------+ + +The fallback icon of every :ref:`Control` node and :ref:`Theme` resource. Used when no other value is available to the control. + +---- + +.. _class_ThemeDB_property_fallback_stylebox: + +- :ref:`StyleBox` **fallback_stylebox** + ++----------+------------------------------+ +| *Setter* | set_fallback_stylebox(value) | ++----------+------------------------------+ +| *Getter* | get_fallback_stylebox() | ++----------+------------------------------+ + +The fallback stylebox of every :ref:`Control` node and :ref:`Theme` resource. Used when no other value is available to the control. + +Method Descriptions +------------------- + +.. _class_ThemeDB_method_get_default_theme: + +- :ref:`Theme` **get_default_theme** **(** **)** + +Returns a reference to the default engine :ref:`Theme`. This theme resource is responsible for the out-of-the-box look of :ref:`Control` nodes and cannot be overridden. + +---- + +.. _class_ThemeDB_method_get_project_theme: + +- :ref:`Theme` **get_project_theme** **(** **)** + +Returns a reference to the custom project :ref:`Theme`. This theme resources allows to override the default engine theme for every control node in the project. + +To set the project theme, see :ref:`ProjectSettings.gui/theme/custom`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_tilemap.rst b/classes/class_tilemap.rst index a1c2080d7..fc74d7d29 100644 --- a/classes/class_tilemap.rst +++ b/classes/class_tilemap.rst @@ -71,11 +71,13 @@ Methods +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`force_update` **(** :ref:`int` layer=-1 **)** | +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_cell_alternative_tile` **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`bool` use_proxies **)** |const| | +| :ref:`int` | :ref:`get_cell_alternative_tile` **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`bool` use_proxies=false **)** |const| | +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`get_cell_atlas_coords` **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`bool` use_proxies **)** |const| | +| :ref:`Vector2i` | :ref:`get_cell_atlas_coords` **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`bool` use_proxies=false **)** |const| | +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_cell_source_id` **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`bool` use_proxies **)** |const| | +| :ref:`int` | :ref:`get_cell_source_id` **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`bool` use_proxies=false **)** |const| | ++---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`TileData` | :ref:`get_cell_tile_data` **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`bool` use_proxies=false **)** |const| | +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2i` | :ref:`get_coords_for_body_rid` **(** :ref:`RID` body **)** | +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -119,7 +121,7 @@ Methods +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_layer_enabled` **(** :ref:`int` layer, :ref:`bool` enabled **)** | +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_layer_modulate` **(** :ref:`int` layer, :ref:`Color` enabled **)** | +| void | :ref:`set_layer_modulate` **(** :ref:`int` layer, :ref:`Color` modulate **)** | +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_layer_name` **(** :ref:`int` layer, :ref:`String` name **)** | +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -252,7 +254,7 @@ Method Descriptions Called with a TileData object about to be used internally by the TileMap, allowing its modification at runtime. -This method is only called if :ref:`_use_tile_data_runtime_update` is implemented and returns ``true`` for the given tile ``coords[/coords] and [code]layer``. +This method is only called if :ref:`_use_tile_data_runtime_update` is implemented and returns ``true`` for the given tile ``coords`` and ``layer``. \ **Warning:** The ``tile_data`` object's sub-resources are the same as the one in the TileSet. Modifying them might impact the whole TileSet. Instead, make sure to duplicate those resources. @@ -264,7 +266,7 @@ This method is only called if :ref:`_use_tile_data_runtime_update` **_use_tile_data_runtime_update** **(** :ref:`int` layer, :ref:`Vector2i` coords **)** |virtual| -Should return ``true`` if the tile at coordinates ``coords[/coords] on layer [code]layer`` requires a runtime update. +Should return ``true`` if the tile at coordinates ``coords`` on layer ``layer`` requires a runtime update. \ **Warning:** Make sure this function only return ``true`` when needed. Any tile processed at runtime without a need for it will imply a significant performance penalty. @@ -274,7 +276,7 @@ Should return ``true`` if the tile at coordinates ``coords[/coords] on layer [co - void **add_layer** **(** :ref:`int` to_position **)** -Adds a layer at the given position ``to_position`` in the array. If ``to_position`` is -1, adds it at the end of the array. +Adds a layer at the given position ``to_position`` in the array. If ``to_position`` is negative, the position is counted from the end, with ``-1`` adding the layer at the end of the array. ---- @@ -318,13 +320,13 @@ Triggers an update of the TileMap. If ``layer`` is provided, only updates the gi \ **Note:** The TileMap node updates automatically when one of its properties is modified. A manual update is only needed if runtime modifications (implemented in :ref:`_tile_data_runtime_update`) need to be applied. -\ **Warning:** Updating the TileMap is a performance demanding task. Limit occurrences of those updates to the minimum and limit the amount tiles they impact (by segregating tiles updated often to a dedicated layer for example). +\ **Warning:** Updating the TileMap is computationally expensive and may impact performance. Try to limit the number of updates and the tiles they impact (by placing frequently updated tiles in a dedicated layer for example). ---- .. _class_TileMap_method_get_cell_alternative_tile: -- :ref:`int` **get_cell_alternative_tile** **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`bool` use_proxies **)** |const| +- :ref:`int` **get_cell_alternative_tile** **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`bool` use_proxies=false **)** |const| Returns the tile alternative ID of the cell on layer ``layer`` at ``coords``. If ``use_proxies`` is ``false``, ignores the :ref:`TileSet`'s tile proxies, returning the raw alternative identifier. See :ref:`TileSet.map_tile_proxy`. @@ -332,7 +334,7 @@ Returns the tile alternative ID of the cell on layer ``layer`` at ``coords``. If .. _class_TileMap_method_get_cell_atlas_coords: -- :ref:`Vector2i` **get_cell_atlas_coords** **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`bool` use_proxies **)** |const| +- :ref:`Vector2i` **get_cell_atlas_coords** **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`bool` use_proxies=false **)** |const| Returns the tile atlas coordinates ID of the cell on layer ``layer`` at coordinates ``coords``. If ``use_proxies`` is ``false``, ignores the :ref:`TileSet`'s tile proxies, returning the raw alternative identifier. See :ref:`TileSet.map_tile_proxy`. @@ -340,12 +342,22 @@ Returns the tile atlas coordinates ID of the cell on layer ``layer`` at coordina .. _class_TileMap_method_get_cell_source_id: -- :ref:`int` **get_cell_source_id** **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`bool` use_proxies **)** |const| +- :ref:`int` **get_cell_source_id** **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`bool` use_proxies=false **)** |const| Returns the tile source ID of the cell on layer ``layer`` at coordinates ``coords``. If ``use_proxies`` is ``false``, ignores the :ref:`TileSet`'s tile proxies, returning the raw alternative identifier. See :ref:`TileSet.map_tile_proxy`. ---- +.. _class_TileMap_method_get_cell_tile_data: + +- :ref:`TileData` **get_cell_tile_data** **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`bool` use_proxies=false **)** |const| + +Returns the :ref:`TileData` object associated with the given cell, or ``null`` if the cell is not a :ref:`TileSetAtlasSource`. + +If ``use_proxies`` is ``false``, ignores the :ref:`TileSet`'s tile proxies, returning the raw alternative identifier. See :ref:`TileSet.map_tile_proxy`. + +---- + .. _class_TileMap_method_get_coords_for_body_rid: - :ref:`Vector2i` **get_coords_for_body_rid** **(** :ref:`RID` body **)** @@ -470,7 +482,7 @@ Returns a local position of the center of the cell at the given tilemap (grid-ba - void **move_layer** **(** :ref:`int` layer, :ref:`int` to_position **)** -Moves the layer at index ``layer_index`` to the given position ``to_position`` in the array. +Moves the layer at index ``layer`` to the given position ``to_position`` in the array. ---- @@ -500,7 +512,7 @@ Sets the tile indentifiers for the cell on layer ``layer`` at coordinates ``coor - void **set_cells_terrain_connect** **(** :ref:`int` layer, :ref:`Vector2i[]` cells, :ref:`int` terrain_set, :ref:`int` terrain, :ref:`bool` ignore_empty_terrains=true **)** -Update all the cells in the ``cells`` coordinates array so that they use the given ``terrain`` for the given ``terrain_set``. If an updated cell has the same terrain as one of its neighboring cells, this function tries to join the two. This function might update neighboring tiles if needed to create correct terrain transitions. If ``ignore_empty_terrains`` is true, empty terrains will be ignored when trying to find the best fitting tile for the given terrain constraints. +Update all the cells in the ``cells`` coordinates array so that they use the given ``terrain`` for the given ``terrain_set``. If an updated cell has the same terrain as one of its neighboring cells, this function tries to join the two. This function might update neighboring tiles if needed to create correct terrain transitions. If ``ignore_empty_terrains`` is true, empty terrains will be ignored when trying to find the best fitting tile for the given terrain constraints. @@ -512,7 +524,7 @@ If ``ignore_empty_terrains`` is true, empty terrains will be ignored when trying - void **set_cells_terrain_path** **(** :ref:`int` layer, :ref:`Vector2i[]` path, :ref:`int` terrain_set, :ref:`int` terrain, :ref:`bool` ignore_empty_terrains=true **)** -Update all the cells in the ``cells`` coordinates array so that they use the given ``terrain`` for the given ``terrain_set``. The function will also connect two successive cell in the path with the same terrain. This function might update neighboring tiles if needed to create correct terrain transitions. +Update all the cells in the ``path`` coordinates array so that they use the given ``terrain`` for the given ``terrain_set``. The function will also connect two successive cell in the path with the same terrain. This function might update neighboring tiles if needed to create correct terrain transitions. If ``ignore_empty_terrains`` is true, empty terrains will be ignored when trying to find the best fitting tile for the given terrain constraints. @@ -526,14 +538,18 @@ If ``ignore_empty_terrains`` is true, empty terrains will be ignored when trying Enables or disables the layer ``layer``. A disabled layer is not processed at all (no rendering, no physics, etc...). +If ``layer`` is negative, the layers are accessed from the last one. + ---- .. _class_TileMap_method_set_layer_modulate: -- void **set_layer_modulate** **(** :ref:`int` layer, :ref:`Color` enabled **)** +- void **set_layer_modulate** **(** :ref:`int` layer, :ref:`Color` modulate **)** Sets a layer's color. It will be multiplied by tile's color and TileMap's modulate. +If ``layer`` is negative, the layers are accessed from the last one. + ---- .. _class_TileMap_method_set_layer_name: @@ -542,6 +558,8 @@ Sets a layer's color. It will be multiplied by tile's color and TileMap's modula Sets a layer's name. This is mostly useful in the editor. +If ``layer`` is negative, the layers are accessed from the last one. + ---- .. _class_TileMap_method_set_layer_y_sort_enabled: @@ -552,6 +570,8 @@ Enables or disables a layer's Y-sorting. If a layer is Y-sorted, the layer will Y-sorted layers should usually be on different Z-index values than not Y-sorted layers, otherwise, each of those layer will be Y-sorted as whole with the Y-sorted one. This is usually an undesired behvaior. +If ``layer`` is negative, the layers are accessed from the last one. + ---- .. _class_TileMap_method_set_layer_y_sort_origin: @@ -562,6 +582,8 @@ Sets a layer's Y-sort origin value. This Y-sort origin value is added to each ti This allows, for example, to fake a different height level on each layer. This can be useful for top-down view games. +If ``layer`` is negative, the layers are accessed from the last one. + ---- .. _class_TileMap_method_set_layer_z_index: @@ -570,6 +592,8 @@ This allows, for example, to fake a different height level on each layer. This c Sets a layers Z-index value. This Z-index is added to each tile's Z-index value. +If ``layer`` is negative, the layers are accessed from the last one. + ---- .. _class_TileMap_method_set_pattern: diff --git a/classes/class_tileset.rst b/classes/class_tileset.rst index ff2a0d2b2..e850bca88 100644 --- a/classes/class_tileset.rst +++ b/classes/class_tileset.rst @@ -66,145 +66,155 @@ Properties Methods ------- -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_custom_data_layer` **(** :ref:`int` to_position=-1 **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_navigation_layer` **(** :ref:`int` to_position=-1 **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_occlusion_layer` **(** :ref:`int` to_position=-1 **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`add_pattern` **(** :ref:`TileMapPattern` pattern, :ref:`int` index=-1 **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_physics_layer` **(** :ref:`int` to_position=-1 **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`add_source` **(** :ref:`TileSetSource` source, :ref:`int` atlas_source_id_override=-1 **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_terrain` **(** :ref:`int` terrain_set, :ref:`int` to_position=-1 **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_terrain_set` **(** :ref:`int` to_position=-1 **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`cleanup_invalid_tile_proxies` **(** **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_tile_proxies` **(** **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_alternative_level_tile_proxy` **(** :ref:`int` source_from, :ref:`Vector2i` coords_from, :ref:`int` alternative_from **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_coords_level_tile_proxy` **(** :ref:`int` source_from, :ref:`Vector2i` coords_from **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_custom_data_layers_count` **(** **)** |const| | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_navigation_layer_layers` **(** :ref:`int` layer_index **)** |const| | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_navigation_layers_count` **(** **)** |const| | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_next_source_id` **(** **)** |const| | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_occlusion_layer_light_mask` **(** :ref:`int` layer_index **)** |const| | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_occlusion_layer_sdf_collision` **(** :ref:`int` layer_index **)** |const| | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_occlusion_layers_count` **(** **)** |const| | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TileMapPattern` | :ref:`get_pattern` **(** :ref:`int` index=-1 **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_patterns_count` **(** **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_physics_layer_collision_layer` **(** :ref:`int` layer_index **)** |const| | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_physics_layer_collision_mask` **(** :ref:`int` layer_index **)** |const| | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PhysicsMaterial` | :ref:`get_physics_layer_physics_material` **(** :ref:`int` layer_index **)** |const| | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_physics_layers_count` **(** **)** |const| | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TileSetSource` | :ref:`get_source` **(** :ref:`int` source_id **)** |const| | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_source_count` **(** **)** |const| | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_source_id` **(** :ref:`int` index **)** |const| | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_source_level_tile_proxy` **(** :ref:`int` source_from **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`get_terrain_color` **(** :ref:`int` terrain_set, :ref:`int` terrain_index **)** |const| | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_terrain_name` **(** :ref:`int` terrain_set, :ref:`int` terrain_index **)** |const| | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TerrainMode` | :ref:`get_terrain_set_mode` **(** :ref:`int` terrain_set **)** |const| | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_terrain_sets_count` **(** **)** |const| | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_terrains_count` **(** :ref:`int` terrain_set **)** |const| | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_alternative_level_tile_proxy` **(** :ref:`int` source_from, :ref:`Vector2i` coords_from, :ref:`int` alternative_from **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_coords_level_tile_proxy` **(** :ref:`int` source_from, :ref:`Vector2i` coords_from **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_source` **(** :ref:`int` source_id **)** |const| | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_source_level_tile_proxy` **(** :ref:`int` source_from **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`map_tile_proxy` **(** :ref:`int` source_from, :ref:`Vector2i` coords_from, :ref:`int` alternative_from **)** |const| | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`move_custom_data_layer` **(** :ref:`int` layer_index, :ref:`int` to_position **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`move_navigation_layer` **(** :ref:`int` layer_index, :ref:`int` to_position **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`move_occlusion_layer` **(** :ref:`int` layer_index, :ref:`int` to_position **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`move_physics_layer` **(** :ref:`int` layer_index, :ref:`int` to_position **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`move_terrain` **(** :ref:`int` terrain_set, :ref:`int` terrain_index, :ref:`int` to_position **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`move_terrain_set` **(** :ref:`int` terrain_set, :ref:`int` to_position **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_alternative_level_tile_proxy` **(** :ref:`int` source_from, :ref:`Vector2i` coords_from, :ref:`int` alternative_from **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_coords_level_tile_proxy` **(** :ref:`int` source_from, :ref:`Vector2i` coords_from **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_custom_data_layer` **(** :ref:`int` layer_index **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_navigation_layer` **(** :ref:`int` layer_index **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_occlusion_layer` **(** :ref:`int` layer_index **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_pattern` **(** :ref:`int` index **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_physics_layer` **(** :ref:`int` layer_index **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_source` **(** :ref:`int` source_id **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_source_level_tile_proxy` **(** :ref:`int` source_from **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_terrain` **(** :ref:`int` terrain_set, :ref:`int` terrain_index **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_terrain_set` **(** :ref:`int` terrain_set **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_alternative_level_tile_proxy` **(** :ref:`int` source_from, :ref:`Vector2i` coords_from, :ref:`int` alternative_from, :ref:`int` source_to, :ref:`Vector2i` coords_to, :ref:`int` alternative_to **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_coords_level_tile_proxy` **(** :ref:`int` p_source_from, :ref:`Vector2i` coords_from, :ref:`int` source_to, :ref:`Vector2i` coords_to **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_navigation_layer_layers` **(** :ref:`int` layer_index, :ref:`int` layers **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_occlusion_layer_light_mask` **(** :ref:`int` layer_index, :ref:`int` light_mask **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_occlusion_layer_sdf_collision` **(** :ref:`int` layer_index, :ref:`bool` sdf_collision **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_physics_layer_collision_layer` **(** :ref:`int` layer_index, :ref:`int` layer **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_physics_layer_collision_mask` **(** :ref:`int` layer_index, :ref:`int` mask **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_physics_layer_physics_material` **(** :ref:`int` layer_index, :ref:`PhysicsMaterial` physics_material **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_source_id` **(** :ref:`int` source_id, :ref:`int` new_source_id **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_source_level_tile_proxy` **(** :ref:`int` source_from, :ref:`int` source_to **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_terrain_color` **(** :ref:`int` terrain_set, :ref:`int` terrain_index, :ref:`Color` color **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_terrain_name` **(** :ref:`int` terrain_set, :ref:`int` terrain_index, :ref:`String` name **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_terrain_set_mode` **(** :ref:`int` terrain_set, :ref:`TerrainMode` mode **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_custom_data_layer` **(** :ref:`int` to_position=-1 **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_navigation_layer` **(** :ref:`int` to_position=-1 **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_occlusion_layer` **(** :ref:`int` to_position=-1 **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`add_pattern` **(** :ref:`TileMapPattern` pattern, :ref:`int` index=-1 **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_physics_layer` **(** :ref:`int` to_position=-1 **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`add_source` **(** :ref:`TileSetSource` source, :ref:`int` atlas_source_id_override=-1 **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_terrain` **(** :ref:`int` terrain_set, :ref:`int` to_position=-1 **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_terrain_set` **(** :ref:`int` to_position=-1 **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`cleanup_invalid_tile_proxies` **(** **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_tile_proxies` **(** **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_alternative_level_tile_proxy` **(** :ref:`int` source_from, :ref:`Vector2i` coords_from, :ref:`int` alternative_from **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_coords_level_tile_proxy` **(** :ref:`int` source_from, :ref:`Vector2i` coords_from **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_custom_data_layer_by_name` **(** :ref:`String` layer_name **)** |const| | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_custom_data_layer_name` **(** :ref:`int` layer_index **)** |const| | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant.Type` | :ref:`get_custom_data_layer_type` **(** :ref:`int` layer_index **)** |const| | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_custom_data_layers_count` **(** **)** |const| | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_navigation_layer_layers` **(** :ref:`int` layer_index **)** |const| | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_navigation_layers_count` **(** **)** |const| | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_next_source_id` **(** **)** |const| | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_occlusion_layer_light_mask` **(** :ref:`int` layer_index **)** |const| | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_occlusion_layer_sdf_collision` **(** :ref:`int` layer_index **)** |const| | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_occlusion_layers_count` **(** **)** |const| | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`TileMapPattern` | :ref:`get_pattern` **(** :ref:`int` index=-1 **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_patterns_count` **(** **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_physics_layer_collision_layer` **(** :ref:`int` layer_index **)** |const| | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_physics_layer_collision_mask` **(** :ref:`int` layer_index **)** |const| | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PhysicsMaterial` | :ref:`get_physics_layer_physics_material` **(** :ref:`int` layer_index **)** |const| | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_physics_layers_count` **(** **)** |const| | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`TileSetSource` | :ref:`get_source` **(** :ref:`int` source_id **)** |const| | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_source_count` **(** **)** |const| | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_source_id` **(** :ref:`int` index **)** |const| | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_source_level_tile_proxy` **(** :ref:`int` source_from **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_terrain_color` **(** :ref:`int` terrain_set, :ref:`int` terrain_index **)** |const| | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_terrain_name` **(** :ref:`int` terrain_set, :ref:`int` terrain_index **)** |const| | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`TerrainMode` | :ref:`get_terrain_set_mode` **(** :ref:`int` terrain_set **)** |const| | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_terrain_sets_count` **(** **)** |const| | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_terrains_count` **(** :ref:`int` terrain_set **)** |const| | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_alternative_level_tile_proxy` **(** :ref:`int` source_from, :ref:`Vector2i` coords_from, :ref:`int` alternative_from **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_coords_level_tile_proxy` **(** :ref:`int` source_from, :ref:`Vector2i` coords_from **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_source` **(** :ref:`int` source_id **)** |const| | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_source_level_tile_proxy` **(** :ref:`int` source_from **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`map_tile_proxy` **(** :ref:`int` source_from, :ref:`Vector2i` coords_from, :ref:`int` alternative_from **)** |const| | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`move_custom_data_layer` **(** :ref:`int` layer_index, :ref:`int` to_position **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`move_navigation_layer` **(** :ref:`int` layer_index, :ref:`int` to_position **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`move_occlusion_layer` **(** :ref:`int` layer_index, :ref:`int` to_position **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`move_physics_layer` **(** :ref:`int` layer_index, :ref:`int` to_position **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`move_terrain` **(** :ref:`int` terrain_set, :ref:`int` terrain_index, :ref:`int` to_position **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`move_terrain_set` **(** :ref:`int` terrain_set, :ref:`int` to_position **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_alternative_level_tile_proxy` **(** :ref:`int` source_from, :ref:`Vector2i` coords_from, :ref:`int` alternative_from **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_coords_level_tile_proxy` **(** :ref:`int` source_from, :ref:`Vector2i` coords_from **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_custom_data_layer` **(** :ref:`int` layer_index **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_navigation_layer` **(** :ref:`int` layer_index **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_occlusion_layer` **(** :ref:`int` layer_index **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_pattern` **(** :ref:`int` index **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_physics_layer` **(** :ref:`int` layer_index **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_source` **(** :ref:`int` source_id **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_source_level_tile_proxy` **(** :ref:`int` source_from **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_terrain` **(** :ref:`int` terrain_set, :ref:`int` terrain_index **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_terrain_set` **(** :ref:`int` terrain_set **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_alternative_level_tile_proxy` **(** :ref:`int` source_from, :ref:`Vector2i` coords_from, :ref:`int` alternative_from, :ref:`int` source_to, :ref:`Vector2i` coords_to, :ref:`int` alternative_to **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_coords_level_tile_proxy` **(** :ref:`int` p_source_from, :ref:`Vector2i` coords_from, :ref:`int` source_to, :ref:`Vector2i` coords_to **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_custom_data_layer_name` **(** :ref:`int` layer_index, :ref:`String` layer_name **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_custom_data_layer_type` **(** :ref:`int` layer_index, :ref:`Variant.Type` layer_type **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_navigation_layer_layers` **(** :ref:`int` layer_index, :ref:`int` layers **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_occlusion_layer_light_mask` **(** :ref:`int` layer_index, :ref:`int` light_mask **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_occlusion_layer_sdf_collision` **(** :ref:`int` layer_index, :ref:`bool` sdf_collision **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_physics_layer_collision_layer` **(** :ref:`int` layer_index, :ref:`int` layer **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_physics_layer_collision_mask` **(** :ref:`int` layer_index, :ref:`int` mask **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_physics_layer_physics_material` **(** :ref:`int` layer_index, :ref:`PhysicsMaterial` physics_material **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_source_id` **(** :ref:`int` source_id, :ref:`int` new_source_id **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_source_level_tile_proxy` **(** :ref:`int` source_from, :ref:`int` source_to **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_terrain_color` **(** :ref:`int` terrain_set, :ref:`int` terrain_index, :ref:`Color` color **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_terrain_name` **(** :ref:`int` terrain_set, :ref:`int` terrain_index, :ref:`String` name **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_terrain_set_mode` **(** :ref:`int` terrain_set, :ref:`TerrainMode` mode **)** | ++-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Enumerations ------------ @@ -555,6 +565,30 @@ If the TileSet has no proxy for the given identifiers, returns an empty Array. ---- +.. _class_TileSet_method_get_custom_data_layer_by_name: + +- :ref:`int` **get_custom_data_layer_by_name** **(** :ref:`String` layer_name **)** |const| + +Returns the index of the custom data layer identified by the given name. + +---- + +.. _class_TileSet_method_get_custom_data_layer_name: + +- :ref:`String` **get_custom_data_layer_name** **(** :ref:`int` layer_index **)** |const| + +Returns the name of the custom data layer identified by the given index. + +---- + +.. _class_TileSet_method_get_custom_data_layer_type: + +- :ref:`Variant.Type` **get_custom_data_layer_type** **(** :ref:`int` layer_index **)** |const| + +Returns the type of the custom data layer identified by the given index. + +---- + .. _class_TileSet_method_get_custom_data_layers_count: - :ref:`int` **get_custom_data_layers_count** **(** **)** |const| @@ -937,6 +971,22 @@ Proxied tiles can be automatically replaced in TileMap nodes using the editor. ---- +.. _class_TileSet_method_set_custom_data_layer_name: + +- void **set_custom_data_layer_name** **(** :ref:`int` layer_index, :ref:`String` layer_name **)** + +Sets the name of the custom data layer identified by the given index. Names are identifiers of the layer therefore if the name is already taken it will fail and raise an error. + +---- + +.. _class_TileSet_method_set_custom_data_layer_type: + +- void **set_custom_data_layer_type** **(** :ref:`int` layer_index, :ref:`Variant.Type` layer_type **)** + +Sets the type of the custom data layer identified by the given index. + +---- + .. _class_TileSet_method_set_navigation_layer_layers: - void **set_navigation_layer_layers** **(** :ref:`int` layer_index, :ref:`int` layers **)** diff --git a/classes/class_tilesetatlassource.rst b/classes/class_tilesetatlassource.rst index 4782b3915..bed2935d3 100644 --- a/classes/class_tilesetatlassource.rst +++ b/classes/class_tilesetatlassource.rst @@ -193,7 +193,7 @@ Method Descriptions - :ref:`int` **create_alternative_tile** **(** :ref:`Vector2i` atlas_coords, :ref:`int` alternative_id_override=-1 **)** -Creates an alternative tile for the tile at coords ``atlas_coords``. If ``alternative_id_override`` is -1, give it an automatically generated unique ID, or assigns it the given ID otherwise. +Creates an alternative tile for the tile at coordinates ``atlas_coords``. If ``alternative_id_override`` is -1, give it an automatically generated unique ID, or assigns it the given ID otherwise. Returns the new alternative identifier, or -1 if the alternative could not be created with a provided ``alternative_id_override``. @@ -203,7 +203,7 @@ Returns the new alternative identifier, or -1 if the alternative could not be cr - void **create_tile** **(** :ref:`Vector2i` atlas_coords, :ref:`Vector2i` size=Vector2i(1, 1) **)** -Creates a new tile at coords ``atlas_coords`` with size ``size``. +Creates a new tile at coordinates ``atlas_coords`` with the given ``size``. ---- @@ -235,7 +235,7 @@ If :ref:`use_texture_padding` **get_runtime_tile_texture_region** **(** :ref:`Vector2i` atlas_coords, :ref:`int` frame **)** |const| -Returns the region of the tile at coordinates ``atlas_coords`` for frame ``frame`` inside the texture returned by :ref:`get_runtime_texture`. +Returns the region of the tile at coordinates ``atlas_coords`` for the given ``frame`` inside the texture returned by :ref:`get_runtime_texture`. \ **Note:** If :ref:`use_texture_padding` is ``false``, returns the same as :ref:`get_tile_texture_region`. @@ -373,7 +373,7 @@ Remove a tile and its alternative at coordinates ``atlas_coords``. Change a tile's alternative ID from ``alternative_tile`` to ``new_id``. -Calling this function with ``alternative_id`` equals to 0 will fail, as the base tile alternative cannot be moved. +Calling this function with ``new_id`` of 0 will fail, as the base tile alternative cannot be moved. ---- @@ -389,7 +389,7 @@ Sets the number of columns in the animation layout of the tile at coordinates `` - void **set_tile_animation_frame_duration** **(** :ref:`Vector2i` atlas_coords, :ref:`int` frame_index, :ref:`float` duration **)** -Sets the animation frame duration of frame ``frame_index`` for the tile at coordinates ``atlas_coords``. +Sets the animation frame ``duration`` of frame ``frame_index`` for the tile at coordinates ``atlas_coords``. ---- diff --git a/classes/class_tilesetscenescollectionsource.rst b/classes/class_tilesetscenescollectionsource.rst index 574cd9d5c..e146e747c 100644 --- a/classes/class_tilesetscenescollectionsource.rst +++ b/classes/class_tilesetscenescollectionsource.rst @@ -73,7 +73,7 @@ Returns the scene ID a following call to :ref:`create_scene_tile` **get_scene_tile_display_placeholder** **(** :ref:`int` id **)** |const| -Returns whether the scene tile with id ``id`` displays a placeholder in the editor. +Returns whether the scene tile with ``id`` displays a placeholder in the editor. ---- @@ -81,7 +81,7 @@ Returns whether the scene tile with id ``id`` displays a placeholder in the edit - :ref:`int` **get_scene_tile_id** **(** :ref:`int` index **)** -Returns the scene tile ID of the scene tile at index ``index``. +Returns the scene tile ID of the scene tile at ``index``. ---- @@ -89,7 +89,7 @@ Returns the scene tile ID of the scene tile at index ``index``. - :ref:`PackedScene` **get_scene_tile_scene** **(** :ref:`int` id **)** |const| -Returns the :ref:`PackedScene` resource of scene tile with id ``id``. +Returns the :ref:`PackedScene` resource of scene tile with ``id``. ---- @@ -105,7 +105,7 @@ Returns the number or scene tiles this TileSet source has. - :ref:`bool` **has_scene_tile_id** **(** :ref:`int` id **)** -Returns whether this TileSet source has a scene tile with id ``id``. +Returns whether this TileSet source has a scene tile with ``id``. ---- @@ -113,7 +113,7 @@ Returns whether this TileSet source has a scene tile with id ``id``. - void **remove_scene_tile** **(** :ref:`int` id **)** -Remove the scene tile with id ``id``. +Remove the scene tile with ``id``. ---- @@ -121,7 +121,7 @@ Remove the scene tile with id ``id``. - void **set_scene_tile_display_placeholder** **(** :ref:`int` id, :ref:`bool` display_placeholder **)** -Sets whether or not the scene tile with id ``id`` should display a placeholder in the editor. This might be useful for scenes that are not visible. +Sets whether or not the scene tile with ``id`` should display a placeholder in the editor. This might be useful for scenes that are not visible. ---- @@ -137,7 +137,7 @@ Changes a scene tile's ID from ``id`` to ``new_id``. This will fail if there is - void **set_scene_tile_scene** **(** :ref:`int` id, :ref:`PackedScene` packed_scene **)** -Assigns a :ref:`PackedScene` resource to the scene tile with id ``id``. This will fail if the scene does not extend CanvasItem, as positioning properties are needed to place the scene on the TileMap. +Assigns a :ref:`PackedScene` resource to the scene tile with ``id``. This will fail if the scene does not extend CanvasItem, as positioning properties are needed to place the scene on the TileMap. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_tilesetsource.rst b/classes/class_tilesetsource.rst index bf699d204..1a3fc78b7 100644 --- a/classes/class_tilesetsource.rst +++ b/classes/class_tilesetsource.rst @@ -97,7 +97,7 @@ Returns if the base tile at coordinates ``atlas_coords`` has an alternative with - :ref:`bool` **has_tile** **(** :ref:`Vector2i` atlas_coords **)** |const| -Returns if this atlas has a tile with coordinates ID ``atlas_coordinates``. +Returns if this atlas has a tile with coordinates ID ``atlas_coords``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_time.rst b/classes/class_time.rst index 996d7b6be..c251cf6fa 100644 --- a/classes/class_time.rst +++ b/classes/class_time.rst @@ -172,7 +172,7 @@ Method Descriptions Returns the current date as a dictionary of keys: ``year``, ``month``, ``day``, ``weekday``, and ``dst`` (Daylight Savings Time). -The returned values are in the system's local time when ``utc`` is false, otherwise they are in UTC. +The returned values are in the system's local time when ``utc`` is ``false``, otherwise they are in UTC. ---- @@ -190,7 +190,7 @@ Converts the given Unix timestamp to a dictionary of keys: ``year``, ``month``, Returns the current date as an ISO 8601 date string (YYYY-MM-DD). -The returned values are in the system's local time when ``utc`` is false, otherwise they are in UTC. +The returned values are in the system's local time when ``utc`` is ``false``, otherwise they are in UTC. ---- @@ -208,7 +208,7 @@ Converts the given Unix timestamp to an ISO 8601 date string (YYYY-MM-DD). Converts the given ISO 8601 date and time string (YYYY-MM-DDTHH:MM:SS) to a dictionary of keys: ``year``, ``month``, ``day``, ``weekday``, ``hour``, ``minute``, and ``second``. -If ``weekday`` is false, then the ``weekday`` entry is excluded (the calculation is relatively expensive). +If ``weekday`` is ``false``, then the ``weekday`` entry is excluded (the calculation is relatively expensive). \ **Note:** Any decimal fraction in the time string will be ignored silently. @@ -242,7 +242,7 @@ The given dictionary can be populated with the following keys: ``year``, ``month If the dictionary is empty, ``0`` is returned. If some keys are omitted, they default to the equivalent values for the Unix epoch timestamp 0 (1970-01-01 at 00:00:00). -If ``use_space`` is true, use a space instead of the letter T in the middle. +If ``use_space`` is ``true``, the date and time bits are separated by an empty space character instead of the letter T. ---- @@ -252,9 +252,9 @@ If ``use_space`` is true, use a space instead of the letter T in the middle. Returns the current date and time as an ISO 8601 date and time string (YYYY-MM-DDTHH:MM:SS). -The returned values are in the system's local time when ``utc`` is false, otherwise they are in UTC. +The returned values are in the system's local time when ``utc`` is ``false``, otherwise they are in UTC. -If ``use_space`` is true, use a space instead of the letter T in the middle. +If ``use_space`` is ``true``, the date and time bits are separated by an empty space character instead of the letter T. ---- @@ -264,7 +264,7 @@ If ``use_space`` is true, use a space instead of the letter T in the middle. Converts the given Unix timestamp to an ISO 8601 date and time string (YYYY-MM-DDTHH:MM:SS). -If ``use_space`` is true, use a space instead of the letter T in the middle. +If ``use_space`` is ``true``, the date and time bits are separated by an empty space character instead of the letter T. ---- @@ -302,7 +302,7 @@ Will always be positive or 0 and uses a 64-bit value (it will wrap after roughly Returns the current time as a dictionary of keys: ``hour``, ``minute``, and ``second``. -The returned values are in the system's local time when ``utc`` is false, otherwise they are in UTC. +The returned values are in the system's local time when ``utc`` is ``false``, otherwise they are in UTC. ---- @@ -320,7 +320,7 @@ Converts the given time to a dictionary of keys: ``hour``, ``minute``, and ``sec Returns the current time as an ISO 8601 time string (HH:MM:SS). -The returned values are in the system's local time when ``utc`` is false, otherwise they are in UTC. +The returned values are in the system's local time when ``utc`` is ``false``, otherwise they are in UTC. ---- diff --git a/classes/class_torusmesh.rst b/classes/class_torusmesh.rst new file mode 100644 index 000000000..4ea2a6578 --- /dev/null +++ b/classes/class_torusmesh.rst @@ -0,0 +1,105 @@ +: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/TorusMesh.xml. + +.. _class_TorusMesh: + +TorusMesh +========= + +**Inherits:** :ref:`PrimitiveMesh` **<** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +Class representing a torus :ref:`PrimitiveMesh`. + +Description +----------- + +Class representing a torus :ref:`PrimitiveMesh`. + +Properties +---------- + ++---------------------------+--------------------------------------------------------------+---------+ +| :ref:`float` | :ref:`inner_radius` | ``0.5`` | ++---------------------------+--------------------------------------------------------------+---------+ +| :ref:`float` | :ref:`outer_radius` | ``1.0`` | ++---------------------------+--------------------------------------------------------------+---------+ +| :ref:`int` | :ref:`ring_segments` | ``32`` | ++---------------------------+--------------------------------------------------------------+---------+ +| :ref:`int` | :ref:`rings` | ``64`` | ++---------------------------+--------------------------------------------------------------+---------+ + +Property Descriptions +--------------------- + +.. _class_TorusMesh_property_inner_radius: + +- :ref:`float` **inner_radius** + ++-----------+-------------------------+ +| *Default* | ``0.5`` | ++-----------+-------------------------+ +| *Setter* | set_inner_radius(value) | ++-----------+-------------------------+ +| *Getter* | get_inner_radius() | ++-----------+-------------------------+ + +The inner radius of the torus. + +---- + +.. _class_TorusMesh_property_outer_radius: + +- :ref:`float` **outer_radius** + ++-----------+-------------------------+ +| *Default* | ``1.0`` | ++-----------+-------------------------+ +| *Setter* | set_outer_radius(value) | ++-----------+-------------------------+ +| *Getter* | get_outer_radius() | ++-----------+-------------------------+ + +The outer radius of the torus. + +---- + +.. _class_TorusMesh_property_ring_segments: + +- :ref:`int` **ring_segments** + ++-----------+--------------------------+ +| *Default* | ``32`` | ++-----------+--------------------------+ +| *Setter* | set_ring_segments(value) | ++-----------+--------------------------+ +| *Getter* | get_ring_segments() | ++-----------+--------------------------+ + +The number of edges each ring of the torus is constructed of. + +---- + +.. _class_TorusMesh_property_rings: + +- :ref:`int` **rings** + ++-----------+------------------+ +| *Default* | ``64`` | ++-----------+------------------+ +| *Setter* | set_rings(value) | ++-----------+------------------+ +| *Getter* | get_rings() | ++-----------+------------------+ + +The number of slices the torus is constructed of. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_transform2d.rst b/classes/class_transform2d.rst index 91995ced7..a80c395e7 100644 --- a/classes/class_transform2d.rst +++ b/classes/class_transform2d.rst @@ -86,8 +86,12 @@ Methods +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform2D` | :ref:`rotated` **(** :ref:`float` angle **)** |const| | +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform2D` | :ref:`rotated_local` **(** :ref:`float` angle **)** |const| | ++---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform2D` | :ref:`scaled` **(** :ref:`Vector2` scale **)** |const| | +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform2D` | :ref:`scaled_local` **(** :ref:`Vector2` scale **)** |const| | ++---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_rotation` **(** :ref:`float` rotation **)** | +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_scale` **(** :ref:`Vector2` scale **)** | @@ -96,6 +100,8 @@ Methods +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform2D` | :ref:`translated` **(** :ref:`Vector2` offset **)** |const| | +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform2D` | :ref:`translated_local` **(** :ref:`Vector2` offset **)** |const| | ++---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Operators --------- @@ -314,7 +320,27 @@ Returns the transform with the basis orthogonal (90 degrees), and normalized axi - :ref:`Transform2D` **rotated** **(** :ref:`float` angle **)** |const| -Returns a copy of the transform rotated by the given ``angle`` (in radians), using matrix multiplication. +Returns a copy of the transform rotated by the given ``angle`` (in radians). + +This method is an optimized version of multiplying the given transform ``X``\ + +with a corresponding rotation transform ``R`` from the left, i.e., ``R * X``. + +This can be seen as transforming with respect to the global/parent frame. + +---- + +.. _class_Transform2D_method_rotated_local: + +- :ref:`Transform2D` **rotated_local** **(** :ref:`float` angle **)** |const| + +Returns a copy of the transform rotated by the given ``angle`` (in radians). + +This method is an optimized version of multiplying the given transform ``X``\ + +with a corresponding rotation transform ``R`` from the right, i.e., ``X * R``. + +This can be seen as transforming with respect to the local frame. ---- @@ -322,7 +348,27 @@ Returns a copy of the transform rotated by the given ``angle`` (in radians), usi - :ref:`Transform2D` **scaled** **(** :ref:`Vector2` scale **)** |const| -Returns a copy of the transform scaled by the given ``scale`` factor, using matrix multiplication. +Returns a copy of the transform scaled by the given ``scale`` factor. + +This method is an optimized version of multiplying the given transform ``X``\ + +with a corresponding scaling transform ``S`` from the left, i.e., ``S * X``. + +This can be seen as transforming with respect to the global/parent frame. + +---- + +.. _class_Transform2D_method_scaled_local: + +- :ref:`Transform2D` **scaled_local** **(** :ref:`Vector2` scale **)** |const| + +Returns a copy of the transform scaled by the given ``scale`` factor. + +This method is an optimized version of multiplying the given transform ``X``\ + +with a corresponding scaling transform ``S`` from the right, i.e., ``X * S``. + +This can be seen as transforming with respect to the local frame. ---- @@ -356,9 +402,27 @@ Sets the transform's skew (in radians). - :ref:`Transform2D` **translated** **(** :ref:`Vector2` offset **)** |const| -Returns a copy of the transform translated by the given ``offset``, relative to the transform's basis vectors. +Returns a copy of the transform translated by the given ``offset``. -Unlike :ref:`rotated` and :ref:`scaled`, this does not use matrix multiplication. +This method is an optimized version of multiplying the given transform ``X``\ + +with a corresponding translation transform ``T`` from the left, i.e., ``T * X``. + +This can be seen as transforming with respect to the global/parent frame. + +---- + +.. _class_Transform2D_method_translated_local: + +- :ref:`Transform2D` **translated_local** **(** :ref:`Vector2` offset **)** |const| + +Returns a copy of the transform translated by the given ``offset``. + +This method is an optimized version of multiplying the given transform ``X``\ + +with a corresponding translation transform ``T`` from the right, i.e., ``X * T``. + +This can be seen as transforming with respect to the local frame. Operator Descriptions --------------------- diff --git a/classes/class_transform3d.rst b/classes/class_transform3d.rst index 2272234eb..b60105267 100644 --- a/classes/class_transform3d.rst +++ b/classes/class_transform3d.rst @@ -61,27 +61,31 @@ Constructors Methods ------- -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`affine_inverse` **(** **)** |const| | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`interpolate_with` **(** :ref:`Transform3D` xform, :ref:`float` weight **)** |const| | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`inverse` **(** **)** |const| | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Transform3D` xform **)** |const| | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`looking_at` **(** :ref:`Vector3` target, :ref:`Vector3` up=Vector3(0, 1, 0) **)** |const| | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`orthonormalized` **(** **)** |const| | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`rotated` **(** :ref:`Vector3` axis, :ref:`float` angle **)** |const| | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`scaled` **(** :ref:`Vector3` scale **)** |const| | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`sphere_interpolate_with` **(** :ref:`Transform3D` xform, :ref:`float` weight **)** |const| | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`translated` **(** :ref:`Vector3` offset **)** |const| | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform3D` | :ref:`affine_inverse` **(** **)** |const| | ++---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform3D` | :ref:`interpolate_with` **(** :ref:`Transform3D` xform, :ref:`float` weight **)** |const| | ++---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform3D` | :ref:`inverse` **(** **)** |const| | ++---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Transform3D` xform **)** |const| | ++---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform3D` | :ref:`looking_at` **(** :ref:`Vector3` target, :ref:`Vector3` up=Vector3(0, 1, 0) **)** |const| | ++---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform3D` | :ref:`orthonormalized` **(** **)** |const| | ++---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform3D` | :ref:`rotated` **(** :ref:`Vector3` axis, :ref:`float` angle **)** |const| | ++---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform3D` | :ref:`rotated_local` **(** :ref:`Vector3` axis, :ref:`float` angle **)** |const| | ++---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform3D` | :ref:`scaled` **(** :ref:`Vector3` scale **)** |const| | ++---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform3D` | :ref:`scaled_local` **(** :ref:`Vector3` scale **)** |const| | ++---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform3D` | :ref:`translated` **(** :ref:`Vector3` offset **)** |const| | ++---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform3D` | :ref:`translated_local` **(** :ref:`Vector3` offset **)** |const| | ++---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Operators --------- @@ -93,6 +97,8 @@ Operators +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedVector3Array` | :ref:`operator *` **(** :ref:`PackedVector3Array` right **)** | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Plane` | :ref:`operator *` **(** :ref:`Plane` right **)** | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform3D` | :ref:`operator *` **(** :ref:`Transform3D` right **)** | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`operator *` **(** :ref:`Vector3` right **)** | @@ -236,7 +242,31 @@ Returns the transform with the basis orthogonal (90 degrees), and normalized axi - :ref:`Transform3D` **rotated** **(** :ref:`Vector3` axis, :ref:`float` angle **)** |const| -Returns a copy of the transform rotated around the given ``axis`` by the given ``angle`` (in radians), using matrix multiplication. The ``axis`` must be a normalized vector. +Returns a copy of the transform rotated around the given ``axis`` by the given ``angle`` (in radians). + +The ``axis`` must be a normalized vector. + +This method is an optimized version of multiplying the given transform ``X``\ + +with a corresponding rotation transform ``R`` from the left, i.e., ``R * X``. + +This can be seen as transforming with respect to the global/parent frame. + +---- + +.. _class_Transform3D_method_rotated_local: + +- :ref:`Transform3D` **rotated_local** **(** :ref:`Vector3` axis, :ref:`float` angle **)** |const| + +Returns a copy of the transform rotated around the given ``axis`` by the given ``angle`` (in radians). + +The ``axis`` must be a normalized vector. + +This method is an optimized version of multiplying the given transform ``X``\ + +with a corresponding rotation transform ``R`` from the right, i.e., ``X * R``. + +This can be seen as transforming with respect to the local frame. ---- @@ -244,15 +274,27 @@ Returns a copy of the transform rotated around the given ``axis`` by the given ` - :ref:`Transform3D` **scaled** **(** :ref:`Vector3` scale **)** |const| -Returns a copy of the transform with its basis and origin scaled by the given ``scale`` factor, using matrix multiplication. +Returns a copy of the transform scaled by the given ``scale`` factor. + +This method is an optimized version of multiplying the given transform ``X``\ + +with a corresponding scaling transform ``S`` from the left, i.e., ``S * X``. + +This can be seen as transforming with respect to the global/parent frame. ---- -.. _class_Transform3D_method_sphere_interpolate_with: +.. _class_Transform3D_method_scaled_local: -- :ref:`Transform3D` **sphere_interpolate_with** **(** :ref:`Transform3D` xform, :ref:`float` weight **)** |const| +- :ref:`Transform3D` **scaled_local** **(** :ref:`Vector3` scale **)** |const| -Returns a transform spherically interpolated between this transform and another by a given ``weight`` (on the range of 0.0 to 1.0). +Returns a copy of the transform scaled by the given ``scale`` factor. + +This method is an optimized version of multiplying the given transform ``X``\ + +with a corresponding scaling transform ``S`` from the right, i.e., ``X * S``. + +This can be seen as transforming with respect to the local frame. ---- @@ -260,9 +302,27 @@ Returns a transform spherically interpolated between this transform and another - :ref:`Transform3D` **translated** **(** :ref:`Vector3` offset **)** |const| -Returns a copy of the transform translated by the given ``offset``, relative to the transform's basis vectors. +Returns a copy of the transform translated by the given ``offset``. -Unlike :ref:`rotated` and :ref:`scaled`, this does not use matrix multiplication. +This method is an optimized version of multiplying the given transform ``X``\ + +with a corresponding translation transform ``T`` from the left, i.e., ``T * X``. + +This can be seen as transforming with respect to the global/parent frame. + +---- + +.. _class_Transform3D_method_translated_local: + +- :ref:`Transform3D` **translated_local** **(** :ref:`Vector3` offset **)** |const| + +Returns a copy of the transform translated by the given ``offset``. + +This method is an optimized version of multiplying the given transform ``X``\ + +with a corresponding translation transform ``T`` from the right, i.e., ``X * T``. + +This can be seen as transforming with respect to the local frame. Operator Descriptions --------------------- @@ -291,6 +351,12 @@ Transforms (multiplies) each element of the :ref:`Vector3` array ---- +- :ref:`Plane` **operator *** **(** :ref:`Plane` right **)** + +Transforms (multiplies) the :ref:`Plane` by the given ``Transform3D`` transformation matrix. + +---- + - :ref:`Transform3D` **operator *** **(** :ref:`Transform3D` right **)** Composes these two transformation matrices by multiplying them together. This has the effect of transforming the second transform (the child) by the first transform (the parent). diff --git a/classes/class_translationserver.rst b/classes/class_translationserver.rst index 889793dfb..eae9c98c0 100644 --- a/classes/class_translationserver.rst +++ b/classes/class_translationserver.rst @@ -53,7 +53,7 @@ Methods +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_language_name` **(** :ref:`String` language **)** |const| | +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_loaded_locales` **(** **)** |const| | +| :ref:`PackedStringArray` | :ref:`get_loaded_locales` **(** **)** |const| | +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_locale` **(** **)** |const| | +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -166,7 +166,7 @@ Returns readable language name for the ``language`` code. .. _class_TranslationServer_method_get_loaded_locales: -- :ref:`Array` **get_loaded_locales** **(** **)** |const| +- :ref:`PackedStringArray` **get_loaded_locales** **(** **)** |const| Returns an array of all loaded locales of the project. @@ -222,7 +222,7 @@ It will return ``null`` if there is no :ref:`Translation` ins - :ref:`StringName` **pseudolocalize** **(** :ref:`StringName` message **)** |const| -Returns the pseudolocalized string based on the ``p_message`` passed in. +Returns the pseudolocalized string based on the ``message`` passed in. ---- diff --git a/classes/class_tree.rst b/classes/class_tree.rst index c980d5c93..34686221b 100644 --- a/classes/class_tree.rst +++ b/classes/class_tree.rst @@ -162,7 +162,7 @@ Theme Properties +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Color` | :ref:`custom_button_font_highlight` | ``Color(0.95, 0.95, 0.95, 1)`` | +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Color` | :ref:`drop_position_color` | ``Color(1, 0.3, 0.2, 1)`` | +| :ref:`Color` | :ref:`drop_position_color` | ``Color(1, 1, 1, 1)`` | +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Color` | :ref:`font_color` | ``Color(0.7, 0.7, 0.7, 1)`` | +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ @@ -280,11 +280,11 @@ Emitted when :ref:`TreeItem.propagate_check` column **)** +- **column_title_clicked** **(** :ref:`int` column, :ref:`int` mouse_button_index **)** -Emitted when a column's title is pressed. +Emitted when a column's title is clicked with either :ref:`@GlobalScope.MOUSE_BUTTON_LEFT` or :ref:`@GlobalScope.MOUSE_BUTTON_RIGHT`. ---- @@ -613,7 +613,7 @@ Creates an item in the tree and adds it as a child of ``parent``, which can be e If ``parent`` is ``null``, the root item will be the parent, or the new item will be the root itself if the tree is empty. -The new item will be the ``idx``\ th child of parent, or it will be the last child if there are not enough siblings. +The new item will be the ``idx``th child of parent, or it will be the last child if there are not enough siblings. ---- @@ -927,9 +927,9 @@ Text :ref:`Color` for a :ref:`TreeItem.CELL_MODE_CUSTOM` **drop_position_color** -+-----------+---------------------------+ -| *Default* | ``Color(1, 0.3, 0.2, 1)`` | -+-----------+---------------------------+ ++-----------+-----------------------+ +| *Default* | ``Color(1, 1, 1, 1)`` | ++-----------+-----------------------+ :ref:`Color` used to draw possible drop locations. See :ref:`DropModeFlags` constants for further description of drop locations. diff --git a/classes/class_treeitem.rst b/classes/class_treeitem.rst index b9b5d2269..d4b2b49d4 100644 --- a/classes/class_treeitem.rst +++ b/classes/class_treeitem.rst @@ -37,179 +37,179 @@ Properties Methods ------- -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_button` **(** :ref:`int` column, :ref:`Texture2D` button, :ref:`int` id=-1, :ref:`bool` disabled=false, :ref:`String` tooltip="" **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`call_recursive` **(** :ref:`StringName` method, ... **)** |vararg| | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_custom_bg_color` **(** :ref:`int` column **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_custom_color` **(** :ref:`int` column **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TreeItem` | :ref:`create_child` **(** :ref:`int` idx=-1 **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`deselect` **(** :ref:`int` column **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`erase_button` **(** :ref:`int` column, :ref:`int` button_idx **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`get_button` **(** :ref:`int` column, :ref:`int` button_idx **)** |const| | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_button_by_id` **(** :ref:`int` column, :ref:`int` id **)** |const| | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_button_count` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_button_id` **(** :ref:`int` column, :ref:`int` button_idx **)** |const| | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_button_tooltip` **(** :ref:`int` column, :ref:`int` button_idx **)** |const| | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TreeCellMode` | :ref:`get_cell_mode` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TreeItem` | :ref:`get_child` **(** :ref:`int` idx **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_child_count` **(** **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_children` **(** **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`get_custom_bg_color` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`get_custom_color` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Font` | :ref:`get_custom_font` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_custom_font_size` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_expand_right` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TreeItem` | :ref:`get_first_child` **(** **)** |const| | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`get_icon` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_icon_max_width` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`get_icon_modulate` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`get_icon_region` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_index` **(** **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_language` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get_metadata` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TreeItem` | :ref:`get_next` **(** **)** |const| | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TreeItem` | :ref:`get_next_visible` **(** :ref:`bool` wrap=false **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TreeItem` | :ref:`get_parent` **(** **)** |const| | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TreeItem` | :ref:`get_prev` **(** **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TreeItem` | :ref:`get_prev_visible` **(** :ref:`bool` wrap=false **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_range` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_range_config` **(** :ref:`int` column **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StructuredTextParser` | :ref:`get_structured_text_bidi_override` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_structured_text_bidi_override_options` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_suffix` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_text` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`HorizontalAlignment` | :ref:`get_text_alignment` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TextDirection` | :ref:`get_text_direction` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_tooltip` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Tree` | :ref:`get_tree` **(** **)** |const| | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_button_disabled` **(** :ref:`int` column, :ref:`int` button_idx **)** |const| | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_checked` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_custom_set_as_button` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_editable` **(** :ref:`int` column **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_indeterminate` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_selectable` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_selected` **(** :ref:`int` column **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`move_after` **(** :ref:`TreeItem` item **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`move_before` **(** :ref:`TreeItem` item **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`propagate_check` **(** :ref:`int` column, :ref:`bool` emit_signal=true **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_child` **(** :ref:`TreeItem` child **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`select` **(** :ref:`int` column **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_button` **(** :ref:`int` column, :ref:`int` button_idx, :ref:`Texture2D` button **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_button_disabled` **(** :ref:`int` column, :ref:`int` button_idx, :ref:`bool` disabled **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_cell_mode` **(** :ref:`int` column, :ref:`TreeCellMode` mode **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_checked` **(** :ref:`int` column, :ref:`bool` checked **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_custom_as_button` **(** :ref:`int` column, :ref:`bool` enable **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_custom_bg_color` **(** :ref:`int` column, :ref:`Color` color, :ref:`bool` just_outline=false **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_custom_color` **(** :ref:`int` column, :ref:`Color` color **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_custom_draw` **(** :ref:`int` column, :ref:`Object` object, :ref:`StringName` callback **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_custom_font` **(** :ref:`int` column, :ref:`Font` font **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_custom_font_size` **(** :ref:`int` column, :ref:`int` font_size **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_editable` **(** :ref:`int` column, :ref:`bool` enabled **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_expand_right` **(** :ref:`int` column, :ref:`bool` enable **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_icon` **(** :ref:`int` column, :ref:`Texture2D` texture **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_icon_max_width` **(** :ref:`int` column, :ref:`int` width **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_icon_modulate` **(** :ref:`int` column, :ref:`Color` modulate **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_icon_region` **(** :ref:`int` column, :ref:`Rect2` region **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_indeterminate` **(** :ref:`int` column, :ref:`bool` indeterminate **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_language` **(** :ref:`int` column, :ref:`String` language **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_metadata` **(** :ref:`int` column, :ref:`Variant` meta **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_range` **(** :ref:`int` column, :ref:`float` value **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_range_config` **(** :ref:`int` column, :ref:`float` min, :ref:`float` max, :ref:`float` step, :ref:`bool` expr=false **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_selectable` **(** :ref:`int` column, :ref:`bool` selectable **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_structured_text_bidi_override` **(** :ref:`int` column, :ref:`StructuredTextParser` parser **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_structured_text_bidi_override_options` **(** :ref:`int` column, :ref:`Array` args **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_suffix` **(** :ref:`int` column, :ref:`String` text **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_text` **(** :ref:`int` column, :ref:`String` text **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_text_alignment` **(** :ref:`int` column, :ref:`HorizontalAlignment` text_alignment **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_text_direction` **(** :ref:`int` column, :ref:`TextDirection` direction **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_tooltip` **(** :ref:`int` column, :ref:`String` tooltip **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`uncollapse_tree` **(** **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_button` **(** :ref:`int` column, :ref:`Texture2D` button, :ref:`int` id=-1, :ref:`bool` disabled=false, :ref:`String` tooltip_text="" **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`call_recursive` **(** :ref:`StringName` method, ... **)** |vararg| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_custom_bg_color` **(** :ref:`int` column **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_custom_color` **(** :ref:`int` column **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`TreeItem` | :ref:`create_child` **(** :ref:`int` idx=-1 **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`deselect` **(** :ref:`int` column **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`erase_button` **(** :ref:`int` column, :ref:`int` button_idx **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Texture2D` | :ref:`get_button` **(** :ref:`int` column, :ref:`int` button_idx **)** |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_button_by_id` **(** :ref:`int` column, :ref:`int` id **)** |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_button_count` **(** :ref:`int` column **)** |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_button_id` **(** :ref:`int` column, :ref:`int` button_idx **)** |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_button_tooltip_text` **(** :ref:`int` column, :ref:`int` button_idx **)** |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`TreeCellMode` | :ref:`get_cell_mode` **(** :ref:`int` column **)** |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`TreeItem` | :ref:`get_child` **(** :ref:`int` idx **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_child_count` **(** **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`TreeItem[]` | :ref:`get_children` **(** **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_custom_bg_color` **(** :ref:`int` column **)** |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_custom_color` **(** :ref:`int` column **)** |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Font` | :ref:`get_custom_font` **(** :ref:`int` column **)** |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_custom_font_size` **(** :ref:`int` column **)** |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_expand_right` **(** :ref:`int` column **)** |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`TreeItem` | :ref:`get_first_child` **(** **)** |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Texture2D` | :ref:`get_icon` **(** :ref:`int` column **)** |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_icon_max_width` **(** :ref:`int` column **)** |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_icon_modulate` **(** :ref:`int` column **)** |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Rect2` | :ref:`get_icon_region` **(** :ref:`int` column **)** |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_index` **(** **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_language` **(** :ref:`int` column **)** |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`get_metadata` **(** :ref:`int` column **)** |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`TreeItem` | :ref:`get_next` **(** **)** |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`TreeItem` | :ref:`get_next_visible` **(** :ref:`bool` wrap=false **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`TreeItem` | :ref:`get_parent` **(** **)** |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`TreeItem` | :ref:`get_prev` **(** **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`TreeItem` | :ref:`get_prev_visible` **(** :ref:`bool` wrap=false **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_range` **(** :ref:`int` column **)** |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`get_range_config` **(** :ref:`int` column **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StructuredTextParser` | :ref:`get_structured_text_bidi_override` **(** :ref:`int` column **)** |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_structured_text_bidi_override_options` **(** :ref:`int` column **)** |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_suffix` **(** :ref:`int` column **)** |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_text` **(** :ref:`int` column **)** |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`HorizontalAlignment` | :ref:`get_text_alignment` **(** :ref:`int` column **)** |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`TextDirection` | :ref:`get_text_direction` **(** :ref:`int` column **)** |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_tooltip_text` **(** :ref:`int` column **)** |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Tree` | :ref:`get_tree` **(** **)** |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_button_disabled` **(** :ref:`int` column, :ref:`int` button_idx **)** |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_checked` **(** :ref:`int` column **)** |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_custom_set_as_button` **(** :ref:`int` column **)** |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_editable` **(** :ref:`int` column **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_indeterminate` **(** :ref:`int` column **)** |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_selectable` **(** :ref:`int` column **)** |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_selected` **(** :ref:`int` column **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`move_after` **(** :ref:`TreeItem` item **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`move_before` **(** :ref:`TreeItem` item **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`propagate_check` **(** :ref:`int` column, :ref:`bool` emit_signal=true **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_child` **(** :ref:`TreeItem` child **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`select` **(** :ref:`int` column **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_button` **(** :ref:`int` column, :ref:`int` button_idx, :ref:`Texture2D` button **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_button_disabled` **(** :ref:`int` column, :ref:`int` button_idx, :ref:`bool` disabled **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_cell_mode` **(** :ref:`int` column, :ref:`TreeCellMode` mode **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_checked` **(** :ref:`int` column, :ref:`bool` checked **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_custom_as_button` **(** :ref:`int` column, :ref:`bool` enable **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_custom_bg_color` **(** :ref:`int` column, :ref:`Color` color, :ref:`bool` just_outline=false **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_custom_color` **(** :ref:`int` column, :ref:`Color` color **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_custom_draw` **(** :ref:`int` column, :ref:`Object` object, :ref:`StringName` callback **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_custom_font` **(** :ref:`int` column, :ref:`Font` font **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_custom_font_size` **(** :ref:`int` column, :ref:`int` font_size **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_editable` **(** :ref:`int` column, :ref:`bool` enabled **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_expand_right` **(** :ref:`int` column, :ref:`bool` enable **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_icon` **(** :ref:`int` column, :ref:`Texture2D` texture **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_icon_max_width` **(** :ref:`int` column, :ref:`int` width **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_icon_modulate` **(** :ref:`int` column, :ref:`Color` modulate **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_icon_region` **(** :ref:`int` column, :ref:`Rect2` region **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_indeterminate` **(** :ref:`int` column, :ref:`bool` indeterminate **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_language` **(** :ref:`int` column, :ref:`String` language **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_metadata` **(** :ref:`int` column, :ref:`Variant` meta **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_range` **(** :ref:`int` column, :ref:`float` value **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_range_config` **(** :ref:`int` column, :ref:`float` min, :ref:`float` max, :ref:`float` step, :ref:`bool` expr=false **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_selectable` **(** :ref:`int` column, :ref:`bool` selectable **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_structured_text_bidi_override` **(** :ref:`int` column, :ref:`StructuredTextParser` parser **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_structured_text_bidi_override_options` **(** :ref:`int` column, :ref:`Array` args **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_suffix` **(** :ref:`int` column, :ref:`String` text **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_text` **(** :ref:`int` column, :ref:`String` text **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_text_alignment` **(** :ref:`int` column, :ref:`HorizontalAlignment` text_alignment **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_text_direction` **(** :ref:`int` column, :ref:`TextDirection` direction **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_tooltip_text` **(** :ref:`int` column, :ref:`String` tooltip **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`uncollapse_tree` **(** **)** | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Enumerations ------------ @@ -302,9 +302,9 @@ Method Descriptions .. _class_TreeItem_method_add_button: -- void **add_button** **(** :ref:`int` column, :ref:`Texture2D` button, :ref:`int` id=-1, :ref:`bool` disabled=false, :ref:`String` tooltip="" **)** +- void **add_button** **(** :ref:`int` column, :ref:`Texture2D` button, :ref:`int` id=-1, :ref:`bool` disabled=false, :ref:`String` tooltip_text="" **)** -Adds a button with :ref:`Texture2D` ``button`` at column ``column``. The ``id`` is used to identify the button. If not specified, the next available index is used, which may be retrieved by calling :ref:`get_button_count` immediately before this method. Optionally, the button can be ``disabled`` and have a ``tooltip``. +Adds a button with :ref:`Texture2D` ``button`` at column ``column``. The ``id`` is used to identify the button. If not specified, the next available index is used, which may be retrieved by calling :ref:`get_button_count` immediately before this method. Optionally, the button can be ``disabled`` and have a ``tooltip_text``. ---- @@ -390,11 +390,11 @@ Returns the id for the button at index ``button_idx`` in column ``column``. ---- -.. _class_TreeItem_method_get_button_tooltip: +.. _class_TreeItem_method_get_button_tooltip_text: -- :ref:`String` **get_button_tooltip** **(** :ref:`int` column, :ref:`int` button_idx **)** |const| +- :ref:`String` **get_button_tooltip_text** **(** :ref:`int` column, :ref:`int` button_idx **)** |const| -Returns the tooltip string for the button at index ``button_idx`` in column ``column``. +Returns the tooltip text for the button at index ``button_idx`` in column ``column``. ---- @@ -426,7 +426,7 @@ Returns the number of child items. .. _class_TreeItem_method_get_children: -- :ref:`Array` **get_children** **(** **)** +- :ref:`TreeItem[]` **get_children** **(** **)** Returns an array of references to the item's children. @@ -640,11 +640,11 @@ Returns item's text base writing direction. ---- -.. _class_TreeItem_method_get_tooltip: +.. _class_TreeItem_method_get_tooltip_text: -- :ref:`String` **get_tooltip** **(** :ref:`int` column **)** |const| +- :ref:`String` **get_tooltip_text** **(** :ref:`int` column **)** |const| -Returns the given column's tooltip. +Returns the given column's tooltip text. ---- @@ -660,7 +660,7 @@ Returns the :ref:`Tree` that owns this TreeItem. - :ref:`bool` **is_button_disabled** **(** :ref:`int` column, :ref:`int` button_idx **)** |const| -Returns ``true`` if the button at index ``button_idx`` for the given column is disabled. +Returns ``true`` if the button at index ``button_idx`` for the given ``column`` is disabled. ---- @@ -668,7 +668,7 @@ Returns ``true`` if the button at index ``button_idx`` for the given column is d - :ref:`bool` **is_checked** **(** :ref:`int` column **)** |const| -Returns ``true`` if the given column is checked. +Returns ``true`` if the given ``column`` is checked. ---- @@ -682,7 +682,7 @@ Returns ``true`` if the given column is checked. - :ref:`bool` **is_editable** **(** :ref:`int` column **)** -Returns ``true`` if column ``column`` is editable. +Returns ``true`` if the given ``column`` is editable. ---- @@ -690,7 +690,7 @@ Returns ``true`` if column ``column`` is editable. - :ref:`bool` **is_indeterminate** **(** :ref:`int` column **)** |const| -Returns ``true`` if the given column is indeterminate. +Returns ``true`` if the given ``column`` is indeterminate. ---- @@ -698,7 +698,7 @@ Returns ``true`` if the given column is indeterminate. - :ref:`bool` **is_selectable** **(** :ref:`int` column **)** |const| -Returns ``true`` if column ``column`` is selectable. +Returns ``true`` if the given ``column`` is selectable. ---- @@ -706,7 +706,7 @@ Returns ``true`` if column ``column`` is selectable. - :ref:`bool` **is_selected** **(** :ref:`int` column **)** -Returns ``true`` if column ``column`` is selected. +Returns ``true`` if the given ``column`` is selected. ---- @@ -750,7 +750,7 @@ Removes the given child ``TreeItem`` and all its children from the :ref:`Tree` column **)** -Selects the column ``column``. +Selects the given ``column``. ---- @@ -766,7 +766,7 @@ Sets the given column's button :ref:`Texture2D` at index ``butt - void **set_button_disabled** **(** :ref:`int` column, :ref:`int` button_idx, :ref:`bool` disabled **)** -If ``true``, disables the button at index ``button_idx`` in column ``column``. +If ``true``, disables the button at index ``button_idx`` in the given ``column``. ---- @@ -782,7 +782,7 @@ Sets the given column's cell mode to ``mode``. See :ref:`TreeCellMode` column, :ref:`bool` checked **)** -If ``true``, the column ``column`` is checked. Clears column's indeterminate status. +If ``true``, the given ``column`` is checked. Clears column's indeterminate status. ---- @@ -822,7 +822,7 @@ The ``callback`` should accept two arguments: the ``TreeItem`` that is drawn and - void **set_custom_font** **(** :ref:`int` column, :ref:`Font` font **)** -Sets custom font used to draw text in the column ``column``. +Sets custom font used to draw text in the given ``column``. ---- @@ -830,7 +830,7 @@ Sets custom font used to draw text in the column ``column``. - void **set_custom_font_size** **(** :ref:`int` column, :ref:`int` font_size **)** -Sets custom font size used to draw text in the column ``column``. +Sets custom font size used to draw text in the given ``column``. ---- @@ -838,7 +838,7 @@ Sets custom font size used to draw text in the column ``column``. - void **set_editable** **(** :ref:`int` column, :ref:`bool` enabled **)** -If ``true``, column ``column`` is editable. +If ``true``, the given ``column`` is editable. ---- @@ -846,7 +846,7 @@ If ``true``, column ``column`` is editable. - void **set_expand_right** **(** :ref:`int` column, :ref:`bool` enable **)** -If ``true``, column ``column`` is expanded to the right. +If ``true``, the given ``column`` is expanded to the right. ---- @@ -886,7 +886,7 @@ Sets the given column's icon's texture region. - void **set_indeterminate** **(** :ref:`int` column, :ref:`bool` indeterminate **)** -If ``true``, the column ``column`` is marked indeterminate. +If ``true``, the given ``column`` is marked ``indeterminate``. \ **Note:** If set ``true`` from ``false``, then column is cleared of checked status. @@ -978,9 +978,9 @@ Sets item's text base writing direction. ---- -.. _class_TreeItem_method_set_tooltip: +.. _class_TreeItem_method_set_tooltip_text: -- void **set_tooltip** **(** :ref:`int` column, :ref:`String` tooltip **)** +- void **set_tooltip_text** **(** :ref:`int` column, :ref:`String` tooltip **)** Sets the given column's tooltip text. diff --git a/classes/class_tween.rst b/classes/class_tween.rst index c9ed1192b..4351c26ee 100644 --- a/classes/class_tween.rst +++ b/classes/class_tween.rst @@ -307,13 +307,13 @@ Returns the total time in seconds the ``Tween`` has been animating (i.e. the tim This method can be used for manual interpolation of a value, when you don't want ``Tween`` to do animating for you. It's similar to :ref:`@GlobalScope.lerp`, but with support for custom transition and easing. -\ ``initial_value`` is the starting value of the interpolation. +``initial_value`` is the starting value of the interpolation. -\ ``delta_value`` is the change of the value in the interpolation, i.e. it's equal to ``final_value - initial_value``. +``delta_value`` is the change of the value in the interpolation, i.e. it's equal to ``final_value - initial_value``. -\ ``elapsed_time`` is the time in seconds that passed after the interpolation started and it's used to control the position of the interpolation. E.g. when it's equal to half of the ``duration``, the interpolated value will be halfway between initial and final values. This value can also be greater than ``duration`` or lower than 0, which will extrapolate the value. +``elapsed_time`` is the time in seconds that passed after the interpolation started and it's used to control the position of the interpolation. E.g. when it's equal to half of the ``duration``, the interpolated value will be halfway between initial and final values. This value can also be greater than ``duration`` or lower than 0, which will extrapolate the value. -\ ``duration`` is the total time of the interpolation. +``duration`` is the total time of the interpolation. \ **Note:** If ``duration`` is equal to ``0``, the method will always return the final value, regardless of ``elapsed_time`` provided. diff --git a/classes/class_udpserver.rst b/classes/class_udpserver.rst index c92408e22..c4f9ff144 100644 --- a/classes/class_udpserver.rst +++ b/classes/class_udpserver.rst @@ -219,7 +219,7 @@ Returns ``true`` if the socket is open and listening on a port. - :ref:`Error` **listen** **(** :ref:`int` port, :ref:`String` bind_address="*" **)** -Starts the server by opening a UDP socket listening on the given port. You can optionally specify a ``bind_address`` to only listen for packets sent to that address. See also :ref:`PacketPeerUDP.bind`. +Starts the server by opening a UDP socket listening on the given ``port``. You can optionally specify a ``bind_address`` to only listen for packets sent to that address. See also :ref:`PacketPeerUDP.bind`. ---- diff --git a/classes/class_undoredo.rst b/classes/class_undoredo.rst index 8e18ef970..f69625b8c 100644 --- a/classes/class_undoredo.rst +++ b/classes/class_undoredo.rst @@ -163,7 +163,7 @@ Method Descriptions - void **add_do_method** **(** :ref:`Object` object, :ref:`StringName` method, ... **)** |vararg| -Register a method that will be called when the action is committed. +Register a ``method`` that will be called when the action is committed. ---- @@ -171,7 +171,7 @@ Register a method that will be called when the action is committed. - void **add_do_property** **(** :ref:`Object` object, :ref:`StringName` property, :ref:`Variant` value **)** -Register a property value change for "do". +Register a ``property`` that would change its value to ``value`` when the action is committed. ---- @@ -187,7 +187,7 @@ Register a reference for "do" that will be erased if the "do" history is lost. T - void **add_undo_method** **(** :ref:`Object` object, :ref:`StringName` method, ... **)** |vararg| -Register a method that will be called when the action is undone. +Register a ``method`` that will be called when the action is undone. ---- @@ -195,7 +195,7 @@ Register a method that will be called when the action is undone. - void **add_undo_property** **(** :ref:`Object` object, :ref:`StringName` property, :ref:`Variant` value **)** -Register a property value change for "undo". +Register a ``property`` that would change its value to ``value`` when the action is undone. ---- @@ -213,7 +213,7 @@ Register a reference for "undo" that will be erased if the "undo" history is los Clear the undo/redo history and associated references. -Passing ``false`` to ``increase_version`` will prevent the version number to be increased from this. +Passing ``false`` to ``increase_version`` will prevent the version number from increasing when the history is cleared. ---- @@ -221,7 +221,7 @@ Passing ``false`` to ``increase_version`` will prevent the version number to be - void **commit_action** **(** :ref:`bool` execute=true **)** -Commit the action. If ``execute`` is true (default), all "do" methods/properties are called/set when this function is called. +Commit the action. If ``execute`` is ``true`` (which it is by default), all "do" methods/properties are called/set when this function is called. ---- @@ -231,7 +231,7 @@ Commit the action. If ``execute`` is true (default), all "do" methods/properties Create a new action. After this is called, do all your calls to :ref:`add_do_method`, :ref:`add_undo_method`, :ref:`add_do_property`, and :ref:`add_undo_property`, then commit the action with :ref:`commit_action`. -The way actions are merged is dictated by the ``merge_mode`` argument. See :ref:`MergeMode` for details. +The way actions are merged is dictated by ``merge_mode``. See :ref:`MergeMode` for details. ---- diff --git a/classes/class_upnp.rst b/classes/class_upnp.rst index 140c01794..6ef69005f 100644 --- a/classes/class_upnp.rst +++ b/classes/class_upnp.rst @@ -12,21 +12,20 @@ UPNP **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -UPNP network functions. +Universal Plug and Play (UPnP) functions for network device discovery, querying and port forwarding. Description ----------- -Provides UPNP functionality to discover :ref:`UPNPDevice`\ s on the local network and execute commands on them, like managing port mappings (port forwarding) and querying the local and remote network IP address. Note that methods on this class are synchronous and block the calling thread. +This class can be used to discover compatible :ref:`UPNPDevice`\ s on the local network and execute commands on them, like managing port mappings (for port forwarding/NAT traversal) and querying the local and remote network IP address. Note that methods on this class are synchronous and block the calling thread. -To forward a specific port: +To forward a specific port (here ``7777``, note both :ref:`discover` and :ref:`add_port_mapping` can return errors that should be checked): :: - const PORT = 7777 var upnp = UPNP.new() - upnp.discover(2000, 2, "InternetGatewayDevice") - upnp.add_port_mapping(port) + upnp.discover() + upnp.add_port_mapping(7777) To close a specific port (e.g. after you have finished using it): @@ -41,7 +40,7 @@ To close a specific port (e.g. after you have finished using it): # Emitted when UPnP port mapping setup is completed (regardless of success or failure). signal upnp_completed(error) - # Replace this with your own server port number between 1025 and 65535. + # Replace this with your own server port number between 1024 and 65535. const SERVER_PORT = 3928 var thread = null @@ -68,6 +67,22 @@ To close a specific port (e.g. after you have finished using it): # Wait for thread finish here to handle game exit while the thread is running. thread.wait_to_finish() +\ **Terminology:** In the context of UPnP networking, "gateway" (or "internet gateway device", short IGD) refers to network devices that allow computers in the local network to access the internet ("wide area network", WAN). These gateways are often also called "routers". + +\ **Pitfalls:**\ + +- As explained above, these calls are blocking and shouldn't be run on the main thread, especially as they can block for multiple seconds at a time. Use threading! + +- Networking is physical and messy. Packets get lost in transit or get filtered, addresses, free ports and assigned mappings change, and devices may leave or join the network at any time. Be mindful of this, be diligent when checking and handling errors, and handle these gracefully if you can: add clear error UI, timeouts and re-try handling. + +- Port mappings may change (and be removed) at any time, and the remote/external IP address of the gateway can change likewise. You should consider re-querying the external IP and try to update/refresh the port mapping periodically (for example, every 5 minutes and on networking failures). + +- Not all devices support UPnP, and some users disable UPnP support. You need to handle this (e.g. documenting and requiring the user to manually forward ports, or adding alternative methods of NAT traversal, like a relay/mirror server, or NAT hole punching, STUN/TURN, etc.). + +- Consider what happens on mapping conflicts. Maybe multiple users on the same network would like to play your game at the same time, or maybe another application uses the same port. Make the port configurable, and optimally choose a port automatically (re-trying with a different port on failure). + +\ **Further reading:** If you want to know more about UPnP (and the Internet Gateway Device (IGD) and Port Control Protocol (PCP) specifically), `Wikipedia `__ is a good first stop, the specification can be found at the `Open Connectivity Foundation `__ and Godot's implementation is based on the `MiniUPnP client `__. + Properties ---------- @@ -293,11 +308,15 @@ Adds the given :ref:`UPNPDevice` to the list of discovered dev - :ref:`int` **add_port_mapping** **(** :ref:`int` port, :ref:`int` port_internal=0, :ref:`String` desc="", :ref:`String` proto="UDP", :ref:`int` duration=0 **)** |const| -Adds a mapping to forward the external ``port`` (between 1 and 65535) on the default gateway (see :ref:`get_gateway`) to the ``internal_port`` on the local machine for the given protocol ``proto`` (either ``TCP`` or ``UDP``, with UDP being the default). If a port mapping for the given port and protocol combination already exists on that gateway device, this method tries to overwrite it. If that is not desired, you can retrieve the gateway manually with :ref:`get_gateway` and call :ref:`add_port_mapping` on it, if any. +Adds a mapping to forward the external ``port`` (between 1 and 65535, although recommended to use port 1024 or above) on the default gateway (see :ref:`get_gateway`) to the ``internal_port`` on the local machine for the given protocol ``proto`` (either ``TCP`` or ``UDP``, with UDP being the default). If a port mapping for the given port and protocol combination already exists on that gateway device, this method tries to overwrite it. If that is not desired, you can retrieve the gateway manually with :ref:`get_gateway` and call :ref:`add_port_mapping` on it, if any. Note that forwarding a well-known port (below 1024) with UPnP may fail depending on the device. + +Depending on the gateway device, if a mapping for that port already exists, it will either be updated or it will refuse this command due to that conflict, especially if the existing mapping for that port wasn't created via UPnP or points to a different network address (or device) than this one. If ``internal_port`` is ``0`` (the default), the same port number is used for both the external and the internal port (the ``port`` value). -The description (``desc``) is shown in some router UIs and can be used to point out which application added the mapping. The mapping's lease duration can be limited by specifying a ``duration`` (in seconds). However, some routers are incompatible with one or both of these, so use with caution and add fallback logic in case of errors to retry without them if in doubt. +The description (``desc``) is shown in some routers management UIs and can be used to point out which application added the mapping. + +The mapping's lease ``duration`` can be limited by specifying a duration in seconds. The default of ``0`` means no duration, i.e. a permanent lease and notably some devices only support these permanent leases. Note that whether permanent or not, this is only a request and the gateway may still decide at any point to remove the mapping (which usually happens on a reboot of the gateway, when its external IP address changes, or on some models when it detects a port mapping has become inactive, i.e. had no traffic for multiple minutes). If not ``0`` (permanent), the allowed range according to spec is between ``120`` (2 minutes) and ``86400`` seconds (24 hours). See :ref:`UPNPResult` for possible return values. @@ -315,7 +334,7 @@ Clears the list of discovered devices. - :ref:`int` **delete_port_mapping** **(** :ref:`int` port, :ref:`String` proto="UDP" **)** |const| -Deletes the port mapping for the given port and protocol combination on the default gateway (see :ref:`get_gateway`) if one exists. ``port`` must be a valid port between 1 and 65535, ``proto`` can be either ``TCP`` or ``UDP``. See :ref:`UPNPResult` for possible return values. +Deletes the port mapping for the given port and protocol combination on the default gateway (see :ref:`get_gateway`) if one exists. ``port`` must be a valid port between 1 and 65535, ``proto`` can be either ``TCP`` or ``UDP``. May be refused for mappings pointing to addresses other than this one, for well-known ports (below 1024), or for mappings not added via UPnP. See :ref:`UPNPResult` for possible return values. ---- diff --git a/classes/class_upnpdevice.rst b/classes/class_upnpdevice.rst index 5f4626f5e..fb6cbdec8 100644 --- a/classes/class_upnpdevice.rst +++ b/classes/class_upnpdevice.rst @@ -12,12 +12,12 @@ UPNPDevice **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -UPNP device. +Universal Plug and Play (UPnP) device. Description ----------- -UPNP device. See :ref:`UPNP` for UPNP discovery and utility functions. Provides low-level access to UPNP control commands. Allows to manage port mappings (port forwarding) and to query network information of the device (like local and external IP address and status). Note that methods on this class are synchronous and block the calling thread. +Universal Plug and Play (UPnP) device. See :ref:`UPNP` for UPnP discovery and utility functions. Provides low-level access to UPNP control commands. Allows to manage port mappings (port forwarding) and to query network information of the device (like local and external IP address and status). Note that methods on this class are synchronous and block the calling thread. Properties ---------- diff --git a/classes/class_variant.rst b/classes/class_variant.rst index 987f200b4..92c84abb2 100644 --- a/classes/class_variant.rst +++ b/classes/class_variant.rst @@ -42,8 +42,6 @@ Godot tracks all scripting API variables within Variants. Without even realizing - GDScript automatically wrap values in them. It keeps all data in plain Variants by default and then optionally enforces custom static typing rules on variable types. -- VisualScript tracks properties inside Variants as well, but it also uses static typing. The GUI interface enforces that properties have a particular type that doesn't change over time. - - C# is statically typed, but uses the Mono ``object`` type in place of Godot's Variant class when it needs to represent a dynamic value. ``object`` is the Mono runtime's equivalent of the same concept. The global :ref:`@GlobalScope.typeof` function returns the enumerated value of the Variant type stored in the current variable (see :ref:`Variant.Type`). diff --git a/classes/class_vector2.rst b/classes/class_vector2.rst index 9b58963e4..e78b80430 100644 --- a/classes/class_vector2.rst +++ b/classes/class_vector2.rst @@ -61,83 +61,85 @@ Constructors Methods ------- -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`abs` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`angle` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`angle_to` **(** :ref:`Vector2` to **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`angle_to_point` **(** :ref:`Vector2` to **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`aspect` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`bezier_interpolate` **(** :ref:`Vector2` control_1, :ref:`Vector2` control_2, :ref:`Vector2` end, :ref:`float` t **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`bounce` **(** :ref:`Vector2` n **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`ceil` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`clamp` **(** :ref:`Vector2` min, :ref:`Vector2` max **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`cross` **(** :ref:`Vector2` with **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`cubic_interpolate` **(** :ref:`Vector2` b, :ref:`Vector2` pre_a, :ref:`Vector2` post_b, :ref:`float` weight **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`direction_to` **(** :ref:`Vector2` to **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`distance_squared_to` **(** :ref:`Vector2` to **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`distance_to` **(** :ref:`Vector2` to **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`dot` **(** :ref:`Vector2` with **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`floor` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`from_angle` **(** :ref:`float` angle **)** |static| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Vector2` to **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_normalized` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`length` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`length_squared` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`lerp` **(** :ref:`Vector2` to, :ref:`float` weight **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`limit_length` **(** :ref:`float` length=1.0 **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`max_axis_index` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`min_axis_index` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`move_toward` **(** :ref:`Vector2` to, :ref:`float` delta **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`normalized` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`orthogonal` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`posmod` **(** :ref:`float` mod **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`posmodv` **(** :ref:`Vector2` modv **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`project` **(** :ref:`Vector2` b **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`reflect` **(** :ref:`Vector2` n **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`rotated` **(** :ref:`float` angle **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`round` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`sign` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`slerp` **(** :ref:`Vector2` to, :ref:`float` weight **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`slide` **(** :ref:`Vector2` n **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`snapped` **(** :ref:`Vector2` step **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`abs` **(** **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`angle` **(** **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`angle_to` **(** :ref:`Vector2` to **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`angle_to_point` **(** :ref:`Vector2` to **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`aspect` **(** **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`bezier_interpolate` **(** :ref:`Vector2` control_1, :ref:`Vector2` control_2, :ref:`Vector2` end, :ref:`float` t **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`bounce` **(** :ref:`Vector2` n **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`ceil` **(** **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`clamp` **(** :ref:`Vector2` min, :ref:`Vector2` max **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`cross` **(** :ref:`Vector2` with **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`cubic_interpolate` **(** :ref:`Vector2` b, :ref:`Vector2` pre_a, :ref:`Vector2` post_b, :ref:`float` weight **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`cubic_interpolate_in_time` **(** :ref:`Vector2` b, :ref:`Vector2` pre_a, :ref:`Vector2` post_b, :ref:`float` weight, :ref:`float` b_t, :ref:`float` pre_a_t, :ref:`float` post_b_t **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`direction_to` **(** :ref:`Vector2` to **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`distance_squared_to` **(** :ref:`Vector2` to **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`distance_to` **(** :ref:`Vector2` to **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`dot` **(** :ref:`Vector2` with **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`floor` **(** **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`from_angle` **(** :ref:`float` angle **)** |static| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Vector2` to **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_normalized` **(** **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`length` **(** **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`length_squared` **(** **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`lerp` **(** :ref:`Vector2` to, :ref:`float` weight **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`limit_length` **(** :ref:`float` length=1.0 **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`max_axis_index` **(** **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`min_axis_index` **(** **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`move_toward` **(** :ref:`Vector2` to, :ref:`float` delta **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`normalized` **(** **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`orthogonal` **(** **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`posmod` **(** :ref:`float` mod **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`posmodv` **(** :ref:`Vector2` modv **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`project` **(** :ref:`Vector2` b **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`reflect` **(** :ref:`Vector2` n **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`rotated` **(** :ref:`float` angle **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`round` **(** **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`sign` **(** **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`slerp` **(** :ref:`Vector2` to, :ref:`float` weight **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`slide` **(** :ref:`Vector2` n **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`snapped` **(** :ref:`Vector2` step **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Operators --------- @@ -163,9 +165,9 @@ Operators +-------------------------------+---------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`operator /` **(** :ref:`int` right **)** | +-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator <` **(** :ref:`Vector2` right **)** | +| :ref:`bool` | :ref:`operator \<` **(** :ref:`Vector2` right **)** | +-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator <=` **(** :ref:`Vector2` right **)** | +| :ref:`bool` | :ref:`operator \<=` **(** :ref:`Vector2` right **)** | +-------------------------------+---------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`Vector2` right **)** | +-------------------------------+---------------------------------------------------------------------------------------------------------------+ @@ -378,6 +380,16 @@ Cubically interpolates between this vector and ``b`` using ``pre_a`` and ``post_ ---- +.. _class_Vector2_method_cubic_interpolate_in_time: + +- :ref:`Vector2` **cubic_interpolate_in_time** **(** :ref:`Vector2` b, :ref:`Vector2` pre_a, :ref:`Vector2` post_b, :ref:`float` weight, :ref:`float` b_t, :ref:`float` pre_a_t, :ref:`float` post_b_t **)** |const| + +Cubically interpolates between this vector and ``b`` using ``pre_a`` and ``post_b`` as handles, and returns the result at position ``weight``. ``weight`` is on the range of 0.0 to 1.0, representing the amount of interpolation. + +It can perform smoother interpolation than ``cubic_interpolate()`` by the time values. + +---- + .. _class_Vector2_method_direction_to: - :ref:`Vector2` **direction_to** **(** :ref:`Vector2` to **)** |const| @@ -566,7 +578,7 @@ Returns the vector reflected (i.e. mirrored, or symmetric) over a line defined b - :ref:`Vector2` **rotated** **(** :ref:`float` angle **)** |const| -Returns the vector rotated by ``angle`` (in radians). See also :ref:`@GlobalScope.deg2rad`. +Returns the vector rotated by ``angle`` (in radians). See also :ref:`@GlobalScope.deg_to_rad`. ---- @@ -747,7 +759,7 @@ Compares two ``Vector2`` vectors by first checking if the X value of the left ve - :ref:`float` **operator []** **(** :ref:`int` index **)** -Access vector components using their index. ``v[0]`` is equivalent to ``v.x``, and ``v[1]`` is equivalent to ``v.y``. +Access vector components using their ``index``. ``v[0]`` is equivalent to ``v.x``, and ``v[1]`` is equivalent to ``v.y``. ---- diff --git a/classes/class_vector2i.rst b/classes/class_vector2i.rst index 2e0f23e2c..fb39eef59 100644 --- a/classes/class_vector2i.rst +++ b/classes/class_vector2i.rst @@ -99,9 +99,9 @@ Operators +---------------------------------+-----------------------------------------------------------------------------------------------------------+ | :ref:`Vector2i` | :ref:`operator /` **(** :ref:`int` right **)** | +---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator <` **(** :ref:`Vector2i` right **)** | +| :ref:`bool` | :ref:`operator \<` **(** :ref:`Vector2i` right **)** | +---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator <=` **(** :ref:`Vector2i` right **)** | +| :ref:`bool` | :ref:`operator \<=` **(** :ref:`Vector2i` right **)** | +---------------------------------+-----------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`Vector2i` right **)** | +---------------------------------+-----------------------------------------------------------------------------------------------------------+ @@ -427,7 +427,7 @@ Compares two ``Vector2i`` vectors by first checking if the X value of the left v - :ref:`int` **operator []** **(** :ref:`int` index **)** -Access vector components using their index. ``v[0]`` is equivalent to ``v.x``, and ``v[1]`` is equivalent to ``v.y``. +Access vector components using their ``index``. ``v[0]`` is equivalent to ``v.x``, and ``v[1]`` is equivalent to ``v.y``. ---- diff --git a/classes/class_vector3.rst b/classes/class_vector3.rst index 57597a430..2d339bac0 100644 --- a/classes/class_vector3.rst +++ b/classes/class_vector3.rst @@ -63,83 +63,85 @@ Constructors Methods ------- -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`abs` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`angle_to` **(** :ref:`Vector3` to **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`bezier_interpolate` **(** :ref:`Vector3` control_1, :ref:`Vector3` control_2, :ref:`Vector3` end, :ref:`float` t **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`bounce` **(** :ref:`Vector3` n **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`ceil` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`clamp` **(** :ref:`Vector3` min, :ref:`Vector3` max **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`cross` **(** :ref:`Vector3` with **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`cubic_interpolate` **(** :ref:`Vector3` b, :ref:`Vector3` pre_a, :ref:`Vector3` post_b, :ref:`float` weight **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`direction_to` **(** :ref:`Vector3` to **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`distance_squared_to` **(** :ref:`Vector3` to **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`distance_to` **(** :ref:`Vector3` to **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`dot` **(** :ref:`Vector3` with **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`floor` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`inverse` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Vector3` to **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_normalized` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`length` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`length_squared` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`lerp` **(** :ref:`Vector3` to, :ref:`float` weight **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`limit_length` **(** :ref:`float` length=1.0 **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`max_axis_index` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`min_axis_index` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`move_toward` **(** :ref:`Vector3` to, :ref:`float` delta **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`normalized` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`octahedron_decode` **(** :ref:`Vector2` uv **)** |static| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`octahedron_encode` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Basis` | :ref:`outer` **(** :ref:`Vector3` with **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`posmod` **(** :ref:`float` mod **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`posmodv` **(** :ref:`Vector3` modv **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`project` **(** :ref:`Vector3` b **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`reflect` **(** :ref:`Vector3` n **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`rotated` **(** :ref:`Vector3` axis, :ref:`float` angle **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`round` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`sign` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`signed_angle_to` **(** :ref:`Vector3` to, :ref:`Vector3` axis **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`slerp` **(** :ref:`Vector3` to, :ref:`float` weight **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`slide` **(** :ref:`Vector3` n **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`snapped` **(** :ref:`Vector3` step **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`abs` **(** **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`angle_to` **(** :ref:`Vector3` to **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`bezier_interpolate` **(** :ref:`Vector3` control_1, :ref:`Vector3` control_2, :ref:`Vector3` end, :ref:`float` t **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`bounce` **(** :ref:`Vector3` n **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`ceil` **(** **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`clamp` **(** :ref:`Vector3` min, :ref:`Vector3` max **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`cross` **(** :ref:`Vector3` with **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`cubic_interpolate` **(** :ref:`Vector3` b, :ref:`Vector3` pre_a, :ref:`Vector3` post_b, :ref:`float` weight **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`cubic_interpolate_in_time` **(** :ref:`Vector3` b, :ref:`Vector3` pre_a, :ref:`Vector3` post_b, :ref:`float` weight, :ref:`float` b_t, :ref:`float` pre_a_t, :ref:`float` post_b_t **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`direction_to` **(** :ref:`Vector3` to **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`distance_squared_to` **(** :ref:`Vector3` to **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`distance_to` **(** :ref:`Vector3` to **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`dot` **(** :ref:`Vector3` with **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`floor` **(** **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`inverse` **(** **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Vector3` to **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_normalized` **(** **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`length` **(** **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`length_squared` **(** **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`lerp` **(** :ref:`Vector3` to, :ref:`float` weight **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`limit_length` **(** :ref:`float` length=1.0 **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`max_axis_index` **(** **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`min_axis_index` **(** **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`move_toward` **(** :ref:`Vector3` to, :ref:`float` delta **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`normalized` **(** **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`octahedron_decode` **(** :ref:`Vector2` uv **)** |static| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`octahedron_encode` **(** **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Basis` | :ref:`outer` **(** :ref:`Vector3` with **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`posmod` **(** :ref:`float` mod **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`posmodv` **(** :ref:`Vector3` modv **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`project` **(** :ref:`Vector3` b **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`reflect` **(** :ref:`Vector3` n **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`rotated` **(** :ref:`Vector3` axis, :ref:`float` angle **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`round` **(** **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`sign` **(** **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`signed_angle_to` **(** :ref:`Vector3` to, :ref:`Vector3` axis **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`slerp` **(** :ref:`Vector3` to, :ref:`float` weight **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`slide` **(** :ref:`Vector3` n **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`snapped` **(** :ref:`Vector3` step **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Operators --------- @@ -169,9 +171,9 @@ Operators +-------------------------------+---------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`operator /` **(** :ref:`int` right **)** | +-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator <` **(** :ref:`Vector3` right **)** | +| :ref:`bool` | :ref:`operator \<` **(** :ref:`Vector3` right **)** | +-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator <=` **(** :ref:`Vector3` right **)** | +| :ref:`bool` | :ref:`operator \<=` **(** :ref:`Vector3` right **)** | +-------------------------------+---------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`Vector3` right **)** | +-------------------------------+---------------------------------------------------------------------------------------------------------------+ @@ -368,6 +370,16 @@ Performs a cubic interpolation between this vector and ``b`` using ``pre_a`` and ---- +.. _class_Vector3_method_cubic_interpolate_in_time: + +- :ref:`Vector3` **cubic_interpolate_in_time** **(** :ref:`Vector3` b, :ref:`Vector3` pre_a, :ref:`Vector3` post_b, :ref:`float` weight, :ref:`float` b_t, :ref:`float` pre_a_t, :ref:`float` post_b_t **)** |const| + +Performs a cubic interpolation between this vector and ``b`` using ``pre_a`` and ``post_b`` as handles, and returns the result at position ``weight``. ``weight`` is on the range of 0.0 to 1.0, representing the amount of interpolation. + +It can perform smoother interpolation than ``cubic_interpolate()`` by the time values. + +---- + .. _class_Vector3_method_direction_to: - :ref:`Vector3` **direction_to** **(** :ref:`Vector3` to **)** |const| @@ -428,7 +440,7 @@ Returns the inverse of the vector. This is the same as ``Vector3(1.0 / v.x, 1.0 - :ref:`bool` **is_equal_approx** **(** :ref:`Vector3` to **)** |const| -Returns ``true`` if this vector and ``v`` are approximately equal, by running :ref:`@GlobalScope.is_equal_approx` on each component. +Returns ``true`` if this vector and ``to`` are approximately equal, by running :ref:`@GlobalScope.is_equal_approx` on each component. ---- @@ -763,7 +775,7 @@ Compares two ``Vector3`` vectors by first checking if the X value of the left ve - :ref:`float` **operator []** **(** :ref:`int` index **)** -Access vector components using their index. ``v[0]`` is equivalent to ``v.x``, ``v[1]`` is equivalent to ``v.y``, and ``v[2]`` is equivalent to ``v.z``. +Access vector components using their ``index``. ``v[0]`` is equivalent to ``v.x``, ``v[1]`` is equivalent to ``v.y``, and ``v[2]`` is equivalent to ``v.z``. ---- diff --git a/classes/class_vector3i.rst b/classes/class_vector3i.rst index 25ea91483..4a1a7019e 100644 --- a/classes/class_vector3i.rst +++ b/classes/class_vector3i.rst @@ -99,9 +99,9 @@ Operators +---------------------------------+-----------------------------------------------------------------------------------------------------------+ | :ref:`Vector3i` | :ref:`operator /` **(** :ref:`int` right **)** | +---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator <` **(** :ref:`Vector3i` right **)** | +| :ref:`bool` | :ref:`operator \<` **(** :ref:`Vector3i` right **)** | +---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator <=` **(** :ref:`Vector3i` right **)** | +| :ref:`bool` | :ref:`operator \<=` **(** :ref:`Vector3i` right **)** | +---------------------------------+-----------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`Vector3i` right **)** | +---------------------------------+-----------------------------------------------------------------------------------------------------------+ @@ -443,7 +443,7 @@ Compares two ``Vector3i`` vectors by first checking if the X value of the left v - :ref:`int` **operator []** **(** :ref:`int` index **)** -Access vector components using their index. ``v[0]`` is equivalent to ``v.x``, ``v[1]`` is equivalent to ``v.y``, and ``v[2]`` is equivalent to ``v.z``. +Access vector components using their ``index``. ``v[0]`` is equivalent to ``v.x``, ``v[1]`` is equivalent to ``v.y``, and ``v[2]`` is equivalent to ``v.z``. ---- diff --git a/classes/class_vector4.rst b/classes/class_vector4.rst index d917ed528..8e2ffce39 100644 --- a/classes/class_vector4.rst +++ b/classes/class_vector4.rst @@ -50,39 +50,55 @@ Constructors Methods ------- -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`abs` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`ceil` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`clamp` **(** :ref:`Vector4` min, :ref:`Vector4` max **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`dot` **(** :ref:`Vector4` with **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`floor` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`inverse` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Vector4` with **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_normalized` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`length` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`length_squared` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`lerp` **(** :ref:`Vector4` to, :ref:`float` weight **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`max_axis_index` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`min_axis_index` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`normalized` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`round` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`sign` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector4` | :ref:`abs` **(** **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector4` | :ref:`ceil` **(** **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector4` | :ref:`clamp` **(** :ref:`Vector4` min, :ref:`Vector4` max **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector4` | :ref:`cubic_interpolate` **(** :ref:`Vector4` b, :ref:`Vector4` pre_a, :ref:`Vector4` post_b, :ref:`float` weight **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector4` | :ref:`cubic_interpolate_in_time` **(** :ref:`Vector4` b, :ref:`Vector4` pre_a, :ref:`Vector4` post_b, :ref:`float` weight, :ref:`float` b_t, :ref:`float` pre_a_t, :ref:`float` post_b_t **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector4` | :ref:`direction_to` **(** :ref:`Vector4` to **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`distance_squared_to` **(** :ref:`Vector4` to **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`distance_to` **(** :ref:`Vector4` to **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`dot` **(** :ref:`Vector4` with **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector4` | :ref:`floor` **(** **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector4` | :ref:`inverse` **(** **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Vector4` with **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_normalized` **(** **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`length` **(** **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`length_squared` **(** **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector4` | :ref:`lerp` **(** :ref:`Vector4` to, :ref:`float` weight **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`max_axis_index` **(** **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`min_axis_index` **(** **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector4` | :ref:`normalized` **(** **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector4` | :ref:`posmod` **(** :ref:`float` mod **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector4` | :ref:`posmodv` **(** :ref:`Vector4` modv **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector4` | :ref:`round` **(** **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector4` | :ref:`sign` **(** **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector4` | :ref:`snapped` **(** :ref:`Vector4` step **)** |const| | ++-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Operators --------- @@ -108,9 +124,9 @@ Operators +-------------------------------+-------------------------------------------------------------------------------------------------------------+ | :ref:`Vector4` | :ref:`operator /` **(** :ref:`int` right **)** | +-------------------------------+-------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator <` **(** :ref:`Vector4` right **)** | +| :ref:`bool` | :ref:`operator \<` **(** :ref:`Vector4` right **)** | +-------------------------------+-------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator <=` **(** :ref:`Vector4` right **)** | +| :ref:`bool` | :ref:`operator \<=` **(** :ref:`Vector4` right **)** | +-------------------------------+-------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`Vector4` right **)** | +-------------------------------+-------------------------------------------------------------------------------------------------------------+ @@ -150,11 +166,11 @@ Constants - **AXIS_W** = **3** --- Enumerated value for the W axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. -- **ZERO** = **Vector4(0, 0, 0)** --- Zero vector, a vector with all components set to ``0``. +- **ZERO** = **Vector4(0, 0, 0, 0)** --- Zero vector, a vector with all components set to ``0``. -- **ONE** = **Vector4(1, 1, 1)** --- One vector, a vector with all components set to ``1``. +- **ONE** = **Vector4(1, 1, 1, 1)** --- One vector, a vector with all components set to ``1``. -- **INF** = **Vector4(inf, inf, inf)** --- Infinity vector, a vector with all components set to :ref:`@GDScript.INF`. +- **INF** = **Vector4(inf, inf, inf, inf)** --- Infinity vector, a vector with all components set to :ref:`@GDScript.INF`. Property Descriptions --------------------- @@ -259,6 +275,50 @@ Returns a new vector with all components clamped between the components of ``min ---- +.. _class_Vector4_method_cubic_interpolate: + +- :ref:`Vector4` **cubic_interpolate** **(** :ref:`Vector4` b, :ref:`Vector4` pre_a, :ref:`Vector4` post_b, :ref:`float` weight **)** |const| + +Performs a cubic interpolation between this vector and ``b`` using ``pre_a`` and ``post_b`` as handles, and returns the result at position ``weight``. ``weight`` is on the range of 0.0 to 1.0, representing the amount of interpolation. + +---- + +.. _class_Vector4_method_cubic_interpolate_in_time: + +- :ref:`Vector4` **cubic_interpolate_in_time** **(** :ref:`Vector4` b, :ref:`Vector4` pre_a, :ref:`Vector4` post_b, :ref:`float` weight, :ref:`float` b_t, :ref:`float` pre_a_t, :ref:`float` post_b_t **)** |const| + +Performs a cubic interpolation between this vector and ``b`` using ``pre_a`` and ``post_b`` as handles, and returns the result at position ``weight``. ``weight`` is on the range of 0.0 to 1.0, representing the amount of interpolation. + +It can perform smoother interpolation than ``cubic_interpolate()`` by the time values. + +---- + +.. _class_Vector4_method_direction_to: + +- :ref:`Vector4` **direction_to** **(** :ref:`Vector4` to **)** |const| + +Returns the normalized vector pointing from this vector to ``to``. This is equivalent to using ``(b - a).normalized()``. + +---- + +.. _class_Vector4_method_distance_squared_to: + +- :ref:`float` **distance_squared_to** **(** :ref:`Vector4` to **)** |const| + +Returns the squared distance between this vector and ``to``. + +This method runs faster than :ref:`distance_to`, so prefer it if you need to compare vectors or need the squared distance for some formula. + +---- + +.. _class_Vector4_method_distance_to: + +- :ref:`float` **distance_to** **(** :ref:`Vector4` to **)** |const| + +Returns the distance between this vector and ``to``. + +---- + .. _class_Vector4_method_dot: - :ref:`float` **dot** **(** :ref:`Vector4` with **)** |const| @@ -287,7 +347,7 @@ Returns the inverse of the vector. This is the same as ``Vector4(1.0 / v.x, 1.0 - :ref:`bool` **is_equal_approx** **(** :ref:`Vector4` with **)** |const| -Returns ``true`` if this vector and ``v`` are approximately equal, by running :ref:`@GlobalScope.is_equal_approx` on each component. +Returns ``true`` if this vector and ``with`` are approximately equal, by running :ref:`@GlobalScope.is_equal_approx` on each component. ---- @@ -347,6 +407,22 @@ Returns the vector scaled to unit length. Equivalent to ``v / v.length()``. ---- +.. _class_Vector4_method_posmod: + +- :ref:`Vector4` **posmod** **(** :ref:`float` mod **)** |const| + +Returns a vector composed of the :ref:`@GlobalScope.fposmod` of this vector's components and ``mod``. + +---- + +.. _class_Vector4_method_posmodv: + +- :ref:`Vector4` **posmodv** **(** :ref:`Vector4` modv **)** |const| + +Returns a vector composed of the :ref:`@GlobalScope.fposmod` of this vector's components and ``modv``'s components. + +---- + .. _class_Vector4_method_round: - :ref:`Vector4` **round** **(** **)** |const| @@ -361,6 +437,14 @@ Returns a new vector with all components rounded to the nearest integer, with ha Returns a new vector with each component set to one or negative one, depending on the signs of the components, or zero if the component is zero, by calling :ref:`@GlobalScope.sign` on each component. +---- + +.. _class_Vector4_method_snapped: + +- :ref:`Vector4` **snapped** **(** :ref:`Vector4` step **)** |const| + +Returns this vector with each component snapped to the nearest multiple of ``step``. This can also be used to round to an arbitrary number of decimals. + Operator Descriptions --------------------- @@ -498,7 +582,7 @@ Compares two ``Vector4`` vectors by first checking if the X value of the left ve - :ref:`bool` **operator >=** **(** :ref:`Vector4` right **)** -Access vector components using their index. ``v[0]`` is equivalent to ``v.x``, ``v[1]`` is equivalent to ``v.y``, and ``v[2]`` is equivalent to ``v.z``. +Compares two ``Vector4`` vectors by first checking if the X value of the left vector is greater than or equal to the X value of the ``right`` vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, Z values of the two vectors, and then with the W values. This operator is useful for sorting vectors. ---- @@ -506,7 +590,7 @@ Access vector components using their index. ``v[0]`` is equivalent to ``v.x``, ` - :ref:`float` **operator []** **(** :ref:`int` index **)** -Access vector components using their index. ``v[0]`` is equivalent to ``v.x``, ``v[1]`` is equivalent to ``v.y``, ``v[2]`` is equivalent to ``v.z``, and ``v[3]`` is equivalent to ``v.w``. +Access vector components using their ``index``. ``v[0]`` is equivalent to ``v.x``, ``v[1]`` is equivalent to ``v.y``, ``v[2]`` is equivalent to ``v.z``, and ``v[3]`` is equivalent to ``v.w``. ---- diff --git a/classes/class_vector4i.rst b/classes/class_vector4i.rst index baa9284d5..079453b35 100644 --- a/classes/class_vector4i.rst +++ b/classes/class_vector4i.rst @@ -83,9 +83,9 @@ Operators +---------------------------------+-----------------------------------------------------------------------------------------------------------+ | :ref:`Vector4i` | :ref:`operator /` **(** :ref:`int` right **)** | +---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator <` **(** :ref:`Vector4i` right **)** | +| :ref:`bool` | :ref:`operator \<` **(** :ref:`Vector4i` right **)** | +---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator <=` **(** :ref:`Vector4i` right **)** | +| :ref:`bool` | :ref:`operator \<=` **(** :ref:`Vector4i` right **)** | +---------------------------------+-----------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`Vector4i` right **)** | +---------------------------------+-----------------------------------------------------------------------------------------------------------+ @@ -123,9 +123,9 @@ Constants - **AXIS_W** = **3** -- **ZERO** = **Vector4i(0, 0, 0)** +- **ZERO** = **Vector4i(0, 0, 0, 0)** -- **ONE** = **Vector4i(1, 1, 1)** +- **ONE** = **Vector4i(1, 1, 1, 1)** Property Descriptions --------------------- diff --git a/classes/class_vehiclebody3d.rst b/classes/class_vehiclebody3d.rst index 7bc8ea73c..fd0265600 100644 --- a/classes/class_vehiclebody3d.rst +++ b/classes/class_vehiclebody3d.rst @@ -10,7 +10,7 @@ VehicleBody3D ============= -**Inherits:** :ref:`RigidDynamicBody3D` **<** :ref:`PhysicsBody3D` **<** :ref:`CollisionObject3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**Inherits:** :ref:`RigidBody3D` **<** :ref:`PhysicsBody3D` **<** :ref:`CollisionObject3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` Physics body that simulates the behavior of a car. @@ -31,15 +31,15 @@ Tutorials Properties ---------- -+---------------------------+----------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`brake` | ``0.0`` | -+---------------------------+----------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`engine_force` | ``0.0`` | -+---------------------------+----------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`float` | mass | ``40.0`` (overrides :ref:`RigidDynamicBody3D`) | -+---------------------------+----------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`steering` | ``0.0`` | -+---------------------------+----------------------------------------------------------------+----------------------------------------------------------------------------------------+ ++---------------------------+----------------------------------------------------------------+--------------------------------------------------------------------------+ +| :ref:`float` | :ref:`brake` | ``0.0`` | ++---------------------------+----------------------------------------------------------------+--------------------------------------------------------------------------+ +| :ref:`float` | :ref:`engine_force` | ``0.0`` | ++---------------------------+----------------------------------------------------------------+--------------------------------------------------------------------------+ +| :ref:`float` | mass | ``40.0`` (overrides :ref:`RigidBody3D`) | ++---------------------------+----------------------------------------------------------------+--------------------------------------------------------------------------+ +| :ref:`float` | :ref:`steering` | ``0.0`` | ++---------------------------+----------------------------------------------------------------+--------------------------------------------------------------------------+ Property Descriptions --------------------- @@ -56,7 +56,7 @@ Property Descriptions | *Getter* | get_brake() | +-----------+------------------+ -Slows down the vehicle by applying a braking force. The vehicle is only slowed down if the wheels are in contact with a surface. The force you need to apply to adequately slow down your vehicle depends on the :ref:`RigidDynamicBody3D.mass` of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 30 range for hard braking. +Slows down the vehicle by applying a braking force. The vehicle is only slowed down if the wheels are in contact with a surface. The force you need to apply to adequately slow down your vehicle depends on the :ref:`RigidBody3D.mass` of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 30 range for hard braking. ---- @@ -72,7 +72,7 @@ Slows down the vehicle by applying a braking force. The vehicle is only slowed d | *Getter* | get_engine_force() | +-----------+-------------------------+ -Accelerates the vehicle by applying an engine force. The vehicle is only sped up if the wheels that have :ref:`VehicleWheel3D.use_as_traction` set to ``true`` and are in contact with a surface. The :ref:`RigidDynamicBody3D.mass` of the vehicle has an effect on the acceleration of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 range for acceleration. +Accelerates the vehicle by applying an engine force. The vehicle is only sped up if the wheels that have :ref:`VehicleWheel3D.use_as_traction` set to ``true`` and are in contact with a surface. The :ref:`RigidBody3D.mass` of the vehicle has an effect on the acceleration of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 range for acceleration. \ **Note:** The simulation does not take the effect of gears into account, you will need to add logic for this if you wish to simulate gears. diff --git a/classes/class_vehiclewheel3d.rst b/classes/class_vehiclewheel3d.rst index dfcc6f105..8aa87e6d8 100644 --- a/classes/class_vehiclewheel3d.rst +++ b/classes/class_vehiclewheel3d.rst @@ -87,7 +87,7 @@ Property Descriptions | *Getter* | get_brake() | +-----------+------------------+ -Slows down the wheel by applying a braking force. The wheel is only slowed down if it is in contact with a surface. The force you need to apply to adequately slow down your vehicle depends on the :ref:`RigidDynamicBody3D.mass` of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 30 range for hard braking. +Slows down the wheel by applying a braking force. The wheel is only slowed down if it is in contact with a surface. The force you need to apply to adequately slow down your vehicle depends on the :ref:`RigidBody3D.mass` of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 30 range for hard braking. ---- @@ -135,7 +135,7 @@ The damping applied to the spring when relaxing. This value should be between 0. | *Getter* | get_engine_force() | +-----------+-------------------------+ -Accelerates the wheel by applying an engine force. The wheel is only sped up if it is in contact with a surface. The :ref:`RigidDynamicBody3D.mass` of the vehicle has an effect on the acceleration of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 range for acceleration. +Accelerates the wheel by applying an engine force. The wheel is only sped up if it is in contact with a surface. The :ref:`RigidBody3D.mass` of the vehicle has an effect on the acceleration of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 range for acceleration. \ **Note:** The simulation does not take the effect of gears into account, you will need to add logic for this if you wish to simulate gears. @@ -171,7 +171,7 @@ The steering angle for the wheel, in radians. Setting this to a non-zero value w | *Getter* | get_suspension_max_force() | +-----------+---------------------------------+ -The maximum force the spring can resist. This value should be higher than a quarter of the :ref:`RigidDynamicBody3D.mass` of the :ref:`VehicleBody3D` or the spring will not carry the weight of the vehicle. Good results are often obtained by a value that is about 3× to 4× this number. +The maximum force the spring can resist. This value should be higher than a quarter of the :ref:`RigidBody3D.mass` of the :ref:`VehicleBody3D` or the spring will not carry the weight of the vehicle. Good results are often obtained by a value that is about 3× to 4× this number. ---- diff --git a/classes/class_velocitytracker3d.rst b/classes/class_velocitytracker3d.rst deleted file mode 100644 index bce081000..000000000 --- a/classes/class_velocitytracker3d.rst +++ /dev/null @@ -1,74 +0,0 @@ -: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/VelocityTracker3D.xml. - -.. _class_VelocityTracker3D: - -VelocityTracker3D -================= - -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` - - - -Properties ----------- - -+-------------------------+--------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`track_physics_step` | ``false`` | -+-------------------------+--------------------------------------------------------------------------------+-----------+ - -Methods -------- - -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_tracked_linear_velocity` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reset` **(** :ref:`Vector3` position **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`update_position` **(** :ref:`Vector3` position **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------+ - -Property Descriptions ---------------------- - -.. _class_VelocityTracker3D_property_track_physics_step: - -- :ref:`bool` **track_physics_step** - -+-----------+-------------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------------+ -| *Setter* | set_track_physics_step(value) | -+-----------+-------------------------------+ -| *Getter* | is_tracking_physics_step() | -+-----------+-------------------------------+ - -Method Descriptions -------------------- - -.. _class_VelocityTracker3D_method_get_tracked_linear_velocity: - -- :ref:`Vector3` **get_tracked_linear_velocity** **(** **)** |const| - ----- - -.. _class_VelocityTracker3D_method_reset: - -- void **reset** **(** :ref:`Vector3` position **)** - ----- - -.. _class_VelocityTracker3D_method_update_position: - -- void **update_position** **(** :ref:`Vector3` position **)** - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_videostreamplayer.rst b/classes/class_videostreamplayer.rst index eafbc7a93..899ad5aff 100644 --- a/classes/class_videostreamplayer.rst +++ b/classes/class_videostreamplayer.rst @@ -23,7 +23,7 @@ Supported video formats are `Ogg Theora `__ (``.ogv``, \ **Note:** Due to a bug, VideoStreamPlayer does not support localization remapping yet. -\ **Warning:** On HTML5, video playback *will* perform poorly due to missing architecture-specific assembly optimizations. +\ **Warning:** On Web, video playback *will* perform poorly due to missing architecture-specific assembly optimizations. Properties ---------- diff --git a/classes/class_viewport.rst b/classes/class_viewport.rst index 0f4935536..6c2b56709 100644 --- a/classes/class_viewport.rst +++ b/classes/class_viewport.rst @@ -66,8 +66,6 @@ Properties +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`disable_3d` | ``false`` | +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`fsr_mipmap_bias` | ``0.0`` | -+-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ | :ref:`float` | :ref:`fsr_sharpness` | ``0.2`` | +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ | :ref:`Transform2D` | :ref:`global_canvas_transform` | | @@ -82,7 +80,9 @@ Properties +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ | :ref:`float` | :ref:`mesh_lod_threshold` | ``1.0`` | +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`MSAA` | :ref:`msaa` | ``0`` | +| :ref:`MSAA` | :ref:`msaa_2d` | ``0`` | ++-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ +| :ref:`MSAA` | :ref:`msaa_3d` | ``0`` | +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`own_world_3d` | ``false`` | +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ @@ -114,6 +114,8 @@ Properties +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`snap_2d_vertices_to_pixel` | ``false`` | +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ +| :ref:`float` | :ref:`texture_mipmap_bias` | ``0.0`` | ++-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`transparent_bg` | ``false`` | +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`use_debanding` | ``false`` | @@ -683,24 +685,6 @@ Disable 3D rendering (but keep 2D rendering). ---- -.. _class_Viewport_property_fsr_mipmap_bias: - -- :ref:`float` **fsr_mipmap_bias** - -+-----------+----------------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------------+ -| *Setter* | set_fsr_mipmap_bias(value) | -+-----------+----------------------------+ -| *Getter* | get_fsr_mipmap_bias() | -+-----------+----------------------------+ - -Affects the final texture sharpness by reading from a lower or higher mipmap when using FSR. Mipmap bias does nothing when FSR is not being used. Negative values make textures sharper, while positive values make textures blurrier. This value is used to adjust the mipmap bias calculated internally which is based on the selected quality. The formula for this is ``-log2(1.0 / scale) + mipmap_bias``. This updates the rendering server's mipmap bias when called - -To control this property on the root viewport, set the :ref:`ProjectSettings.rendering/scaling_3d/fsr_mipmap_bias` project setting. - ----- - .. _class_Viewport_property_fsr_sharpness: - :ref:`float` **fsr_sharpness** @@ -815,19 +799,35 @@ To control this property on the root viewport, set the :ref:`ProjectSettings.ren ---- -.. _class_Viewport_property_msaa: +.. _class_Viewport_property_msaa_2d: -- :ref:`MSAA` **msaa** +- :ref:`MSAA` **msaa_2d** -+-----------+-----------------+ -| *Default* | ``0`` | -+-----------+-----------------+ -| *Setter* | set_msaa(value) | -+-----------+-----------------+ -| *Getter* | get_msaa() | -+-----------+-----------------+ ++-----------+--------------------+ +| *Default* | ``0`` | ++-----------+--------------------+ +| *Setter* | set_msaa_2d(value) | ++-----------+--------------------+ +| *Getter* | get_msaa_2d() | ++-----------+--------------------+ -The multisample anti-aliasing mode. A higher number results in smoother edges at the cost of significantly worse performance. A value of 2 or 4 is best unless targeting very high-end systems. See also bilinear scaling 3d :ref:`scaling_3d_mode` for supersampling, which provides higher quality but is much more expensive. +The multisample anti-aliasing mode for 2D/Canvas rendering. A higher number results in smoother edges at the cost of significantly worse performance. A value of 2 or 4 is best unless targeting very high-end systems. This has no effect on shader-induced aliasing or texture aliasing. + +---- + +.. _class_Viewport_property_msaa_3d: + +- :ref:`MSAA` **msaa_3d** + ++-----------+--------------------+ +| *Default* | ``0`` | ++-----------+--------------------+ +| *Setter* | set_msaa_3d(value) | ++-----------+--------------------+ +| *Getter* | get_msaa_3d() | ++-----------+--------------------+ + +The multisample anti-aliasing mode for 3D rendering. A higher number results in smoother edges at the cost of significantly worse performance. A value of 2 or 4 is best unless targeting very high-end systems. See also bilinear scaling 3d :ref:`scaling_3d_mode` for supersampling, which provides higher quality but is much more expensive. This has no effect on shader-induced aliasing or texture aliasing. ---- @@ -989,7 +989,7 @@ To control this property on the root viewport, set the :ref:`ProjectSettings.ren | *Getter* | get_scaling_3d_scale() | +-----------+-----------------------------+ -Scales the 3D render buffer based on the viewport size uses an image filter specified in :ref:`ProjectSettings.rendering/scaling_3d/mode` to scale the output image to the full viewport size. Values lower than ``1.0`` can be used to speed up 3D rendering at the cost of quality (undersampling). Values greater than ``1.0`` are only valid for bilinear mode and can be used to improve 3D rendering quality at a high performance cost (supersampling). See also :ref:`ProjectSettings.rendering/anti_aliasing/quality/msaa` for multi-sample antialiasing, which is significantly cheaper but only smoothens the edges of polygons. +Scales the 3D render buffer based on the viewport size uses an image filter specified in :ref:`ProjectSettings.rendering/scaling_3d/mode` to scale the output image to the full viewport size. Values lower than ``1.0`` can be used to speed up 3D rendering at the cost of quality (undersampling). Values greater than ``1.0`` are only valid for bilinear mode and can be used to improve 3D rendering quality at a high performance cost (supersampling). See also :ref:`ProjectSettings.rendering/anti_aliasing/quality/msaa_3d` for multi-sample antialiasing, which is significantly cheaper but only smooths the edges of polygons. When using FSR upscaling, AMD recommends exposing the following values as preset options to users "Ultra Quality: 0.77", "Quality: 0.67", "Balanced: 0.59", "Performance: 0.5" instead of exposing the entire scale. @@ -1069,6 +1069,28 @@ Sets the screen-space antialiasing method used. Screen-space antialiasing works ---- +.. _class_Viewport_property_texture_mipmap_bias: + +- :ref:`float` **texture_mipmap_bias** + ++-----------+--------------------------------+ +| *Default* | ``0.0`` | ++-----------+--------------------------------+ +| *Setter* | set_texture_mipmap_bias(value) | ++-----------+--------------------------------+ +| *Getter* | get_texture_mipmap_bias() | ++-----------+--------------------------------+ + +Affects the final texture sharpness by reading from a lower or higher mipmap (also called "texture LOD bias"). Negative values make mipmapped textures sharper but grainier when viewed at a distance, while positive values make mipmapped textures blurrier (even when up close). + +Enabling temporal antialiasing (:ref:`use_taa`) will automatically apply a ``-0.5`` offset to this value, while enabling FXAA (:ref:`screen_space_aa`) will automatically apply a ``-0.25`` offset to this value. If both TAA and FXAA are enbled at the same time, an offset of ``-0.75`` is applied to this value. + +\ **Note:** If :ref:`scaling_3d_scale` is lower than ``1.0`` (exclusive), :ref:`texture_mipmap_bias` is used to adjust the automatic mipmap bias which is calculated internally based on the scale factor. The formula for this is ``log2(scaling_3d_scale) + mipmap_bias``. + +To control this property on the root viewport, set the :ref:`ProjectSettings.rendering/textures/default_filters/texture_mipmap_bias` project setting. + +---- + .. _class_Viewport_property_transparent_bg: - :ref:`bool` **transparent_bg** @@ -1362,8 +1384,6 @@ Removes the focus from the currently focused :ref:`Control` withi - void **push_text_input** **(** :ref:`String` text **)** -Returns ``true`` if the viewport is currently embedding windows. - ---- .. _class_Viewport_method_push_unhandled_input: diff --git a/classes/class_visibleonscreenenabler3d.rst b/classes/class_visibleonscreenenabler3d.rst index 0c6046d7c..8df5dcae5 100644 --- a/classes/class_visibleonscreenenabler3d.rst +++ b/classes/class_visibleonscreenenabler3d.rst @@ -17,7 +17,7 @@ Enables certain nodes only when approximately visible. Description ----------- -The VisibleOnScreenEnabler3D will disable :ref:`RigidDynamicBody3D` and :ref:`AnimationPlayer` nodes when they are not visible. It will only affect other nodes within the same scene as the VisibleOnScreenEnabler3D itself. +The VisibleOnScreenEnabler3D will disable :ref:`RigidBody3D` and :ref:`AnimationPlayer` nodes when they are not visible. It will only affect other nodes within the same scene as the VisibleOnScreenEnabler3D itself. If you just want to receive notifications, use :ref:`VisibleOnScreenNotifier3D` instead. diff --git a/classes/class_visualscript.rst b/classes/class_visualscript.rst deleted file mode 100644 index 463f364b5..000000000 --- a/classes/class_visualscript.rst +++ /dev/null @@ -1,473 +0,0 @@ -: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/modules/visual_script/doc_classes/VisualScript.xml. - -.. _class_VisualScript: - -VisualScript -============ - -**Inherits:** :ref:`Script` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -A script implemented in the Visual Script programming environment. - -Description ------------ - -A script implemented in the Visual Script programming environment. The script extends the functionality of all objects that instance it. - -\ :ref:`Object.set_script` extends an existing object, if that object's class matches one of the script's base classes. - -You are most likely to use this class via the Visual Script editor or when writing plugins for it. - -Tutorials ---------- - -- :doc:`VisualScript documentation index <../tutorials/scripting/visual_script/index>` - -Methods -------- - -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_custom_signal` **(** :ref:`StringName` name **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_function` **(** :ref:`StringName` name, :ref:`int` func_node_id **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_node` **(** :ref:`int` id, :ref:`VisualScriptNode` node, :ref:`Vector2` position=Vector2(0, 0) **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_variable` **(** :ref:`StringName` name, :ref:`Variant` default_value=null, :ref:`bool` export=false **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`custom_signal_add_argument` **(** :ref:`StringName` name, :ref:`Variant.Type` type, :ref:`String` argname, :ref:`int` index=-1 **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`custom_signal_get_argument_count` **(** :ref:`StringName` name **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`custom_signal_get_argument_name` **(** :ref:`StringName` name, :ref:`int` argidx **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant.Type` | :ref:`custom_signal_get_argument_type` **(** :ref:`StringName` name, :ref:`int` argidx **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`custom_signal_remove_argument` **(** :ref:`StringName` name, :ref:`int` argidx **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`custom_signal_set_argument_name` **(** :ref:`StringName` name, :ref:`int` argidx, :ref:`String` argname **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`custom_signal_set_argument_type` **(** :ref:`StringName` name, :ref:`int` argidx, :ref:`Variant.Type` type **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`custom_signal_swap_argument` **(** :ref:`StringName` name, :ref:`int` argidx, :ref:`int` withidx **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`data_connect` **(** :ref:`int` from_node, :ref:`int` from_port, :ref:`int` to_node, :ref:`int` to_port **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`data_disconnect` **(** :ref:`int` from_node, :ref:`int` from_port, :ref:`int` to_node, :ref:`int` to_port **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_function_node_id` **(** :ref:`StringName` name **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`VisualScriptNode` | :ref:`get_node` **(** :ref:`int` id **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_node_position` **(** :ref:`int` id **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_scroll` **(** **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get_variable_default_value` **(** :ref:`StringName` name **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_variable_export` **(** :ref:`StringName` name **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_variable_info` **(** :ref:`StringName` name **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_custom_signal` **(** :ref:`StringName` name **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_data_connection` **(** :ref:`int` from_node, :ref:`int` from_port, :ref:`int` to_node, :ref:`int` to_port **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_function` **(** :ref:`StringName` name **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_node` **(** :ref:`int` id **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_sequence_connection` **(** :ref:`int` from_node, :ref:`int` from_output, :ref:`int` to_node **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_variable` **(** :ref:`StringName` name **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_custom_signal` **(** :ref:`StringName` name **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_function` **(** :ref:`StringName` name **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_node` **(** :ref:`int` id **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_variable` **(** :ref:`StringName` name **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`rename_custom_signal` **(** :ref:`StringName` name, :ref:`StringName` new_name **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`rename_function` **(** :ref:`StringName` name, :ref:`StringName` new_name **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`rename_variable` **(** :ref:`StringName` name, :ref:`StringName` new_name **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`sequence_connect` **(** :ref:`int` from_node, :ref:`int` from_output, :ref:`int` to_node **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`sequence_disconnect` **(** :ref:`int` from_node, :ref:`int` from_output, :ref:`int` to_node **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_instance_base_type` **(** :ref:`StringName` type **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_node_position` **(** :ref:`int` id, :ref:`Vector2` position **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_scroll` **(** :ref:`Vector2` offset **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_variable_default_value` **(** :ref:`StringName` name, :ref:`Variant` value **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_variable_export` **(** :ref:`StringName` name, :ref:`bool` enable **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_variable_info` **(** :ref:`StringName` name, :ref:`Dictionary` value **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - -Signals -------- - -.. _class_VisualScript_signal_node_ports_changed: - -- **node_ports_changed** **(** :ref:`int` id **)** - -Emitted when the ports of a node are changed. - -Method Descriptions -------------------- - -.. _class_VisualScript_method_add_custom_signal: - -- void **add_custom_signal** **(** :ref:`StringName` name **)** - -Add a custom signal with the specified name to the VisualScript. - ----- - -.. _class_VisualScript_method_add_function: - -- void **add_function** **(** :ref:`StringName` name, :ref:`int` func_node_id **)** - -Add a function with the specified name to the VisualScript, and assign the root :ref:`VisualScriptFunction` node's id as ``func_node_id``. - ----- - -.. _class_VisualScript_method_add_node: - -- void **add_node** **(** :ref:`int` id, :ref:`VisualScriptNode` node, :ref:`Vector2` position=Vector2(0, 0) **)** - -Add a node to the VisualScript. - ----- - -.. _class_VisualScript_method_add_variable: - -- void **add_variable** **(** :ref:`StringName` name, :ref:`Variant` default_value=null, :ref:`bool` export=false **)** - -Add a variable to the VisualScript, optionally giving it a default value or marking it as exported. - ----- - -.. _class_VisualScript_method_custom_signal_add_argument: - -- void **custom_signal_add_argument** **(** :ref:`StringName` name, :ref:`Variant.Type` type, :ref:`String` argname, :ref:`int` index=-1 **)** - -Add an argument to a custom signal added with :ref:`add_custom_signal`. - ----- - -.. _class_VisualScript_method_custom_signal_get_argument_count: - -- :ref:`int` **custom_signal_get_argument_count** **(** :ref:`StringName` name **)** |const| - -Get the count of a custom signal's arguments. - ----- - -.. _class_VisualScript_method_custom_signal_get_argument_name: - -- :ref:`String` **custom_signal_get_argument_name** **(** :ref:`StringName` name, :ref:`int` argidx **)** |const| - -Get the name of a custom signal's argument. - ----- - -.. _class_VisualScript_method_custom_signal_get_argument_type: - -- :ref:`Variant.Type` **custom_signal_get_argument_type** **(** :ref:`StringName` name, :ref:`int` argidx **)** |const| - -Get the type of a custom signal's argument. - ----- - -.. _class_VisualScript_method_custom_signal_remove_argument: - -- void **custom_signal_remove_argument** **(** :ref:`StringName` name, :ref:`int` argidx **)** - -Remove a specific custom signal's argument. - ----- - -.. _class_VisualScript_method_custom_signal_set_argument_name: - -- void **custom_signal_set_argument_name** **(** :ref:`StringName` name, :ref:`int` argidx, :ref:`String` argname **)** - -Rename a custom signal's argument. - ----- - -.. _class_VisualScript_method_custom_signal_set_argument_type: - -- void **custom_signal_set_argument_type** **(** :ref:`StringName` name, :ref:`int` argidx, :ref:`Variant.Type` type **)** - -Change the type of a custom signal's argument. - ----- - -.. _class_VisualScript_method_custom_signal_swap_argument: - -- void **custom_signal_swap_argument** **(** :ref:`StringName` name, :ref:`int` argidx, :ref:`int` withidx **)** - -Swap two of the arguments of a custom signal. - ----- - -.. _class_VisualScript_method_data_connect: - -- void **data_connect** **(** :ref:`int` from_node, :ref:`int` from_port, :ref:`int` to_node, :ref:`int` to_port **)** - -Connect two data ports. The value of ``from_node``'s ``from_port`` would be fed into ``to_node``'s ``to_port``. - ----- - -.. _class_VisualScript_method_data_disconnect: - -- void **data_disconnect** **(** :ref:`int` from_node, :ref:`int` from_port, :ref:`int` to_node, :ref:`int` to_port **)** - -Disconnect two data ports previously connected with :ref:`data_connect`. - ----- - -.. _class_VisualScript_method_get_function_node_id: - -- :ref:`int` **get_function_node_id** **(** :ref:`StringName` name **)** |const| - -Returns the id of a function's entry point node. - ----- - -.. _class_VisualScript_method_get_node: - -- :ref:`VisualScriptNode` **get_node** **(** :ref:`int` id **)** |const| - -Returns a node given its id. - ----- - -.. _class_VisualScript_method_get_node_position: - -- :ref:`Vector2` **get_node_position** **(** :ref:`int` id **)** |const| - -Returns a node's position in pixels. - ----- - -.. _class_VisualScript_method_get_scroll: - -- :ref:`Vector2` **get_scroll** **(** **)** |const| - -Returns the current position of the center of the screen. - ----- - -.. _class_VisualScript_method_get_variable_default_value: - -- :ref:`Variant` **get_variable_default_value** **(** :ref:`StringName` name **)** |const| - -Returns the default (initial) value of a variable. - ----- - -.. _class_VisualScript_method_get_variable_export: - -- :ref:`bool` **get_variable_export** **(** :ref:`StringName` name **)** |const| - -Returns whether a variable is exported. - ----- - -.. _class_VisualScript_method_get_variable_info: - -- :ref:`Dictionary` **get_variable_info** **(** :ref:`StringName` name **)** |const| - -Returns the information for a given variable as a dictionary. The information includes its name, type, hint and usage. - ----- - -.. _class_VisualScript_method_has_custom_signal: - -- :ref:`bool` **has_custom_signal** **(** :ref:`StringName` name **)** |const| - -Returns whether a signal exists with the specified name. - ----- - -.. _class_VisualScript_method_has_data_connection: - -- :ref:`bool` **has_data_connection** **(** :ref:`int` from_node, :ref:`int` from_port, :ref:`int` to_node, :ref:`int` to_port **)** |const| - -Returns whether the specified data ports are connected. - ----- - -.. _class_VisualScript_method_has_function: - -- :ref:`bool` **has_function** **(** :ref:`StringName` name **)** |const| - -Returns whether a function exists with the specified name. - ----- - -.. _class_VisualScript_method_has_node: - -- :ref:`bool` **has_node** **(** :ref:`int` id **)** |const| - -Returns whether a node exists with the given id. - ----- - -.. _class_VisualScript_method_has_sequence_connection: - -- :ref:`bool` **has_sequence_connection** **(** :ref:`int` from_node, :ref:`int` from_output, :ref:`int` to_node **)** |const| - -Returns whether the specified sequence ports are connected. - ----- - -.. _class_VisualScript_method_has_variable: - -- :ref:`bool` **has_variable** **(** :ref:`StringName` name **)** |const| - -Returns whether a variable exists with the specified name. - ----- - -.. _class_VisualScript_method_remove_custom_signal: - -- void **remove_custom_signal** **(** :ref:`StringName` name **)** - -Remove a custom signal with the given name. - ----- - -.. _class_VisualScript_method_remove_function: - -- void **remove_function** **(** :ref:`StringName` name **)** - -Remove a specific function and its nodes from the script. - ----- - -.. _class_VisualScript_method_remove_node: - -- void **remove_node** **(** :ref:`int` id **)** - -Remove the node with the specified id. - ----- - -.. _class_VisualScript_method_remove_variable: - -- void **remove_variable** **(** :ref:`StringName` name **)** - -Remove a variable with the given name. - ----- - -.. _class_VisualScript_method_rename_custom_signal: - -- void **rename_custom_signal** **(** :ref:`StringName` name, :ref:`StringName` new_name **)** - -Change the name of a custom signal. - ----- - -.. _class_VisualScript_method_rename_function: - -- void **rename_function** **(** :ref:`StringName` name, :ref:`StringName` new_name **)** - -Change the name of a function. - ----- - -.. _class_VisualScript_method_rename_variable: - -- void **rename_variable** **(** :ref:`StringName` name, :ref:`StringName` new_name **)** - -Change the name of a variable. - ----- - -.. _class_VisualScript_method_sequence_connect: - -- void **sequence_connect** **(** :ref:`int` from_node, :ref:`int` from_output, :ref:`int` to_node **)** - -Connect two sequence ports. The execution will flow from of ``from_node``'s ``from_output`` into ``to_node``. - -Unlike :ref:`data_connect`, there isn't a ``to_port``, since the target node can have only one sequence port. - ----- - -.. _class_VisualScript_method_sequence_disconnect: - -- void **sequence_disconnect** **(** :ref:`int` from_node, :ref:`int` from_output, :ref:`int` to_node **)** - -Disconnect two sequence ports previously connected with :ref:`sequence_connect`. - ----- - -.. _class_VisualScript_method_set_instance_base_type: - -- void **set_instance_base_type** **(** :ref:`StringName` type **)** - -Set the base type of the script. - ----- - -.. _class_VisualScript_method_set_node_position: - -- void **set_node_position** **(** :ref:`int` id, :ref:`Vector2` position **)** - -Set the node position in the VisualScript graph. - ----- - -.. _class_VisualScript_method_set_scroll: - -- void **set_scroll** **(** :ref:`Vector2` offset **)** - -Set the screen center to the given position. - ----- - -.. _class_VisualScript_method_set_variable_default_value: - -- void **set_variable_default_value** **(** :ref:`StringName` name, :ref:`Variant` value **)** - -Change the default (initial) value of a variable. - ----- - -.. _class_VisualScript_method_set_variable_export: - -- void **set_variable_export** **(** :ref:`StringName` name, :ref:`bool` enable **)** - -Change whether a variable is exported. - ----- - -.. _class_VisualScript_method_set_variable_info: - -- void **set_variable_info** **(** :ref:`StringName` name, :ref:`Dictionary` value **)** - -Set a variable's info, using the same format as :ref:`get_variable_info`. - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualscriptbasictypeconstant.rst b/classes/class_visualscriptbasictypeconstant.rst deleted file mode 100644 index b65fe5eec..000000000 --- a/classes/class_visualscriptbasictypeconstant.rst +++ /dev/null @@ -1,67 +0,0 @@ -: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/modules/visual_script/doc_classes/VisualScriptBasicTypeConstant.xml. - -.. _class_VisualScriptBasicTypeConstant: - -VisualScriptBasicTypeConstant -============================= - -**Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -A Visual Script node representing a constant from the base types. - -Description ------------ - -A Visual Script node representing a constant from base types, such as :ref:`Vector3.AXIS_X`. - -Properties ----------- - -+-----------------------------------------------------+----------------------------------------------------------------------------+-------+ -| :ref:`Variant.Type` | :ref:`basic_type` | ``0`` | -+-----------------------------------------------------+----------------------------------------------------------------------------+-------+ -| :ref:`StringName` | :ref:`constant` | | -+-----------------------------------------------------+----------------------------------------------------------------------------+-------+ - -Property Descriptions ---------------------- - -.. _class_VisualScriptBasicTypeConstant_property_basic_type: - -- :ref:`Variant.Type` **basic_type** - -+-----------+-----------------------+ -| *Default* | ``0`` | -+-----------+-----------------------+ -| *Setter* | set_basic_type(value) | -+-----------+-----------------------+ -| *Getter* | get_basic_type() | -+-----------+-----------------------+ - -The type to get the constant from. - ----- - -.. _class_VisualScriptBasicTypeConstant_property_constant: - -- :ref:`StringName` **constant** - -+----------+--------------------------------+ -| *Setter* | set_basic_type_constant(value) | -+----------+--------------------------------+ -| *Getter* | get_basic_type_constant() | -+----------+--------------------------------+ - -The name of the constant to return. - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualscriptbuiltinfunc.rst b/classes/class_visualscriptbuiltinfunc.rst deleted file mode 100644 index c6ddc0358..000000000 --- a/classes/class_visualscriptbuiltinfunc.rst +++ /dev/null @@ -1,341 +0,0 @@ -: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/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml. - -.. _class_VisualScriptBuiltinFunc: - -VisualScriptBuiltinFunc -======================= - -**Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -A Visual Script node used to call built-in functions. - -Description ------------ - -A built-in function used inside a :ref:`VisualScript`. It is usually a math function or an utility function. - -See also :ref:`@GDScript`, for the same functions in the GDScript language. - -Properties ----------- - -+--------------------------------------------------------------+------------------------------------------------------------------+-------+ -| :ref:`BuiltinFunc` | :ref:`function` | ``0`` | -+--------------------------------------------------------------+------------------------------------------------------------------+-------+ - -Enumerations ------------- - -.. _enum_VisualScriptBuiltinFunc_BuiltinFunc: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_SIN: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_COS: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_TAN: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_SINH: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_COSH: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_TANH: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_ASIN: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_ACOS: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_ATAN: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_ATAN2: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_SQRT: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_FMOD: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_FPOSMOD: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_FLOOR: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_CEIL: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_ROUND: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_ABS: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_SIGN: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_POW: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_LOG: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_EXP: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_ISNAN: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_ISINF: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_EASE: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_STEP_DECIMALS: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_SNAPPED: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_LERP: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_CUBIC_INTERPOLATE: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_INVERSE_LERP: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_RANGE_LERP: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_MOVE_TOWARD: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_RANDOMIZE: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_RANDI: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_RANDF: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_RANDI_RANGE: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_RANDF_RANGE: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_RANDFN: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_SEED: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_RANDSEED: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_DEG2RAD: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_RAD2DEG: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_LINEAR2DB: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_DB2LINEAR: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_WRAP: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_WRAPF: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_PINGPONG: - -.. _class_VisualScriptBuiltinFunc_constant_LOGIC_MAX: - -.. _class_VisualScriptBuiltinFunc_constant_LOGIC_MIN: - -.. _class_VisualScriptBuiltinFunc_constant_LOGIC_CLAMP: - -.. _class_VisualScriptBuiltinFunc_constant_LOGIC_NEAREST_PO2: - -.. _class_VisualScriptBuiltinFunc_constant_OBJ_WEAKREF: - -.. _class_VisualScriptBuiltinFunc_constant_TYPE_CONVERT: - -.. _class_VisualScriptBuiltinFunc_constant_TYPE_OF: - -.. _class_VisualScriptBuiltinFunc_constant_TYPE_EXISTS: - -.. _class_VisualScriptBuiltinFunc_constant_TEXT_CHAR: - -.. _class_VisualScriptBuiltinFunc_constant_TEXT_STR: - -.. _class_VisualScriptBuiltinFunc_constant_TEXT_PRINT: - -.. _class_VisualScriptBuiltinFunc_constant_TEXT_PRINTERR: - -.. _class_VisualScriptBuiltinFunc_constant_TEXT_PRINTRAW: - -.. _class_VisualScriptBuiltinFunc_constant_TEXT_PRINT_VERBOSE: - -.. _class_VisualScriptBuiltinFunc_constant_VAR_TO_STR: - -.. _class_VisualScriptBuiltinFunc_constant_STR_TO_VAR: - -.. _class_VisualScriptBuiltinFunc_constant_VAR_TO_BYTES: - -.. _class_VisualScriptBuiltinFunc_constant_BYTES_TO_VAR: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_SMOOTHSTEP: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_POSMOD: - -.. _class_VisualScriptBuiltinFunc_constant_MATH_LERP_ANGLE: - -.. _class_VisualScriptBuiltinFunc_constant_TEXT_ORD: - -.. _class_VisualScriptBuiltinFunc_constant_FUNC_MAX: - -enum **BuiltinFunc**: - -- **MATH_SIN** = **0** --- Returns the sine of the input. - -- **MATH_COS** = **1** --- Returns the cosine of the input. - -- **MATH_TAN** = **2** --- Returns the tangent of the input. - -- **MATH_SINH** = **3** --- Returns the hyperbolic sine of the input. - -- **MATH_COSH** = **4** --- Returns the hyperbolic cosine of the input. - -- **MATH_TANH** = **5** --- Returns the hyperbolic tangent of the input. - -- **MATH_ASIN** = **6** --- Returns the arc sine of the input. - -- **MATH_ACOS** = **7** --- Returns the arc cosine of the input. - -- **MATH_ATAN** = **8** --- Returns the arc tangent of the input. - -- **MATH_ATAN2** = **9** --- Returns the arc tangent of the input, using the signs of both parameters to determine the exact angle. - -- **MATH_SQRT** = **10** --- Returns the square root of the input. - -- **MATH_FMOD** = **11** --- Returns the remainder of one input divided by the other, using floating-point numbers. - -- **MATH_FPOSMOD** = **12** --- Returns the positive remainder of one input divided by the other, using floating-point numbers. - -- **MATH_FLOOR** = **13** --- Returns the input rounded down. - -- **MATH_CEIL** = **14** --- Returns the input rounded up. - -- **MATH_ROUND** = **15** --- Returns the input rounded to the nearest integer. - -- **MATH_ABS** = **16** --- Returns the absolute value of the input. - -- **MATH_SIGN** = **17** --- Returns the sign of the input, turning it into 1, -1, or 0. Useful to determine if the input is positive or negative. - -- **MATH_POW** = **18** --- Returns the input raised to a given power. - -- **MATH_LOG** = **19** --- Returns the natural logarithm of the input. Note that this is not the typical base-10 logarithm function calculators use. - -- **MATH_EXP** = **20** --- Returns the mathematical constant **e** raised to the specified power of the input. **e** has an approximate value of 2.71828. - -- **MATH_ISNAN** = **21** --- Returns whether the input is NaN (Not a Number) or not. NaN is usually produced by dividing 0 by 0, though other ways exist. - -- **MATH_ISINF** = **22** --- Returns whether the input is an infinite floating-point number or not. Infinity is usually produced by dividing a number by 0, though other ways exist. - -- **MATH_EASE** = **23** --- Easing function, based on exponent. 0 is constant, 1 is linear, 0 to 1 is ease-in, 1+ is ease out. Negative values are in-out/out in. - -- **MATH_STEP_DECIMALS** = **24** --- Returns the number of digit places after the decimal that the first non-zero digit occurs. - -- **MATH_SNAPPED** = **25** --- Returns the input snapped to a given step. - -- **MATH_LERP** = **26** --- Returns a number linearly interpolated between the first two inputs, based on the third input. Uses the formula ``a + (a - b) * t``. - -- **MATH_CUBIC_INTERPOLATE** = **27** - -- **MATH_INVERSE_LERP** = **28** - -- **MATH_RANGE_LERP** = **29** - -- **MATH_MOVE_TOWARD** = **30** --- Moves the number toward a value, based on the third input. - -- **MATH_RANDOMIZE** = **31** --- Randomize the seed (or the internal state) of the random number generator. Current implementation reseeds using a number based on time. - -- **MATH_RANDI** = **32** --- Returns a random 32 bits integer value. To obtain a random value between 0 to N (where N is smaller than 2^32 - 1), you can use it with the remainder function. - -- **MATH_RANDF** = **33** --- Returns a random floating-point value between 0 and 1. To obtain a random value between 0 to N, you can use it with multiplication. - -- **MATH_RANDI_RANGE** = **34** --- Returns a random 32-bit integer value between the two inputs. - -- **MATH_RANDF_RANGE** = **35** --- Returns a random floating-point value between the two inputs. - -- **MATH_RANDFN** = **36** --- Returns a normally-distributed pseudo-random number, using Box-Muller transform with the specified mean and a standard deviation. This is also called Gaussian distribution. - -- **MATH_SEED** = **37** --- Set the seed for the random number generator. - -- **MATH_RANDSEED** = **38** --- Returns a random value from the given seed, along with the new seed. - -- **MATH_DEG2RAD** = **39** --- Convert the input from degrees to radians. - -- **MATH_RAD2DEG** = **40** --- Convert the input from radians to degrees. - -- **MATH_LINEAR2DB** = **41** --- Convert the input from linear volume to decibel volume. - -- **MATH_DB2LINEAR** = **42** --- Convert the input from decibel volume to linear volume. - -- **MATH_WRAP** = **43** - -- **MATH_WRAPF** = **44** - -- **MATH_PINGPONG** = **45** --- Returns the ``value`` wrapped between ``0`` and the ``length``. If the limit is reached, the next value the function returned is decreased to the ``0`` side or increased to the ``length`` side (like a triangle wave). If ``length`` is less than zero, it becomes positive. - -- **LOGIC_MAX** = **46** --- Returns the greater of the two numbers, also known as their maximum. - -- **LOGIC_MIN** = **47** --- Returns the lesser of the two numbers, also known as their minimum. - -- **LOGIC_CLAMP** = **48** --- Returns the input clamped inside the given range, ensuring the result is never outside it. Equivalent to ``min(max(input, range_low), range_high)``. - -- **LOGIC_NEAREST_PO2** = **49** --- Returns the nearest power of 2 to the input. - -- **OBJ_WEAKREF** = **50** --- Create a :ref:`WeakRef` from the input. - -- **TYPE_CONVERT** = **51** --- Convert between types. - -- **TYPE_OF** = **52** --- Returns the type of the input as an integer. Check :ref:`Variant.Type` for the integers that might be returned. - -- **TYPE_EXISTS** = **53** --- Checks if a type is registered in the :ref:`ClassDB`. - -- **TEXT_CHAR** = **54** --- Returns a character with the given ascii value. - -- **TEXT_STR** = **55** --- Convert the input to a string. - -- **TEXT_PRINT** = **56** --- Print the given string to the output window. - -- **TEXT_PRINTERR** = **57** --- Print the given string to the standard error output. - -- **TEXT_PRINTRAW** = **58** --- Print the given string to the standard output, without adding a newline. - -- **TEXT_PRINT_VERBOSE** = **59** - -- **VAR_TO_STR** = **60** --- Serialize a :ref:`Variant` to a string. - -- **STR_TO_VAR** = **61** --- Deserialize a :ref:`Variant` from a string serialized using :ref:`VAR_TO_STR`. - -- **VAR_TO_BYTES** = **62** --- Serialize a :ref:`Variant` to a :ref:`PackedByteArray`. - -- **BYTES_TO_VAR** = **63** --- Deserialize a :ref:`Variant` from a :ref:`PackedByteArray` serialized using :ref:`VAR_TO_BYTES`. - -- **MATH_SMOOTHSTEP** = **64** --- Returns a number smoothly interpolated between the first two inputs, based on the third input. Similar to :ref:`MATH_LERP`, but interpolates faster at the beginning and slower at the end. Using Hermite interpolation formula: - -:: - - var t = clamp((weight - from) / (to - from), 0.0, 1.0) - return t * t * (3.0 - 2.0 * t) - -- **MATH_POSMOD** = **65** - -- **MATH_LERP_ANGLE** = **66** - -- **TEXT_ORD** = **67** - -- **FUNC_MAX** = **68** --- Represents the size of the :ref:`BuiltinFunc` enum. - -Property Descriptions ---------------------- - -.. _class_VisualScriptBuiltinFunc_property_function: - -- :ref:`BuiltinFunc` **function** - -+-----------+-----------------+ -| *Default* | ``0`` | -+-----------+-----------------+ -| *Setter* | set_func(value) | -+-----------+-----------------+ -| *Getter* | get_func() | -+-----------+-----------------+ - -The function to be executed. - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualscriptclassconstant.rst b/classes/class_visualscriptclassconstant.rst deleted file mode 100644 index e0f865ef6..000000000 --- a/classes/class_visualscriptclassconstant.rst +++ /dev/null @@ -1,77 +0,0 @@ -: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/modules/visual_script/doc_classes/VisualScriptClassConstant.xml. - -.. _class_VisualScriptClassConstant: - -VisualScriptClassConstant -========================= - -**Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -Gets a constant from a given class. - -Description ------------ - -This node returns a constant from a given class, such as :ref:`@GlobalScope.TYPE_INT`. See the given class' documentation for available constants. - -\ **Input Ports:**\ - -none - -\ **Output Ports:**\ - -- Data (variant): ``value`` - -Properties ----------- - -+-------------------------------------+----------------------------------------------------------------------+---------------+ -| :ref:`StringName` | :ref:`base_type` | ``&"Object"`` | -+-------------------------------------+----------------------------------------------------------------------+---------------+ -| :ref:`StringName` | :ref:`constant` | ``&""`` | -+-------------------------------------+----------------------------------------------------------------------+---------------+ - -Property Descriptions ---------------------- - -.. _class_VisualScriptClassConstant_property_base_type: - -- :ref:`StringName` **base_type** - -+-----------+----------------------+ -| *Default* | ``&"Object"`` | -+-----------+----------------------+ -| *Setter* | set_base_type(value) | -+-----------+----------------------+ -| *Getter* | get_base_type() | -+-----------+----------------------+ - -The constant's parent class. - ----- - -.. _class_VisualScriptClassConstant_property_constant: - -- :ref:`StringName` **constant** - -+-----------+---------------------------+ -| *Default* | ``&""`` | -+-----------+---------------------------+ -| *Setter* | set_class_constant(value) | -+-----------+---------------------------+ -| *Getter* | get_class_constant() | -+-----------+---------------------------+ - -The constant to return. See the given class for its available constants. - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualscriptcomment.rst b/classes/class_visualscriptcomment.rst deleted file mode 100644 index e826af2a0..000000000 --- a/classes/class_visualscriptcomment.rst +++ /dev/null @@ -1,89 +0,0 @@ -: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/modules/visual_script/doc_classes/VisualScriptComment.xml. - -.. _class_VisualScriptComment: - -VisualScriptComment -=================== - -**Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -A Visual Script node used to annotate the script. - -Description ------------ - -A Visual Script node used to display annotations in the script, so that code may be documented. - -Comment nodes can be resized so they encompass a group of nodes. - -Properties ----------- - -+-------------------------------+--------------------------------------------------------------------+-----------------------+ -| :ref:`String` | :ref:`description` | ``""`` | -+-------------------------------+--------------------------------------------------------------------+-----------------------+ -| :ref:`Vector2` | :ref:`size` | ``Vector2(150, 150)`` | -+-------------------------------+--------------------------------------------------------------------+-----------------------+ -| :ref:`String` | :ref:`title` | ``"Comment"`` | -+-------------------------------+--------------------------------------------------------------------+-----------------------+ - -Property Descriptions ---------------------- - -.. _class_VisualScriptComment_property_description: - -- :ref:`String` **description** - -+-----------+------------------------+ -| *Default* | ``""`` | -+-----------+------------------------+ -| *Setter* | set_description(value) | -+-----------+------------------------+ -| *Getter* | get_description() | -+-----------+------------------------+ - -The text inside the comment node. - ----- - -.. _class_VisualScriptComment_property_size: - -- :ref:`Vector2` **size** - -+-----------+-----------------------+ -| *Default* | ``Vector2(150, 150)`` | -+-----------+-----------------------+ -| *Setter* | set_size(value) | -+-----------+-----------------------+ -| *Getter* | get_size() | -+-----------+-----------------------+ - -The comment node's size (in pixels). - ----- - -.. _class_VisualScriptComment_property_title: - -- :ref:`String` **title** - -+-----------+------------------+ -| *Default* | ``"Comment"`` | -+-----------+------------------+ -| *Setter* | set_title(value) | -+-----------+------------------+ -| *Getter* | get_title() | -+-----------+------------------+ - -The comment node's title. - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualscriptcomposearray.rst b/classes/class_visualscriptcomposearray.rst deleted file mode 100644 index 99e5a2ad5..000000000 --- a/classes/class_visualscriptcomposearray.rst +++ /dev/null @@ -1,27 +0,0 @@ -: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/modules/visual_script/doc_classes/VisualScriptComposeArray.xml. - -.. _class_VisualScriptComposeArray: - -VisualScriptComposeArray -======================== - -**Inherits:** :ref:`VisualScriptLists` **<** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -A Visual Script Node used to create array from a list of items. - -Description ------------ - -A Visual Script Node used to compose array from the list of elements provided with custom in-graph UI hard coded in the VisualScript Editor. - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualscriptcondition.rst b/classes/class_visualscriptcondition.rst deleted file mode 100644 index eb8f7cf87..000000000 --- a/classes/class_visualscriptcondition.rst +++ /dev/null @@ -1,41 +0,0 @@ -: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/modules/visual_script/doc_classes/VisualScriptCondition.xml. - -.. _class_VisualScriptCondition: - -VisualScriptCondition -===================== - -**Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -A Visual Script node which branches the flow. - -Description ------------ - -A Visual Script node that checks a :ref:`bool` input port. If ``true``, it will exit via the "true" sequence port. If ``false``, it will exit via the "false" sequence port. After exiting either, it exits via the "done" port. Sequence ports may be left disconnected. - -\ **Input Ports:**\ - -- Sequence: ``if (cond) is``\ - -- Data (boolean): ``cond``\ - -\ **Output Ports:**\ - -- Sequence: ``true``\ - -- Sequence: ``false``\ - -- Sequence: ``done`` - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualscriptconstant.rst b/classes/class_visualscriptconstant.rst deleted file mode 100644 index 510965a98..000000000 --- a/classes/class_visualscriptconstant.rst +++ /dev/null @@ -1,75 +0,0 @@ -: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/modules/visual_script/doc_classes/VisualScriptConstant.xml. - -.. _class_VisualScriptConstant: - -VisualScriptConstant -==================== - -**Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -Gets a contant's value. - -Description ------------ - -This node returns a constant's value. - -\ **Input Ports:**\ - -none - -\ **Output Ports:**\ - -- Data (variant): ``get`` - -Properties ----------- - -+-----------------------------------------------------+---------------------------------------------------------+-------+ -| :ref:`Variant.Type` | :ref:`type` | ``0`` | -+-----------------------------------------------------+---------------------------------------------------------+-------+ -| :ref:`Variant` | :ref:`value` | | -+-----------------------------------------------------+---------------------------------------------------------+-------+ - -Property Descriptions ---------------------- - -.. _class_VisualScriptConstant_property_type: - -- :ref:`Variant.Type` **type** - -+-----------+--------------------------+ -| *Default* | ``0`` | -+-----------+--------------------------+ -| *Setter* | set_constant_type(value) | -+-----------+--------------------------+ -| *Getter* | get_constant_type() | -+-----------+--------------------------+ - -The constant's type. - ----- - -.. _class_VisualScriptConstant_property_value: - -- :ref:`Variant` **value** - -+----------+---------------------------+ -| *Setter* | set_constant_value(value) | -+----------+---------------------------+ -| *Getter* | get_constant_value() | -+----------+---------------------------+ - -The constant's value. - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualscriptconstructor.rst b/classes/class_visualscriptconstructor.rst deleted file mode 100644 index 2792406da..000000000 --- a/classes/class_visualscriptconstructor.rst +++ /dev/null @@ -1,65 +0,0 @@ -: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/modules/visual_script/doc_classes/VisualScriptConstructor.xml. - -.. _class_VisualScriptConstructor: - -VisualScriptConstructor -======================= - -**Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -A Visual Script node which calls a base type constructor. - -Description ------------ - -A Visual Script node which calls a base type constructor. It can be used for type conversion as well. - -Methods -------- - -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_constructor` **(** **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant.Type` | :ref:`get_constructor_type` **(** **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_constructor` **(** :ref:`Dictionary` constructor **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_constructor_type` **(** :ref:`Variant.Type` type **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - -Method Descriptions -------------------- - -.. _class_VisualScriptConstructor_method_get_constructor: - -- :ref:`Dictionary` **get_constructor** **(** **)** |const| - ----- - -.. _class_VisualScriptConstructor_method_get_constructor_type: - -- :ref:`Variant.Type` **get_constructor_type** **(** **)** |const| - ----- - -.. _class_VisualScriptConstructor_method_set_constructor: - -- void **set_constructor** **(** :ref:`Dictionary` constructor **)** - ----- - -.. _class_VisualScriptConstructor_method_set_constructor_type: - -- void **set_constructor_type** **(** :ref:`Variant.Type` type **)** - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualscriptcustomnode.rst b/classes/class_visualscriptcustomnode.rst deleted file mode 100644 index 4cd2c58fb..000000000 --- a/classes/class_visualscriptcustomnode.rst +++ /dev/null @@ -1,269 +0,0 @@ -: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/modules/visual_script/doc_classes/VisualScriptCustomNode.xml. - -.. _class_VisualScriptCustomNode: - -VisualScriptCustomNode -====================== - -**Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -A scripted Visual Script node. - -Description ------------ - -A custom Visual Script node which can be scripted in powerful ways. - -Methods -------- - -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_get_caption` **(** **)** |virtual| |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_get_category` **(** **)** |virtual| |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_input_value_port_count` **(** **)** |virtual| |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_input_value_port_hint` **(** :ref:`int` input_idx **)** |virtual| |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_get_input_value_port_hint_string` **(** :ref:`int` input_idx **)** |virtual| |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_get_input_value_port_name` **(** :ref:`int` input_idx **)** |virtual| |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_input_value_port_type` **(** :ref:`int` input_idx **)** |virtual| |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_output_sequence_port_count` **(** **)** |virtual| |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_get_output_sequence_port_text` **(** :ref:`int` seq_idx **)** |virtual| |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_output_value_port_count` **(** **)** |virtual| |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_output_value_port_hint` **(** :ref:`int` output_idx **)** |virtual| |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_get_output_value_port_hint_string` **(** :ref:`int` output_idx **)** |virtual| |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_get_output_value_port_name` **(** :ref:`int` output_idx **)** |virtual| |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_output_value_port_type` **(** :ref:`int` output_idx **)** |virtual| |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_get_text` **(** **)** |virtual| |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_working_memory_size` **(** **)** |virtual| |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_has_input_sequence_port` **(** **)** |virtual| |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`_step` **(** :ref:`Array` inputs, :ref:`Array` outputs, :ref:`int` start_mode, :ref:`Array` working_mem **)** |virtual| |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - -Enumerations ------------- - -.. _enum_VisualScriptCustomNode_StartMode: - -.. _class_VisualScriptCustomNode_constant_START_MODE_BEGIN_SEQUENCE: - -.. _class_VisualScriptCustomNode_constant_START_MODE_CONTINUE_SEQUENCE: - -.. _class_VisualScriptCustomNode_constant_START_MODE_RESUME_YIELD: - -enum **StartMode**: - -- **START_MODE_BEGIN_SEQUENCE** = **0** --- The start mode used the first time when :ref:`_step` is called. - -- **START_MODE_CONTINUE_SEQUENCE** = **1** --- The start mode used when :ref:`_step` is called after coming back from a :ref:`STEP_PUSH_STACK_BIT`. - -- **START_MODE_RESUME_YIELD** = **2** --- The start mode used when :ref:`_step` is called after resuming from :ref:`STEP_YIELD_BIT`. - -Constants ---------- - -.. _class_VisualScriptCustomNode_constant_STEP_PUSH_STACK_BIT: - -.. _class_VisualScriptCustomNode_constant_STEP_GO_BACK_BIT: - -.. _class_VisualScriptCustomNode_constant_STEP_NO_ADVANCE_BIT: - -.. _class_VisualScriptCustomNode_constant_STEP_EXIT_FUNCTION_BIT: - -.. _class_VisualScriptCustomNode_constant_STEP_YIELD_BIT: - -- **STEP_PUSH_STACK_BIT** = **16777216** --- Hint used by :ref:`_step` to tell that control should return to it when there is no other node left to execute. - -This is used by :ref:`VisualScriptCondition` to redirect the sequence to the "Done" port after the ``true``/``false`` branch has finished execution. - -- **STEP_GO_BACK_BIT** = **33554432** --- Hint used by :ref:`_step` to tell that control should return back, either hitting a previous :ref:`STEP_PUSH_STACK_BIT` or exiting the function. - -- **STEP_NO_ADVANCE_BIT** = **67108864** - -- **STEP_EXIT_FUNCTION_BIT** = **134217728** --- Hint used by :ref:`_step` to tell that control should stop and exit the function. - -- **STEP_YIELD_BIT** = **268435456** --- Hint used by :ref:`_step` to tell that the function should be yielded. - -Using this requires you to have at least one working memory slot, which is used for the :ref:`VisualScriptFunctionState`. - -Method Descriptions -------------------- - -.. _class_VisualScriptCustomNode_method__get_caption: - -- :ref:`String` **_get_caption** **(** **)** |virtual| |const| - -Returns the node's title. - ----- - -.. _class_VisualScriptCustomNode_method__get_category: - -- :ref:`String` **_get_category** **(** **)** |virtual| |const| - -Returns the node's category. - ----- - -.. _class_VisualScriptCustomNode_method__get_input_value_port_count: - -- :ref:`int` **_get_input_value_port_count** **(** **)** |virtual| |const| - -Returns the count of input value ports. - ----- - -.. _class_VisualScriptCustomNode_method__get_input_value_port_hint: - -- :ref:`int` **_get_input_value_port_hint** **(** :ref:`int` input_idx **)** |virtual| |const| - -Returns the specified input port's hint. See the :ref:`PropertyHint` hints. - ----- - -.. _class_VisualScriptCustomNode_method__get_input_value_port_hint_string: - -- :ref:`String` **_get_input_value_port_hint_string** **(** :ref:`int` input_idx **)** |virtual| |const| - -Returns the specified input port's hint string. - ----- - -.. _class_VisualScriptCustomNode_method__get_input_value_port_name: - -- :ref:`String` **_get_input_value_port_name** **(** :ref:`int` input_idx **)** |virtual| |const| - -Returns the specified input port's name. - ----- - -.. _class_VisualScriptCustomNode_method__get_input_value_port_type: - -- :ref:`int` **_get_input_value_port_type** **(** :ref:`int` input_idx **)** |virtual| |const| - -Returns the specified input port's type. See the :ref:`Variant.Type` values. - ----- - -.. _class_VisualScriptCustomNode_method__get_output_sequence_port_count: - -- :ref:`int` **_get_output_sequence_port_count** **(** **)** |virtual| |const| - -Returns the amount of output **sequence** ports. - ----- - -.. _class_VisualScriptCustomNode_method__get_output_sequence_port_text: - -- :ref:`String` **_get_output_sequence_port_text** **(** :ref:`int` seq_idx **)** |virtual| |const| - -Returns the specified **sequence** output's name. - ----- - -.. _class_VisualScriptCustomNode_method__get_output_value_port_count: - -- :ref:`int` **_get_output_value_port_count** **(** **)** |virtual| |const| - -Returns the amount of output value ports. - ----- - -.. _class_VisualScriptCustomNode_method__get_output_value_port_hint: - -- :ref:`int` **_get_output_value_port_hint** **(** :ref:`int` output_idx **)** |virtual| |const| - -Returns the specified output port's hint. See the :ref:`PropertyHint` hints. - ----- - -.. _class_VisualScriptCustomNode_method__get_output_value_port_hint_string: - -- :ref:`String` **_get_output_value_port_hint_string** **(** :ref:`int` output_idx **)** |virtual| |const| - -Returns the specified output port's hint string. - ----- - -.. _class_VisualScriptCustomNode_method__get_output_value_port_name: - -- :ref:`String` **_get_output_value_port_name** **(** :ref:`int` output_idx **)** |virtual| |const| - -Returns the specified output port's name. - ----- - -.. _class_VisualScriptCustomNode_method__get_output_value_port_type: - -- :ref:`int` **_get_output_value_port_type** **(** :ref:`int` output_idx **)** |virtual| |const| - -Returns the specified output port's type. See the :ref:`Variant.Type` values. - ----- - -.. _class_VisualScriptCustomNode_method__get_text: - -- :ref:`String` **_get_text** **(** **)** |virtual| |const| - -Returns the custom node's text, which is shown right next to the input **sequence** port (if there is none, on the place that is usually taken by it). - ----- - -.. _class_VisualScriptCustomNode_method__get_working_memory_size: - -- :ref:`int` **_get_working_memory_size** **(** **)** |virtual| |const| - -Returns the size of the custom node's working memory. See :ref:`_step` for more details. - ----- - -.. _class_VisualScriptCustomNode_method__has_input_sequence_port: - -- :ref:`bool` **_has_input_sequence_port** **(** **)** |virtual| |const| - -Returns whether the custom node has an input **sequence** port. - ----- - -.. _class_VisualScriptCustomNode_method__step: - -- :ref:`Variant` **_step** **(** :ref:`Array` inputs, :ref:`Array` outputs, :ref:`int` start_mode, :ref:`Array` working_mem **)** |virtual| |const| - -Execute the custom node's logic, returning the index of the output sequence port to use or a :ref:`String` when there is an error. - -The ``inputs`` array contains the values of the input ports. - -\ ``outputs`` is an array whose indices should be set to the respective outputs. - -The ``start_mode`` is usually :ref:`START_MODE_BEGIN_SEQUENCE`, unless you have used the ``STEP_*`` constants. - -\ ``working_mem`` is an array which can be used to persist information between runs of the custom node. The size needs to be predefined using :ref:`_get_working_memory_size`. - -When returning, you can mask the returned value with one of the ``STEP_*`` constants. - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualscriptcustomnodes.rst b/classes/class_visualscriptcustomnodes.rst deleted file mode 100644 index 73a66c410..000000000 --- a/classes/class_visualscriptcustomnodes.rst +++ /dev/null @@ -1,62 +0,0 @@ -: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/modules/visual_script/doc_classes/VisualScriptCustomNodes.xml. - -.. _class_VisualScriptCustomNodes: - -VisualScriptCustomNodes -======================= - -**Inherits:** :ref:`Object` - -Manages custom nodes for the Visual Script editor. - -Description ------------ - -This singleton can be used to manage (i.e., add or remove) custom nodes for the Visual Script editor. - -Methods -------- - -+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_custom_node` **(** :ref:`String` name, :ref:`String` category, :ref:`Script` script **)** | -+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_custom_node` **(** :ref:`String` name, :ref:`String` category **)** | -+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - -Signals -------- - -.. _class_VisualScriptCustomNodes_signal_custom_nodes_updated: - -- **custom_nodes_updated** **(** **)** - -Emitted when a custom Visual Script node is added or removed. - -Method Descriptions -------------------- - -.. _class_VisualScriptCustomNodes_method_add_custom_node: - -- void **add_custom_node** **(** :ref:`String` name, :ref:`String` category, :ref:`Script` script **)** - -Add a custom Visual Script node to the editor. It'll be placed under "Custom Nodes" with the ``category`` as the parameter. - ----- - -.. _class_VisualScriptCustomNodes_method_remove_custom_node: - -- void **remove_custom_node** **(** :ref:`String` name, :ref:`String` category **)** - -Remove a custom Visual Script node from the editor. Custom nodes already placed on scripts won't be removed. - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualscriptdeconstruct.rst b/classes/class_visualscriptdeconstruct.rst deleted file mode 100644 index 1a002c0d0..000000000 --- a/classes/class_visualscriptdeconstruct.rst +++ /dev/null @@ -1,51 +0,0 @@ -: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/modules/visual_script/doc_classes/VisualScriptDeconstruct.xml. - -.. _class_VisualScriptDeconstruct: - -VisualScriptDeconstruct -======================= - -**Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -A Visual Script node which deconstructs a base type instance into its parts. - -Description ------------ - -A Visual Script node which deconstructs a base type instance into its parts. - -Properties ----------- - -+-----------------------------------------------------+----------------------------------------------------------+-------+ -| :ref:`Variant.Type` | :ref:`type` | ``0`` | -+-----------------------------------------------------+----------------------------------------------------------+-------+ - -Property Descriptions ---------------------- - -.. _class_VisualScriptDeconstruct_property_type: - -- :ref:`Variant.Type` **type** - -+-----------+-----------------------------+ -| *Default* | ``0`` | -+-----------+-----------------------------+ -| *Setter* | set_deconstruct_type(value) | -+-----------+-----------------------------+ -| *Getter* | get_deconstruct_type() | -+-----------+-----------------------------+ - -The type to deconstruct. - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualscriptemitsignal.rst b/classes/class_visualscriptemitsignal.rst deleted file mode 100644 index 0e31dad0c..000000000 --- a/classes/class_visualscriptemitsignal.rst +++ /dev/null @@ -1,59 +0,0 @@ -: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/modules/visual_script/doc_classes/VisualScriptEmitSignal.xml. - -.. _class_VisualScriptEmitSignal: - -VisualScriptEmitSignal -====================== - -**Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -Emits a specified signal. - -Description ------------ - -Emits a specified signal when it is executed. - -\ **Input Ports:**\ - -- Sequence: ``emit``\ - -\ **Output Ports:**\ - -- Sequence - -Properties ----------- - -+-------------------------------------+-------------------------------------------------------------+---------+ -| :ref:`StringName` | :ref:`signal` | ``&""`` | -+-------------------------------------+-------------------------------------------------------------+---------+ - -Property Descriptions ---------------------- - -.. _class_VisualScriptEmitSignal_property_signal: - -- :ref:`StringName` **signal** - -+-----------+-------------------+ -| *Default* | ``&""`` | -+-----------+-------------------+ -| *Setter* | set_signal(value) | -+-----------+-------------------+ -| *Getter* | get_signal() | -+-----------+-------------------+ - -The signal to emit. - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualscriptenginesingleton.rst b/classes/class_visualscriptenginesingleton.rst deleted file mode 100644 index f979516a8..000000000 --- a/classes/class_visualscriptenginesingleton.rst +++ /dev/null @@ -1,51 +0,0 @@ -: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/modules/visual_script/doc_classes/VisualScriptEngineSingleton.xml. - -.. _class_VisualScriptEngineSingleton: - -VisualScriptEngineSingleton -=========================== - -**Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -A Visual Script node returning a singleton from :ref:`@GlobalScope`. - -Description ------------ - -A Visual Script node returning a singleton from :ref:`@GlobalScope`. - -Properties ----------- - -+-----------------------------+----------------------------------------------------------------------+--------+ -| :ref:`String` | :ref:`constant` | ``""`` | -+-----------------------------+----------------------------------------------------------------------+--------+ - -Property Descriptions ---------------------- - -.. _class_VisualScriptEngineSingleton_property_constant: - -- :ref:`String` **constant** - -+-----------+----------------------+ -| *Default* | ``""`` | -+-----------+----------------------+ -| *Setter* | set_singleton(value) | -+-----------+----------------------+ -| *Getter* | get_singleton() | -+-----------+----------------------+ - -The singleton's name. - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualscriptexpression.rst b/classes/class_visualscriptexpression.rst deleted file mode 100644 index 00c29d6f6..000000000 --- a/classes/class_visualscriptexpression.rst +++ /dev/null @@ -1,27 +0,0 @@ -: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/modules/visual_script/doc_classes/VisualScriptExpression.xml. - -.. _class_VisualScriptExpression: - -VisualScriptExpression -====================== - -**Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -A Visual Script node that can execute a custom expression. - -Description ------------ - -A Visual Script node that can execute a custom expression. Values can be provided for the input and the expression result can be retrieved from the output. - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualscriptfunction.rst b/classes/class_visualscriptfunction.rst deleted file mode 100644 index 56979d205..000000000 --- a/classes/class_visualscriptfunction.rst +++ /dev/null @@ -1,27 +0,0 @@ -: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/modules/visual_script/doc_classes/VisualScriptFunction.xml. - -.. _class_VisualScriptFunction: - -VisualScriptFunction -==================== - -**Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -A Visual Script node representing a function. - -Description ------------ - -``VisualScriptFunction`` represents a function header. It is the starting point for the function body and can be used to tweak the function's properties (e.g. RPC mode). - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualscriptfunctioncall.rst b/classes/class_visualscriptfunctioncall.rst deleted file mode 100644 index 752f1a5fd..000000000 --- a/classes/class_visualscriptfunctioncall.rst +++ /dev/null @@ -1,256 +0,0 @@ -: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/modules/visual_script/doc_classes/VisualScriptFunctionCall.xml. - -.. _class_VisualScriptFunctionCall: - -VisualScriptFunctionCall -======================== - -**Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -A Visual Script node for calling a function. - -Description ------------ - -``VisualScriptFunctionCall`` is created when you add or drag and drop a function onto the Visual Script graph. It allows to tweak parameters of the call, e.g. what object the function is called on. - -Properties ----------- - -+---------------------------------------------------------------+-----------------------------------------------------------------------------------+---------------+ -| :ref:`String` | :ref:`base_script` | | -+---------------------------------------------------------------+-----------------------------------------------------------------------------------+---------------+ -| :ref:`StringName` | :ref:`base_type` | ``&"Object"`` | -+---------------------------------------------------------------+-----------------------------------------------------------------------------------+---------------+ -| :ref:`Variant.Type` | :ref:`basic_type` | | -+---------------------------------------------------------------+-----------------------------------------------------------------------------------+---------------+ -| :ref:`CallMode` | :ref:`call_mode` | ``0`` | -+---------------------------------------------------------------+-----------------------------------------------------------------------------------+---------------+ -| :ref:`StringName` | :ref:`function` | ``&""`` | -+---------------------------------------------------------------+-----------------------------------------------------------------------------------+---------------+ -| :ref:`NodePath` | :ref:`node_path` | | -+---------------------------------------------------------------+-----------------------------------------------------------------------------------+---------------+ -| :ref:`RPCCallMode` | :ref:`rpc_call_mode` | ``0`` | -+---------------------------------------------------------------+-----------------------------------------------------------------------------------+---------------+ -| :ref:`StringName` | :ref:`singleton` | | -+---------------------------------------------------------------+-----------------------------------------------------------------------------------+---------------+ -| :ref:`int` | :ref:`use_default_args` | | -+---------------------------------------------------------------+-----------------------------------------------------------------------------------+---------------+ -| :ref:`bool` | :ref:`validate` | ``true`` | -+---------------------------------------------------------------+-----------------------------------------------------------------------------------+---------------+ - -Enumerations ------------- - -.. _enum_VisualScriptFunctionCall_CallMode: - -.. _class_VisualScriptFunctionCall_constant_CALL_MODE_SELF: - -.. _class_VisualScriptFunctionCall_constant_CALL_MODE_NODE_PATH: - -.. _class_VisualScriptFunctionCall_constant_CALL_MODE_INSTANCE: - -.. _class_VisualScriptFunctionCall_constant_CALL_MODE_BASIC_TYPE: - -.. _class_VisualScriptFunctionCall_constant_CALL_MODE_SINGLETON: - -enum **CallMode**: - -- **CALL_MODE_SELF** = **0** --- The method will be called on this :ref:`Object`. - -- **CALL_MODE_NODE_PATH** = **1** --- The method will be called on the given :ref:`Node` in the scene tree. - -- **CALL_MODE_INSTANCE** = **2** --- The method will be called on an instanced node with the given type and script. - -- **CALL_MODE_BASIC_TYPE** = **3** --- The method will be called on a GDScript basic type (e.g. :ref:`Vector2`). - -- **CALL_MODE_SINGLETON** = **4** --- The method will be called on a singleton. - ----- - -.. _enum_VisualScriptFunctionCall_RPCCallMode: - -.. _class_VisualScriptFunctionCall_constant_RPC_DISABLED: - -.. _class_VisualScriptFunctionCall_constant_RPC_RELIABLE: - -.. _class_VisualScriptFunctionCall_constant_RPC_UNRELIABLE: - -.. _class_VisualScriptFunctionCall_constant_RPC_RELIABLE_TO_ID: - -.. _class_VisualScriptFunctionCall_constant_RPC_UNRELIABLE_TO_ID: - -enum **RPCCallMode**: - -- **RPC_DISABLED** = **0** --- The method will be called locally. - -- **RPC_RELIABLE** = **1** --- The method will be called remotely. - -- **RPC_UNRELIABLE** = **2** --- The method will be called remotely using an unreliable protocol. - -- **RPC_RELIABLE_TO_ID** = **3** --- The method will be called remotely for the given peer. - -- **RPC_UNRELIABLE_TO_ID** = **4** --- The method will be called remotely for the given peer, using an unreliable protocol. - -Property Descriptions ---------------------- - -.. _class_VisualScriptFunctionCall_property_base_script: - -- :ref:`String` **base_script** - -+----------+------------------------+ -| *Setter* | set_base_script(value) | -+----------+------------------------+ -| *Getter* | get_base_script() | -+----------+------------------------+ - -The script to be used when :ref:`call_mode` is set to :ref:`CALL_MODE_INSTANCE`. - ----- - -.. _class_VisualScriptFunctionCall_property_base_type: - -- :ref:`StringName` **base_type** - -+-----------+----------------------+ -| *Default* | ``&"Object"`` | -+-----------+----------------------+ -| *Setter* | set_base_type(value) | -+-----------+----------------------+ -| *Getter* | get_base_type() | -+-----------+----------------------+ - -The base type to be used when :ref:`call_mode` is set to :ref:`CALL_MODE_INSTANCE`. - ----- - -.. _class_VisualScriptFunctionCall_property_basic_type: - -- :ref:`Variant.Type` **basic_type** - -+----------+-----------------------+ -| *Setter* | set_basic_type(value) | -+----------+-----------------------+ -| *Getter* | get_basic_type() | -+----------+-----------------------+ - -The type to be used when :ref:`call_mode` is set to :ref:`CALL_MODE_BASIC_TYPE`. - ----- - -.. _class_VisualScriptFunctionCall_property_call_mode: - -- :ref:`CallMode` **call_mode** - -+-----------+----------------------+ -| *Default* | ``0`` | -+-----------+----------------------+ -| *Setter* | set_call_mode(value) | -+-----------+----------------------+ -| *Getter* | get_call_mode() | -+-----------+----------------------+ - -``call_mode`` determines the target object on which the method will be called. See :ref:`CallMode` for options. - ----- - -.. _class_VisualScriptFunctionCall_property_function: - -- :ref:`StringName` **function** - -+-----------+---------------------+ -| *Default* | ``&""`` | -+-----------+---------------------+ -| *Setter* | set_function(value) | -+-----------+---------------------+ -| *Getter* | get_function() | -+-----------+---------------------+ - -The name of the function to be called. - ----- - -.. _class_VisualScriptFunctionCall_property_node_path: - -- :ref:`NodePath` **node_path** - -+----------+----------------------+ -| *Setter* | set_base_path(value) | -+----------+----------------------+ -| *Getter* | get_base_path() | -+----------+----------------------+ - -The node path to use when :ref:`call_mode` is set to :ref:`CALL_MODE_NODE_PATH`. - ----- - -.. _class_VisualScriptFunctionCall_property_rpc_call_mode: - -- :ref:`RPCCallMode` **rpc_call_mode** - -+-----------+--------------------------+ -| *Default* | ``0`` | -+-----------+--------------------------+ -| *Setter* | set_rpc_call_mode(value) | -+-----------+--------------------------+ -| *Getter* | get_rpc_call_mode() | -+-----------+--------------------------+ - -The mode for RPC calls. See :ref:`Node.rpc` for more details and :ref:`RPCCallMode` for available options. - ----- - -.. _class_VisualScriptFunctionCall_property_singleton: - -- :ref:`StringName` **singleton** - -+----------+----------------------+ -| *Setter* | set_singleton(value) | -+----------+----------------------+ -| *Getter* | get_singleton() | -+----------+----------------------+ - -The singleton to call the method on. Used when :ref:`call_mode` is set to :ref:`CALL_MODE_SINGLETON`. - ----- - -.. _class_VisualScriptFunctionCall_property_use_default_args: - -- :ref:`int` **use_default_args** - -+----------+-----------------------------+ -| *Setter* | set_use_default_args(value) | -+----------+-----------------------------+ -| *Getter* | get_use_default_args() | -+----------+-----------------------------+ - -Number of default arguments that will be used when calling the function. Can't be higher than the number of available default arguments in the method's declaration. - ----- - -.. _class_VisualScriptFunctionCall_property_validate: - -- :ref:`bool` **validate** - -+-----------+---------------------+ -| *Default* | ``true`` | -+-----------+---------------------+ -| *Setter* | set_validate(value) | -+-----------+---------------------+ -| *Getter* | get_validate() | -+-----------+---------------------+ - -If ``false``, call errors (e.g. wrong number of arguments) will be ignored. - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualscriptfunctionstate.rst b/classes/class_visualscriptfunctionstate.rst deleted file mode 100644 index dc388cdeb..000000000 --- a/classes/class_visualscriptfunctionstate.rst +++ /dev/null @@ -1,63 +0,0 @@ -: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/modules/visual_script/doc_classes/VisualScriptFunctionState.xml. - -.. _class_VisualScriptFunctionState: - -VisualScriptFunctionState -========================= - -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` - -A Visual Script node representing a function state. - -Description ------------ - -``VisualScriptFunctionState`` is returned from :ref:`VisualScriptYield` and can be used to resume a paused function call. - -Methods -------- - -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`connect_to_signal` **(** :ref:`Object` obj, :ref:`String` signals, :ref:`Array` args **)** | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_valid` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`resume` **(** :ref:`Array` args=[] **)** | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - -Method Descriptions -------------------- - -.. _class_VisualScriptFunctionState_method_connect_to_signal: - -- void **connect_to_signal** **(** :ref:`Object` obj, :ref:`String` signals, :ref:`Array` args **)** - -Connects this ``VisualScriptFunctionState`` to a signal in the given object to automatically resume when it's emitted. - ----- - -.. _class_VisualScriptFunctionState_method_is_valid: - -- :ref:`bool` **is_valid** **(** **)** |const| - -Returns whether the function state is valid. - ----- - -.. _class_VisualScriptFunctionState_method_resume: - -- :ref:`Variant` **resume** **(** :ref:`Array` args=[] **)** - -Resumes the function to run from the point it was yielded. - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualscriptglobalconstant.rst b/classes/class_visualscriptglobalconstant.rst deleted file mode 100644 index d8add1c1e..000000000 --- a/classes/class_visualscriptglobalconstant.rst +++ /dev/null @@ -1,51 +0,0 @@ -: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/modules/visual_script/doc_classes/VisualScriptGlobalConstant.xml. - -.. _class_VisualScriptGlobalConstant: - -VisualScriptGlobalConstant -========================== - -**Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -A Visual Script node returning a constant from :ref:`@GlobalScope`. - -Description ------------ - -A Visual Script node returning a constant from :ref:`@GlobalScope`. - -Properties ----------- - -+-----------------------+---------------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`constant` | ``0`` | -+-----------------------+---------------------------------------------------------------------+-------+ - -Property Descriptions ---------------------- - -.. _class_VisualScriptGlobalConstant_property_constant: - -- :ref:`int` **constant** - -+-----------+----------------------------+ -| *Default* | ``0`` | -+-----------+----------------------------+ -| *Setter* | set_global_constant(value) | -+-----------+----------------------------+ -| *Getter* | get_global_constant() | -+-----------+----------------------------+ - -The constant to be used. - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualscriptinputaction.rst b/classes/class_visualscriptinputaction.rst deleted file mode 100644 index 251cd329b..000000000 --- a/classes/class_visualscriptinputaction.rst +++ /dev/null @@ -1,92 +0,0 @@ -: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/modules/visual_script/doc_classes/VisualScriptInputAction.xml. - -.. _class_VisualScriptInputAction: - -VisualScriptInputAction -======================= - -**Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -A Visual Script node returning a state of an action. - -Description ------------ - -``VisualScriptInputAction`` can be used to check if an action is pressed or released. - -Properties ----------- - -+------------------------------------------------+--------------------------------------------------------------+---------+ -| :ref:`StringName` | :ref:`action` | ``&""`` | -+------------------------------------------------+--------------------------------------------------------------+---------+ -| :ref:`Mode` | :ref:`mode` | ``0`` | -+------------------------------------------------+--------------------------------------------------------------+---------+ - -Enumerations ------------- - -.. _enum_VisualScriptInputAction_Mode: - -.. _class_VisualScriptInputAction_constant_MODE_PRESSED: - -.. _class_VisualScriptInputAction_constant_MODE_RELEASED: - -.. _class_VisualScriptInputAction_constant_MODE_JUST_PRESSED: - -.. _class_VisualScriptInputAction_constant_MODE_JUST_RELEASED: - -enum **Mode**: - -- **MODE_PRESSED** = **0** --- ``True`` if action is pressed. - -- **MODE_RELEASED** = **1** --- ``True`` if action is released (i.e. not pressed). - -- **MODE_JUST_PRESSED** = **2** --- ``True`` on the frame the action was pressed. - -- **MODE_JUST_RELEASED** = **3** --- ``True`` on the frame the action was released. - -Property Descriptions ---------------------- - -.. _class_VisualScriptInputAction_property_action: - -- :ref:`StringName` **action** - -+-----------+------------------------+ -| *Default* | ``&""`` | -+-----------+------------------------+ -| *Setter* | set_action_name(value) | -+-----------+------------------------+ -| *Getter* | get_action_name() | -+-----------+------------------------+ - -Name of the action. - ----- - -.. _class_VisualScriptInputAction_property_mode: - -- :ref:`Mode` **mode** - -+-----------+------------------------+ -| *Default* | ``0`` | -+-----------+------------------------+ -| *Setter* | set_action_mode(value) | -+-----------+------------------------+ -| *Getter* | get_action_mode() | -+-----------+------------------------+ - -State of the action to check. See :ref:`Mode` for options. - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualscriptiterator.rst b/classes/class_visualscriptiterator.rst deleted file mode 100644 index fcf1c0df4..000000000 --- a/classes/class_visualscriptiterator.rst +++ /dev/null @@ -1,41 +0,0 @@ -: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/modules/visual_script/doc_classes/VisualScriptIterator.xml. - -.. _class_VisualScriptIterator: - -VisualScriptIterator -==================== - -**Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -Steps through items in a given input. - -Description ------------ - -This node steps through each item in a given input. Input can be any sequence data type, such as an :ref:`Array` or :ref:`String`. When each item has been processed, execution passed out the ``exit`` Sequence port. - -\ **Input Ports:**\ - -- Sequence: ``for (elem) in (input)``\ - -- Data (variant): ``input``\ - -\ **Output Ports:**\ - -- Sequence: ``each``\ - -- Sequence: ``exit``\ - -- Data (variant): ``elem`` - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualscriptlists.rst b/classes/class_visualscriptlists.rst deleted file mode 100644 index 9760ba92e..000000000 --- a/classes/class_visualscriptlists.rst +++ /dev/null @@ -1,115 +0,0 @@ -: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/modules/visual_script/doc_classes/VisualScriptLists.xml. - -.. _class_VisualScriptLists: - -VisualScriptLists -================= - -**Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -**Inherited By:** :ref:`VisualScriptComposeArray` - -A Visual Script virtual class for in-graph editable nodes. - -Description ------------ - -A Visual Script virtual class that defines the shape and the default behavior of the nodes that have to be in-graph editable nodes. - -Methods -------- - -+------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_input_data_port` **(** :ref:`Variant.Type` type, :ref:`String` name, :ref:`int` index **)** | -+------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_output_data_port` **(** :ref:`Variant.Type` type, :ref:`String` name, :ref:`int` index **)** | -+------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_input_data_port` **(** :ref:`int` index **)** | -+------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_output_data_port` **(** :ref:`int` index **)** | -+------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_input_data_port_name` **(** :ref:`int` index, :ref:`String` name **)** | -+------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_input_data_port_type` **(** :ref:`int` index, :ref:`Variant.Type` type **)** | -+------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_output_data_port_name` **(** :ref:`int` index, :ref:`String` name **)** | -+------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_output_data_port_type` **(** :ref:`int` index, :ref:`Variant.Type` type **)** | -+------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - -Method Descriptions -------------------- - -.. _class_VisualScriptLists_method_add_input_data_port: - -- void **add_input_data_port** **(** :ref:`Variant.Type` type, :ref:`String` name, :ref:`int` index **)** - -Adds an input port to the Visual Script node. - ----- - -.. _class_VisualScriptLists_method_add_output_data_port: - -- void **add_output_data_port** **(** :ref:`Variant.Type` type, :ref:`String` name, :ref:`int` index **)** - -Adds an output port to the Visual Script node. - ----- - -.. _class_VisualScriptLists_method_remove_input_data_port: - -- void **remove_input_data_port** **(** :ref:`int` index **)** - -Removes an input port from the Visual Script node. - ----- - -.. _class_VisualScriptLists_method_remove_output_data_port: - -- void **remove_output_data_port** **(** :ref:`int` index **)** - -Removes an output port from the Visual Script node. - ----- - -.. _class_VisualScriptLists_method_set_input_data_port_name: - -- void **set_input_data_port_name** **(** :ref:`int` index, :ref:`String` name **)** - -Sets the name of an input port. - ----- - -.. _class_VisualScriptLists_method_set_input_data_port_type: - -- void **set_input_data_port_type** **(** :ref:`int` index, :ref:`Variant.Type` type **)** - -Sets the type of an input port. - ----- - -.. _class_VisualScriptLists_method_set_output_data_port_name: - -- void **set_output_data_port_name** **(** :ref:`int` index, :ref:`String` name **)** - -Sets the name of an output port. - ----- - -.. _class_VisualScriptLists_method_set_output_data_port_type: - -- void **set_output_data_port_type** **(** :ref:`int` index, :ref:`Variant.Type` type **)** - -Sets the type of an output port. - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualscriptlocalvar.rst b/classes/class_visualscriptlocalvar.rst deleted file mode 100644 index 7ce4b06cf..000000000 --- a/classes/class_visualscriptlocalvar.rst +++ /dev/null @@ -1,77 +0,0 @@ -: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/modules/visual_script/doc_classes/VisualScriptLocalVar.xml. - -.. _class_VisualScriptLocalVar: - -VisualScriptLocalVar -==================== - -**Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -Gets a local variable's value. - -Description ------------ - -Returns a local variable's value. "Var Name" must be supplied, with an optional type. - -\ **Input Ports:**\ - -none - -\ **Output Ports:**\ - -- Data (variant): ``get`` - -Properties ----------- - -+-----------------------------------------------------+---------------------------------------------------------------+------------------+ -| :ref:`Variant.Type` | :ref:`type` | ``0`` | -+-----------------------------------------------------+---------------------------------------------------------------+------------------+ -| :ref:`StringName` | :ref:`var_name` | ``&"new_local"`` | -+-----------------------------------------------------+---------------------------------------------------------------+------------------+ - -Property Descriptions ---------------------- - -.. _class_VisualScriptLocalVar_property_type: - -- :ref:`Variant.Type` **type** - -+-----------+---------------------+ -| *Default* | ``0`` | -+-----------+---------------------+ -| *Setter* | set_var_type(value) | -+-----------+---------------------+ -| *Getter* | get_var_type() | -+-----------+---------------------+ - -The local variable's type. - ----- - -.. _class_VisualScriptLocalVar_property_var_name: - -- :ref:`StringName` **var_name** - -+-----------+---------------------+ -| *Default* | ``&"new_local"`` | -+-----------+---------------------+ -| *Setter* | set_var_name(value) | -+-----------+---------------------+ -| *Getter* | get_var_name() | -+-----------+---------------------+ - -The local variable's name. - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualscriptlocalvarset.rst b/classes/class_visualscriptlocalvarset.rst deleted file mode 100644 index 2199cbdfb..000000000 --- a/classes/class_visualscriptlocalvarset.rst +++ /dev/null @@ -1,81 +0,0 @@ -: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/modules/visual_script/doc_classes/VisualScriptLocalVarSet.xml. - -.. _class_VisualScriptLocalVarSet: - -VisualScriptLocalVarSet -======================= - -**Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -Changes a local variable's value. - -Description ------------ - -Changes a local variable's value to the given input. The new value is also provided on an output Data port. - -\ **Input Ports:**\ - -- Sequence - -- Data (variant): ``set``\ - -\ **Output Ports:**\ - -- Sequence - -- Data (variant): ``get`` - -Properties ----------- - -+-----------------------------------------------------+------------------------------------------------------------------+------------------+ -| :ref:`Variant.Type` | :ref:`type` | ``0`` | -+-----------------------------------------------------+------------------------------------------------------------------+------------------+ -| :ref:`StringName` | :ref:`var_name` | ``&"new_local"`` | -+-----------------------------------------------------+------------------------------------------------------------------+------------------+ - -Property Descriptions ---------------------- - -.. _class_VisualScriptLocalVarSet_property_type: - -- :ref:`Variant.Type` **type** - -+-----------+---------------------+ -| *Default* | ``0`` | -+-----------+---------------------+ -| *Setter* | set_var_type(value) | -+-----------+---------------------+ -| *Getter* | get_var_type() | -+-----------+---------------------+ - -The local variable's type. - ----- - -.. _class_VisualScriptLocalVarSet_property_var_name: - -- :ref:`StringName` **var_name** - -+-----------+---------------------+ -| *Default* | ``&"new_local"`` | -+-----------+---------------------+ -| *Setter* | set_var_name(value) | -+-----------+---------------------+ -| *Getter* | get_var_name() | -+-----------+---------------------+ - -The local variable's name. - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualscriptmathconstant.rst b/classes/class_visualscriptmathconstant.rst deleted file mode 100644 index b7c187833..000000000 --- a/classes/class_visualscriptmathconstant.rst +++ /dev/null @@ -1,102 +0,0 @@ -: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/modules/visual_script/doc_classes/VisualScriptMathConstant.xml. - -.. _class_VisualScriptMathConstant: - -VisualScriptMathConstant -======================== - -**Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -Commonly used mathematical constants. - -Description ------------ - -Provides common math constants, such as Pi, on an output Data port. - -\ **Input Ports:**\ - -none - -\ **Output Ports:**\ - -- Data (variant): ``get`` - -Properties ----------- - -+-----------------------------------------------------------------+-------------------------------------------------------------------+-------+ -| :ref:`MathConstant` | :ref:`constant` | ``0`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------+-------+ - -Enumerations ------------- - -.. _enum_VisualScriptMathConstant_MathConstant: - -.. _class_VisualScriptMathConstant_constant_MATH_CONSTANT_ONE: - -.. _class_VisualScriptMathConstant_constant_MATH_CONSTANT_PI: - -.. _class_VisualScriptMathConstant_constant_MATH_CONSTANT_HALF_PI: - -.. _class_VisualScriptMathConstant_constant_MATH_CONSTANT_TAU: - -.. _class_VisualScriptMathConstant_constant_MATH_CONSTANT_E: - -.. _class_VisualScriptMathConstant_constant_MATH_CONSTANT_SQRT2: - -.. _class_VisualScriptMathConstant_constant_MATH_CONSTANT_INF: - -.. _class_VisualScriptMathConstant_constant_MATH_CONSTANT_NAN: - -.. _class_VisualScriptMathConstant_constant_MATH_CONSTANT_MAX: - -enum **MathConstant**: - -- **MATH_CONSTANT_ONE** = **0** --- Unity: ``1``. - -- **MATH_CONSTANT_PI** = **1** --- Pi: ``3.141593``. - -- **MATH_CONSTANT_HALF_PI** = **2** --- Pi divided by two: ``1.570796``. - -- **MATH_CONSTANT_TAU** = **3** --- Tau: ``6.283185``. - -- **MATH_CONSTANT_E** = **4** --- Mathematical constant ``e``, the natural log base: ``2.718282``. - -- **MATH_CONSTANT_SQRT2** = **5** --- Square root of two: ``1.414214``. - -- **MATH_CONSTANT_INF** = **6** --- Infinity: ``inf``. - -- **MATH_CONSTANT_NAN** = **7** --- Not a number: ``nan``. - -- **MATH_CONSTANT_MAX** = **8** --- Represents the size of the :ref:`MathConstant` enum. - -Property Descriptions ---------------------- - -.. _class_VisualScriptMathConstant_property_constant: - -- :ref:`MathConstant` **constant** - -+-----------+--------------------------+ -| *Default* | ``0`` | -+-----------+--------------------------+ -| *Setter* | set_math_constant(value) | -+-----------+--------------------------+ -| *Getter* | get_math_constant() | -+-----------+--------------------------+ - -The math constant. - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualscriptnode.rst b/classes/class_visualscriptnode.rst deleted file mode 100644 index d1b8521e5..000000000 --- a/classes/class_visualscriptnode.rst +++ /dev/null @@ -1,84 +0,0 @@ -: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/modules/visual_script/doc_classes/VisualScriptNode.xml. - -.. _class_VisualScriptNode: - -VisualScriptNode -================ - -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -**Inherited By:** :ref:`VisualScriptBasicTypeConstant`, :ref:`VisualScriptBuiltinFunc`, :ref:`VisualScriptClassConstant`, :ref:`VisualScriptComment`, :ref:`VisualScriptCondition`, :ref:`VisualScriptConstant`, :ref:`VisualScriptConstructor`, :ref:`VisualScriptCustomNode`, :ref:`VisualScriptDeconstruct`, :ref:`VisualScriptEmitSignal`, :ref:`VisualScriptEngineSingleton`, :ref:`VisualScriptExpression`, :ref:`VisualScriptFunction`, :ref:`VisualScriptFunctionCall`, :ref:`VisualScriptGlobalConstant`, :ref:`VisualScriptIndexGet`, :ref:`VisualScriptIndexSet`, :ref:`VisualScriptInputAction`, :ref:`VisualScriptIterator`, :ref:`VisualScriptLists`, :ref:`VisualScriptLocalVar`, :ref:`VisualScriptLocalVarSet`, :ref:`VisualScriptMathConstant`, :ref:`VisualScriptOperator`, :ref:`VisualScriptPreload`, :ref:`VisualScriptPropertyGet`, :ref:`VisualScriptPropertySet`, :ref:`VisualScriptResourcePath`, :ref:`VisualScriptReturn`, :ref:`VisualScriptSceneNode`, :ref:`VisualScriptSceneTree`, :ref:`VisualScriptSelect`, :ref:`VisualScriptSelf`, :ref:`VisualScriptSequence`, :ref:`VisualScriptSubCall`, :ref:`VisualScriptSwitch`, :ref:`VisualScriptTypeCast`, :ref:`VisualScriptVariableGet`, :ref:`VisualScriptVariableSet`, :ref:`VisualScriptWhile`, :ref:`VisualScriptYield`, :ref:`VisualScriptYieldSignal` - -A node which is part of a :ref:`VisualScript`. - -Description ------------ - -A node which is part of a :ref:`VisualScript`. Not to be confused with :ref:`Node`, which is a part of a :ref:`SceneTree`. - -Methods -------- - -+-----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get_default_input_value` **(** :ref:`int` port_idx **)** |const| | -+-----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`VisualScript` | :ref:`get_visual_script` **(** **)** |const| | -+-----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`ports_changed_notify` **(** **)** | -+-----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_default_input_value` **(** :ref:`int` port_idx, :ref:`Variant` value **)** | -+-----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - -Signals -------- - -.. _class_VisualScriptNode_signal_ports_changed: - -- **ports_changed** **(** **)** - -Emitted when the available input/output ports are changed. - -Method Descriptions -------------------- - -.. _class_VisualScriptNode_method_get_default_input_value: - -- :ref:`Variant` **get_default_input_value** **(** :ref:`int` port_idx **)** |const| - -Returns the default value of a given port. The default value is used when nothing is connected to the port. - ----- - -.. _class_VisualScriptNode_method_get_visual_script: - -- :ref:`VisualScript` **get_visual_script** **(** **)** |const| - -Returns the :ref:`VisualScript` instance the node is bound to. - ----- - -.. _class_VisualScriptNode_method_ports_changed_notify: - -- void **ports_changed_notify** **(** **)** - -Notify that the node's ports have changed. Usually used in conjunction with :ref:`VisualScriptCustomNode` . - ----- - -.. _class_VisualScriptNode_method_set_default_input_value: - -- void **set_default_input_value** **(** :ref:`int` port_idx, :ref:`Variant` value **)** - -Change the default value of a given port. - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualscriptoperator.rst b/classes/class_visualscriptoperator.rst deleted file mode 100644 index 773878f5b..000000000 --- a/classes/class_visualscriptoperator.rst +++ /dev/null @@ -1,77 +0,0 @@ -: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/modules/visual_script/doc_classes/VisualScriptOperator.xml. - -.. _class_VisualScriptOperator: - -VisualScriptOperator -==================== - -**Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -A Visual Script node that performs an operation on two values. - -Description ------------ - -**Input Ports:**\ - -- Data (variant): ``A``\ - -- Data (variant): ``B``\ - -\ **Output Ports:**\ - -- Data (variant): ``result`` - -Properties ----------- - -+-------------------------------------------------------------+---------------------------------------------------------------+-------+ -| :ref:`Variant.Operator` | :ref:`operator` | ``6`` | -+-------------------------------------------------------------+---------------------------------------------------------------+-------+ -| :ref:`Variant.Type` | :ref:`type` | ``0`` | -+-------------------------------------------------------------+---------------------------------------------------------------+-------+ - -Property Descriptions ---------------------- - -.. _class_VisualScriptOperator_property_operator: - -- :ref:`Variant.Operator` **operator** - -+-----------+---------------------+ -| *Default* | ``6`` | -+-----------+---------------------+ -| *Setter* | set_operator(value) | -+-----------+---------------------+ -| *Getter* | get_operator() | -+-----------+---------------------+ - -The operation to be performed. See :ref:`Variant.Operator` for available options. - ----- - -.. _class_VisualScriptOperator_property_type: - -- :ref:`Variant.Type` **type** - -+-----------+------------------+ -| *Default* | ``0`` | -+-----------+------------------+ -| *Setter* | set_typed(value) | -+-----------+------------------+ -| *Getter* | get_typed() | -+-----------+------------------+ - -The type of the values for this operation. See :ref:`Variant.Type` for available options. - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualscriptpreload.rst b/classes/class_visualscriptpreload.rst deleted file mode 100644 index cba07b56c..000000000 --- a/classes/class_visualscriptpreload.rst +++ /dev/null @@ -1,57 +0,0 @@ -: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/modules/visual_script/doc_classes/VisualScriptPreload.xml. - -.. _class_VisualScriptPreload: - -VisualScriptPreload -=================== - -**Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -Creates a new :ref:`Resource` or loads one from the filesystem. - -Description ------------ - -Creates a new :ref:`Resource` or loads one from the filesystem. - -\ **Input Ports:**\ - -none - -\ **Output Ports:**\ - -- Data (object): ``res`` - -Properties ----------- - -+---------------------------------+--------------------------------------------------------------+ -| :ref:`Resource` | :ref:`resource` | -+---------------------------------+--------------------------------------------------------------+ - -Property Descriptions ---------------------- - -.. _class_VisualScriptPreload_property_resource: - -- :ref:`Resource` **resource** - -+----------+--------------------+ -| *Setter* | set_preload(value) | -+----------+--------------------+ -| *Getter* | get_preload() | -+----------+--------------------+ - -The :ref:`Resource` to load. - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualscriptpropertyget.rst b/classes/class_visualscriptpropertyget.rst deleted file mode 100644 index add1dd967..000000000 --- a/classes/class_visualscriptpropertyget.rst +++ /dev/null @@ -1,174 +0,0 @@ -: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/modules/visual_script/doc_classes/VisualScriptPropertyGet.xml. - -.. _class_VisualScriptPropertyGet: - -VisualScriptPropertyGet -======================= - -**Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -A Visual Script node returning a value of a property from an :ref:`Object`. - -Description ------------ - -``VisualScriptPropertyGet`` can return a value of any property from the current object or other objects. - -Properties ----------- - -+--------------------------------------------------------+------------------------------------------------------------------------+---------------+ -| :ref:`String` | :ref:`base_script` | | -+--------------------------------------------------------+------------------------------------------------------------------------+---------------+ -| :ref:`StringName` | :ref:`base_type` | ``&"Object"`` | -+--------------------------------------------------------+------------------------------------------------------------------------+---------------+ -| :ref:`Variant.Type` | :ref:`basic_type` | | -+--------------------------------------------------------+------------------------------------------------------------------------+---------------+ -| :ref:`StringName` | :ref:`index` | | -+--------------------------------------------------------+------------------------------------------------------------------------+---------------+ -| :ref:`NodePath` | :ref:`node_path` | | -+--------------------------------------------------------+------------------------------------------------------------------------+---------------+ -| :ref:`StringName` | :ref:`property` | ``&""`` | -+--------------------------------------------------------+------------------------------------------------------------------------+---------------+ -| :ref:`CallMode` | :ref:`set_mode` | ``0`` | -+--------------------------------------------------------+------------------------------------------------------------------------+---------------+ - -Enumerations ------------- - -.. _enum_VisualScriptPropertyGet_CallMode: - -.. _class_VisualScriptPropertyGet_constant_CALL_MODE_SELF: - -.. _class_VisualScriptPropertyGet_constant_CALL_MODE_NODE_PATH: - -.. _class_VisualScriptPropertyGet_constant_CALL_MODE_INSTANCE: - -.. _class_VisualScriptPropertyGet_constant_CALL_MODE_BASIC_TYPE: - -enum **CallMode**: - -- **CALL_MODE_SELF** = **0** --- The property will be retrieved from this :ref:`Object`. - -- **CALL_MODE_NODE_PATH** = **1** --- The property will be retrieved from the given :ref:`Node` in the scene tree. - -- **CALL_MODE_INSTANCE** = **2** --- The property will be retrieved from an instanced node with the given type and script. - -- **CALL_MODE_BASIC_TYPE** = **3** --- The property will be retrieved from a GDScript basic type (e.g. :ref:`Vector2`). - -Property Descriptions ---------------------- - -.. _class_VisualScriptPropertyGet_property_base_script: - -- :ref:`String` **base_script** - -+----------+------------------------+ -| *Setter* | set_base_script(value) | -+----------+------------------------+ -| *Getter* | get_base_script() | -+----------+------------------------+ - -The script to be used when :ref:`set_mode` is set to :ref:`CALL_MODE_INSTANCE`. - ----- - -.. _class_VisualScriptPropertyGet_property_base_type: - -- :ref:`StringName` **base_type** - -+-----------+----------------------+ -| *Default* | ``&"Object"`` | -+-----------+----------------------+ -| *Setter* | set_base_type(value) | -+-----------+----------------------+ -| *Getter* | get_base_type() | -+-----------+----------------------+ - -The base type to be used when :ref:`set_mode` is set to :ref:`CALL_MODE_INSTANCE`. - ----- - -.. _class_VisualScriptPropertyGet_property_basic_type: - -- :ref:`Variant.Type` **basic_type** - -+----------+-----------------------+ -| *Setter* | set_basic_type(value) | -+----------+-----------------------+ -| *Getter* | get_basic_type() | -+----------+-----------------------+ - -The type to be used when :ref:`set_mode` is set to :ref:`CALL_MODE_BASIC_TYPE`. - ----- - -.. _class_VisualScriptPropertyGet_property_index: - -- :ref:`StringName` **index** - -+----------+------------------+ -| *Setter* | set_index(value) | -+----------+------------------+ -| *Getter* | get_index() | -+----------+------------------+ - -The indexed name of the property to retrieve. See :ref:`Object.get_indexed` for details. - ----- - -.. _class_VisualScriptPropertyGet_property_node_path: - -- :ref:`NodePath` **node_path** - -+----------+----------------------+ -| *Setter* | set_base_path(value) | -+----------+----------------------+ -| *Getter* | get_base_path() | -+----------+----------------------+ - -The node path to use when :ref:`set_mode` is set to :ref:`CALL_MODE_NODE_PATH`. - ----- - -.. _class_VisualScriptPropertyGet_property_property: - -- :ref:`StringName` **property** - -+-----------+---------------------+ -| *Default* | ``&""`` | -+-----------+---------------------+ -| *Setter* | set_property(value) | -+-----------+---------------------+ -| *Getter* | get_property() | -+-----------+---------------------+ - -The name of the property to retrieve. Changing this will clear :ref:`index`. - ----- - -.. _class_VisualScriptPropertyGet_property_set_mode: - -- :ref:`CallMode` **set_mode** - -+-----------+----------------------+ -| *Default* | ``0`` | -+-----------+----------------------+ -| *Setter* | set_call_mode(value) | -+-----------+----------------------+ -| *Getter* | get_call_mode() | -+-----------+----------------------+ - -``set_mode`` determines the target object from which the property will be retrieved. See :ref:`CallMode` for options. - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualscriptpropertyset.rst b/classes/class_visualscriptpropertyset.rst deleted file mode 100644 index 3020b209d..000000000 --- a/classes/class_visualscriptpropertyset.rst +++ /dev/null @@ -1,242 +0,0 @@ -: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/modules/visual_script/doc_classes/VisualScriptPropertySet.xml. - -.. _class_VisualScriptPropertySet: - -VisualScriptPropertySet -======================= - -**Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -A Visual Script node that sets a property of an :ref:`Object`. - -Description ------------ - -``VisualScriptPropertySet`` can set the value of any property from the current object or other objects. - -Properties ----------- - -+--------------------------------------------------------+------------------------------------------------------------------------+---------------+ -| :ref:`AssignOp` | :ref:`assign_op` | ``0`` | -+--------------------------------------------------------+------------------------------------------------------------------------+---------------+ -| :ref:`String` | :ref:`base_script` | | -+--------------------------------------------------------+------------------------------------------------------------------------+---------------+ -| :ref:`StringName` | :ref:`base_type` | ``&"Object"`` | -+--------------------------------------------------------+------------------------------------------------------------------------+---------------+ -| :ref:`Variant.Type` | :ref:`basic_type` | | -+--------------------------------------------------------+------------------------------------------------------------------------+---------------+ -| :ref:`StringName` | :ref:`index` | | -+--------------------------------------------------------+------------------------------------------------------------------------+---------------+ -| :ref:`NodePath` | :ref:`node_path` | | -+--------------------------------------------------------+------------------------------------------------------------------------+---------------+ -| :ref:`StringName` | :ref:`property` | ``&""`` | -+--------------------------------------------------------+------------------------------------------------------------------------+---------------+ -| :ref:`CallMode` | :ref:`set_mode` | ``0`` | -+--------------------------------------------------------+------------------------------------------------------------------------+---------------+ - -Enumerations ------------- - -.. _enum_VisualScriptPropertySet_CallMode: - -.. _class_VisualScriptPropertySet_constant_CALL_MODE_SELF: - -.. _class_VisualScriptPropertySet_constant_CALL_MODE_NODE_PATH: - -.. _class_VisualScriptPropertySet_constant_CALL_MODE_INSTANCE: - -.. _class_VisualScriptPropertySet_constant_CALL_MODE_BASIC_TYPE: - -enum **CallMode**: - -- **CALL_MODE_SELF** = **0** --- The property will be set on this :ref:`Object`. - -- **CALL_MODE_NODE_PATH** = **1** --- The property will be set on the given :ref:`Node` in the scene tree. - -- **CALL_MODE_INSTANCE** = **2** --- The property will be set on an instanced node with the given type and script. - -- **CALL_MODE_BASIC_TYPE** = **3** --- The property will be set on a GDScript basic type (e.g. :ref:`Vector2`). - ----- - -.. _enum_VisualScriptPropertySet_AssignOp: - -.. _class_VisualScriptPropertySet_constant_ASSIGN_OP_NONE: - -.. _class_VisualScriptPropertySet_constant_ASSIGN_OP_ADD: - -.. _class_VisualScriptPropertySet_constant_ASSIGN_OP_SUB: - -.. _class_VisualScriptPropertySet_constant_ASSIGN_OP_MUL: - -.. _class_VisualScriptPropertySet_constant_ASSIGN_OP_DIV: - -.. _class_VisualScriptPropertySet_constant_ASSIGN_OP_MOD: - -.. _class_VisualScriptPropertySet_constant_ASSIGN_OP_SHIFT_LEFT: - -.. _class_VisualScriptPropertySet_constant_ASSIGN_OP_SHIFT_RIGHT: - -.. _class_VisualScriptPropertySet_constant_ASSIGN_OP_BIT_AND: - -.. _class_VisualScriptPropertySet_constant_ASSIGN_OP_BIT_OR: - -.. _class_VisualScriptPropertySet_constant_ASSIGN_OP_BIT_XOR: - -enum **AssignOp**: - -- **ASSIGN_OP_NONE** = **0** --- The property will be assigned regularly. - -- **ASSIGN_OP_ADD** = **1** --- The value will be added to the property. Equivalent of doing ``+=``. - -- **ASSIGN_OP_SUB** = **2** --- The value will be subtracted from the property. Equivalent of doing ``-=``. - -- **ASSIGN_OP_MUL** = **3** --- The property will be multiplied by the value. Equivalent of doing ``*=``. - -- **ASSIGN_OP_DIV** = **4** --- The property will be divided by the value. Equivalent of doing ``/=``. - -- **ASSIGN_OP_MOD** = **5** --- A modulo operation will be performed on the property and the value. Equivalent of doing ``%=``. - -- **ASSIGN_OP_SHIFT_LEFT** = **6** --- The property will be binarly shifted to the left by the given value. Equivalent of doing ``<<``. - -- **ASSIGN_OP_SHIFT_RIGHT** = **7** --- The property will be binarly shifted to the right by the given value. Equivalent of doing ``>>``. - -- **ASSIGN_OP_BIT_AND** = **8** --- A binary ``AND`` operation will be performed on the property. Equivalent of doing ``&=``. - -- **ASSIGN_OP_BIT_OR** = **9** --- A binary ``OR`` operation will be performed on the property. Equivalent of doing ``|=``. - -- **ASSIGN_OP_BIT_XOR** = **10** --- A binary ``XOR`` operation will be performed on the property. Equivalent of doing ``^=``. - -Property Descriptions ---------------------- - -.. _class_VisualScriptPropertySet_property_assign_op: - -- :ref:`AssignOp` **assign_op** - -+-----------+----------------------+ -| *Default* | ``0`` | -+-----------+----------------------+ -| *Setter* | set_assign_op(value) | -+-----------+----------------------+ -| *Getter* | get_assign_op() | -+-----------+----------------------+ - -The additional operation to perform when assigning. See :ref:`AssignOp` for options. - ----- - -.. _class_VisualScriptPropertySet_property_base_script: - -- :ref:`String` **base_script** - -+----------+------------------------+ -| *Setter* | set_base_script(value) | -+----------+------------------------+ -| *Getter* | get_base_script() | -+----------+------------------------+ - -The script to be used when :ref:`set_mode` is set to :ref:`CALL_MODE_INSTANCE`. - ----- - -.. _class_VisualScriptPropertySet_property_base_type: - -- :ref:`StringName` **base_type** - -+-----------+----------------------+ -| *Default* | ``&"Object"`` | -+-----------+----------------------+ -| *Setter* | set_base_type(value) | -+-----------+----------------------+ -| *Getter* | get_base_type() | -+-----------+----------------------+ - -The base type to be used when :ref:`set_mode` is set to :ref:`CALL_MODE_INSTANCE`. - ----- - -.. _class_VisualScriptPropertySet_property_basic_type: - -- :ref:`Variant.Type` **basic_type** - -+----------+-----------------------+ -| *Setter* | set_basic_type(value) | -+----------+-----------------------+ -| *Getter* | get_basic_type() | -+----------+-----------------------+ - -The type to be used when :ref:`set_mode` is set to :ref:`CALL_MODE_BASIC_TYPE`. - ----- - -.. _class_VisualScriptPropertySet_property_index: - -- :ref:`StringName` **index** - -+----------+------------------+ -| *Setter* | set_index(value) | -+----------+------------------+ -| *Getter* | get_index() | -+----------+------------------+ - -The indexed name of the property to set. See :ref:`Object.set_indexed` for details. - ----- - -.. _class_VisualScriptPropertySet_property_node_path: - -- :ref:`NodePath` **node_path** - -+----------+----------------------+ -| *Setter* | set_base_path(value) | -+----------+----------------------+ -| *Getter* | get_base_path() | -+----------+----------------------+ - -The node path to use when :ref:`set_mode` is set to :ref:`CALL_MODE_NODE_PATH`. - ----- - -.. _class_VisualScriptPropertySet_property_property: - -- :ref:`StringName` **property** - -+-----------+---------------------+ -| *Default* | ``&""`` | -+-----------+---------------------+ -| *Setter* | set_property(value) | -+-----------+---------------------+ -| *Getter* | get_property() | -+-----------+---------------------+ - -The name of the property to set. Changing this will clear :ref:`index`. - ----- - -.. _class_VisualScriptPropertySet_property_set_mode: - -- :ref:`CallMode` **set_mode** - -+-----------+----------------------+ -| *Default* | ``0`` | -+-----------+----------------------+ -| *Setter* | set_call_mode(value) | -+-----------+----------------------+ -| *Getter* | get_call_mode() | -+-----------+----------------------+ - -``set_mode`` determines the target object on which the property will be set. See :ref:`CallMode` for options. - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualscriptresourcepath.rst b/classes/class_visualscriptresourcepath.rst deleted file mode 100644 index 9a6a7463d..000000000 --- a/classes/class_visualscriptresourcepath.rst +++ /dev/null @@ -1,44 +0,0 @@ -: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/modules/visual_script/doc_classes/VisualScriptResourcePath.xml. - -.. _class_VisualScriptResourcePath: - -VisualScriptResourcePath -======================== - -**Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - - - -Properties ----------- - -+-----------------------------+-----------------------------------------------------------+--------+ -| :ref:`String` | :ref:`path` | ``""`` | -+-----------------------------+-----------------------------------------------------------+--------+ - -Property Descriptions ---------------------- - -.. _class_VisualScriptResourcePath_property_path: - -- :ref:`String` **path** - -+-----------+--------------------------+ -| *Default* | ``""`` | -+-----------+--------------------------+ -| *Setter* | set_resource_path(value) | -+-----------+--------------------------+ -| *Getter* | get_resource_path() | -+-----------+--------------------------+ - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualscriptreturn.rst b/classes/class_visualscriptreturn.rst deleted file mode 100644 index ea1ff6b37..000000000 --- a/classes/class_visualscriptreturn.rst +++ /dev/null @@ -1,79 +0,0 @@ -: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/modules/visual_script/doc_classes/VisualScriptReturn.xml. - -.. _class_VisualScriptReturn: - -VisualScriptReturn -================== - -**Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -Exits a function and returns an optional value. - -Description ------------ - -Ends the execution of a function and returns control to the calling function. Optionally, it can return a :ref:`Variant` value. - -\ **Input Ports:**\ - -- Sequence - -- Data (variant): ``result`` (optional) - -\ **Output Ports:**\ - -none - -Properties ----------- - -+-----------------------------------------------------+-------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`return_enabled` | ``false`` | -+-----------------------------------------------------+-------------------------------------------------------------------------+-----------+ -| :ref:`Variant.Type` | :ref:`return_type` | ``0`` | -+-----------------------------------------------------+-------------------------------------------------------------------------+-----------+ - -Property Descriptions ---------------------- - -.. _class_VisualScriptReturn_property_return_enabled: - -- :ref:`bool` **return_enabled** - -+-----------+--------------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------------+ -| *Setter* | set_enable_return_value(value) | -+-----------+--------------------------------+ -| *Getter* | is_return_value_enabled() | -+-----------+--------------------------------+ - -If ``true``, the ``return`` input port is available. - ----- - -.. _class_VisualScriptReturn_property_return_type: - -- :ref:`Variant.Type` **return_type** - -+-----------+------------------------+ -| *Default* | ``0`` | -+-----------+------------------------+ -| *Setter* | set_return_type(value) | -+-----------+------------------------+ -| *Getter* | get_return_type() | -+-----------+------------------------+ - -The return value's data type. - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualscriptscenenode.rst b/classes/class_visualscriptscenenode.rst deleted file mode 100644 index e40fe8997..000000000 --- a/classes/class_visualscriptscenenode.rst +++ /dev/null @@ -1,59 +0,0 @@ -: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/modules/visual_script/doc_classes/VisualScriptSceneNode.xml. - -.. _class_VisualScriptSceneNode: - -VisualScriptSceneNode -===================== - -**Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -Node reference. - -Description ------------ - -A direct reference to a node. - -\ **Input Ports:**\ - -none - -\ **Output Ports:**\ - -- Data: ``node`` (obj) - -Properties ----------- - -+---------------------------------+------------------------------------------------------------------+-------------------+ -| :ref:`NodePath` | :ref:`node_path` | ``NodePath(".")`` | -+---------------------------------+------------------------------------------------------------------+-------------------+ - -Property Descriptions ---------------------- - -.. _class_VisualScriptSceneNode_property_node_path: - -- :ref:`NodePath` **node_path** - -+-----------+----------------------+ -| *Default* | ``NodePath(".")`` | -+-----------+----------------------+ -| *Setter* | set_node_path(value) | -+-----------+----------------------+ -| *Getter* | get_node_path() | -+-----------+----------------------+ - -The node's path in the scene tree. - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualscriptselect.rst b/classes/class_visualscriptselect.rst deleted file mode 100644 index 226d8565f..000000000 --- a/classes/class_visualscriptselect.rst +++ /dev/null @@ -1,63 +0,0 @@ -: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/modules/visual_script/doc_classes/VisualScriptSelect.xml. - -.. _class_VisualScriptSelect: - -VisualScriptSelect -================== - -**Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -Chooses between two input values. - -Description ------------ - -Chooses between two input values based on a Boolean condition. - -\ **Input Ports:**\ - -- Data (boolean): ``cond``\ - -- Data (variant): ``a``\ - -- Data (variant): ``b``\ - -\ **Output Ports:**\ - -- Data (variant): ``out`` - -Properties ----------- - -+-----------------------------------------------------+-----------------------------------------------------+-------+ -| :ref:`Variant.Type` | :ref:`type` | ``0`` | -+-----------------------------------------------------+-----------------------------------------------------+-------+ - -Property Descriptions ---------------------- - -.. _class_VisualScriptSelect_property_type: - -- :ref:`Variant.Type` **type** - -+-----------+------------------+ -| *Default* | ``0`` | -+-----------+------------------+ -| *Setter* | set_typed(value) | -+-----------+------------------+ -| *Getter* | get_typed() | -+-----------+------------------+ - -The input variables' type. - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualscriptsequence.rst b/classes/class_visualscriptsequence.rst deleted file mode 100644 index c8ffb05f6..000000000 --- a/classes/class_visualscriptsequence.rst +++ /dev/null @@ -1,63 +0,0 @@ -: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/modules/visual_script/doc_classes/VisualScriptSequence.xml. - -.. _class_VisualScriptSequence: - -VisualScriptSequence -==================== - -**Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -Executes a series of Sequence ports. - -Description ------------ - -Steps through a series of one or more output Sequence ports. The ``current`` data port outputs the currently executing item. - -\ **Input Ports:**\ - -- Sequence: ``in order``\ - -\ **Output Ports:**\ - -- Sequence: ``1``\ - -- Sequence: ``2 - n`` (optional) - -- Data (int): ``current`` - -Properties ----------- - -+-----------------------+---------------------------------------------------------+-------+ -| :ref:`int` | :ref:`steps` | ``1`` | -+-----------------------+---------------------------------------------------------+-------+ - -Property Descriptions ---------------------- - -.. _class_VisualScriptSequence_property_steps: - -- :ref:`int` **steps** - -+-----------+------------------+ -| *Default* | ``1`` | -+-----------+------------------+ -| *Setter* | set_steps(value) | -+-----------+------------------+ -| *Getter* | get_steps() | -+-----------+------------------+ - -The number of steps in the sequence. - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualscriptsubcall.rst b/classes/class_visualscriptsubcall.rst deleted file mode 100644 index d6ab09d91..000000000 --- a/classes/class_visualscriptsubcall.rst +++ /dev/null @@ -1,27 +0,0 @@ -: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/modules/visual_script/doc_classes/VisualScriptSubCall.xml. - -.. _class_VisualScriptSubCall: - -VisualScriptSubCall -=================== - -**Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -Calls a method called ``_subcall`` in this object. - -Description ------------ - -``VisualScriptSubCall`` will call method named ``_subcall`` in the current script. It will fail if the method doesn't exist or the provided arguments are wrong. - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualscriptswitch.rst b/classes/class_visualscriptswitch.rst deleted file mode 100644 index dc7812c77..000000000 --- a/classes/class_visualscriptswitch.rst +++ /dev/null @@ -1,45 +0,0 @@ -: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/modules/visual_script/doc_classes/VisualScriptSwitch.xml. - -.. _class_VisualScriptSwitch: - -VisualScriptSwitch -================== - -**Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -Branches program flow based on a given input's value. - -Description ------------ - -Branches the flow based on an input's value. Use **Case Count** in the Inspector to set the number of branches and each comparison's optional type. - -\ **Input Ports:**\ - -- Sequence: ``'input' is``\ - -- Data (variant): ``=``\ - -- Data (variant): ``=`` (optional) - -- Data (variant): ``input``\ - -\ **Output Ports:**\ - -- Sequence - -- Sequence (optional) - -- Sequence: ``done`` - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualscripttypecast.rst b/classes/class_visualscripttypecast.rst deleted file mode 100644 index cb8b44c4b..000000000 --- a/classes/class_visualscripttypecast.rst +++ /dev/null @@ -1,69 +0,0 @@ -: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/modules/visual_script/doc_classes/VisualScriptTypeCast.xml. - -.. _class_VisualScriptTypeCast: - -VisualScriptTypeCast -==================== - -**Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -A Visual Script node that casts the given value to another type. - -Description ------------ - -``VisualScriptTypeCast`` will perform a type conversion to an :ref:`Object`-derived type. - -Properties ----------- - -+-------------------------------------+---------------------------------------------------------------------+---------------+ -| :ref:`String` | :ref:`base_script` | ``""`` | -+-------------------------------------+---------------------------------------------------------------------+---------------+ -| :ref:`StringName` | :ref:`base_type` | ``&"Object"`` | -+-------------------------------------+---------------------------------------------------------------------+---------------+ - -Property Descriptions ---------------------- - -.. _class_VisualScriptTypeCast_property_base_script: - -- :ref:`String` **base_script** - -+-----------+------------------------+ -| *Default* | ``""`` | -+-----------+------------------------+ -| *Setter* | set_base_script(value) | -+-----------+------------------------+ -| *Getter* | get_base_script() | -+-----------+------------------------+ - -The target script class to be converted to. If none, only the :ref:`base_type` will be used. - ----- - -.. _class_VisualScriptTypeCast_property_base_type: - -- :ref:`StringName` **base_type** - -+-----------+----------------------+ -| *Default* | ``&"Object"`` | -+-----------+----------------------+ -| *Setter* | set_base_type(value) | -+-----------+----------------------+ -| *Getter* | get_base_type() | -+-----------+----------------------+ - -The target type to be converted to. - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualscriptvariableget.rst b/classes/class_visualscriptvariableget.rst deleted file mode 100644 index 091882e33..000000000 --- a/classes/class_visualscriptvariableget.rst +++ /dev/null @@ -1,59 +0,0 @@ -: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/modules/visual_script/doc_classes/VisualScriptVariableGet.xml. - -.. _class_VisualScriptVariableGet: - -VisualScriptVariableGet -======================= - -**Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -Gets a variable's value. - -Description ------------ - -Returns a variable's value. "Var Name" must be supplied, with an optional type. - -\ **Input Ports:**\ - -none - -\ **Output Ports:**\ - -- Data (variant): ``value`` - -Properties ----------- - -+-------------------------------------+------------------------------------------------------------------+---------+ -| :ref:`StringName` | :ref:`var_name` | ``&""`` | -+-------------------------------------+------------------------------------------------------------------+---------+ - -Property Descriptions ---------------------- - -.. _class_VisualScriptVariableGet_property_var_name: - -- :ref:`StringName` **var_name** - -+-----------+---------------------+ -| *Default* | ``&""`` | -+-----------+---------------------+ -| *Setter* | set_variable(value) | -+-----------+---------------------+ -| *Getter* | get_variable() | -+-----------+---------------------+ - -The variable's name. - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualscriptvariableset.rst b/classes/class_visualscriptvariableset.rst deleted file mode 100644 index 79a52e9c0..000000000 --- a/classes/class_visualscriptvariableset.rst +++ /dev/null @@ -1,61 +0,0 @@ -: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/modules/visual_script/doc_classes/VisualScriptVariableSet.xml. - -.. _class_VisualScriptVariableSet: - -VisualScriptVariableSet -======================= - -**Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -Changes a variable's value. - -Description ------------ - -Changes a variable's value to the given input. - -\ **Input Ports:**\ - -- Sequence - -- Data (variant): ``set``\ - -\ **Output Ports:**\ - -- Sequence - -Properties ----------- - -+-------------------------------------+------------------------------------------------------------------+---------+ -| :ref:`StringName` | :ref:`var_name` | ``&""`` | -+-------------------------------------+------------------------------------------------------------------+---------+ - -Property Descriptions ---------------------- - -.. _class_VisualScriptVariableSet_property_var_name: - -- :ref:`StringName` **var_name** - -+-----------+---------------------+ -| *Default* | ``&""`` | -+-----------+---------------------+ -| *Setter* | set_variable(value) | -+-----------+---------------------+ -| *Getter* | get_variable() | -+-----------+---------------------+ - -The variable's name. - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualscriptwhile.rst b/classes/class_visualscriptwhile.rst deleted file mode 100644 index ae8da0718..000000000 --- a/classes/class_visualscriptwhile.rst +++ /dev/null @@ -1,39 +0,0 @@ -: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/modules/visual_script/doc_classes/VisualScriptWhile.xml. - -.. _class_VisualScriptWhile: - -VisualScriptWhile -================= - -**Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -Conditional loop. - -Description ------------ - -Loops while a condition is ``true``. Execution continues out the ``exit`` Sequence port when the loop terminates. - -\ **Input Ports:**\ - -- Sequence: ``while(cond)``\ - -- Data (bool): ``cond``\ - -\ **Output Ports:**\ - -- Sequence: ``repeat``\ - -- Sequence: ``exit`` - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualscriptyield.rst b/classes/class_visualscriptyield.rst deleted file mode 100644 index a21a01063..000000000 --- a/classes/class_visualscriptyield.rst +++ /dev/null @@ -1,86 +0,0 @@ -: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/modules/visual_script/doc_classes/VisualScriptYield.xml. - -.. _class_VisualScriptYield: - -VisualScriptYield -================= - -**Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -A Visual Script node used to pause a function execution. - -Description ------------ - -``VisualScriptYield`` will pause the function call and return :ref:`VisualScriptFunctionState`, which can be used to resume the function. - -Properties ----------- - -+----------------------------------------------------+--------------------------------------------------------------+-------+ -| :ref:`YieldMode` | :ref:`mode` | ``1`` | -+----------------------------------------------------+--------------------------------------------------------------+-------+ -| :ref:`float` | :ref:`wait_time` | | -+----------------------------------------------------+--------------------------------------------------------------+-------+ - -Enumerations ------------- - -.. _enum_VisualScriptYield_YieldMode: - -.. _class_VisualScriptYield_constant_YIELD_FRAME: - -.. _class_VisualScriptYield_constant_YIELD_PHYSICS_FRAME: - -.. _class_VisualScriptYield_constant_YIELD_WAIT: - -enum **YieldMode**: - -- **YIELD_FRAME** = **1** --- Yields during an idle frame. - -- **YIELD_PHYSICS_FRAME** = **2** --- Yields during a physics frame. - -- **YIELD_WAIT** = **3** --- Yields a function and waits the given time. - -Property Descriptions ---------------------- - -.. _class_VisualScriptYield_property_mode: - -- :ref:`YieldMode` **mode** - -+-----------+-----------------------+ -| *Default* | ``1`` | -+-----------+-----------------------+ -| *Setter* | set_yield_mode(value) | -+-----------+-----------------------+ -| *Getter* | get_yield_mode() | -+-----------+-----------------------+ - -The mode to use for yielding. See :ref:`YieldMode` for available options. - ----- - -.. _class_VisualScriptYield_property_wait_time: - -- :ref:`float` **wait_time** - -+----------+----------------------+ -| *Setter* | set_wait_time(value) | -+----------+----------------------+ -| *Getter* | get_wait_time() | -+----------+----------------------+ - -The time to wait when :ref:`mode` is set to :ref:`YIELD_WAIT`. - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualscriptyieldsignal.rst b/classes/class_visualscriptyieldsignal.rst deleted file mode 100644 index 106f74fe8..000000000 --- a/classes/class_visualscriptyieldsignal.rst +++ /dev/null @@ -1,122 +0,0 @@ -: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/modules/visual_script/doc_classes/VisualScriptYieldSignal.xml. - -.. _class_VisualScriptYieldSignal: - -VisualScriptYieldSignal -======================= - -**Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -A Visual Script node yielding for a signal. - -Description ------------ - -``VisualScriptYieldSignal`` will pause the function execution until the provided signal is emitted. - -Properties ----------- - -+--------------------------------------------------------+--------------------------------------------------------------------+---------------+ -| :ref:`StringName` | :ref:`base_type` | ``&"Object"`` | -+--------------------------------------------------------+--------------------------------------------------------------------+---------------+ -| :ref:`CallMode` | :ref:`call_mode` | ``0`` | -+--------------------------------------------------------+--------------------------------------------------------------------+---------------+ -| :ref:`NodePath` | :ref:`node_path` | | -+--------------------------------------------------------+--------------------------------------------------------------------+---------------+ -| :ref:`StringName` | :ref:`signal` | ``&""`` | -+--------------------------------------------------------+--------------------------------------------------------------------+---------------+ - -Enumerations ------------- - -.. _enum_VisualScriptYieldSignal_CallMode: - -.. _class_VisualScriptYieldSignal_constant_CALL_MODE_SELF: - -.. _class_VisualScriptYieldSignal_constant_CALL_MODE_NODE_PATH: - -.. _class_VisualScriptYieldSignal_constant_CALL_MODE_INSTANCE: - -enum **CallMode**: - -- **CALL_MODE_SELF** = **0** --- A signal from this :ref:`Object` will be used. - -- **CALL_MODE_NODE_PATH** = **1** --- A signal from the given :ref:`Node` in the scene tree will be used. - -- **CALL_MODE_INSTANCE** = **2** --- A signal from an instanced node with the given type will be used. - -Property Descriptions ---------------------- - -.. _class_VisualScriptYieldSignal_property_base_type: - -- :ref:`StringName` **base_type** - -+-----------+----------------------+ -| *Default* | ``&"Object"`` | -+-----------+----------------------+ -| *Setter* | set_base_type(value) | -+-----------+----------------------+ -| *Getter* | get_base_type() | -+-----------+----------------------+ - -The base type to be used when :ref:`call_mode` is set to :ref:`CALL_MODE_INSTANCE`. - ----- - -.. _class_VisualScriptYieldSignal_property_call_mode: - -- :ref:`CallMode` **call_mode** - -+-----------+----------------------+ -| *Default* | ``0`` | -+-----------+----------------------+ -| *Setter* | set_call_mode(value) | -+-----------+----------------------+ -| *Getter* | get_call_mode() | -+-----------+----------------------+ - -``call_mode`` determines the target object to wait for the signal emission. See :ref:`CallMode` for options. - ----- - -.. _class_VisualScriptYieldSignal_property_node_path: - -- :ref:`NodePath` **node_path** - -+----------+----------------------+ -| *Setter* | set_base_path(value) | -+----------+----------------------+ -| *Getter* | get_base_path() | -+----------+----------------------+ - -The node path to use when :ref:`call_mode` is set to :ref:`CALL_MODE_NODE_PATH`. - ----- - -.. _class_VisualScriptYieldSignal_property_signal: - -- :ref:`StringName` **signal** - -+-----------+-------------------+ -| *Default* | ``&""`` | -+-----------+-------------------+ -| *Setter* | set_signal(value) | -+-----------+-------------------+ -| *Getter* | get_signal() | -+-----------+-------------------+ - -The signal name to be waited for. - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualshader.rst b/classes/class_visualshader.rst index 7ddb9828e..c248a356b 100644 --- a/classes/class_visualshader.rst +++ b/classes/class_visualshader.rst @@ -46,7 +46,7 @@ Methods +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`VisualShaderNode` | :ref:`get_node` **(** :ref:`Type` type, :ref:`int` id **)** |const| | +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_node_connections` **(** :ref:`Type` type **)** |const| | +| :ref:`Dictionary[]` | :ref:`get_node_connections` **(** :ref:`Type` type **)** |const| | +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedInt32Array` | :ref:`get_node_list` **(** :ref:`Type` type **)** |const| | +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -144,13 +144,15 @@ enum **VaryingMode**: .. _class_VisualShader_constant_VARYING_TYPE_FLOAT: +.. _class_VisualShader_constant_VARYING_TYPE_INT: + .. _class_VisualShader_constant_VARYING_TYPE_VECTOR_2D: .. _class_VisualShader_constant_VARYING_TYPE_VECTOR_3D: .. _class_VisualShader_constant_VARYING_TYPE_VECTOR_4D: -.. _class_VisualShader_constant_VARYING_TYPE_COLOR: +.. _class_VisualShader_constant_VARYING_TYPE_BOOLEAN: .. _class_VisualShader_constant_VARYING_TYPE_TRANSFORM: @@ -160,17 +162,19 @@ enum **VaryingType**: - **VARYING_TYPE_FLOAT** = **0** -- **VARYING_TYPE_VECTOR_2D** = **1** +- **VARYING_TYPE_INT** = **1** -- **VARYING_TYPE_VECTOR_3D** = **2** +- **VARYING_TYPE_VECTOR_2D** = **2** -- **VARYING_TYPE_VECTOR_4D** = **3** +- **VARYING_TYPE_VECTOR_3D** = **3** -- **VARYING_TYPE_COLOR** = **4** +- **VARYING_TYPE_VECTOR_4D** = **4** -- **VARYING_TYPE_TRANSFORM** = **5** +- **VARYING_TYPE_BOOLEAN** = **5** -- **VARYING_TYPE_MAX** = **6** +- **VARYING_TYPE_TRANSFORM** = **6** + +- **VARYING_TYPE_MAX** = **7** Constants --------- @@ -207,7 +211,7 @@ Method Descriptions - void **add_node** **(** :ref:`Type` type, :ref:`VisualShaderNode` node, :ref:`Vector2` position, :ref:`int` id **)** -Adds the specified node to the shader. +Adds the specified ``node`` to the shader. ---- @@ -259,7 +263,7 @@ Returns the shader node instance with specified ``type`` and ``id``. .. _class_VisualShader_method_get_node_connections: -- :ref:`Array` **get_node_connections** **(** :ref:`Type` type **)** |const| +- :ref:`Dictionary[]` **get_node_connections** **(** :ref:`Type` type **)** |const| Returns the list of connected nodes with the specified type. diff --git a/classes/class_visualshadernode.rst b/classes/class_visualshadernode.rst index 519331ecc..faa3b1b57 100644 --- a/classes/class_visualshadernode.rst +++ b/classes/class_visualshadernode.rst @@ -12,7 +12,7 @@ VisualShaderNode **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`VisualShaderNodeBillboard`, :ref:`VisualShaderNodeClamp`, :ref:`VisualShaderNodeColorFunc`, :ref:`VisualShaderNodeColorOp`, :ref:`VisualShaderNodeCompare`, :ref:`VisualShaderNodeConstant`, :ref:`VisualShaderNodeCubemap`, :ref:`VisualShaderNodeCustom`, :ref:`VisualShaderNodeDerivativeFunc`, :ref:`VisualShaderNodeDeterminant`, :ref:`VisualShaderNodeDotProduct`, :ref:`VisualShaderNodeFloatFunc`, :ref:`VisualShaderNodeFloatOp`, :ref:`VisualShaderNodeFresnel`, :ref:`VisualShaderNodeIf`, :ref:`VisualShaderNodeInput`, :ref:`VisualShaderNodeIntFunc`, :ref:`VisualShaderNodeIntOp`, :ref:`VisualShaderNodeIs`, :ref:`VisualShaderNodeMix`, :ref:`VisualShaderNodeMultiplyAdd`, :ref:`VisualShaderNodeOuterProduct`, :ref:`VisualShaderNodeOutput`, :ref:`VisualShaderNodeParticleAccelerator`, :ref:`VisualShaderNodeParticleConeVelocity`, :ref:`VisualShaderNodeParticleEmit`, :ref:`VisualShaderNodeParticleEmitter`, :ref:`VisualShaderNodeParticleMultiplyByAxisAngle`, :ref:`VisualShaderNodeParticleRandomness`, :ref:`VisualShaderNodeResizableBase`, :ref:`VisualShaderNodeSDFRaymarch`, :ref:`VisualShaderNodeSDFToScreenUV`, :ref:`VisualShaderNodeSample3D`, :ref:`VisualShaderNodeScreenUVToSDF`, :ref:`VisualShaderNodeSmoothStep`, :ref:`VisualShaderNodeStep`, :ref:`VisualShaderNodeSwitch`, :ref:`VisualShaderNodeTexture`, :ref:`VisualShaderNodeTextureSDF`, :ref:`VisualShaderNodeTextureSDFNormal`, :ref:`VisualShaderNodeTransformCompose`, :ref:`VisualShaderNodeTransformDecompose`, :ref:`VisualShaderNodeTransformFunc`, :ref:`VisualShaderNodeTransformOp`, :ref:`VisualShaderNodeTransformVecMult`, :ref:`VisualShaderNodeUVFunc`, :ref:`VisualShaderNodeUniform`, :ref:`VisualShaderNodeUniformRef`, :ref:`VisualShaderNodeVarying`, :ref:`VisualShaderNodeVectorBase`, :ref:`VisualShaderNodeVectorRefract` +**Inherited By:** :ref:`VisualShaderNodeBillboard`, :ref:`VisualShaderNodeClamp`, :ref:`VisualShaderNodeColorFunc`, :ref:`VisualShaderNodeColorOp`, :ref:`VisualShaderNodeCompare`, :ref:`VisualShaderNodeConstant`, :ref:`VisualShaderNodeCubemap`, :ref:`VisualShaderNodeCustom`, :ref:`VisualShaderNodeDerivativeFunc`, :ref:`VisualShaderNodeDeterminant`, :ref:`VisualShaderNodeDistanceFade`, :ref:`VisualShaderNodeDotProduct`, :ref:`VisualShaderNodeFloatFunc`, :ref:`VisualShaderNodeFloatOp`, :ref:`VisualShaderNodeFresnel`, :ref:`VisualShaderNodeIf`, :ref:`VisualShaderNodeInput`, :ref:`VisualShaderNodeIntFunc`, :ref:`VisualShaderNodeIntOp`, :ref:`VisualShaderNodeIs`, :ref:`VisualShaderNodeLinearSceneDepth`, :ref:`VisualShaderNodeMix`, :ref:`VisualShaderNodeMultiplyAdd`, :ref:`VisualShaderNodeOuterProduct`, :ref:`VisualShaderNodeOutput`, :ref:`VisualShaderNodeParticleAccelerator`, :ref:`VisualShaderNodeParticleConeVelocity`, :ref:`VisualShaderNodeParticleEmit`, :ref:`VisualShaderNodeParticleEmitter`, :ref:`VisualShaderNodeParticleMultiplyByAxisAngle`, :ref:`VisualShaderNodeParticleRandomness`, :ref:`VisualShaderNodeProximityFade`, :ref:`VisualShaderNodeRandomRange`, :ref:`VisualShaderNodeRemap`, :ref:`VisualShaderNodeResizableBase`, :ref:`VisualShaderNodeSDFRaymarch`, :ref:`VisualShaderNodeSDFToScreenUV`, :ref:`VisualShaderNodeSample3D`, :ref:`VisualShaderNodeScreenUVToSDF`, :ref:`VisualShaderNodeSmoothStep`, :ref:`VisualShaderNodeStep`, :ref:`VisualShaderNodeSwitch`, :ref:`VisualShaderNodeTexture`, :ref:`VisualShaderNodeTextureSDF`, :ref:`VisualShaderNodeTextureSDFNormal`, :ref:`VisualShaderNodeTransformCompose`, :ref:`VisualShaderNodeTransformDecompose`, :ref:`VisualShaderNodeTransformFunc`, :ref:`VisualShaderNodeTransformOp`, :ref:`VisualShaderNodeTransformVecMult`, :ref:`VisualShaderNodeUVFunc`, :ref:`VisualShaderNodeUVPolarCoord`, :ref:`VisualShaderNodeUniform`, :ref:`VisualShaderNodeUniformRef`, :ref:`VisualShaderNodeVarying`, :ref:`VisualShaderNodeVectorBase` Base class for nodes in a visual shader graph. @@ -166,7 +166,7 @@ Sets the default input ports values using an :ref:`Array` of the fo - void **set_input_port_default_value** **(** :ref:`int` port, :ref:`Variant` value, :ref:`Variant` prev_value=null **)** -Sets the default value for the selected input ``port``. +Sets the default ``value`` for the selected input ``port``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_visualshadernodecustom.rst b/classes/class_visualshadernodecustom.rst index 8fcbb2f03..10c81d530 100644 --- a/classes/class_visualshadernodecustom.rst +++ b/classes/class_visualshadernodecustom.rst @@ -138,7 +138,7 @@ Defining this method is **optional**. - :ref:`int` **_get_input_port_count** **(** **)** |virtual| |const| -Override this method to define the amount of input ports of the associated custom node. +Override this method to define the number of input ports of the associated custom node. Defining this method is **required**. If not overridden, the node has no input ports. @@ -178,7 +178,7 @@ Defining this method is **optional**, but recommended. If not overridden, the no - :ref:`int` **_get_output_port_count** **(** **)** |virtual| |const| -Override this method to define the amount of output ports of the associated custom node. +Override this method to define the number of output ports of the associated custom node. Defining this method is **required**. If not overridden, the node has no output ports. diff --git a/classes/class_visualscriptself.rst b/classes/class_visualshadernodedistancefade.rst similarity index 73% rename from classes/class_visualscriptself.rst rename to classes/class_visualshadernodedistancefade.rst index 4aac00199..ff4cef9a6 100644 --- a/classes/class_visualscriptself.rst +++ b/classes/class_visualshadernodedistancefade.rst @@ -3,29 +3,16 @@ .. 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/modules/visual_script/doc_classes/VisualScriptSelf.xml. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/VisualShaderNodeDistanceFade.xml. -.. _class_VisualScriptSelf: +.. _class_VisualShaderNodeDistanceFade: -VisualScriptSelf -================ +VisualShaderNodeDistanceFade +============================ -**Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Outputs a reference to the current instance. -Description ------------ - -Provides a reference to the node running the visual script. - -\ **Input Ports:**\ - -none - -\ **Output Ports:**\ - -- Data (object): ``instance`` .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_visualshadernodeexpression.rst b/classes/class_visualshadernodeexpression.rst index 356627d08..1740d20d1 100644 --- a/classes/class_visualshadernodeexpression.rst +++ b/classes/class_visualshadernodeexpression.rst @@ -19,7 +19,7 @@ A custom visual shader graph expression written in Godot Shading Language. Description ----------- -Custom Godot Shading Language expression, with a custom amount of input and output ports. +Custom Godot Shading Language expression, with a custom number of input and output ports. The provided code is directly injected into the graph's matching shader function (``vertex``, ``fragment``, or ``light``), so it cannot be used to declare functions, varyings, uniforms, or global constants. See :ref:`VisualShaderNodeGlobalExpression` for such global definitions. diff --git a/classes/class_visualshadernodegroupbase.rst b/classes/class_visualshadernodegroupbase.rst index 020a0f21e..7d8251c5c 100644 --- a/classes/class_visualshadernodegroupbase.rst +++ b/classes/class_visualshadernodegroupbase.rst @@ -14,7 +14,7 @@ VisualShaderNodeGroupBase **Inherited By:** :ref:`VisualShaderNodeExpression` -Base class for a family of nodes with variable amount of input and output ports within the visual shader graph. +Base class for a family of nodes with variable number of input and output ports within the visual shader graph. Description ----------- diff --git a/classes/class_visualscriptindexget.rst b/classes/class_visualshadernodelinearscenedepth.rst similarity index 73% rename from classes/class_visualscriptindexget.rst rename to classes/class_visualshadernodelinearscenedepth.rst index a1d50369f..c5c75eaff 100644 --- a/classes/class_visualscriptindexget.rst +++ b/classes/class_visualshadernodelinearscenedepth.rst @@ -3,21 +3,16 @@ .. 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/modules/visual_script/doc_classes/VisualScriptIndexGet.xml. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/VisualShaderNodeLinearSceneDepth.xml. -.. _class_VisualScriptIndexGet: +.. _class_VisualShaderNodeLinearSceneDepth: -VisualScriptIndexGet -==================== +VisualShaderNodeLinearSceneDepth +================================ -**Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -A Visual Script node for getting a value from an array or a dictionary. -Description ------------ - -``VisualScriptIndexGet`` will return the value stored in an array or a dictionary under the given index. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_visualscriptindexset.rst b/classes/class_visualshadernodeproximityfade.rst similarity index 72% rename from classes/class_visualscriptindexset.rst rename to classes/class_visualshadernodeproximityfade.rst index 66d5ae65d..e3236fc7e 100644 --- a/classes/class_visualscriptindexset.rst +++ b/classes/class_visualshadernodeproximityfade.rst @@ -3,21 +3,16 @@ .. 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/modules/visual_script/doc_classes/VisualScriptIndexSet.xml. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/VisualShaderNodeProximityFade.xml. -.. _class_VisualScriptIndexSet: +.. _class_VisualShaderNodeProximityFade: -VisualScriptIndexSet -==================== +VisualShaderNodeProximityFade +============================= -**Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -A Visual Script node for setting a value in an array or a dictionary. -Description ------------ - -``VisualScriptIndexSet`` will set the value stored in an array or a dictionary under the given index to the provided new value. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_visualshadernoderandomrange.rst b/classes/class_visualshadernoderandomrange.rst new file mode 100644 index 000000000..cf70c7181 --- /dev/null +++ b/classes/class_visualshadernoderandomrange.rst @@ -0,0 +1,22 @@ +: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/VisualShaderNodeRandomRange.xml. + +.. _class_VisualShaderNodeRandomRange: + +VisualShaderNodeRandomRange +=========================== + +**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + + + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualscriptscenetree.rst b/classes/class_visualshadernoderemap.rst similarity index 75% rename from classes/class_visualscriptscenetree.rst rename to classes/class_visualshadernoderemap.rst index 64d34c15d..04d8df3fc 100644 --- a/classes/class_visualscriptscenetree.rst +++ b/classes/class_visualshadernoderemap.rst @@ -3,21 +3,16 @@ .. 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/modules/visual_script/doc_classes/VisualScriptSceneTree.xml. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/VisualShaderNodeRemap.xml. -.. _class_VisualScriptSceneTree: +.. _class_VisualShaderNodeRemap: -VisualScriptSceneTree +VisualShaderNodeRemap ===================== -**Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -A Visual Script node for accessing :ref:`SceneTree` methods. -Description ------------ - -A Visual Script node for accessing :ref:`SceneTree` methods. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_visualshadernodetextureuniform.rst b/classes/class_visualshadernodetextureuniform.rst index 31cbbbc89..fc676a0a1 100644 --- a/classes/class_visualshadernodetextureuniform.rst +++ b/classes/class_visualshadernodetextureuniform.rst @@ -69,15 +69,19 @@ enum **TextureType**: .. _class_VisualShaderNodeTextureUniform_constant_COLOR_DEFAULT_BLACK: +.. _class_VisualShaderNodeTextureUniform_constant_COLOR_DEFAULT_TRANSPARENT: + .. _class_VisualShaderNodeTextureUniform_constant_COLOR_DEFAULT_MAX: enum **ColorDefault**: -- **COLOR_DEFAULT_WHITE** = **0** --- Defaults to white color. +- **COLOR_DEFAULT_WHITE** = **0** --- Defaults to fully opaque white color. -- **COLOR_DEFAULT_BLACK** = **1** --- Defaults to black color. +- **COLOR_DEFAULT_BLACK** = **1** --- Defaults to fully opaque black color. -- **COLOR_DEFAULT_MAX** = **2** --- Represents the size of the :ref:`ColorDefault` enum. +- **COLOR_DEFAULT_TRANSPARENT** = **2** --- Defaults to fully transparent black color. + +- **COLOR_DEFAULT_MAX** = **3** --- Represents the size of the :ref:`ColorDefault` enum. ---- diff --git a/classes/class_visualshadernodeuvfunc.rst b/classes/class_visualshadernodeuvfunc.rst index 1968227d6..ed6713cc3 100644 --- a/classes/class_visualshadernodeuvfunc.rst +++ b/classes/class_visualshadernodeuvfunc.rst @@ -36,7 +36,7 @@ enum **Function**: - **FUNC_PANNING** = **0** --- Translates ``uv`` by using ``scale`` and ``offset`` values using the following formula: ``uv = uv + offset * scale``. ``uv`` port is connected to ``UV`` built-in by default. -- **FUNC_SCALING** = **1** --- Scales ``uv[/uv] by using [code]scale`` and ``pivot`` values using the following formula: ``uv = (uv - pivot) * scale + pivot``. ``uv`` port is connected to ``UV`` built-in by default. +- **FUNC_SCALING** = **1** --- Scales ``uv`` by using ``scale`` and ``pivot`` values using the following formula: ``uv = (uv - pivot) * scale + pivot``. ``uv`` port is connected to ``UV`` built-in by default. - **FUNC_MAX** = **2** --- Represents the size of the :ref:`Function` enum. diff --git a/classes/class_visualshadernodeuvpolarcoord.rst b/classes/class_visualshadernodeuvpolarcoord.rst new file mode 100644 index 000000000..fb670e402 --- /dev/null +++ b/classes/class_visualshadernodeuvpolarcoord.rst @@ -0,0 +1,22 @@ +: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/VisualShaderNodeUVPolarCoord.xml. + +.. _class_VisualShaderNodeUVPolarCoord: + +VisualShaderNodeUVPolarCoord +============================ + +**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + + + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualshadernodevectorbase.rst b/classes/class_visualshadernodevectorbase.rst index 2f66f426c..4b8af9fb7 100644 --- a/classes/class_visualshadernodevectorbase.rst +++ b/classes/class_visualshadernodevectorbase.rst @@ -12,7 +12,7 @@ VisualShaderNodeVectorBase **Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`VisualShaderNodeFaceForward`, :ref:`VisualShaderNodeVectorCompose`, :ref:`VisualShaderNodeVectorDecompose`, :ref:`VisualShaderNodeVectorDistance`, :ref:`VisualShaderNodeVectorFunc`, :ref:`VisualShaderNodeVectorLen`, :ref:`VisualShaderNodeVectorOp` +**Inherited By:** :ref:`VisualShaderNodeFaceForward`, :ref:`VisualShaderNodeVectorCompose`, :ref:`VisualShaderNodeVectorDecompose`, :ref:`VisualShaderNodeVectorDistance`, :ref:`VisualShaderNodeVectorFunc`, :ref:`VisualShaderNodeVectorLen`, :ref:`VisualShaderNodeVectorOp`, :ref:`VisualShaderNodeVectorRefract` A base type for the nodes using different vector types within the visual shader graph. diff --git a/classes/class_visualshadernodevectorrefract.rst b/classes/class_visualshadernodevectorrefract.rst index 792bfb3cc..bf7884aa5 100644 --- a/classes/class_visualshadernodevectorrefract.rst +++ b/classes/class_visualshadernodevectorrefract.rst @@ -10,9 +10,9 @@ VisualShaderNodeVectorRefract ============================= -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**Inherits:** :ref:`VisualShaderNodeVectorBase` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Returns the :ref:`Vector3` that points in the direction of refraction. For use within the visual shader graph. +Returns the vector that points in the direction of refraction. For use within the visual shader graph. Description ----------- diff --git a/classes/class_voxelgidata.rst b/classes/class_voxelgidata.rst index 21ee66d25..1189540cf 100644 --- a/classes/class_voxelgidata.rst +++ b/classes/class_voxelgidata.rst @@ -40,9 +40,9 @@ Properties +---------------------------+--------------------------------------------------------------------+-----------+ | :ref:`float` | :ref:`normal_bias` | ``0.0`` | +---------------------------+--------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`propagation` | ``0.7`` | +| :ref:`float` | :ref:`propagation` | ``0.5`` | +---------------------------+--------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`use_two_bounces` | ``false`` | +| :ref:`bool` | :ref:`use_two_bounces` | ``true`` | +---------------------------+--------------------------------------------------------------------+-----------+ Methods @@ -152,14 +152,14 @@ The normal bias to use for indirect lighting and reflections. Higher values redu - :ref:`float` **propagation** +-----------+------------------------+ -| *Default* | ``0.7`` | +| *Default* | ``0.5`` | +-----------+------------------------+ | *Setter* | set_propagation(value) | +-----------+------------------------+ | *Getter* | get_propagation() | +-----------+------------------------+ -If indirect lighting looks too flat, try decreasing :ref:`propagation` while increasing :ref:`energy` at the same time. See also :ref:`use_two_bounces` which influences the indirect lighting's effective brightness. +The multiplier to use when light bounces off a surface. Higher values result in brighter indirect lighting. If indirect lighting looks too flat, try decreasing :ref:`propagation` while increasing :ref:`energy` at the same time. See also :ref:`use_two_bounces` which influences the indirect lighting's effective brightness. ---- @@ -168,7 +168,7 @@ If indirect lighting looks too flat, try decreasing :ref:`propagation` **use_two_bounces** +-----------+----------------------------+ -| *Default* | ``false`` | +| *Default* | ``true`` | +-----------+----------------------------+ | *Setter* | set_use_two_bounces(value) | +-----------+----------------------------+ diff --git a/classes/class_weakref.rst b/classes/class_weakref.rst index 9d3fa3fe3..c5bb96962 100644 --- a/classes/class_weakref.rst +++ b/classes/class_weakref.rst @@ -33,7 +33,7 @@ Method Descriptions - :ref:`Variant` **get_ref** **(** **)** |const| -Returns the :ref:`Object` this weakref is referring to. +Returns the :ref:`Object` this weakref is referring to. Returns ``null`` if that object no longer exists. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_webrtcmultiplayerpeer.rst b/classes/class_webrtcmultiplayerpeer.rst index 634fb4152..c180eab8a 100644 --- a/classes/class_webrtcmultiplayerpeer.rst +++ b/classes/class_webrtcmultiplayerpeer.rst @@ -99,7 +99,7 @@ If ``server_compatibilty`` is ``false`` (default), the multiplayer peer will be If ``server_compatibilty`` is ``true`` the peer will suppress all :ref:`MultiplayerPeer.peer_connected` signals until a peer with id :ref:`MultiplayerPeer.TARGET_PEER_SERVER` connects and then emit :ref:`MultiplayerPeer.connection_succeeded`. After that the signal :ref:`MultiplayerPeer.peer_connected` will be emitted for every already connected peer, and any new peer that might connect. If the server peer disconnects after that, signal :ref:`MultiplayerPeer.server_disconnected` will be emitted and state will become :ref:`MultiplayerPeer.CONNECTION_CONNECTED`. -You can optionally specify a ``channels_config`` array of :ref:`TransferMode` which will be used to create extra channels (WebRTC only supports one transfer mode per channel). +You can optionally specify a ``channels_config`` array of :ref:`TransferMode` which will be used to create extra channels (WebRTC only supports one transfer mode per channel). ---- diff --git a/classes/class_websocketclient.rst b/classes/class_websocketclient.rst index c64fb1388..9732b5421 100644 --- a/classes/class_websocketclient.rst +++ b/classes/class_websocketclient.rst @@ -107,7 +107,7 @@ Property Descriptions If specified, this :ref:`X509Certificate` will be the only one accepted when connecting to an SSL host. Any other certificate provided by the server will be regarded as invalid. -\ **Note:** Specifying a custom ``trusted_ssl_certificate`` is not supported in HTML5 exports due to browsers restrictions. +\ **Note:** Specifying a custom ``trusted_ssl_certificate`` is not supported in Web exports due to browsers restrictions. ---- @@ -140,9 +140,9 @@ If ``false`` is passed instead (default), you must call :ref:`PacketPeer` or :ref:`WebSocketServer.client_disconnected` is received. -\ **Note:** The HTML5 export might not support all status codes. Please refer to browser-specific documentation for more details. +\ **Note:** The Web export might not support all status codes. Please refer to browser-specific documentation for more details. ---- @@ -80,7 +80,7 @@ Closes this WebSocket connection. ``code`` is the status code for the closure (s Returns the IP address of the connected peer. -\ **Note:** Not available in the HTML5 export. +\ **Note:** Not available in the Web export. ---- @@ -90,7 +90,7 @@ Returns the IP address of the connected peer. Returns the remote port of the connected peer. -\ **Note:** Not available in the HTML5 export. +\ **Note:** Not available in the Web export. ---- @@ -98,7 +98,7 @@ Returns the remote port of the connected peer. - :ref:`int` **get_current_outbound_buffered_amount** **(** **)** |const| -Returns the current amount of data in the outbound websocket buffer. **Note:** HTML5 exports use WebSocket.bufferedAmount, while other platforms use an internal buffer. +Returns the current amount of data in the outbound websocket buffer. **Note:** Web exports use WebSocket.bufferedAmount, while other platforms use an internal buffer. ---- @@ -124,7 +124,7 @@ Returns ``true`` if this peer is currently connected. Disable Nagle's algorithm on the underling TCP socket (default). See :ref:`StreamPeerTCP.set_no_delay` for more information. -\ **Note:** Not available in the HTML5 export. +\ **Note:** Not available in the Web export. ---- diff --git a/classes/class_websocketserver.rst b/classes/class_websocketserver.rst index a79578bd2..184900813 100644 --- a/classes/class_websocketserver.rst +++ b/classes/class_websocketserver.rst @@ -21,7 +21,7 @@ This class implements a WebSocket server that can also support the high-level mu After starting the server (:ref:`listen`), you will need to :ref:`MultiplayerPeer.poll` it at regular intervals (e.g. inside :ref:`Node._process`). When clients connect, disconnect, or send data, you will receive the appropriate signal. -\ **Note:** Not available in HTML5 exports. +\ **Note:** Not available in Web exports. \ **Note:** When exporting to Android, make sure to enable the ``INTERNET`` permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android. diff --git a/classes/class_webxrinterface.rst b/classes/class_webxrinterface.rst index 4f4a38645..b1c38984a 100644 --- a/classes/class_webxrinterface.rst +++ b/classes/class_webxrinterface.rst @@ -19,11 +19,11 @@ Description WebXR is an open standard that allows creating VR and AR applications that run in the web browser. -As such, this interface is only available when running in an HTML5 export. +As such, this interface is only available when running in Web exports. WebXR supports a wide range of devices, from the very capable (like Valve Index, HTC Vive, Oculus Rift and Quest) down to the much less capable (like Google Cardboard, Oculus Go, GearVR, or plain smartphones). -Since WebXR is based on Javascript, it makes extensive use of callbacks, which means that ``WebXRInterface`` is forced to use signals, where other AR/VR interfaces would instead use functions that return a result immediately. This makes ``WebXRInterface`` quite a bit more complicated to initialize than other AR/VR interfaces. +Since WebXR is based on JavaScript, it makes extensive use of callbacks, which means that ``WebXRInterface`` is forced to use signals, where other AR/VR interfaces would instead use functions that return a result immediately. This makes ``WebXRInterface`` quite a bit more complicated to initialize than other AR/VR interfaces. Here's the minimum code required to start an immersive VR session: @@ -294,7 +294,7 @@ The :ref:`reference_space_reset` when setting up the WebXR session. +A comma-seperated list of optional features used by :ref:`XRInterface.initialize` when setting up the WebXR session. If a user's browser or device doesn't support one of the given features, initialization will continue, but you won't be able to use the requested feature. @@ -328,7 +328,7 @@ Possible values come from `WebXR's XRReferenceSpaceType ` when setting up the WebXR session. +A comma-seperated list of reference space types used by :ref:`XRInterface.initialize` when setting up the WebXR session. The reference space types are requested in order, and the first on supported by the users device or browser will be used. The :ref:`reference_space_type` property contains the reference space type that was ultimately used. @@ -348,7 +348,7 @@ Possible values come from `WebXR's XRReferenceSpaceType ` when setting up the WebXR session. +A comma-seperated list of required features used by :ref:`XRInterface.initialize` when setting up the WebXR session. If a user's browser or device doesn't support one of the given features, initialization will fail and :ref:`session_failed` will be emitted. diff --git a/classes/class_window.rst b/classes/class_window.rst index b2ea9aaaf..3e3d77c12 100644 --- a/classes/class_window.rst +++ b/classes/class_window.rst @@ -45,6 +45,8 @@ Properties +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ | :ref:`bool` | :ref:`exclusive` | ``false`` | +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ +| :ref:`bool` | :ref:`extend_to_title` | ``false`` | ++-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ | :ref:`Vector2i` | :ref:`max_size` | ``Vector2i(0, 0)`` | +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ | :ref:`Vector2i` | :ref:`min_size` | ``Vector2i(0, 0)`` | @@ -279,7 +281,7 @@ Emitted when the mouse cursor exits the ``Window``'s area (including when it's h - **theme_changed** **(** **)** -Emitted when the :ref:`theme` is modified or changed to another :ref:`Theme`. +Emitted when the :ref:`NOTIFICATION_THEME_CHANGED` notification is sent. ---- @@ -346,6 +348,8 @@ Regardless of the platform, enabling fullscreen will change the window size to m .. _class_Window_constant_FLAG_POPUP: +.. _class_Window_constant_FLAG_EXTEND_TO_TITLE: + .. _class_Window_constant_FLAG_MAX: enum **Flags**: @@ -362,7 +366,9 @@ enum **Flags**: - **FLAG_POPUP** = **5** --- Whether the window is popup or a regular window. Set with :ref:`popup_window`. -- **FLAG_MAX** = **6** --- Max value of the :ref:`Flags`. +- **FLAG_EXTEND_TO_TITLE** = **6** --- Window contents is expanded to the full size of the window, window title bar is transparent. + +- **FLAG_MAX** = **7** --- Max value of the :ref:`Flags`. ---- @@ -435,8 +441,20 @@ Constants .. _class_Window_constant_NOTIFICATION_VISIBILITY_CHANGED: +.. _class_Window_constant_NOTIFICATION_THEME_CHANGED: + - **NOTIFICATION_VISIBILITY_CHANGED** = **30** --- Emitted when ``Window``'s visibility changes, right before :ref:`visibility_changed`. +- **NOTIFICATION_THEME_CHANGED** = **32** --- Sent when the node needs to refresh its theme items. This happens in one of the following cases: + +- The :ref:`theme` property is changed on this node or any of its ancestors. + +- The :ref:`theme_type_variation` property is changed on this node. + +- The node enters the scene tree. + +\ **Note:** As an optimization, this notification won't be sent from changes that occur while this node is outside of the scene tree. Instead, all of the theme item updates can be applied at once when the node enters the scene tree. + Property Descriptions --------------------- @@ -586,6 +604,22 @@ Needs :ref:`transient` enabled to work. ---- +.. _class_Window_property_extend_to_title: + +- :ref:`bool` **extend_to_title** + ++-----------+-----------------+ +| *Default* | ``false`` | ++-----------+-----------------+ +| *Setter* | set_flag(value) | ++-----------+-----------------+ +| *Getter* | get_flag() | ++-----------+-----------------+ + +If ``true``, the ``Window`` contents is expanded to the full size of the window, window title bar is transparent. + +---- + .. _class_Window_property_max_size: - :ref:`Vector2i` **max_size** @@ -600,6 +634,8 @@ Needs :ref:`transient` enabled to work. If non-zero, the ``Window`` can't be resized to be bigger than this size. +\ **Note:** This property will be ignored if the value is lower than :ref:`min_size`. + ---- .. _class_Window_property_min_size: @@ -616,6 +652,8 @@ If non-zero, the ``Window`` can't be resized to be bigger than this size. If non-zero, the ``Window`` can't be resized to be smaller than this size. +\ **Note:** This property will be ignored in favor of :ref:`get_contents_minimum_size` if :ref:`wrap_controls` is enabled and if its size is bigger. + ---- .. _class_Window_property_mode: @@ -826,7 +864,7 @@ If ``true``, the window is visible. | *Getter* | is_wrapping_controls() | +-----------+--------------------------+ -If ``true``, the window's size will automatically update when a child node is added or removed. +If ``true``, the window's size will automatically update when a child node is added or removed, ignoring :ref:`min_size` if the new size is bigger. If ``false``, you need to call :ref:`child_controls_changed` manually. @@ -861,7 +899,7 @@ Returns the combined minimum size from the child :ref:`Control` n - :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| -Returns ``true`` if the flag is set. +Returns ``true`` if the ``flag`` is set. ---- diff --git a/classes/class_xmlparser.rst b/classes/class_xmlparser.rst index 8f84d864f..9c7aa33bd 100644 --- a/classes/class_xmlparser.rst +++ b/classes/class_xmlparser.rst @@ -100,7 +100,7 @@ Method Descriptions - :ref:`int` **get_attribute_count** **(** **)** |const| -Gets the amount of attributes in the current element. +Gets the number of attributes in the current element. ---- @@ -108,7 +108,7 @@ Gets the amount of attributes in the current element. - :ref:`String` **get_attribute_name** **(** :ref:`int` idx **)** |const| -Gets the name of the attribute specified by the index in ``idx`` argument. +Gets the name of the attribute specified by the ``idx`` index. ---- @@ -116,7 +116,7 @@ Gets the name of the attribute specified by the index in ``idx`` argument. - :ref:`String` **get_attribute_value** **(** :ref:`int` idx **)** |const| -Gets the value of the attribute specified by the index in ``idx`` argument. +Gets the value of the attribute specified by the ``idx`` index. ---- @@ -132,7 +132,7 @@ Gets the current line in the parsed file, counting from 0. - :ref:`String` **get_named_attribute_value** **(** :ref:`String` name **)** |const| -Gets the value of a certain attribute of the current element by name. This will raise an error if the element has no such attribute. +Gets the value of a certain attribute of the current element by ``name``. This will raise an error if the element has no such attribute. ---- @@ -140,7 +140,7 @@ Gets the value of a certain attribute of the current element by name. This will - :ref:`String` **get_named_attribute_value_safe** **(** :ref:`String` name **)** |const| -Gets the value of a certain attribute of the current element by name. This will return an empty :ref:`String` if the attribute is not found. +Gets the value of a certain attribute of the current element by ``name``. This will return an empty :ref:`String` if the attribute is not found. ---- @@ -196,7 +196,7 @@ Check whether the current element is empty (this only works for completely empty - :ref:`Error` **open** **(** :ref:`String` file **)** -Opens an XML file for parsing. This returns an error code. +Opens an XML ``file`` for parsing. This returns an error code. ---- @@ -204,7 +204,7 @@ Opens an XML file for parsing. This returns an error code. - :ref:`Error` **open_buffer** **(** :ref:`PackedByteArray` buffer **)** -Opens an XML raw buffer for parsing. This returns an error code. +Opens an XML raw ``buffer`` for parsing. This returns an error code. ---- diff --git a/classes/class_xrinterface.rst b/classes/class_xrinterface.rst index cf25f48d4..ff0d79e65 100644 --- a/classes/class_xrinterface.rst +++ b/classes/class_xrinterface.rst @@ -320,9 +320,9 @@ Call this to find out if a given play area mode is supported by this interface. Triggers a haptic pulse on a device associated with this interface. -\ ``action_name`` is the name of the action for this pulse. +``action_name`` is the name of the action for this pulse. -\ ``tracker_name`` is optional and can be used to direct the pulse to a specific device provided that device is bound to this haptic. +``tracker_name`` is optional and can be used to direct the pulse to a specific device provided that device is bound to this haptic. ---- diff --git a/classes/class_xrnode3d.rst b/classes/class_xrnode3d.rst index 8ef010027..3aa0b6d90 100644 --- a/classes/class_xrnode3d.rst +++ b/classes/class_xrnode3d.rst @@ -113,7 +113,7 @@ Returns the :ref:`XRPose` containing the current state of the pose Triggers a haptic pulse on a device associated with this interface. -\ ``action_name`` is the name of the action for this pulse. +``action_name`` is the name of the action for this pulse. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_xrpositionaltracker.rst b/classes/class_xrpositionaltracker.rst index 35ea1bfb1..42c8c4123 100644 --- a/classes/class_xrpositionaltracker.rst +++ b/classes/class_xrpositionaltracker.rst @@ -228,7 +228,7 @@ Returns an input for this tracker. It can return a boolean, float or :ref:`Vecto - :ref:`XRPose` **get_pose** **(** :ref:`StringName` name **)** |const| -Returns the current :ref:`XRPose` state object for the bound ``pose``. +Returns the current :ref:`XRPose` state object for the bound ``name`` pose. ---- @@ -236,7 +236,7 @@ Returns the current :ref:`XRPose` state object for the bound ``pos - :ref:`bool` **has_pose** **(** :ref:`StringName` name **)** |const| -Returns ``true`` if the bound ``tracker`` is available and is currently tracking the bound ``pose``. +Returns ``true`` if the tracker is available and is currently tracking the bound ``name`` pose. ---- diff --git a/classes/class_xrserver.rst b/classes/class_xrserver.rst index b1eca75a9..4c4d89d38 100644 --- a/classes/class_xrserver.rst +++ b/classes/class_xrserver.rst @@ -51,7 +51,7 @@ Methods +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_interface_count` **(** **)** |const| | +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_interfaces` **(** **)** |const| | +| :ref:`Dictionary[]` | :ref:`get_interfaces` **(** **)** |const| | +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform3D` | :ref:`get_reference_frame` **(** **)** |const| | +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -230,7 +230,7 @@ You should call this method after a few seconds have passed. For instance, when - :ref:`XRInterface` **find_interface** **(** :ref:`String` name **)** |const| -Finds an interface by its name. For instance, if your project uses capabilities of an AR/VR platform, you can find the interface for that platform by name and initialize it. +Finds an interface by its ``name``. For instance, if your project uses capabilities of an AR/VR platform, you can find the interface for that platform by name and initialize it. ---- @@ -246,7 +246,7 @@ Returns the primary interface's transformation. - :ref:`XRInterface` **get_interface** **(** :ref:`int` idx **)** |const| -Returns the interface registered at a given index in our list of interfaces. +Returns the interface registered at the given ``idx`` index in the list of interfaces. ---- @@ -260,7 +260,7 @@ Returns the number of interfaces currently registered with the AR/VR server. If .. _class_XRServer_method_get_interfaces: -- :ref:`Array` **get_interfaces** **(** **)** |const| +- :ref:`Dictionary[]` **get_interfaces** **(** **)** |const| Returns a list of available interfaces the ID and name of each interface. @@ -278,7 +278,7 @@ Returns the reference frame transform. Mostly used internally and exposed for GD - :ref:`XRPositionalTracker` **get_tracker** **(** :ref:`StringName` tracker_name **)** |const| -Returns the positional tracker with this name. +Returns the positional tracker with the given ``tracker_name``. ---- @@ -286,7 +286,7 @@ Returns the positional tracker with this name. - :ref:`Dictionary` **get_trackers** **(** :ref:`int` tracker_types **)** -Returns a dictionary of trackers for this type. +Returns a dictionary of trackers for ``tracker_types``. ---- @@ -294,7 +294,7 @@ Returns a dictionary of trackers for this type. - void **remove_interface** **(** :ref:`XRInterface` interface **)** -Removes this interface. +Removes this ``interface``. ---- @@ -302,7 +302,7 @@ Removes this interface. - void **remove_tracker** **(** :ref:`XRPositionalTracker` tracker **)** -Removes this positional tracker. +Removes this positional ``tracker``. .. |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.)`