diff options
Diffstat (limited to 'doc/classes')
55 files changed, 484 insertions, 209 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index 5f81c80887..dce96fb315 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -2626,6 +2626,8 @@ <constant name="METHOD_FLAG_FROM_SCRIPT" value="64" enum="MethodFlags"> Deprecated method flag, unused. </constant> + <constant name="METHOD_FLAG_VARARG" value="128" enum="MethodFlags"> + </constant> <constant name="METHOD_FLAG_STATIC" value="256" enum="MethodFlags"> </constant> <constant name="METHOD_FLAG_OBJECT_CORE" value="512" enum="MethodFlags"> @@ -2640,8 +2642,8 @@ <constant name="RPC_MODE_ANY_PEER" value="1" enum="RPCMode"> Used with [method Node.rpc_config] to set a method to be callable remotely by any peer. Analogous to the [code]@rpc(any)[/code] annotation. Calls are accepted from all remote peers, no matter if they are node's authority or not. </constant> - <constant name="RPC_MODE_AUTH" value="2" enum="RPCMode"> - Used with [method 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 [code]@rpc(auth)[/code] annotation. See [method Node.set_multiplayer_authority]. + <constant name="RPC_MODE_AUTHORITY" value="2" enum="RPCMode"> + Used with [method 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 [code]@rpc(authority)[/code] annotation. See [method Node.set_multiplayer_authority]. </constant> <constant name="TRANSFER_MODE_UNRELIABLE" value="0" enum="TransferMode"> Packets are not acknowledged, no resend attempts are made for lost packets. Packets may arrive in any order. Potentially faster than [constant TRANSFER_MODE_UNRELIABLE_ORDERED]. Use for non-critical data, and always consider whether the order matters. diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml index ef4f86f1a9..94181db95f 100644 --- a/doc/classes/Array.xml +++ b/doc/classes/Array.xml @@ -123,6 +123,48 @@ </constructor> </constructors> <methods> + <method name="all" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="method" type="Callable" /> + <description> + Calls the provided [Callable] on each element in the array and returns [code]true[/code] if the [Callable] returns [code]true[/code] for [i]all[/i] elements in the array. If the [Callable] returns [code]false[/code] for one array element or more, this method returns [code]false[/code]. + The callable's method should take one [Variant] parameter (the current array element) and return a boolean value. + [codeblock] + func _ready(): + print([6, 10, 6].all(greater_than_5)) # Prints True (3 elements evaluate to `true`). + print([4, 10, 4].all(greater_than_5)) # Prints False (1 elements evaluate to `true`). + print([4, 4, 4].all(greater_than_5)) # Prints False (0 elements evaluate to `true`). + + print([6, 10, 6].all(func(number): return number > 5)) # Prints True. Same as the first line above, but using lambda function. + + func greater_than_5(number): + return number > 5 + [/codeblock] + See also [method any], [method filter], [method map] and [method reduce]. + [b]Note:[/b] Unlike relying on the size of an array returned by [method filter], this method will return as early as possible to improve performance (especially with large arrays). + </description> + </method> + <method name="any" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="method" type="Callable" /> + <description> + Calls the provided [Callable] on each element in the array and returns [code]true[/code] if the [Callable] returns [code]true[/code] for [i]one or more[/i] elements in the array. If the [Callable] returns [code]false[/code] for all elements in the array, this method returns [code]false[/code]. + The callable's method should take one [Variant] parameter (the current array element) and return a boolean value. + [codeblock] + func _ready(): + print([6, 10, 6].any(greater_than_5)) # Prints True (3 elements evaluate to `true`). + print([4, 10, 4].any(greater_than_5)) # Prints True (1 elements evaluate to `true`). + print([4, 4, 4].any(greater_than_5)) # Prints False (0 elements evaluate to `true`). + + print([6, 10, 6].any(func(number): return number > 5)) # Prints True. Same as the first line above, but using lambda function. + + func greater_than_5(number): + return number > 5 + [/codeblock] + See also [method all], [method filter], [method map] and [method reduce]. + [b]Note:[/b] Unlike relying on the size of an array returned by [method filter], this method will return as early as possible to improve performance (especially with large arrays). + </description> + </method> <method name="append"> <return type="void" /> <argument index="0" name="value" type="Variant" /> @@ -232,6 +274,7 @@ func remove_1(number): return number != 1 [/codeblock] + See also [method any], [method all], [method map] and [method reduce]. </description> </method> <method name="find" qualifiers="const"> @@ -333,6 +376,7 @@ func negate(number): return -number [/codeblock] + See also [method filter], [method reduce], [method any] and [method all]. </description> </method> <method name="max" qualifiers="const"> @@ -398,6 +442,7 @@ func sum(accum, number): return accum + number [/codeblock] + See also [method map], [method filter], [method any] and [method all]. </description> </method> <method name="remove_at"> diff --git a/doc/classes/AudioEffectCapture.xml b/doc/classes/AudioEffectCapture.xml index 5ab4403be5..7a7f1f8e8a 100644 --- a/doc/classes/AudioEffectCapture.xml +++ b/doc/classes/AudioEffectCapture.xml @@ -5,7 +5,7 @@ </brief_description> <description> AudioEffectCapture is an AudioEffect which copies all audio frames from the attached audio effect bus into its internal ring buffer. - Application code should consume these audio frames from this ring buffer using [method get_buffer] and process it as needed, for example to capture data from a microphone, implement application defined effects, or to transmit audio over the network. + Application code should consume these audio frames from this ring buffer using [method get_buffer] and process it as needed, for example to capture data from a microphone, implement application defined effects, or to transmit audio over the network. When capturing audio data from a microphone, the format of the samples will be stereo 32-bit floating point PCM. </description> <tutorials> </tutorials> diff --git a/doc/classes/BaseMaterial3D.xml b/doc/classes/BaseMaterial3D.xml index c6f3aae929..a9c6030809 100644 --- a/doc/classes/BaseMaterial3D.xml +++ b/doc/classes/BaseMaterial3D.xml @@ -61,14 +61,16 @@ The material's base color. [b]Note:[/b] If [member detail_enabled] is [code]true[/code] and a [member detail_albedo] texture is specified, [member albedo_color] will [i]not[/i] modulate the detail texture. This can be used to color partial areas of a material by not specifying an albedo texture and using a transparent [member detail_albedo] texture instead. </member> - <member name="albedo_tex_force_srgb" type="bool" setter="set_flag" getter="get_flag" default="false"> - Forces a conversion of the [member albedo_texture] from sRGB space to linear space. - </member> - <member name="albedo_tex_msdf" type="bool" setter="set_flag" getter="get_flag" default="false"> - Enables multichannel signed distance field rendering shader. Use [member msdf_pixel_range] and [member msdf_outline_size] to configure MSDF parameters. - </member> <member name="albedo_texture" type="Texture2D" setter="set_texture" getter="get_texture"> Texture to multiply by [member albedo_color]. Used for basic texturing of objects. + If the texture appears unexpectedly too dark or too bright, check [member albedo_texture_force_srgb]. + </member> + <member name="albedo_texture_force_srgb" type="bool" setter="set_flag" getter="get_flag" default="false"> + If [code]true[/code], forces a conversion of the [member albedo_texture] from sRGB color space to linear color space. See also [member vertex_color_is_srgb]. + This should only be enabled when needed (typically when using a [ViewportTexture] as [member albedo_texture]). If [member albedo_texture_force_srgb] is [code]true[/code] when it shouldn't be, the texture will appear to be too dark. If [member albedo_texture_force_srgb] is [code]false[/code] when it shouldn't be, the texture will appear to be too bright. + </member> + <member name="albedo_texture_msdf" type="bool" setter="set_flag" getter="get_flag" default="false"> + Enables multichannel signed distance field rendering shader. Use [member msdf_pixel_range] and [member msdf_outline_size] to configure MSDF parameters. </member> <member name="alpha_antialiasing_edge" type="float" setter="set_alpha_antialiasing_edge" getter="get_alpha_antialiasing_edge"> Threshold at which antialiasing will be applied on the alpha channel. @@ -401,7 +403,8 @@ If [code]true[/code], triplanar mapping for [code]UV2[/code] is calculated in world space rather than object local space. See also [member uv2_triplanar]. </member> <member name="vertex_color_is_srgb" type="bool" setter="set_flag" getter="get_flag" default="false"> - If [code]true[/code], the model's vertex colors are processed as sRGB mode. + If [code]true[/code], vertex colors are considered to be stored in sRGB color space and are converted to linear color space during rendering. If [code]false[/code], vertex colors are considered to be stored in linear color space and are rendered as-is. See also [member albedo_texture_force_srgb]. + [b]Note:[/b] Only effective when using the Vulkan Clustered or Vulkan Mobile backends. </member> <member name="vertex_color_use_as_albedo" type="bool" setter="set_flag" getter="get_flag" default="false"> If [code]true[/code], the vertex color is used as albedo color. @@ -607,7 +610,8 @@ Set [code]ALBEDO[/code] to the per-vertex color specified in the mesh. </constant> <constant name="FLAG_SRGB_VERTEX_COLOR" value="2" enum="Flags"> - Vertex color is in sRGB space and needs to be converted to linear. Only applies in the Vulkan renderer. + Vertex colors are considered to be stored in sRGB color space and are converted to linear color space during rendering. See also [member vertex_color_is_srgb]. + [b]Note:[/b] Only effective when using the Vulkan Clustered or Vulkan Mobile backends. </constant> <constant name="FLAG_USE_POINT_SIZE" value="3" enum="Flags"> Uses point size to alter the size of primitive points. Also changes the albedo texture lookup to use [code]POINT_COORD[/code] instead of [code]UV[/code]. @@ -637,7 +641,7 @@ Use [code]UV2[/code] coordinates to look up from the [member emission_texture]. </constant> <constant name="FLAG_ALBEDO_TEXTURE_FORCE_SRGB" value="12" enum="Flags"> - Forces the shader to convert albedo from sRGB space to linear space. + Forces the shader to convert albedo from sRGB space to linear space. See also [member albedo_texture_force_srgb]. </constant> <constant name="FLAG_DONT_RECEIVE_SHADOWS" value="13" enum="Flags"> Disables receiving shadows from other objects. diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index 6cd2da520f..98a498d719 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -67,7 +67,7 @@ <argument index="1" name="radius" type="float" /> <argument index="2" name="color" type="Color" /> <description> - Draws a colored, unfilled circle. See also [method draw_arc], [method draw_polyline] and [method draw_polygon]. + Draws a colored, filled circle. See also [method draw_arc], [method draw_polyline] and [method draw_polygon]. </description> </method> <method name="draw_colored_polygon"> diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml index 7b8a57ed22..59ad104ad1 100644 --- a/doc/classes/Color.xml +++ b/doc/classes/Color.xml @@ -157,10 +157,28 @@ Constructs a color from an [url=https://en.wikipedia.org/wiki/HSL_and_HSV]HSV profile[/url]. [code]h[/code] (hue), [code]s[/code] (saturation), and [code]v[/code] (value) are typically between 0 and 1. [codeblocks] [gdscript] - var c = Color.from_hsv(0.58, 0.5, 0.79, 0.8) + var color = Color.from_hsv(0.58, 0.5, 0.79, 0.8) [/gdscript] [csharp] - var c = Color.FromHsv(0.58f, 0.5f, 0.79f, 0.8f); + var color = Color.FromHsv(0.58f, 0.5f, 0.79f, 0.8f); + [/csharp] + [/codeblocks] + </description> + </method> + <method name="from_ok_hsl" qualifiers="static"> + <return type="Color" /> + <argument index="0" name="h" type="float" /> + <argument index="1" name="s" type="float" /> + <argument index="2" name="l" type="float" /> + <argument index="3" name="alpha" type="float" default="1.0" /> + <description> + Constructs a color from an [url=https://bottosson.github.io/posts/colorpicker/]OK HSL profile[/url]. [code]h[/code] (hue), [code]s[/code] (saturation), and [code]v[/code] (value) are typically between 0 and 1. + [codeblocks] + [gdscript] + var color = Color.from_ok_hsl(0.58, 0.5, 0.79, 0.8) + [/gdscript] + [csharp] + var color = Color.FromOkHsl(0.58f, 0.5f, 0.79f, 0.8f); [/csharp] [/codeblocks] </description> diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml index 5c47d6fb54..7c9c4ed4d6 100644 --- a/doc/classes/ColorPicker.xml +++ b/doc/classes/ColorPicker.xml @@ -91,6 +91,9 @@ <constant name="SHAPE_VHS_CIRCLE" value="2" enum="PickerShapeType"> HSV Color Model circle color space. Use Saturation as a radius. </constant> + <constant name="SHAPE_OKHSL_CIRCLE" value="3" enum="PickerShapeType"> + HSL OK Color Model circle color space. + </constant> </constants> <theme_items> <theme_item name="h_width" data_type="constant" type="int" default="30"> diff --git a/doc/classes/Crypto.xml b/doc/classes/Crypto.xml index c0a76dc80e..4936fc1d85 100644 --- a/doc/classes/Crypto.xml +++ b/doc/classes/Crypto.xml @@ -68,7 +68,6 @@ } [/csharp] [/codeblocks] - [b]Note:[/b] Not available in HTML5 exports. </description> <tutorials> </tutorials> diff --git a/doc/classes/CryptoKey.xml b/doc/classes/CryptoKey.xml index b0abdf60c8..8496c6dec1 100644 --- a/doc/classes/CryptoKey.xml +++ b/doc/classes/CryptoKey.xml @@ -6,7 +6,6 @@ <description> The CryptoKey class represents a cryptographic key. Keys can be loaded and saved like any other [Resource]. They can be used to generate a self-signed [X509Certificate] via [method Crypto.generate_self_signed_certificate] and as private key in [method StreamPeerSSL.accept_stream] along with the appropriate certificate. - [b]Note:[/b] Not available in HTML5 exports. </description> <tutorials> </tutorials> diff --git a/doc/classes/CylinderMesh.xml b/doc/classes/CylinderMesh.xml index e141ba8203..045c3b914b 100644 --- a/doc/classes/CylinderMesh.xml +++ b/doc/classes/CylinderMesh.xml @@ -10,7 +10,15 @@ </tutorials> <members> <member name="bottom_radius" type="float" setter="set_bottom_radius" getter="get_bottom_radius" default="0.5"> - Bottom radius of the cylinder. If set to [code]0.0[/code], the bottom faces will not be generated, resulting in a conic shape. + Bottom radius of the cylinder. If set to [code]0.0[/code], the bottom faces will not be generated, resulting in a conic shape. See also [member cap_bottom]. + </member> + <member name="cap_bottom" type="bool" setter="set_cap_bottom" getter="is_cap_bottom" default="true"> + If [code]true[/code], generates a cap at the bottom of the cylinder. This can be set to [code]false[/code] to speed up generation and rendering when the cap is never seen by the camera. See also [member bottom_radius]. + [b]Note:[/b] If [member bottom_radius] is [code]0.0[/code], cap generation is always skipped even if [member cap_bottom] is [code]true[/code]. + </member> + <member name="cap_top" type="bool" setter="set_cap_top" getter="is_cap_top" default="true"> + If [code]true[/code], generates a cap at the top of the cylinder. This can be set to [code]false[/code] to speed up generation and rendering when the cap is never seen by the camera. See also [member top_radius]. + [b]Note:[/b] If [member top_radius] is [code]0.0[/code], cap generation is always skipped even if [member cap_top] is [code]true[/code]. </member> <member name="height" type="float" setter="set_height" getter="get_height" default="2.0"> Full height of the cylinder. @@ -22,7 +30,7 @@ Number of edge rings along the height of the cylinder. Changing [member rings] does not have any visual impact unless a shader or procedural mesh tool is used to alter the vertex data. Higher values result in more subdivisions, which can be used to create smoother-looking effects with shaders or procedural mesh tools (at the cost of performance). When not altering the vertex data using a shader or procedural mesh tool, [member rings] should be kept to its default value. </member> <member name="top_radius" type="float" setter="set_top_radius" getter="get_top_radius" default="0.5"> - Top radius of the cylinder. If set to [code]0.0[/code], the top faces will not be generated, resulting in a conic shape. + Top radius of the cylinder. If set to [code]0.0[/code], the top faces will not be generated, resulting in a conic shape. See also [member cap_top]. </member> </members> </class> diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml index 8ee09ba8f8..6f2ad5205c 100644 --- a/doc/classes/Dictionary.xml +++ b/doc/classes/Dictionary.xml @@ -43,7 +43,7 @@ You can access a dictionary's values by referencing the appropriate key. In the above example, [code]points_dict["White"][/code] will return [code]50[/code]. You can also write [code]points_dict.White[/code], which is equivalent. However, you'll have to use the bracket syntax if the key you're accessing the dictionary with isn't a fixed string (such as a number or variable). [codeblocks] [gdscript] - export(string, "White", "Yellow", "Orange") var my_color + export(String, "White", "Yellow", "Orange") var my_color var points_dict = {"White": 50, "Yellow": 75, "Orange": 100} func _ready(): # We can't use dot syntax here as `my_color` is a variable. @@ -291,6 +291,14 @@ Returns the list of keys in the [Dictionary]. </description> </method> + <method name="merge"> + <return type="void" /> + <argument index="0" name="dictionary" type="Dictionary" /> + <argument index="1" name="overwrite" type="bool" default="false" /> + <description> + Adds elements from [code]dictionary[/code] to this [Dictionary]. By default, duplicate keys will not be copied over, unless [code]overwrite[/code] is [code]true[/code]. + </description> + </method> <method name="size" qualifiers="const"> <return type="int" /> <description> diff --git a/doc/classes/EditorInspectorPlugin.xml b/doc/classes/EditorInspectorPlugin.xml index 2bbed84b1e..572d5d9d84 100644 --- a/doc/classes/EditorInspectorPlugin.xml +++ b/doc/classes/EditorInspectorPlugin.xml @@ -77,6 +77,7 @@ <return type="void" /> <argument index="0" name="property" type="String" /> <argument index="1" name="editor" type="Control" /> + <argument index="2" name="add_to_end" type="bool" default="false" /> <description> Adds a property editor for an individual property. The [code]editor[/code] control must extend [EditorProperty]. </description> diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml index 7bbb2ae26c..1514b82ff8 100644 --- a/doc/classes/EditorPlugin.xml +++ b/doc/classes/EditorPlugin.xml @@ -261,14 +261,28 @@ <method name="_get_state" qualifiers="virtual const"> <return type="Dictionary" /> <description> - Gets the state of your plugin editor. This is used when saving the scene (so state is kept when opening it again) and for switching tabs (so state can be restored when the tab returns). + Override this method to provide a state data you want to be saved, like view position, grid settings, folding, etc. This is used when saving the scene (so state is kept when opening it again) and for switching tabs (so state can be restored when the tab returns). This data is automatically saved for each scene in an [code]editstate[/code] file in the editor metadata folder. If you want to store global (scene-independent) editor data for your plugin, you can use [method _get_window_layout] instead. + Use [method _set_state] to restore your saved state. + [b]Note:[/b] This method should not be used to save important settings that should persist with the project. + [b]Note:[/b] You must implement [method _get_plugin_name] for the state to be stored and restored correctly. + [codeblock] + func _get_state(): + var state = {"zoom": zoom, "preferred_color": my_color} + return state + [/codeblock] </description> </method> <method name="_get_window_layout" qualifiers="virtual"> <return type="void" /> <argument index="0" name="configuration" type="ConfigFile" /> <description> - Gets the GUI layout of the plugin. This is used to save the project's editor layout when [method queue_save_layout] is called or the editor layout was changed(For example changing the position of a dock). + Override this method to provide the GUI layout of the plugin or any other data you want to be stored. This is used to save the project's editor layout when [method queue_save_layout] is called or the editor layout was changed (for example changing the position of a dock). The data is stored in the [code]editor_layout.cfg[/code] file in the editor metadata directory. + Use [method _set_window_layout] to restore your saved layout. + [codeblock] + func _get_window_layout(configuration): + configuration.set_value("MyPlugin", "window_position", $Window.position) + configuration.set_value("MyPlugin", "icon_color", $Icon.modulate) + [/codeblock] </description> </method> <method name="_handles" qualifiers="virtual const"> @@ -302,14 +316,25 @@ <return type="void" /> <argument index="0" name="state" type="Dictionary" /> <description> - Restore the state saved by [method _get_state]. + Restore the state saved by [method _get_state]. This method is called when the current scene tab is changed in the editor. + [b]Note:[/b] Your plugin must implement [method _get_plugin_name], otherwise it will not be recognized and this method will not be called. + [codeblock] + func _set_state(data): + zoom = data.get("zoom", 1.0) + preferred_color = data.get("my_color", Color.white) + [/codeblock] </description> </method> <method name="_set_window_layout" qualifiers="virtual"> <return type="void" /> <argument index="0" name="configuration" type="ConfigFile" /> <description> - Restore the plugin GUI layout saved by [method _get_window_layout]. + Restore the plugin GUI layout and data saved by [method _get_window_layout]. This method is called for every plugin on editor startup. Use the provided [code]configuration[/code] file to read your saved data. + [codeblock] + func _set_window_layout(configuration): + $Window.position = configuration.get_value("MyPlugin", "window_position", Vector2()) + $Icon.modulate = configuration.get_value("MyPlugin", "icon_color", Color.white) + [/codeblock] </description> </method> <method name="add_autoload_singleton"> @@ -479,7 +504,7 @@ <method name="get_script_create_dialog"> <return type="ScriptCreateDialog" /> <description> - Gets the Editor's dialogue used for making scripts. + Gets the Editor's dialog used for making scripts. [b]Note:[/b] Users can configure it before use. [b]Warning:[/b] Removing and freeing this node will render a part of the editor useless and may cause a crash. </description> diff --git a/doc/classes/FogVolume.xml b/doc/classes/FogVolume.xml index d28a6a8783..3f2ee3035c 100644 --- a/doc/classes/FogVolume.xml +++ b/doc/classes/FogVolume.xml @@ -11,14 +11,15 @@ </tutorials> <members> <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)"> - Sets the size of the [FogVolume] when [member shape] is [constant RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID] or [constant RenderingServer.FOG_VOLUME_SHAPE_BOX]. + Sets the size of the [FogVolume] when [member shape] is [constant RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID], [constant RenderingServer.FOG_VOLUME_SHAPE_CONE], [constant RenderingServer.FOG_VOLUME_SHAPE_CYLINDER] or [constant RenderingServer.FOG_VOLUME_SHAPE_BOX]. [b]Note:[/b] Thin fog volumes may appear to flicker when the camera moves or rotates. This can be alleviated by increasing [member ProjectSettings.rendering/environment/volumetric_fog/volume_depth] (at a performance cost) or by decreasing [member Environment.volumetric_fog_length] (at no performance cost, but at the cost of lower fog range). Alternatively, the [FogVolume] can be made thicker and use a lower density in the [member material]. + [b]Note:[/b] If [member shape] is [constant RenderingServer.FOG_VOLUME_SHAPE_CONE] or [constant RenderingServer.FOG_VOLUME_SHAPE_CYLINDER], the cone/cylinder will be adjusted to fit within the extents. Non-uniform scaling of cone/cylinder shapes via the [member extents] property is not supported, but you can scale the [FogVolume] node instead. </member> <member name="material" type="Material" setter="set_material" getter="get_material"> Sets the [Material] to be used by the [FogVolume]. Can be either a [FogMaterial] or a custom [ShaderMaterial]. </member> - <member name="shape" type="int" setter="set_shape" getter="get_shape" enum="RenderingServer.FogVolumeShape" default="1"> - Sets the shape of the [FogVolume] to either [constant RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID], [constant RenderingServer.FOG_VOLUME_SHAPE_BOX], or [constant RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID] or [constant RenderingServer.FOG_VOLUME_SHAPE_WORLD]. + <member name="shape" type="int" setter="set_shape" getter="get_shape" enum="RenderingServer.FogVolumeShape" default="3"> + Sets the shape of the [FogVolume] to either [constant RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID], [constant RenderingServer.FOG_VOLUME_SHAPE_CONE], [constant RenderingServer.FOG_VOLUME_SHAPE_CYLINDER], [constant RenderingServer.FOG_VOLUME_SHAPE_BOX] or [constant RenderingServer.FOG_VOLUME_SHAPE_WORLD]. </member> </members> </class> diff --git a/doc/classes/Geometry2D.xml b/doc/classes/Geometry2D.xml index cbd83e8d7d..b84e221d1c 100644 --- a/doc/classes/Geometry2D.xml +++ b/doc/classes/Geometry2D.xml @@ -118,7 +118,7 @@ <argument index="2" name="from_b" type="Vector2" /> <argument index="3" name="dir_b" type="Vector2" /> <description> - Checks if the two lines ([code]from_a[/code], [code]dir_a[/code]) and ([code]from_b[/code], [code]dir_b[/code]) intersect. If yes, return the point of intersection as [Vector2]. If no intersection takes place, returns an empty [Variant]. + Checks if the two lines ([code]from_a[/code], [code]dir_a[/code]) and ([code]from_b[/code], [code]dir_b[/code]) intersect. If yes, return the point of intersection as [Vector2]. If no intersection takes place, returns [code]null[/code]. [b]Note:[/b] The lines are specified using direction vectors, not end points. </description> </method> @@ -195,7 +195,7 @@ <argument index="2" name="from_b" type="Vector2" /> <argument index="3" name="to_b" type="Vector2" /> <description> - Checks if the two segments ([code]from_a[/code], [code]to_a[/code]) and ([code]from_b[/code], [code]to_b[/code]) intersect. If yes, return the point of intersection as [Vector2]. If no intersection takes place, returns an empty [Variant]. + Checks if the two segments ([code]from_a[/code], [code]to_a[/code]) and ([code]from_b[/code], [code]to_b[/code]) intersect. If yes, return the point of intersection as [Vector2]. If no intersection takes place, returns [code]null[/code]. </description> </method> <method name="triangulate_delaunay"> diff --git a/doc/classes/Geometry3D.xml b/doc/classes/Geometry3D.xml index 0bf6f880c2..c05d7df53f 100644 --- a/doc/classes/Geometry3D.xml +++ b/doc/classes/Geometry3D.xml @@ -81,7 +81,7 @@ <argument index="3" name="b" type="Vector3" /> <argument index="4" name="c" type="Vector3" /> <description> - Tests if the 3D ray starting at [code]from[/code] with the direction of [code]dir[/code] intersects the triangle specified by [code]a[/code], [code]b[/code] and [code]c[/code]. If yes, returns the point of intersection as [Vector3]. If no intersection takes place, an empty [Variant] is returned. + Tests if the 3D ray starting at [code]from[/code] with the direction of [code]dir[/code] intersects the triangle specified by [code]a[/code], [code]b[/code] and [code]c[/code]. If yes, returns the point of intersection as [Vector3]. If no intersection takes place, returns [code]null[/code]. </description> </method> <method name="segment_intersects_convex"> @@ -121,7 +121,7 @@ <argument index="3" name="b" type="Vector3" /> <argument index="4" name="c" type="Vector3" /> <description> - Tests if the segment ([code]from[/code], [code]to[/code]) intersects the triangle [code]a[/code], [code]b[/code], [code]c[/code]. If yes, returns the point of intersection as [Vector3]. If no intersection takes place, an empty [Variant] is returned. + Tests if the segment ([code]from[/code], [code]to[/code]) intersects the triangle [code]a[/code], [code]b[/code], [code]c[/code]. If yes, returns the point of intersection as [Vector3]. If no intersection takes place, returns [code]null[/code]. </description> </method> </methods> diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml index 02352ca808..965dbe7449 100644 --- a/doc/classes/GraphEdit.xml +++ b/doc/classes/GraphEdit.xml @@ -202,6 +202,9 @@ <member name="connection_lines_antialiased" type="bool" setter="set_connection_lines_antialiased" getter="is_connection_lines_antialiased" default="true"> If [code]true[/code], the lines between nodes will use antialiasing. </member> + <member name="connection_lines_curvature" type="float" setter="set_connection_lines_curvature" getter="get_connection_lines_curvature" default="0.5"> + The curvature of the lines between the nodes. 0 results in straight lines. + </member> <member name="connection_lines_thickness" type="float" setter="set_connection_lines_thickness" getter="get_connection_lines_thickness" default="2.0"> The thickness of the lines between the nodes. </member> @@ -372,15 +375,11 @@ <theme_item name="selection_stroke" data_type="color" type="Color" default="Color(1, 1, 1, 0.8)"> The outline color of the selection rectangle. </theme_item> - <theme_item name="bezier_len_neg" data_type="constant" type="int" default="160"> - </theme_item> - <theme_item name="bezier_len_pos" data_type="constant" type="int" default="80"> - </theme_item> - <theme_item name="port_grab_distance_horizontal" data_type="constant" type="int" default="24"> - The horizontal range within which a port can be grabbed (on both sides). + <theme_item name="port_hotzone_inner_extent" data_type="constant" type="int" default="22"> + The horizontal range within which a port can be grabbed (inner side). </theme_item> - <theme_item name="port_grab_distance_vertical" data_type="constant" type="int" default="26"> - The vertical range within which a port can be grabbed (on both sides). + <theme_item name="port_hotzone_outer_extent" data_type="constant" type="int" default="26"> + The horizontal range within which a port can be grabbed (outer side). </theme_item> <theme_item name="layout" data_type="icon" type="Texture2D"> </theme_item> diff --git a/doc/classes/GraphNode.xml b/doc/classes/GraphNode.xml index 5f0dca0402..f261da8413 100644 --- a/doc/classes/GraphNode.xml +++ b/doc/classes/GraphNode.xml @@ -43,6 +43,13 @@ Returns the number of enabled input slots (connections) to the GraphNode. </description> </method> + <method name="get_connection_input_height"> + <return type="int" /> + <argument index="0" name="idx" type="int" /> + <description> + Returns the height of the input connection [code]idx[/code]. + </description> + </method> <method name="get_connection_input_position"> <return type="Vector2" /> <argument index="0" name="idx" type="int" /> @@ -70,6 +77,13 @@ Returns the number of enabled output slots (connections) of the GraphNode. </description> </method> + <method name="get_connection_output_height"> + <return type="int" /> + <argument index="0" name="idx" type="int" /> + <description> + Returns the height of the output connection [code]idx[/code]. + </description> + </method> <method name="get_connection_output_position"> <return type="Vector2" /> <argument index="0" name="idx" type="int" /> diff --git a/doc/classes/HMACContext.xml b/doc/classes/HMACContext.xml index fa60a7eb58..f2b946cab7 100644 --- a/doc/classes/HMACContext.xml +++ b/doc/classes/HMACContext.xml @@ -50,7 +50,6 @@ [/csharp] [/codeblocks] - [b]Note:[/b] Not available in HTML5 exports. </description> <tutorials> </tutorials> diff --git a/doc/classes/HashingContext.xml b/doc/classes/HashingContext.xml index 9ecf2872f3..c126efcfbb 100644 --- a/doc/classes/HashingContext.xml +++ b/doc/classes/HashingContext.xml @@ -57,7 +57,6 @@ } [/csharp] [/codeblocks] - [b]Note:[/b] Not available in HTML5 exports. </description> <tutorials> </tutorials> diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml index 2a4381b41b..66683fa0ee 100644 --- a/doc/classes/Input.xml +++ b/doc/classes/Input.xml @@ -40,7 +40,7 @@ <method name="flush_buffered_events"> <return type="void" /> <description> - Sends all input events which are in the current buffer to the game loop. These events may have been buffered as a result of accumulated input ([method set_use_accumulated_input]) or agile input flushing ([member ProjectSettings.input_devices/buffering/agile_event_flushing]). + Sends all input events which are in the current buffer to the game loop. These events may have been buffered as a result of accumulated input ([member use_accumulated_input]) or agile input flushing ([member ProjectSettings.input_devices/buffering/agile_event_flushing]). The engine will already do this itself at key execution points (at least once per frame). However, this can be useful in advanced cases where you want precise control over the timing of event handling. </description> </method> @@ -80,7 +80,7 @@ </description> </method> <method name="get_connected_joypads"> - <return type="Array" /> + <return type="int[]" /> <description> Returns an [Array] containing the device IDs of all currently connected joypads. </description> @@ -160,12 +160,6 @@ Returns mouse buttons as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together. </description> </method> - <method name="get_mouse_mode" qualifiers="const"> - <return type="int" enum="Input.MouseMode" /> - <description> - Returns the mouse mode. See the constants for more information. - </description> - </method> <method name="get_vector" qualifiers="const"> <return type="Vector2" /> <argument index="0" name="negative_x" type="StringName" /> @@ -338,21 +332,6 @@ [b]Note:[/b] This value can be immediately overwritten by the hardware sensor value on Android and iOS. </description> </method> - <method name="set_mouse_mode"> - <return type="void" /> - <argument index="0" name="mode" type="int" enum="Input.MouseMode" /> - <description> - Sets the mouse mode. See the constants for more information. - </description> - </method> - <method name="set_use_accumulated_input"> - <return type="void" /> - <argument index="0" name="enable" type="bool" /> - <description> - Enables or disables the accumulation of similar input events sent by the operating system. When input accumulation is enabled, all input events generated during a frame will be merged and emitted when the frame is done rendering. Therefore, this limits the number of input method calls per second to the rendering FPS. - Input accumulation is enabled by default. It can be disabled to get slightly more precise/reactive input at the cost of increased CPU usage. In applications where drawing freehand lines is required, input accumulation should generally be disabled while the user is drawing the line to get results that closely follow the actual input. - </description> - </method> <method name="start_joy_vibration"> <return type="void" /> <argument index="0" name="device" type="int" /> @@ -389,6 +368,15 @@ </description> </method> </methods> + <members> + <member name="mouse_mode" type="int" setter="set_mouse_mode" getter="get_mouse_mode" enum="Input.MouseMode"> + Controls the mouse mode. See [enum MouseMode] for more information. + </member> + <member name="use_accumulated_input" type="bool" setter="set_use_accumulated_input" getter="is_using_accumulated_input"> + If [code]true[/code], similar input events sent by the operating system are accumulated. When input accumulation is enabled, all input events generated during a frame will be merged and emitted when the frame is done rendering. Therefore, this limits the number of input method calls per second to the rendering FPS. + Input accumulation can be disabled to get slightly more precise/reactive input at the cost of increased CPU usage. In applications where drawing freehand lines is required, input accumulation should generally be disabled while the user is drawing the line to get results that closely follow the actual input. + </member> + </members> <signals> <signal name="joy_connection_changed"> <argument index="0" name="device" type="int" /> diff --git a/doc/classes/InputEventMouseMotion.xml b/doc/classes/InputEventMouseMotion.xml index 7cc3de8fcb..ad74204d82 100644 --- a/doc/classes/InputEventMouseMotion.xml +++ b/doc/classes/InputEventMouseMotion.xml @@ -5,7 +5,7 @@ </brief_description> <description> Contains mouse and pen motion information. Supports relative, absolute positions and velocity. See [method Node._input]. - [b]Note:[/b] By default, this event is only emitted once per frame rendered at most. If you need more precise input reporting, call [method Input.set_use_accumulated_input] with [code]false[/code] to make events emitted as often as possible. If you use InputEventMouseMotion to draw lines, consider implementing [url=https://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm]Bresenham's line algorithm[/url] as well to avoid visible gaps in lines if the user is moving the mouse quickly. + [b]Note:[/b] By default, this event is only emitted once per frame rendered at most. If you need more precise input reporting, set [member Input.use_accumulated_input] to [code]false[/code] to make events emitted as often as possible. If you use InputEventMouseMotion to draw lines, consider implementing [url=https://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm]Bresenham's line algorithm[/url] as well to avoid visible gaps in lines if the user is moving the mouse quickly. </description> <tutorials> <link title="Mouse and input coordinates">$DOCS_URL/tutorials/inputs/mouse_and_input_coordinates.html</link> diff --git a/doc/classes/Mesh.xml b/doc/classes/Mesh.xml index 2b24901fe2..eeb6af24c9 100644 --- a/doc/classes/Mesh.xml +++ b/doc/classes/Mesh.xml @@ -123,7 +123,7 @@ <method name="generate_triangle_mesh" qualifiers="const"> <return type="TriangleMesh" /> <description> - Generate a [TriangleMesh] from the mesh. + Generate a [TriangleMesh] from the mesh. Considers only surfaces using one of these primitive types: [constant PRIMITIVE_TRIANGLES], [constant PRIMITIVE_TRIANGLE_STRIP]. </description> </method> <method name="get_aabb" qualifiers="const"> diff --git a/doc/classes/MultiplayerSynchronizer.xml b/doc/classes/MultiplayerSynchronizer.xml index 43355481b6..ac067791e6 100644 --- a/doc/classes/MultiplayerSynchronizer.xml +++ b/doc/classes/MultiplayerSynchronizer.xml @@ -7,7 +7,7 @@ <tutorials> </tutorials> <members> - <member name="congiruation" type="SceneReplicationConfig" setter="set_replication_config" getter="get_replication_config"> + <member name="replication_config" type="SceneReplicationConfig" setter="set_replication_config" getter="get_replication_config"> </member> <member name="replication_interval" type="float" setter="set_replication_interval" getter="get_replication_interval" default="0.0"> </member> diff --git a/doc/classes/NavigationAgent2D.xml b/doc/classes/NavigationAgent2D.xml index 942579f564..945947ad9f 100644 --- a/doc/classes/NavigationAgent2D.xml +++ b/doc/classes/NavigationAgent2D.xml @@ -5,6 +5,7 @@ </brief_description> <description> 2D Agent that is used in navigation to reach a location while avoiding static and dynamic obstacles. The dynamic obstacles are avoided using RVO collision avoidance. The agent needs navigation data to work correctly. [NavigationAgent2D] is physics safe. + [b]Note:[/b] After [method set_target_location] is used it is required to use the [method get_next_location] function once every physics frame to update the internal path logic of the NavigationAgent. The returned vector position from this function should be used as the next movement position for the agent's parent Node. </description> <tutorials> </tutorials> @@ -24,7 +25,7 @@ <method name="get_nav_path" qualifiers="const"> <return type="PackedVector2Array" /> <description> - Returns the path from start to finish in global coordinates. + Returns this agent's current path from start to finish in global coordinates. The path only updates when the target location is changed or the agent requires a repath. The path array is not intended to be used in direct path movement as the agent has its own internal path logic that would get corrupted by changing the path array manually. Use the intended [method get_next_location] once every physics frame to receive the next path point for the agents movement as this function also updates the internal path logic. </description> </method> <method name="get_nav_path_index" qualifiers="const"> @@ -36,7 +37,7 @@ <method name="get_next_location"> <return type="Vector2" /> <description> - Returns a [Vector2] in global coordinates, that can be moved to, making sure that there are no static objects in the way. If the agent does not have a navigation path, it will return the position of the agent's parent. + Returns the next location in global coordinates that can be moved to, making sure that there are no static objects in the way. If the agent does not have a navigation path, it will return the position of the agent's parent. The use of this function once every physics frame is required to update the internal path logic of the NavigationAgent. </description> </method> <method name="get_rid" qualifiers="const"> diff --git a/doc/classes/NavigationAgent3D.xml b/doc/classes/NavigationAgent3D.xml index 445fac55fe..7f7e058742 100644 --- a/doc/classes/NavigationAgent3D.xml +++ b/doc/classes/NavigationAgent3D.xml @@ -5,6 +5,7 @@ </brief_description> <description> 3D Agent that is used in navigation to reach a location while avoiding static and dynamic obstacles. The dynamic obstacles are avoided using RVO collision avoidance. The agent needs navigation data to work correctly. [NavigationAgent3D] is physics safe. + [b]Note:[/b] After [method set_target_location] is used it is required to use the [method get_next_location] function once every physics frame to update the internal path logic of the NavigationAgent. The returned vector position from this function should be used as the next movement position for the agent's parent Node. </description> <tutorials> </tutorials> @@ -24,7 +25,7 @@ <method name="get_nav_path" qualifiers="const"> <return type="PackedVector3Array" /> <description> - Returns the path from start to finish in global coordinates. + Returns this agent's current path from start to finish in global coordinates. The path only updates when the target location is changed or the agent requires a repath. The path array is not intended to be used in direct path movement as the agent has its own internal path logic that would get corrupted by changing the path array manually. Use the intended [method get_next_location] once every physics frame to receive the next path point for the agents movement as this function also updates the internal path logic. </description> </method> <method name="get_nav_path_index" qualifiers="const"> @@ -36,7 +37,7 @@ <method name="get_next_location"> <return type="Vector3" /> <description> - Returns a [Vector3] in global coordinates, that can be moved to, making sure that there are no static objects in the way. If the agent does not have a navigation path, it will return the origin of the agent's parent. + Returns the next location in global coordinates that can be moved to, making sure that there are no static objects in the way. If the agent does not have a navigation path, it will return the position of the agent's parent. The use of this function once every physics frame is required to update the internal path logic of the NavigationAgent. </description> </method> <method name="get_rid" qualifiers="const"> @@ -86,7 +87,7 @@ </methods> <members> <member name="agent_height_offset" type="float" setter="set_agent_height_offset" getter="get_agent_height_offset" default="0.0"> - The agent height offset to match the navigation mesh height. + The NavigationAgent height offset is subtracted from the y-axis value of any vector path position for this NavigationAgent. The NavigationAgent height offset does not change or influence the navigation mesh or pathfinding query result. Additional navigation maps that use regions with navigation meshes that the developer baked with appropriate agent radius or height values are required to support different-sized agents. </member> <member name="avoidance_enabled" type="bool" setter="set_avoidance_enabled" getter="get_avoidance_enabled" default="false"> If [code]true[/code] the agent is registered for an RVO avoidance callback on the [NavigationServer3D]. When [method NavigationAgent3D.set_velocity] is used and the processing is completed a [code]safe_velocity[/code] Vector3 is received with a signal connection to [signal velocity_computed]. Avoidance processing with many registered agents has a significant performance cost and should only be enabled on agents that currently require it. diff --git a/doc/classes/NavigationMesh.xml b/doc/classes/NavigationMesh.xml index bee459273b..3c18b56658 100644 --- a/doc/classes/NavigationMesh.xml +++ b/doc/classes/NavigationMesh.xml @@ -34,7 +34,7 @@ <return type="bool" /> <argument index="0" name="layer_number" type="int" /> <description> - Returns whether or not the specified layer of the [member geometry/collision_mask] is enabled, given a [code]layer_number[/code] between 1 and 32. + Returns whether or not the specified layer of the [member geometry_collision_mask] is enabled, given a [code]layer_number[/code] between 1 and 32. </description> </method> <method name="get_polygon"> @@ -61,7 +61,7 @@ <argument index="0" name="layer_number" type="int" /> <argument index="1" name="value" type="bool" /> <description> - Based on [code]value[/code], enables or disables the specified layer in the [member geometry/collision_mask], given a [code]layer_number[/code] between 1 and 32. + Based on [code]value[/code], enables or disables the specified layer in the [member geometry_collision_mask], given a [code]layer_number[/code] between 1 and 32. </description> </method> <method name="set_vertices"> @@ -73,75 +73,75 @@ </method> </methods> <members> - <member name="agent/height" type="float" setter="set_agent_height" getter="get_agent_height" default="1.5"> + <member name="agent_height" type="float" setter="set_agent_height" getter="get_agent_height" default="1.5"> The minimum floor to ceiling height that will still allow the floor area to be considered walkable. - [b]Note:[/b] While baking, this value will be rounded up to the nearest multiple of [member cell/height]. + [b]Note:[/b] While baking, this value will be rounded up to the nearest multiple of [member cell_height]. </member> - <member name="agent/max_climb" type="float" setter="set_agent_max_climb" getter="get_agent_max_climb" default="0.25"> + <member name="agent_max_climb" type="float" setter="set_agent_max_climb" getter="get_agent_max_climb" default="0.25"> The minimum ledge height that is considered to still be traversable. - [b]Note:[/b] While baking, this value will be rounded down to the nearest multiple of [member cell/height]. + [b]Note:[/b] While baking, this value will be rounded down to the nearest multiple of [member cell_height]. </member> - <member name="agent/max_slope" type="float" setter="set_agent_max_slope" getter="get_agent_max_slope" default="45.0"> + <member name="agent_max_slope" type="float" setter="set_agent_max_slope" getter="get_agent_max_slope" default="45.0"> The maximum slope that is considered walkable, in degrees. </member> - <member name="agent/radius" type="float" setter="set_agent_radius" getter="get_agent_radius" default="0.5"> + <member name="agent_radius" type="float" setter="set_agent_radius" getter="get_agent_radius" default="0.5"> The distance to erode/shrink the walkable area of the heightfield away from obstructions. - [b]Note:[/b] While baking, this value will be rounded up to the nearest multiple of [member cell/size]. + [b]Note:[/b] While baking, this value will be rounded up to the nearest multiple of [member cell_size]. </member> - <member name="cell/height" type="float" setter="set_cell_height" getter="get_cell_height" default="0.25"> + <member name="cell_height" type="float" setter="set_cell_height" getter="get_cell_height" default="0.25"> The Y axis cell size to use for fields. </member> - <member name="cell/size" type="float" setter="set_cell_size" getter="get_cell_size" default="0.25"> + <member name="cell_size" type="float" setter="set_cell_size" getter="get_cell_size" default="0.25"> The XZ plane cell size to use for fields. </member> - <member name="detail/sample_distance" type="float" setter="set_detail_sample_distance" getter="get_detail_sample_distance" default="6.0"> + <member name="detail_sample_distance" type="float" setter="set_detail_sample_distance" getter="get_detail_sample_distance" default="6.0"> The sampling distance to use when generating the detail mesh, in cell unit. </member> - <member name="detail/sample_max_error" type="float" setter="set_detail_sample_max_error" getter="get_detail_sample_max_error" default="1.0"> + <member name="detail_sample_max_error" type="float" setter="set_detail_sample_max_error" getter="get_detail_sample_max_error" default="1.0"> The maximum distance the detail mesh surface should deviate from heightfield, in cell unit. </member> - <member name="edge/max_error" type="float" setter="set_edge_max_error" getter="get_edge_max_error" default="1.3"> + <member name="edge_max_error" type="float" setter="set_edge_max_error" getter="get_edge_max_error" default="1.3"> The maximum distance a simplfied contour's border edges should deviate the original raw contour. </member> - <member name="edge/max_length" type="float" setter="set_edge_max_length" getter="get_edge_max_length" default="12.0"> + <member name="edge_max_length" type="float" setter="set_edge_max_length" getter="get_edge_max_length" default="12.0"> The maximum allowed length for contour edges along the border of the mesh. - [b]Note:[/b] While baking, this value will be rounded up to the nearest multiple of [member cell/size]. + [b]Note:[/b] While baking, this value will be rounded up to the nearest multiple of [member cell_size]. </member> - <member name="filter/filter_walkable_low_height_spans" type="bool" setter="set_filter_walkable_low_height_spans" getter="get_filter_walkable_low_height_spans" default="false"> - If [code]true[/code], marks walkable spans as not walkable if the clearance above the span is less than [member agent/height]. - </member> - <member name="filter/ledge_spans" type="bool" setter="set_filter_ledge_spans" getter="get_filter_ledge_spans" default="false"> + <member name="filter_ledge_spans" type="bool" setter="set_filter_ledge_spans" getter="get_filter_ledge_spans" default="false"> If [code]true[/code], marks spans that are ledges as non-walkable. </member> - <member name="filter/low_hanging_obstacles" type="bool" setter="set_filter_low_hanging_obstacles" getter="get_filter_low_hanging_obstacles" default="false"> - If [code]true[/code], marks non-walkable spans as walkable if their maximum is within [member agent/max_climb] of a walkable neighbor. + <member name="filter_low_hanging_obstacles" type="bool" setter="set_filter_low_hanging_obstacles" getter="get_filter_low_hanging_obstacles" default="false"> + If [code]true[/code], marks non-walkable spans as walkable if their maximum is within [member agent_max_climb] of a walkable neighbor. + </member> + <member name="filter_walkable_low_height_spans" type="bool" setter="set_filter_walkable_low_height_spans" getter="get_filter_walkable_low_height_spans" default="false"> + If [code]true[/code], marks walkable spans as not walkable if the clearance above the span is less than [member agent_height]. </member> - <member name="geometry/collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask"> + <member name="geometry_collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="4294967295"> The physics layers to scan for static colliders. - Only used when [member geometry/parsed_geometry_type] is [constant PARSED_GEOMETRY_STATIC_COLLIDERS] or [constant PARSED_GEOMETRY_BOTH]. + Only used when [member geometry_parsed_geometry_type] is [constant PARSED_GEOMETRY_STATIC_COLLIDERS] or [constant PARSED_GEOMETRY_BOTH]. </member> - <member name="geometry/parsed_geometry_type" type="int" setter="set_parsed_geometry_type" getter="get_parsed_geometry_type" enum="NavigationMesh.ParsedGeometryType" default="0"> + <member name="geometry_parsed_geometry_type" type="int" setter="set_parsed_geometry_type" getter="get_parsed_geometry_type" enum="NavigationMesh.ParsedGeometryType" default="0"> Determines which type of nodes will be parsed as geometry. See [enum ParsedGeometryType] for possible values. </member> - <member name="geometry/source_geometry_mode" type="int" setter="set_source_geometry_mode" getter="get_source_geometry_mode" enum="NavigationMesh.SourceGeometryMode" default="0"> + <member name="geometry_source_geometry_mode" type="int" setter="set_source_geometry_mode" getter="get_source_geometry_mode" enum="NavigationMesh.SourceGeometryMode" default="0"> The source of the geometry used when baking. See [enum SourceGeometryMode] for possible values. </member> - <member name="geometry/source_group_name" type="StringName" setter="set_source_group_name" getter="get_source_group_name"> + <member name="geometry_source_group_name" type="StringName" setter="set_source_group_name" getter="get_source_group_name" default="&"navmesh""> The name of the group to scan for geometry. - Only used when [member geometry/source_geometry_mode] is [constant SOURCE_GEOMETRY_GROUPS_WITH_CHILDREN] or [constant SOURCE_GEOMETRY_GROUPS_EXPLICIT]. + Only used when [member geometry_source_geometry_mode] is [constant SOURCE_GEOMETRY_GROUPS_WITH_CHILDREN] or [constant SOURCE_GEOMETRY_GROUPS_EXPLICIT]. </member> - <member name="polygon/verts_per_poly" type="float" setter="set_verts_per_poly" getter="get_verts_per_poly" default="6.0"> + <member name="polygon_verts_per_poly" type="float" setter="set_verts_per_poly" getter="get_verts_per_poly" default="6.0"> The maximum number of vertices allowed for polygons generated during the contour to polygon conversion process. </member> - <member name="region/merge_size" type="float" setter="set_region_merge_size" getter="get_region_merge_size" default="20.0"> + <member name="region_merge_size" type="float" setter="set_region_merge_size" getter="get_region_merge_size" default="20.0"> Any regions with a size smaller than this will be merged with larger regions if possible. [b]Note:[/b] This value will be squared to calculate the number of cells. For example, a value of 20 will set the number of cells to 400. </member> - <member name="region/min_size" type="float" setter="set_region_min_size" getter="get_region_min_size" default="2.0"> + <member name="region_min_size" type="float" setter="set_region_min_size" getter="get_region_min_size" default="2.0"> The minimum size of a region for it to be created. [b]Note:[/b] This value will be squared to calculate the minimum number of cells allowed to form isolated island areas. For example, a value of 8 will set the number of cells to 64. </member> - <member name="sample_partition_type/sample_partition_type" type="int" setter="set_sample_partition_type" getter="get_sample_partition_type" enum="NavigationMesh.SamplePartitionType" default="0"> + <member name="sample_partition_type" type="int" setter="set_sample_partition_type" getter="get_sample_partition_type" enum="NavigationMesh.SamplePartitionType" default="0"> Partitioning algorithm for creating the navigation mesh polys. See [enum SamplePartitionType] for possible values. </member> </members> @@ -162,7 +162,7 @@ Parses mesh instances as geometry. This includes [MeshInstance3D], [CSGShape3D], and [GridMap] nodes. </constant> <constant name="PARSED_GEOMETRY_STATIC_COLLIDERS" value="1" enum="ParsedGeometryType"> - Parses [StaticBody3D] colliders as geometry. The collider should be in any of the layers specified by [member geometry/collision_mask]. + Parses [StaticBody3D] colliders as geometry. The collider should be in any of the layers specified by [member geometry_collision_mask]. </constant> <constant name="PARSED_GEOMETRY_BOTH" value="2" enum="ParsedGeometryType"> Both [constant PARSED_GEOMETRY_MESH_INSTANCES] and [constant PARSED_GEOMETRY_STATIC_COLLIDERS]. @@ -174,10 +174,10 @@ Scans the child nodes of [NavigationRegion3D] recursively for geometry. </constant> <constant name="SOURCE_GEOMETRY_GROUPS_WITH_CHILDREN" value="1" enum="SourceGeometryMode"> - Scans nodes in a group and their child nodes recursively for geometry. The group is specified by [member geometry/source_group_name]. + Scans nodes in a group and their child nodes recursively for geometry. The group is specified by [member geometry_source_group_name]. </constant> <constant name="SOURCE_GEOMETRY_GROUPS_EXPLICIT" value="2" enum="SourceGeometryMode"> - Uses nodes in a group for geometry. The group is specified by [member geometry/source_group_name]. + Uses nodes in a group for geometry. The group is specified by [member geometry_source_group_name]. </constant> <constant name="SOURCE_GEOMETRY_MAX" value="3" enum="SourceGeometryMode"> Represents the size of the [enum SourceGeometryMode] enum. diff --git a/doc/classes/NavigationMeshGenerator.xml b/doc/classes/NavigationMeshGenerator.xml index 36588ce2f5..b92183fda0 100644 --- a/doc/classes/NavigationMeshGenerator.xml +++ b/doc/classes/NavigationMeshGenerator.xml @@ -17,7 +17,7 @@ <argument index="0" name="nav_mesh" type="NavigationMesh" /> <argument index="1" name="root_node" type="Node" /> <description> - Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child nodes under the provided [code]root_node[/code] or a specific group of nodes for potential source geometry. The parse behavior can be controlled with the [member NavigationMesh.geometry/parsed_geometry_type] and [member NavigationMesh.geometry/source_geometry_mode] properties on the [NavigationMesh] resource. + Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child nodes under the provided [code]root_node[/code] or a specific group of nodes for potential source geometry. The parse behavior can be controlled with the [member NavigationMesh.geometry_parsed_geometry_type] and [member NavigationMesh.geometry_source_geometry_mode] properties on the [NavigationMesh] resource. </description> </method> <method name="clear"> diff --git a/doc/classes/NavigationObstacle2D.xml b/doc/classes/NavigationObstacle2D.xml index f3690ce8a7..4ecdc06645 100644 --- a/doc/classes/NavigationObstacle2D.xml +++ b/doc/classes/NavigationObstacle2D.xml @@ -5,6 +5,7 @@ </brief_description> <description> 2D Obstacle used in navigation for collision avoidance. The obstacle needs navigation data to work correctly. [NavigationObstacle2D] is physics safe. + [b]Note:[/b] Obstacles are intended as a last resort option for constantly moving objects that cannot be (re)baked to a navigation mesh efficiently. </description> <tutorials> </tutorials> diff --git a/doc/classes/NavigationObstacle3D.xml b/doc/classes/NavigationObstacle3D.xml index e6ea70b91a..ed8af3883c 100644 --- a/doc/classes/NavigationObstacle3D.xml +++ b/doc/classes/NavigationObstacle3D.xml @@ -5,6 +5,7 @@ </brief_description> <description> 3D Obstacle used in navigation for collision avoidance. The obstacle needs navigation data to work correctly. [NavigationObstacle3D] is physics safe. + [b]Note:[/b] Obstacles are intended as a last resort option for constantly moving objects that cannot be (re)baked to a navigation mesh efficiently. </description> <tutorials> </tutorials> diff --git a/doc/classes/NavigationPolygon.xml b/doc/classes/NavigationPolygon.xml index ee57d8f26b..0a2ceeedc5 100644 --- a/doc/classes/NavigationPolygon.xml +++ b/doc/classes/NavigationPolygon.xml @@ -80,6 +80,12 @@ Clears the array of polygons, but it doesn't clear the array of outlines and vertices. </description> </method> + <method name="get_mesh"> + <return type="NavigationMesh" /> + <description> + Returns the [NavigationMesh] resulting from this navigation polygon. This navmesh can be used to update the navmesh of a region with the [method NavigationServer3D.region_set_navmesh] API directly (as 2D uses the 3D server behind the scene). + </description> + </method> <method name="get_outline" qualifiers="const"> <return type="PackedVector2Array" /> <argument index="0" name="idx" type="int" /> diff --git a/doc/classes/NavigationRegion2D.xml b/doc/classes/NavigationRegion2D.xml index 5cd2e035b6..542aa8f619 100644 --- a/doc/classes/NavigationRegion2D.xml +++ b/doc/classes/NavigationRegion2D.xml @@ -7,6 +7,9 @@ A region of the navigation map. It tells the [NavigationServer2D] what can be navigated and what cannot, based on its [NavigationPolygon] resource. Two regions can be connected to each other if they share a similar edge. You can set the minimum distance between two vertices required to connect two edges by using [method NavigationServer2D.map_set_edge_connection_margin]. [b]Note:[/b] Overlapping two regions' polygons is not enough for connecting two regions. They must share a similar edge. + The pathfinding cost of entering this region from another region can be controlled with the [member enter_cost] value. + [b]Note[/b]: 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 [member travel_cost] multiplier. </description> <tutorials> </tutorials> @@ -22,11 +25,17 @@ <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true"> Determines if the [NavigationRegion2D] is enabled or disabled. </member> + <member name="enter_cost" type="float" setter="set_enter_cost" getter="get_enter_cost" default="0.0"> + When pathfinding enters this regions navmesh from another regions navmesh the [code]enter_cost[/code] value is added to the path distance for determining the shortest path. + </member> <member name="layers" type="int" setter="set_layers" getter="get_layers" default="1"> A bitfield determining all layers the region belongs to. These layers can be checked upon when requesting a path with [method NavigationServer2D.map_get_path]. </member> <member name="navpoly" type="NavigationPolygon" setter="set_navigation_polygon" getter="get_navigation_polygon"> The [NavigationPolygon] resource to use. </member> + <member name="travel_cost" type="float" setter="set_travel_cost" getter="get_travel_cost" default="1.0"> + When pathfinding moves inside this regions navmesh the traveled distances are multiplied with [code]travel_cost[/code] for determining the shortest path. + </member> </members> </class> diff --git a/doc/classes/NavigationRegion3D.xml b/doc/classes/NavigationRegion3D.xml index 42f0e0c5d9..e45bca7f8b 100644 --- a/doc/classes/NavigationRegion3D.xml +++ b/doc/classes/NavigationRegion3D.xml @@ -6,6 +6,10 @@ <description> A region of the navigation map. It tells the [NavigationServer3D] what can be navigated and what cannot, based on its [NavigationMesh] resource. Two regions can be connected to each other if they share a similar edge. You can set the minimum distance between two vertices required to connect two edges by using [method NavigationServer3D.map_set_edge_connection_margin]. + [b]Note:[/b] Overlapping two regions' navmeshes is not enough for connecting two regions. They must share a similar edge. + The cost of entering this region from another region can be controlled with the [member enter_cost] value. + [b]Note[/b]: 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 [member travel_cost] multiplier. </description> <tutorials> </tutorials> @@ -28,12 +32,18 @@ <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true"> Determines if the [NavigationRegion3D] is enabled or disabled. </member> + <member name="enter_cost" type="float" setter="set_enter_cost" getter="get_enter_cost" default="0.0"> + When pathfinding enters this regions navmesh from another regions navmesh the [code]enter_cost[/code] value is added to the path distance for determining the shortest path. + </member> <member name="layers" type="int" setter="set_layers" getter="get_layers" default="1"> A bitfield determining all layers the region belongs to. These layers can be checked upon when requesting a path with [method NavigationServer3D.map_get_path]. </member> <member name="navmesh" type="NavigationMesh" setter="set_navigation_mesh" getter="get_navigation_mesh"> The [NavigationMesh] resource to use. </member> + <member name="travel_cost" type="float" setter="set_travel_cost" getter="get_travel_cost" default="1.0"> + When pathfinding moves inside this regions navmesh the traveled distances are multiplied with [code]travel_cost[/code] for determining the shortest path. + </member> </members> <signals> <signal name="bake_finished"> diff --git a/doc/classes/NavigationServer2D.xml b/doc/classes/NavigationServer2D.xml index 928834101f..7b0dac99c3 100644 --- a/doc/classes/NavigationServer2D.xml +++ b/doc/classes/NavigationServer2D.xml @@ -5,7 +5,9 @@ </brief_description> <description> NavigationServer2D is the server responsible for all 2D navigation. It handles several objects, namely maps, regions and agents. - Maps are made up of regions, which are made of navigation polygons. Together, they define the navigable areas in the 2D world. For two regions to be connected to each other, they must share a similar edge. An edge is considered connected to another if both of its two vertices are at a distance less than [code]edge_connection_margin[/code] to the respective other edge's vertex. + Maps are made up of regions, which are made of navigation polygons. Together, they define the navigable areas in the 2D world. + [b]Note:[/b] Most NavigationServer changes take effect after the next physics frame and not immediately. This includes all changes made to maps, regions or agents by navigation related Nodes in the SceneTree or made through scripts. + For two regions to be connected to each other, they must share a similar edge. An edge is considered connected to another if both of its two vertices are at a distance less than [code]edge_connection_margin[/code] to the respective other edge's vertex. You may assign navigation layers to regions with [method NavigationServer2D.region_set_layers], which then can be checked upon when requesting a path with [method NavigationServer2D.map_get_path]. This allows allowing or forbidding some areas to 2D objects. To use the collision avoidance system, you may use agents. You can set an agent's target velocity, then the servers will emit a callback with a modified velocity. [b]Note:[/b] The collision avoidance system ignores regions. Using the modified velocity as-is might lead to pushing and agent outside of a navigable area. This is a limitation of the collision avoidance system, any more complex situation may require the use of the physics engine. @@ -245,6 +247,13 @@ Returns how many connections this [code]region[/code] has with other regions in the map. </description> </method> + <method name="region_get_enter_cost" qualifiers="const"> + <return type="float" /> + <argument index="0" name="region" type="RID" /> + <description> + Returns the [code]enter_cost[/code] of this [code]region[/code]. + </description> + </method> <method name="region_get_layers" qualifiers="const"> <return type="int" /> <argument index="0" name="region" type="RID" /> @@ -259,6 +268,21 @@ Returns the navigation map [RID] the requested [code]region[/code] is currently assigned to. </description> </method> + <method name="region_get_travel_cost" qualifiers="const"> + <return type="float" /> + <argument index="0" name="region" type="RID" /> + <description> + Returns the [code]travel_cost[/code] of this [code]region[/code]. + </description> + </method> + <method name="region_set_enter_cost" qualifiers="const"> + <return type="void" /> + <argument index="0" name="region" type="RID" /> + <argument index="1" name="enter_cost" type="float" /> + <description> + Sets the [code]enter_cost[/code] for this [code]region[/code]. + </description> + </method> <method name="region_set_layers" qualifiers="const"> <return type="void" /> <argument index="0" name="region" type="RID" /> @@ -291,6 +315,14 @@ Sets the global transformation for the region. </description> </method> + <method name="region_set_travel_cost" qualifiers="const"> + <return type="void" /> + <argument index="0" name="region" type="RID" /> + <argument index="1" name="travel_cost" type="float" /> + <description> + Sets the [code]travel_cost[/code] for this [code]region[/code]. + </description> + </method> </methods> <signals> <signal name="map_changed"> diff --git a/doc/classes/NavigationServer3D.xml b/doc/classes/NavigationServer3D.xml index 8c83fe5485..d6574dd69a 100644 --- a/doc/classes/NavigationServer3D.xml +++ b/doc/classes/NavigationServer3D.xml @@ -5,7 +5,9 @@ </brief_description> <description> NavigationServer3D is the server responsible for all 3D navigation. It handles several objects, namely maps, regions and agents. - Maps are made up of regions, which are made of navigation meshes. Together, they define the navigable areas in the 3D world. For two regions to be connected to each other, they must share a similar edge. An edge is considered connected to another if both of its two vertices are at a distance less than [code]edge_connection_margin[/code] to the respective other edge's vertex. + Maps are made up of regions, which are made of navigation meshes. Together, they define the navigable areas in the 3D world. + [b]Note:[/b] Most NavigationServer changes take effect after the next physics frame and not immediately. This includes all changes made to maps, regions or agents by navigation related Nodes in the SceneTree or made through scripts. + For two regions to be connected to each other, they must share a similar edge. An edge is considered connected to another if both of its two vertices are at a distance less than [code]edge_connection_margin[/code] to the respective other edge's vertex. You may assign navigation layers to regions with [method NavigationServer3D.region_set_layers], which then can be checked upon when requesting a path with [method NavigationServer3D.map_get_path]. This allows allowing or forbidding some areas to 3D objects. To use the collision avoidance system, you may use agents. You can set an agent's target velocity, then the servers will emit a callback with a modified velocity. [b]Note:[/b] The collision avoidance system ignores regions. Using the modified velocity as-is might lead to pushing and agent outside of a navigable area. This is a limitation of the collision avoidance system, any more complex situation may require the use of the physics engine. @@ -295,6 +297,13 @@ Returns how many connections this [code]region[/code] has with other regions in the map. </description> </method> + <method name="region_get_enter_cost" qualifiers="const"> + <return type="float" /> + <argument index="0" name="region" type="RID" /> + <description> + Returns the [code]enter_cost[/code] of this [code]region[/code]. + </description> + </method> <method name="region_get_layers" qualifiers="const"> <return type="int" /> <argument index="0" name="region" type="RID" /> @@ -309,6 +318,21 @@ Returns the navigation map [RID] the requested [code]region[/code] is currently assigned to. </description> </method> + <method name="region_get_travel_cost" qualifiers="const"> + <return type="float" /> + <argument index="0" name="region" type="RID" /> + <description> + Returns the [code]travel_cost[/code] of this [code]region[/code]. + </description> + </method> + <method name="region_set_enter_cost" qualifiers="const"> + <return type="void" /> + <argument index="0" name="region" type="RID" /> + <argument index="1" name="enter_cost" type="float" /> + <description> + Sets the [code]enter_cost[/code] for this [code]region[/code]. + </description> + </method> <method name="region_set_layers" qualifiers="const"> <return type="void" /> <argument index="0" name="region" type="RID" /> @@ -341,6 +365,14 @@ Sets the global transformation for the region. </description> </method> + <method name="region_set_travel_cost" qualifiers="const"> + <return type="void" /> + <argument index="0" name="region" type="RID" /> + <argument index="1" name="travel_cost" type="float" /> + <description> + Sets the [code]travel_cost[/code] for this [code]region[/code]. + </description> + </method> <method name="set_active" qualifiers="const"> <return type="void" /> <argument index="0" name="active" type="bool" /> diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index c9795856d5..966e24c537 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -625,7 +625,7 @@ <return type="void" /> <argument index="0" name="method" type="StringName" /> <description> - Sends a remote procedure call request for the given [code]method[/code] 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 [NodePath], including the exact same node name. Behaviour depends on the RPC configuration for the given method, see [method rpc_config]. Methods are not exposed to RPCs by default. Returns an empty [Variant]. + Sends a remote procedure call request for the given [code]method[/code] 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 [NodePath], including the exact same node name. Behaviour depends on the RPC configuration for the given method, see [method rpc_config]. Methods are not exposed to RPCs by default. Returns [code]null[/code]. [b]Note:[/b] You can only safely use RPCs on clients after you received the [code]connected_to_server[/code] signal from the [MultiplayerAPI]. You also need to keep track of the connection state, either by the [MultiplayerAPI] signals like [code]server_disconnected[/code] or by checking [code]get_multiplayer().peer.get_connection_status() == CONNECTION_CONNECTED[/code]. </description> </method> @@ -637,7 +637,7 @@ <argument index="3" name="transfer_mode" type="int" enum="TransferMode" default="2" /> <argument index="4" name="channel" type="int" default="0" /> <description> - Changes the RPC mode for the given [code]method[/code] to the given [code]rpc_mode[/code], optionally specifying the [code]transfer_mode[/code] and [code]channel[/code] (on supported peers). See [enum RPCMode] and [enum TransferMode]. An alternative is annotating methods and properties with the corresponding annotation ([code]@rpc(any)[/code], [code]@rpc(auth)[/code]). By default, methods are not exposed to networking (and RPCs). + Changes the RPC mode for the given [code]method[/code] to the given [code]rpc_mode[/code], optionally specifying the [code]transfer_mode[/code] and [code]channel[/code] (on supported peers). See [enum RPCMode] and [enum TransferMode]. An alternative is annotating methods and properties with the corresponding annotation ([code]@rpc(any)[/code], [code]@rpc(authority)[/code]). By default, methods are not exposed to networking (and RPCs). </description> </method> <method name="rpc_id" qualifiers="vararg"> @@ -645,7 +645,7 @@ <argument index="0" name="peer_id" type="int" /> <argument index="1" name="method" type="StringName" /> <description> - Sends a [method rpc] to a specific peer identified by [code]peer_id[/code] (see [method MultiplayerPeer.set_target_peer]). Returns an empty [Variant]. + Sends a [method rpc] to a specific peer identified by [code]peer_id[/code] (see [method MultiplayerPeer.set_target_peer]). Returns [code]null[/code]. </description> </method> <method name="set_display_folded"> diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml index bb73019668..e65c666900 100644 --- a/doc/classes/Node2D.xml +++ b/doc/classes/Node2D.xml @@ -102,6 +102,9 @@ <member name="global_scale" type="Vector2" setter="set_global_scale" getter="get_global_scale"> Global scale. </member> + <member name="global_skew" type="float" setter="set_global_skew" getter="get_global_skew"> + Global skew in radians. + </member> <member name="global_transform" type="Transform2D" setter="set_global_transform" getter="get_global_transform"> Global [Transform2D]. </member> diff --git a/doc/classes/NodePath.xml b/doc/classes/NodePath.xml index 3319e5d822..00c5dcaa3d 100644 --- a/doc/classes/NodePath.xml +++ b/doc/classes/NodePath.xml @@ -107,7 +107,7 @@ <return type="StringName" /> <argument index="0" name="idx" type="int" /> <description> - Gets the node name indicated by [code]idx[/code] (0 to [method get_name_count]). + Gets the node name indicated by [code]idx[/code] (0 to [method get_name_count] - 1). [codeblocks] [gdscript] var node_path = NodePath("Path2D/PathFollow2D/Sprite2D") @@ -157,6 +157,12 @@ For example, [code]"Path2D/PathFollow2D/Sprite2D:texture:load_path"[/code] has 2 subnames. </description> </method> + <method name="hash" qualifiers="const"> + <return type="int" /> + <description> + Returns the 32-bit hash value representing the [NodePath]'s contents. + </description> + </method> <method name="is_absolute" qualifiers="const"> <return type="bool" /> <description> diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index 266a2573de..2512dec4b3 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -550,7 +550,7 @@ Requests the OS to open a resource with the most appropriate program. For example: - [code]OS.shell_open("C:\\Users\name\Downloads")[/code] on Windows opens the file explorer at the user's Downloads folder. - [code]OS.shell_open("https://godotengine.org")[/code] opens the default web browser on the official Godot website. - - [code]OS.shell_open("mailto:example@example.com")[/code] opens the default email client with the "To" field set to [code]example@example.com[/code]. See [url=https://blog.escapecreative.com/customizing-mailto-links/]Customizing [code]mailto:[/code] Links[/url] for a list of fields that can be added. + - [code]OS.shell_open("mailto:example@example.com")[/code] opens the default email client with the "To" field set to [code]example@example.com[/code]. See [url=https://datatracker.ietf.org/doc/html/rfc2368]RFC 2368 - The [code]mailto[/code] URL scheme[/url] for a list of fields that can be added. Use [method ProjectSettings.globalize_path] to convert a [code]res://[/code] or [code]user://[/code] path into a system path for use with this method. [b]Note:[/b] This method is implemented on Android, iOS, HTML5, Linux, macOS and Windows. </description> diff --git a/doc/classes/PhysicalSkyMaterial.xml b/doc/classes/PhysicalSkyMaterial.xml index 716eaaeeba..7c2ea088c8 100644 --- a/doc/classes/PhysicalSkyMaterial.xml +++ b/doc/classes/PhysicalSkyMaterial.xml @@ -11,9 +11,6 @@ <tutorials> </tutorials> <members> - <member name="dither_strength" type="float" setter="set_dither_strength" getter="get_dither_strength" default="1.0"> - The amount of dithering to use. Dithering helps reduce banding that appears from the smooth changes in color in the sky. Use the lowest value possible for your given sky settings, as higher amounts may add fuzziness to the sky. - </member> <member name="exposure" type="float" setter="set_exposure" getter="get_exposure" default="0.1"> Sets the exposure of the sky. Higher exposure values make the entire sky brighter. </member> @@ -44,5 +41,8 @@ <member name="turbidity" type="float" setter="set_turbidity" getter="get_turbidity" default="10.0"> Sets the thickness of the atmosphere. High turbidity creates a foggy-looking atmosphere, while a low turbidity results in a clearer atmosphere. </member> + <member name="use_debanding" type="bool" setter="set_use_debanding" getter="get_use_debanding" default="true"> + If [code]true[/code], enables debanding. Debanding adds a small amount of noise which helps reduce banding that appears from the smooth changes in color in the sky. + </member> </members> </class> diff --git a/doc/classes/ProceduralSkyMaterial.xml b/doc/classes/ProceduralSkyMaterial.xml index 88283bcf24..3cc4bd71f7 100644 --- a/doc/classes/ProceduralSkyMaterial.xml +++ b/doc/classes/ProceduralSkyMaterial.xml @@ -11,9 +11,6 @@ <tutorials> </tutorials> <members> - <member name="dither_strength" type="float" setter="set_dither_strength" getter="get_dither_strength" default="1.0"> - The amount of dithering to use. Dithering helps reduce banding that appears from the smooth changes in color in the sky. Use the lowest value possible for your given sky settings, as higher amounts may add fuzziness to the sky. - </member> <member name="ground_bottom_color" type="Color" setter="set_ground_bottom_color" getter="get_ground_bottom_color" default="Color(0.2, 0.169, 0.133, 1)"> Color of the ground at the bottom. Blends with [member ground_horizon_color]. </member> @@ -50,5 +47,8 @@ <member name="sun_curve" type="float" setter="set_sun_curve" getter="get_sun_curve" default="0.15"> How quickly the sun fades away between the edge of the sun disk and [member sun_angle_max]. </member> + <member name="use_debanding" type="bool" setter="set_use_debanding" getter="get_use_debanding" default="true"> + If [code]true[/code], enables debanding. Debanding adds a small amount of noise which helps reduce banding that appears from the smooth changes in color in the sky. + </member> </members> </class> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 1e169b150a..8a3677c0b4 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -216,6 +216,9 @@ <member name="application/config/description" type="String" setter="" getter="" default=""""> The project's description, displayed as a tooltip in the Project Manager when hovering the project. </member> + <member name="application/config/features" type="PackedStringArray" setter="" getter=""> + List of internal features associated with the project, like [code]Double Precision[/code] or [code]C#[/code]. Not to be confused with feature tags. + </member> <member name="application/config/icon" type="String" setter="" getter="" default=""""> Icon used for the project, set when project loads. Exporters will also use this icon when possible. </member> @@ -334,18 +337,20 @@ <member name="debug/file_logging/max_log_files" type="int" setter="" getter="" default="5"> Specifies the maximum amount of log files allowed (used for rotation). </member> - <member name="debug/gdscript/warnings/assert_always_false" type="bool" setter="" getter="" default="true"> + <member name="debug/gdscript/warnings/assert_always_false" type="int" setter="" getter="" default="1"> + If [code]enabled[/code], prints a warning or an error when an [code]assert[/code] call always returns false. </member> - <member name="debug/gdscript/warnings/assert_always_true" type="bool" setter="" getter="" default="true"> + <member name="debug/gdscript/warnings/assert_always_true" type="int" setter="" getter="" default="1"> + If [code]enabled[/code], prints a warning or an error when an [code]assert[/code] call always returns true. </member> - <member name="debug/gdscript/warnings/constant_used_as_function" type="bool" setter="" getter="" default="true"> - If [code]true[/code], enables warnings when a constant is used as a function. + <member name="debug/gdscript/warnings/constant_used_as_function" type="int" setter="" getter="" default="1"> + If [code]enabled[/code], prints a warning or an error when a constant is used as a function. </member> - <member name="debug/gdscript/warnings/deprecated_keyword" type="bool" setter="" getter="" default="true"> - If [code]true[/code], enables warnings when deprecated keywords are used. + <member name="debug/gdscript/warnings/deprecated_keyword" type="int" setter="" getter="" default="1"> + If [code]enabled[/code], prints a warning or an error when deprecated keywords are used. </member> - <member name="debug/gdscript/warnings/empty_file" type="bool" setter="" getter="" default="true"> - If [code]true[/code], enables warnings when an empty file is parsed. + <member name="debug/gdscript/warnings/empty_file" type="int" setter="" getter="" default="1"> + If [code]enabled[/code], prints a warning or an error when an empty file is parsed. </member> <member name="debug/gdscript/warnings/enable" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables specific GDScript warnings (see [code]debug/gdscript/warnings/*[/code] settings). If [code]false[/code], disables all GDScript warnings. @@ -353,82 +358,88 @@ <member name="debug/gdscript/warnings/exclude_addons" type="bool" setter="" getter="" default="true"> If [code]true[/code], scripts in the [code]res://addons[/code] folder will not generate warnings. </member> - <member name="debug/gdscript/warnings/function_used_as_property" type="bool" setter="" getter="" default="true"> - If [code]true[/code], enables warnings when using a function as if it was a property. + <member name="debug/gdscript/warnings/function_used_as_property" type="int" setter="" getter="" default="1"> + If [code]enabled[/code], prints a warning or an error when using a function as if it was a property. </member> - <member name="debug/gdscript/warnings/incompatible_ternary" type="bool" setter="" getter="" default="true"> - If [code]true[/code], enables warnings when a ternary operator may emit values with incompatible types. + <member name="debug/gdscript/warnings/incompatible_ternary" type="int" setter="" getter="" default="1"> + If [code]enabled[/code], prints a warning or an error when a ternary operator may emit values with incompatible types. </member> - <member name="debug/gdscript/warnings/int_assigned_to_enum" type="bool" setter="" getter="" default="true"> + <member name="debug/gdscript/warnings/int_assigned_to_enum" type="int" setter="" getter="" default="1"> + If [code]enabled[/code], prints a warning or an error when trying to assign an integer to a variable that expects an enum value. </member> - <member name="debug/gdscript/warnings/integer_division" type="bool" setter="" getter="" default="true"> - If [code]true[/code], enables warnings when dividing an integer by another integer (the decimal part will be discarded). + <member name="debug/gdscript/warnings/integer_division" type="int" setter="" getter="" default="1"> + If [code]enabled[/code], prints a warning or an error when dividing an integer by another integer (the decimal part will be discarded). </member> - <member name="debug/gdscript/warnings/narrowing_conversion" type="bool" setter="" getter="" default="true"> - If [code]true[/code], enables warnings when passing a floating-point value to a function that expects an integer (it will be converted and lose precision). + <member name="debug/gdscript/warnings/narrowing_conversion" type="int" setter="" getter="" default="1"> + If [code]enabled[/code], prints a warning or an error when passing a floating-point value to a function that expects an integer (it will be converted and lose precision). </member> - <member name="debug/gdscript/warnings/property_used_as_function" type="bool" setter="" getter="" default="true"> - If [code]true[/code], enables warnings when using a property as if it was a function. + <member name="debug/gdscript/warnings/property_used_as_function" type="int" setter="" getter="" default="1"> + If [code]enabled[/code], prints a warning or an error when using a property as if it was a function. </member> - <member name="debug/gdscript/warnings/redundant_await" type="bool" setter="" getter="" default="true"> + <member name="debug/gdscript/warnings/redundant_await" type="int" setter="" getter="" default="1"> + If [code]enabled[/code], prints a warning or an error when a function that is not a coroutine is called with await. </member> - <member name="debug/gdscript/warnings/return_value_discarded" type="bool" setter="" getter="" default="true"> - If [code]true[/code], enables warnings when calling a function without using its return value (by assigning it to a variable or using it as a function argument). Such return values are sometimes used to denote possible errors using the [enum Error] enum. + <member name="debug/gdscript/warnings/return_value_discarded" type="int" setter="" getter="" default="1"> + If [code]enabled[/code], prints a warning or an error when calling a function without using its return value (by assigning it to a variable or using it as a function argument). Such return values are sometimes used to denote possible errors using the [enum Error] enum. </member> - <member name="debug/gdscript/warnings/shadowed_global_identifier" type="bool" setter="" getter="" default="true"> - If [code]true[/code], enables warnings when defining a local or subclass member variable, signal, or enum that would have the same name as a built-in function or global class name, which possibly shadow it. + <member name="debug/gdscript/warnings/shadowed_global_identifier" type="int" setter="" getter="" default="1"> + If [code]enabled[/code], prints a warning or an error when defining a local or subclass member variable, signal, or enum that would have the same name as a built-in function or global class name, which possibly shadow it. </member> - <member name="debug/gdscript/warnings/shadowed_variable" type="bool" setter="" getter="" default="true"> - If [code]true[/code], enables warnings when defining a local or subclass member variable that would shadow a variable at an upper level (such as a member variable). + <member name="debug/gdscript/warnings/shadowed_variable" type="int" setter="" getter="" default="1"> + If [code]enabled[/code], prints a warning or an error when defining a local or subclass member variable that would shadow a variable at an upper level (such as a member variable). </member> - <member name="debug/gdscript/warnings/shadowed_variable_base_class" type="bool" setter="" getter="" default="true"> + <member name="debug/gdscript/warnings/shadowed_variable_base_class" type="int" setter="" getter="" default="1"> </member> - <member name="debug/gdscript/warnings/standalone_expression" type="bool" setter="" getter="" default="true"> - If [code]true[/code], enables warnings when calling an expression that has no effect on the surrounding code, such as writing [code]2 + 2[/code] as a statement. + <member name="debug/gdscript/warnings/standalone_expression" type="int" setter="" getter="" default="1"> + If [code]enabled[/code], prints a warning or an error when calling an expression that has no effect on the surrounding code, such as writing [code]2 + 2[/code] as a statement. </member> - <member name="debug/gdscript/warnings/standalone_ternary" type="bool" setter="" getter="" default="true"> - If [code]true[/code], enables warnings when calling a ternary expression that has no effect on the surrounding code, such as writing [code]42 if active else 0[/code] as a statement. + <member name="debug/gdscript/warnings/standalone_ternary" type="int" setter="" getter="" default="1"> + If [code]enabled[/code], prints a warning or an error when calling a ternary expression that has no effect on the surrounding code, such as writing [code]42 if active else 0[/code] as a statement. </member> <member name="debug/gdscript/warnings/treat_warnings_as_errors" type="bool" setter="" getter="" default="false"> If [code]true[/code], all warnings will be reported as if they were errors. </member> - <member name="debug/gdscript/warnings/unassigned_variable" type="bool" setter="" getter="" default="true"> - If [code]true[/code], enables warnings when using a variable that wasn't previously assigned. + <member name="debug/gdscript/warnings/unassigned_variable" type="int" setter="" getter="" default="1"> + If [code]enabled[/code], prints a warning or an error when using a variable that wasn't previously assigned. </member> - <member name="debug/gdscript/warnings/unassigned_variable_op_assign" type="bool" setter="" getter="" default="true"> - If [code]true[/code], enables warnings when assigning a variable using an assignment operator like [code]+=[/code] if the variable wasn't previously assigned. + <member name="debug/gdscript/warnings/unassigned_variable_op_assign" type="int" setter="" getter="" default="1"> + If [code]enabled[/code], prints a warning or an error when assigning a variable using an assignment operator like [code]+=[/code] if the variable wasn't previously assigned. </member> - <member name="debug/gdscript/warnings/unreachable_code" type="bool" setter="" getter="" default="true"> - If [code]true[/code], enables warnings when unreachable code is detected (such as after a [code]return[/code] statement that will always be executed). + <member name="debug/gdscript/warnings/unreachable_code" type="int" setter="" getter="" default="1"> + If [code]enabled[/code], prints a warning or an error when unreachable code is detected (such as after a [code]return[/code] statement that will always be executed). </member> - <member name="debug/gdscript/warnings/unreachable_pattern" type="bool" setter="" getter="" default="true"> + <member name="debug/gdscript/warnings/unreachable_pattern" type="int" setter="" getter="" default="1"> + If [code]enabled[/code], prints a warning or an error when an unreachable [code]match[/code] pattern is detected. </member> - <member name="debug/gdscript/warnings/unsafe_call_argument" type="bool" setter="" getter="" default="false"> - If [code]true[/code], enables warnings when using an expression whose type may not be compatible with the function parameter expected. + <member name="debug/gdscript/warnings/unsafe_call_argument" type="int" setter="" getter="" default="0"> + If [code]enabled[/code], prints a warning or an error when using an expression whose type may not be compatible with the function parameter expected. </member> - <member name="debug/gdscript/warnings/unsafe_cast" type="bool" setter="" getter="" default="false"> - If [code]true[/code], enables warnings when performing an unsafe cast. + <member name="debug/gdscript/warnings/unsafe_cast" type="int" setter="" getter="" default="0"> + If [code]enabled[/code], prints a warning or an error when performing an unsafe cast. </member> - <member name="debug/gdscript/warnings/unsafe_method_access" type="bool" setter="" getter="" default="false"> - If [code]true[/code], enables warnings when calling a method whose presence is not guaranteed at compile-time in the class. + <member name="debug/gdscript/warnings/unsafe_method_access" type="int" setter="" getter="" default="0"> + If [code]enabled[/code], prints a warning or an error when calling a method whose presence is not guaranteed at compile-time in the class. </member> - <member name="debug/gdscript/warnings/unsafe_property_access" type="bool" setter="" getter="" default="false"> - If [code]true[/code], enables warnings when accessing a property whose presence is not guaranteed at compile-time in the class. + <member name="debug/gdscript/warnings/unsafe_property_access" type="int" setter="" getter="" default="0"> + If [code]enabled[/code], prints a warning or an error when accessing a property whose presence is not guaranteed at compile-time in the class. </member> - <member name="debug/gdscript/warnings/unused_local_constant" type="bool" setter="" getter="" default="true"> + <member name="debug/gdscript/warnings/unused_local_constant" type="int" setter="" getter="" default="1"> + If [code]enabled[/code], prints a warning or an error when a local constant is never used. </member> - <member name="debug/gdscript/warnings/unused_parameter" type="bool" setter="" getter="" default="true"> + <member name="debug/gdscript/warnings/unused_parameter" type="int" setter="" getter="" default="1"> + If [code]enabled[/code], prints a warning or an error when a function parameter is never used. </member> - <member name="debug/gdscript/warnings/unused_private_class_variable" type="bool" setter="" getter="" default="true"> + <member name="debug/gdscript/warnings/unused_private_class_variable" type="int" setter="" getter="" default="1"> + If [code]enabled[/code], prints a warning or an error when a class variable is never used. </member> - <member name="debug/gdscript/warnings/unused_signal" type="bool" setter="" getter="" default="true"> - If [code]true[/code], enables warnings when a signal is unused. + <member name="debug/gdscript/warnings/unused_signal" type="int" setter="" getter="" default="1"> + If [code]enabled[/code], prints a warning or an error when a signal is unused. </member> - <member name="debug/gdscript/warnings/unused_variable" type="bool" setter="" getter="" default="true"> - If [code]true[/code], enables warnings when a local variable is unused. + <member name="debug/gdscript/warnings/unused_variable" type="int" setter="" getter="" default="1"> + If [code]enabled[/code], prints a warning or an error when a local variable is unused. </member> - <member name="debug/gdscript/warnings/void_assignment" type="bool" setter="" getter="" default="true"> - If [code]true[/code], enables warnings when assigning the result of a function that returns [code]void[/code] to a variable. + <member name="debug/gdscript/warnings/void_assignment" type="int" setter="" getter="" default="1"> + If [code]enabled[/code], prints a warning or an error when assigning the result of a function that returns [code]void[/code] to a variable. </member> <member name="debug/settings/crash_handler/message" type="String" setter="" getter="" default=""Please include this when reporting the bug on https://github.com/godotengine/godot/issues""> Message to be displayed before the backtrace when the engine crashes. @@ -803,6 +814,12 @@ <member name="internationalization/locale/test" type="String" setter="" getter="" default=""""> If non-empty, this locale will be used when running the project from the editor. </member> + <member name="internationalization/locale/translation_remaps" type="PackedStringArray" setter="" getter=""> + Locale-dependent resource remaps. Edit them in the "Localization" tab of Project Settings editor. + </member> + <member name="internationalization/locale/translations" type="PackedStringArray" setter="" getter=""> + List of translation files available in the project. Edit them in the "Localization" tab of Project Settings editor. + </member> <member name="internationalization/pseudolocalization/double_vowels" type="bool" setter="" getter="" default="false"> Double vowels in strings during pseudolocalization to simulate the lengthening of text due to localization. </member> @@ -1367,10 +1384,10 @@ <member name="navigation/2d/default_edge_connection_margin" type="int" setter="" getter="" default="1"> Default edge connection margin for 2D navigation maps. See [method NavigationServer2D.map_set_edge_connection_margin]. </member> - <member name="navigation/3d/default_cell_size" type="float" setter="" getter="" default="0.3"> + <member name="navigation/3d/default_cell_size" type="float" setter="" getter="" default="0.25"> Default cell size for 3D navigation maps. See [method NavigationServer3D.map_set_cell_size]. </member> - <member name="navigation/3d/default_edge_connection_margin" type="float" setter="" getter="" default="0.3"> + <member name="navigation/3d/default_edge_connection_margin" type="float" setter="" getter="" default="0.25"> Default edge connection margin for 3D navigation maps. See [method NavigationServer3D.map_set_edge_connection_margin]. </member> <member name="network/limits/debugger/max_chars_per_second" type="int" setter="" getter="" default="32768"> @@ -1576,6 +1593,10 @@ </member> <member name="rendering/anti_aliasing/quality/use_debanding" type="bool" setter="" getter="" default="false"> </member> + <member name="rendering/anti_aliasing/quality/use_taa" type="bool" setter="" getter="" default="false"> + Enables Temporal Anti-Aliasing for the default screen [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. + [b]Note:[/b] The implementation is not complete yet, some visual instances such as particles and skinned meshes may show artifacts. + </member> <member name="rendering/anti_aliasing/screen_space_roughness_limiter/amount" type="float" setter="" getter="" default="0.25"> </member> <member name="rendering/anti_aliasing/screen_space_roughness_limiter/enabled" type="bool" setter="" getter="" default="true"> diff --git a/doc/classes/Range.xml b/doc/classes/Range.xml index df6efd155a..22793e75d8 100644 --- a/doc/classes/Range.xml +++ b/doc/classes/Range.xml @@ -4,7 +4,7 @@ Abstract base class for range-based controls. </brief_description> <description> - Range is a base class for [Control] nodes that change a floating-point [i]value[/i] between a [i]minimum[/i] and a [i]maximum[/i], using [i]step[/i] and [i]page[/i], for example a [ScrollBar]. + Range is a base class for [Control] nodes that change a floating-point [member value] between a [member min_value] and [member max_value], using a configured [member step] and [member page] size. See e.g. [ScrollBar] and [Slider] for examples of higher level nodes using Range. </description> <tutorials> </tutorials> diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index b8f26f75c9..d92121a950 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -1186,7 +1186,7 @@ <argument index="0" name="fog_volume" type="RID" /> <argument index="1" name="extents" type="Vector3" /> <description> - Sets the size of the fog volume when shape is [constant FOG_VOLUME_SHAPE_ELLIPSOID] or [constant FOG_VOLUME_SHAPE_BOX]. + Sets the size of the fog volume when shape is [constant RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID], [constant RenderingServer.FOG_VOLUME_SHAPE_CONE], [constant RenderingServer.FOG_VOLUME_SHAPE_CYLINDER] or [constant RenderingServer.FOG_VOLUME_SHAPE_BOX]. </description> </method> <method name="fog_volume_set_material"> @@ -1202,7 +1202,7 @@ <argument index="0" name="fog_volume" type="RID" /> <argument index="1" name="shape" type="int" enum="RenderingServer.FogVolumeShape" /> <description> - Sets the shape of the fog volume to either [constant RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID], [constant RenderingServer.FOG_VOLUME_SHAPE_BOX], or [constant RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID] or [constant RenderingServer.FOG_VOLUME_SHAPE_WORLD]. + Sets the shape of the fog volume to either [constant RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID], [constant RenderingServer.FOG_VOLUME_SHAPE_CONE], [constant RenderingServer.FOG_VOLUME_SHAPE_CYLINDER], [constant RenderingServer.FOG_VOLUME_SHAPE_BOX] or [constant RenderingServer.FOG_VOLUME_SHAPE_WORLD]. </description> </method> <method name="force_draw"> @@ -3035,7 +3035,7 @@ $Viewport.set_attach_to_screen_rect(Rect2(0, 0, 600, 600)) [/gdscript] [/codeblocks] - Using this can result in significant optimization, especially on lower-end devices. However, it comes at the cost of having to manage your viewports manually. For a further optimization see, [method viewport_set_render_direct_to_screen]. + Using this can result in significant optimization, especially on lower-end devices. However, it comes at the cost of having to manage your viewports manually. For further optimization, see [method viewport_set_render_direct_to_screen]. </description> </method> <method name="viewport_create"> @@ -3340,6 +3340,14 @@ <description> </description> </method> + <method name="viewport_set_use_taa"> + <return type="void" /> + <argument index="0" name="viewport" type="RID" /> + <argument index="1" name="enable" type="bool" /> + <description> + If [code]true[/code], use Temporal Anti-Aliasing. + </description> + </method> <method name="viewport_set_use_xr"> <return type="void" /> <argument index="0" name="viewport" type="RID" /> @@ -3931,14 +3939,22 @@ <constant name="PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_MAX" value="6" enum="ParticlesCollisionHeightfieldResolution"> </constant> <constant name="FOG_VOLUME_SHAPE_ELLIPSOID" value="0" enum="FogVolumeShape"> - [FogVolume] will be shaped like an ellipsoid. + [FogVolume] will be shaped like an ellipsoid (stretched sphere). + </constant> + <constant name="FOG_VOLUME_SHAPE_CONE" value="1" enum="FogVolumeShape"> + [FogVolume] will be shaped like a cone pointing upwards (in local coordinates). The cone's angle is set automatically to fill the extents. The cone will be adjusted to fit within the extents. Rotate the [FogVolume] node to reorient the cone. Non-uniform scaling via extents is not supported (scale the [FogVolume] node instead). + </constant> + <constant name="FOG_VOLUME_SHAPE_CYLINDER" value="2" enum="FogVolumeShape"> + [FogVolume] will be shaped like an upright cylinder (in local coordinates). Rotate the [FogVolume] node to reorient the cylinder. The cylinder will be adjusted to fit within the extents. Non-uniform scaling via extents is not supported (scale the [FogVolume] node instead). </constant> - <constant name="FOG_VOLUME_SHAPE_BOX" value="1" enum="FogVolumeShape"> + <constant name="FOG_VOLUME_SHAPE_BOX" value="3" enum="FogVolumeShape"> [FogVolume] will be shaped like a box. </constant> - <constant name="FOG_VOLUME_SHAPE_WORLD" value="2" enum="FogVolumeShape"> + <constant name="FOG_VOLUME_SHAPE_WORLD" value="4" enum="FogVolumeShape"> [FogVolume] will have no shape, will cover the whole world and will not be culled. </constant> + <constant name="FOG_VOLUME_SHAPE_MAX" value="5" enum="FogVolumeShape"> + </constant> <constant name="VIEWPORT_SCALING_3D_MODE_BILINEAR" value="0" enum="ViewportScaling3DMode"> Use bilinear scaling for the viewport's 3D buffer. The amount of scaling can be set using [member Viewport.scaling_3d_scale]. Values less then [code]1.0[/code] will result in undersampling while values greater than [code]1.0[/code] will result in supersampling. A value of [code]1.0[/code] disables scaling. </constant> @@ -4097,6 +4113,8 @@ </constant> <constant name="VIEWPORT_DEBUG_DRAW_OCCLUDERS" value="24" enum="ViewportDebugDraw"> </constant> + <constant name="VIEWPORT_DEBUG_DRAW_MOTION_VECTORS" value="25" enum="ViewportDebugDraw"> + </constant> <constant name="SKY_MODE_AUTOMATIC" value="0" enum="SkyMode"> </constant> <constant name="SKY_MODE_QUALITY" value="1" enum="SkyMode"> diff --git a/doc/classes/SceneTreeTimer.xml b/doc/classes/SceneTreeTimer.xml index 427608ead3..2e9aeebceb 100644 --- a/doc/classes/SceneTreeTimer.xml +++ b/doc/classes/SceneTreeTimer.xml @@ -22,7 +22,7 @@ } [/csharp] [/codeblocks] - The timer will be automatically freed after its time elapses. + The timer will be automatically freed after its time elapses, so be aware that any reference you might have kept to it will become invalid. </description> <tutorials> </tutorials> diff --git a/doc/classes/StreamPeerSSL.xml b/doc/classes/StreamPeerSSL.xml index 3aede347a0..70762cbf6c 100644 --- a/doc/classes/StreamPeerSSL.xml +++ b/doc/classes/StreamPeerSSL.xml @@ -44,6 +44,12 @@ Returns the status of the connection. See [enum Status] for values. </description> </method> + <method name="get_stream" qualifiers="const"> + <return type="StreamPeer" /> + <description> + Returns the underlying [StreamPeer] connection, used in [method accept_stream] or [method connect_to_stream]. + </description> + </method> <method name="poll"> <return type="void" /> <description> diff --git a/doc/classes/StringName.xml b/doc/classes/StringName.xml index ffa1227500..a2bcac9788 100644 --- a/doc/classes/StringName.xml +++ b/doc/classes/StringName.xml @@ -32,6 +32,14 @@ </description> </constructor> </constructors> + <methods> + <method name="hash" qualifiers="const"> + <return type="int" /> + <description> + Returns the 32-bit hash value representing the [StringName]'s contents. + </description> + </method> + </methods> <operators> <operator name="operator !="> <return type="bool" /> diff --git a/doc/classes/Texture2D.xml b/doc/classes/Texture2D.xml index 1bbebe085e..3721058d25 100644 --- a/doc/classes/Texture2D.xml +++ b/doc/classes/Texture2D.xml @@ -106,7 +106,8 @@ <method name="get_image" qualifiers="const"> <return type="Image" /> <description> - Returns an [Image] that is a copy of data from this [Texture2D]. [Image]s can be accessed and manipulated directly. + Returns an [Image] that is a copy of data from this [Texture2D] (a new [Image] is created each time). [Image]s can be accessed and manipulated directly. + [b]Note:[/b] This will fetch the texture data from the GPU, which might cause performance problems when overused. </description> </method> <method name="get_size" qualifiers="const"> diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml index 1d4a5b922d..6ae85ad242 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -353,10 +353,11 @@ </member> </members> <signals> - <signal name="button_pressed"> + <signal name="button_clicked"> <argument index="0" name="item" type="TreeItem" /> <argument index="1" name="column" type="int" /> <argument index="2" name="id" type="int" /> + <argument index="3" name="mouse_button_index" type="int" /> <description> Emitted when a button on the tree was pressed (see [method TreeItem.add_button]). </description> @@ -379,22 +380,23 @@ Emitted when a column's title is pressed. </description> </signal> - <signal name="custom_popup_edited"> - <argument index="0" name="arrow_clicked" type="bool" /> + <signal name="custom_item_clicked"> + <argument index="0" name="mouse_button_index" type="int" /> <description> - Emitted when a cell with the [constant TreeItem.CELL_MODE_CUSTOM] is clicked to be edited. + Emitted when an item with [constant TreeItem.CELL_MODE_CUSTOM] is clicked with a mouse button. </description> </signal> - <signal name="empty_rmb"> - <argument index="0" name="position" type="Vector2" /> + <signal name="custom_popup_edited"> + <argument index="0" name="arrow_clicked" type="bool" /> <description> - Emitted when the right mouse button is pressed in the empty space of the tree. + Emitted when a cell with the [constant TreeItem.CELL_MODE_CUSTOM] is clicked to be edited. </description> </signal> - <signal name="empty_tree_rmb_selected"> + <signal name="empty_clicked"> <argument index="0" name="position" type="Vector2" /> + <argument index="1" name="mouse_button_index" type="int" /> <description> - Emitted when the right mouse button is pressed if right mouse button selection is active and the tree is empty. + Emitted when a mouse button is clicked in the empty space of the tree. </description> </signal> <signal name="item_activated"> @@ -423,15 +425,11 @@ Emitted when an item is edited. </description> </signal> - <signal name="item_rmb_edited"> - <description> - Emitted when an item is edited using the right mouse button. - </description> - </signal> - <signal name="item_rmb_selected"> + <signal name="item_mouse_selected"> <argument index="0" name="position" type="Vector2" /> + <argument index="1" name="mouse_button_index" type="int" /> <description> - Emitted when an item is selected with the right mouse button. + Emitted when an item is selected with a mouse button. </description> </signal> <signal name="item_selected"> diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml index d2e29bf3b1..0a680b9627 100644 --- a/doc/classes/TreeItem.xml +++ b/doc/classes/TreeItem.xml @@ -687,6 +687,10 @@ <member name="disable_folding" type="bool" setter="set_disable_folding" getter="is_folding_disabled"> If [code]true[/code], folding is disabled for this TreeItem. </member> + <member name="visible" type="bool" setter="set_visible" getter="is_visible"> + If [code]true[/code], the [TreeItem] is visible (default). + Note that if a [TreeItem] is set to not be visible, none of its children will be visible either. + </member> </members> <constants> <constant name="CELL_MODE_STRING" value="0" enum="TreeCellMode"> diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index 148c6d7064..4727bc389e 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -227,7 +227,7 @@ 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 [member scaling_3d_mode] for supersampling, which provides higher quality but is much more expensive. </member> <member name="own_world_3d" type="bool" setter="set_use_own_world_3d" getter="is_using_own_world_3d" default="false"> - If [code]true[/code], the viewport will use the [World3D] defined in [member world_3d]. + If [code]true[/code], the viewport will use a unique copy of the [World3D] defined in [member world_3d]. </member> <member name="physics_object_picking" type="bool" setter="set_physics_object_picking" getter="get_physics_object_picking" default="false"> If [code]true[/code], the objects rendered by viewport become subjects of mouse picking process. @@ -279,6 +279,10 @@ If [code]true[/code], [OccluderInstance3D] nodes will be usable for occlusion culling in 3D for this viewport. For the root viewport, [member ProjectSettings.rendering/occlusion_culling/use_occlusion_culling] must be set to [code]true[/code] instead. [b]Note:[/b] Enabling occlusion culling has a cost on the CPU. Only enable occlusion culling if you actually plan to use it, and think whether your scene can actually benefit from occlusion culling. Large, open scenes with few or no objects blocking the view will generally not benefit much from occlusion culling. Large open scenes generally benefit more from mesh LOD and visibility ranges ([member GeometryInstance3D.visibility_range_begin] and [member GeometryInstance3D.visibility_range_end]) compared to occlusion culling. </member> + <member name="use_taa" type="bool" setter="set_use_taa" getter="is_using_taa" default="false"> + Enables Temporal Anti-Aliasing for this 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. + [b]Note:[/b] The implementation is not complete yet, some visual instances such as particles and skinned meshes may show artifacts. + </member> <member name="use_xr" type="bool" setter="set_use_xr" getter="is_using_xr" default="false"> If [code]true[/code], the viewport will use the primary XR interface to render XR output. When applicable this can result in a stereoscopic image and the resulting render being output to a headset. </member> @@ -441,6 +445,8 @@ </constant> <constant name="DEBUG_DRAW_OCCLUDERS" value="24" enum="DebugDraw"> </constant> + <constant name="DEBUG_DRAW_MOTION_VECTORS" value="25" enum="DebugDraw"> + </constant> <constant name="DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST" value="0" enum="DefaultCanvasItemTextureFilter"> The texture filter reads from the nearest pixel only. The simplest and fastest method of filtering, but the texture will look pixelized. </constant> diff --git a/doc/classes/VisualShaderNodeFloatFunc.xml b/doc/classes/VisualShaderNodeFloatFunc.xml index 0f057b2e6d..1226013c67 100644 --- a/doc/classes/VisualShaderNodeFloatFunc.xml +++ b/doc/classes/VisualShaderNodeFloatFunc.xml @@ -65,7 +65,7 @@ <constant name="FUNC_CEIL" value="16" enum="Function"> Finds the nearest integer that is greater than or equal to the parameter. Translates to [code]ceil(x)[/code] in the Godot Shader Language. </constant> - <constant name="FUNC_FRAC" value="17" enum="Function"> + <constant name="FUNC_FRACT" value="17" enum="Function"> Computes the fractional part of the argument. Translates to [code]fract(x)[/code] in the Godot Shader Language. </constant> <constant name="FUNC_SATURATE" value="18" enum="Function"> diff --git a/doc/classes/VisualShaderNodeTextureUniform.xml b/doc/classes/VisualShaderNodeTextureUniform.xml index b104634da0..bff6f2015d 100644 --- a/doc/classes/VisualShaderNodeTextureUniform.xml +++ b/doc/classes/VisualShaderNodeTextureUniform.xml @@ -27,7 +27,7 @@ No hints are added to the uniform declaration. </constant> <constant name="TYPE_COLOR" value="1" enum="TextureType"> - Adds [code]hint_albedo[/code] as hint to the uniform declaration for proper sRGB to linear conversion. + Adds [code]source_color[/code] as hint to the uniform declaration for proper sRGB to linear conversion. </constant> <constant name="TYPE_NORMAL_MAP" value="2" enum="TextureType"> Adds [code]hint_normal[/code] as hint to the uniform declaration, which internally converts the texture for proper usage as normal map. diff --git a/doc/classes/VisualShaderNodeVectorFunc.xml b/doc/classes/VisualShaderNodeVectorFunc.xml index bc4e12c0b3..7524025f21 100644 --- a/doc/classes/VisualShaderNodeVectorFunc.xml +++ b/doc/classes/VisualShaderNodeVectorFunc.xml @@ -68,7 +68,7 @@ <constant name="FUNC_FLOOR" value="17" enum="Function"> Finds the nearest integer less than or equal to the parameter. </constant> - <constant name="FUNC_FRAC" value="18" enum="Function"> + <constant name="FUNC_FRACT" value="18" enum="Function"> Computes the fractional part of the argument. </constant> <constant name="FUNC_INVERSE_SQRT" value="19" enum="Function"> diff --git a/doc/classes/X509Certificate.xml b/doc/classes/X509Certificate.xml index e5d8b45db6..581aba05e4 100644 --- a/doc/classes/X509Certificate.xml +++ b/doc/classes/X509Certificate.xml @@ -6,7 +6,6 @@ <description> The X509Certificate class represents an X509 certificate. Certificates can be loaded and saved like any other [Resource]. They can be used as the server certificate in [method StreamPeerSSL.accept_stream] (along with the proper [CryptoKey]), and to specify the only certificate that should be accepted when connecting to an SSL server via [method StreamPeerSSL.connect_to_stream]. - [b]Note:[/b] Not available in HTML5 exports. </description> <tutorials> </tutorials> |