summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/@GlobalScope.xml63
-rw-r--r--doc/classes/ArrayMesh.xml30
-rw-r--r--doc/classes/Button.xml3
-rw-r--r--doc/classes/CallbackTweener.xml29
-rw-r--r--doc/classes/CanvasLayer.xml3
-rw-r--r--doc/classes/CharacterBody2D.xml3
-rw-r--r--doc/classes/CharacterBody3D.xml3
-rw-r--r--doc/classes/ClassDB.xml4
-rw-r--r--doc/classes/CodeEdit.xml40
-rw-r--r--doc/classes/Color.xml40
-rw-r--r--doc/classes/Control.xml25
-rw-r--r--doc/classes/CylinderMesh.xml10
-rw-r--r--doc/classes/DisplayServer.xml2
-rw-r--r--doc/classes/EditorPlugin.xml2
-rw-r--r--doc/classes/EditorSpinSlider.xml3
-rw-r--r--doc/classes/Engine.xml5
-rw-r--r--doc/classes/File.xml1
-rw-r--r--doc/classes/ImmediateGeometry3D.xml113
-rw-r--r--doc/classes/ImmediateMesh.xml103
-rw-r--r--doc/classes/Input.xml6
-rw-r--r--doc/classes/InputEvent.xml15
-rw-r--r--doc/classes/InputEventJoypadButton.xml2
-rw-r--r--doc/classes/InputEventJoypadMotion.xml2
-rw-r--r--doc/classes/InputEventMIDI.xml2
-rw-r--r--doc/classes/InputEventMouseButton.xml2
-rw-r--r--doc/classes/InstancePlaceholder.xml2
-rw-r--r--doc/classes/IntervalTweener.xml16
-rw-r--r--doc/classes/JSON.xml69
-rw-r--r--doc/classes/JSONParseResult.xml51
-rw-r--r--doc/classes/JSONParser.xml57
-rw-r--r--doc/classes/Label.xml2
-rw-r--r--doc/classes/Light3D.xml2
-rw-r--r--doc/classes/LineShape2D.xml4
-rw-r--r--doc/classes/MeshDataTool.xml2
-rw-r--r--doc/classes/MeshInstance3D.xml2
-rw-r--r--doc/classes/MethodTweener.xml43
-rw-r--r--doc/classes/NativeExtension.xml57
-rw-r--r--doc/classes/NativeExtensionManager.xml61
-rw-r--r--doc/classes/Node.xml24
-rw-r--r--doc/classes/Node2D.xml8
-rw-r--r--doc/classes/Node3D.xml5
-rw-r--r--doc/classes/NodePath.xml1
-rw-r--r--doc/classes/OS.xml25
-rw-r--r--doc/classes/PackedScene.xml14
-rw-r--r--doc/classes/Performance.xml4
-rw-r--r--doc/classes/PhysicalBone3D.xml5
-rw-r--r--doc/classes/PhysicsTestMotionResult2D.xml6
-rw-r--r--doc/classes/Plane.xml14
-rw-r--r--doc/classes/Polygon2D.xml5
-rw-r--r--doc/classes/ProjectSettings.xml6
-rw-r--r--doc/classes/PropertyTweener.xml78
-rw-r--r--doc/classes/Quaternion.xml32
-rw-r--r--doc/classes/RDFramebufferPass.xml35
-rw-r--r--doc/classes/ReflectionProbe.xml4
-rw-r--r--doc/classes/RenderingDevice.xml50
-rw-r--r--doc/classes/RenderingServer.xml175
-rw-r--r--doc/classes/Resource.xml2
-rw-r--r--doc/classes/RichTextLabel.xml28
-rw-r--r--doc/classes/SceneState.xml8
-rw-r--r--doc/classes/SceneTree.xml14
-rw-r--r--doc/classes/Script.xml4
-rw-r--r--doc/classes/Sprite3D.xml6
-rw-r--r--doc/classes/SurfaceTool.xml2
-rw-r--r--doc/classes/TextEdit.xml58
-rw-r--r--doc/classes/TileData.xml40
-rw-r--r--doc/classes/TileSet.xml2
-rw-r--r--doc/classes/Tree.xml20
-rw-r--r--doc/classes/TreeItem.xml8
-rw-r--r--doc/classes/Tween.xml508
-rw-r--r--doc/classes/Tweener.xml22
-rw-r--r--doc/classes/Vector2.xml24
-rw-r--r--doc/classes/Vector2i.xml24
-rw-r--r--doc/classes/Vector3.xml24
-rw-r--r--doc/classes/Vector3i.xml24
-rw-r--r--doc/classes/Viewport.xml3
-rw-r--r--doc/classes/WorldEnvironment.xml2
-rw-r--r--doc/classes/float.xml33
-rw-r--r--doc/classes/int.xml45
78 files changed, 1267 insertions, 1004 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml
index 552fc41318..daabc2c83b 100644
--- a/doc/classes/@GlobalScope.xml
+++ b/doc/classes/@GlobalScope.xml
@@ -1066,11 +1066,13 @@
<description>
Returns the internal type of the given Variant object, using the [enum Variant.Type] values.
[codeblock]
- p = parse_json('["a", "b", "c"]')
- if typeof(p) == TYPE_ARRAY:
- print(p[0]) # Prints a
+ var json = JSON.new()
+ json.parse('["a", "b", "c"]')
+ var result = json.get_data()
+ if typeof(result) == TYPE_ARRAY:
+ print(result[0]) # Prints a
else:
- print("unexpected results")
+ print("Unexpected result")
[/codeblock]
</description>
</method>
@@ -1211,9 +1213,6 @@
<member name="InputMap" type="InputMap" setter="" getter="">
The [InputMap] singleton.
</member>
- <member name="JSON" type="JSON" setter="" getter="">
- The [JSON] singleton.
- </member>
<member name="JavaClassWrapper" type="JavaClassWrapper" setter="" getter="">
The [JavaClassWrapper] singleton.
[b]Note:[/b] Only implemented on Android.
@@ -1225,6 +1224,8 @@
<member name="Marshalls" type="Marshalls" setter="" getter="">
The [Marshalls] singleton.
</member>
+ <member name="NativeExtensionManager" type="NativeExtensionManager" setter="" getter="">
+ </member>
<member name="NavigationMeshGenerator" type="NavigationMeshGenerator" setter="" getter="">
The [NavigationMeshGenerator] singleton.
</member>
@@ -2409,74 +2410,72 @@
</constant>
<constant name="PROPERTY_HINT_RANGE" value="1" enum="PropertyHint">
Hints that an integer or float property should be within a range specified via the hint string [code]"min,max"[/code] or [code]"min,max,step"[/code]. The hint string can optionally include [code]"or_greater"[/code] and/or [code]"or_lesser"[/code] to allow manual input going respectively above the max or below the min values. Example: [code]"-360,360,1,or_greater,or_lesser"[/code].
+ Additionally, other keywords can be included: "exp" for exponential range editing, "radians" for editing radian angles in degrees, "degrees" to hint at an angle and "noslider" to hide the slider.
</constant>
- <constant name="PROPERTY_HINT_EXP_RANGE" value="2" enum="PropertyHint">
- Hints that an integer or float property should be within an exponential range specified via the hint string [code]"min,max"[/code] or [code]"min,max,step"[/code]. The hint string can optionally include [code]"or_greater"[/code] and/or [code]"or_lesser"[/code] to allow manual input going respectively above the max or below the min values. Example: [code]"0.01,100,0.01,or_greater"[/code].
- </constant>
- <constant name="PROPERTY_HINT_ENUM" value="3" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_ENUM" value="2" enum="PropertyHint">
Hints that an integer, float or string property is an enumerated value to pick in a list specified via a hint string such as [code]"Hello,Something,Else"[/code].
</constant>
- <constant name="PROPERTY_HINT_EXP_EASING" value="4" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_EXP_EASING" value="3" enum="PropertyHint">
Hints that a float property should be edited via an exponential easing function. The hint string can include [code]"attenuation"[/code] to flip the curve horizontally and/or [code]"inout"[/code] to also include in/out easing.
</constant>
- <constant name="PROPERTY_HINT_LENGTH" value="5" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_LENGTH" value="4" enum="PropertyHint">
Deprecated hint, unused.
</constant>
- <constant name="PROPERTY_HINT_KEY_ACCEL" value="6" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_KEY_ACCEL" value="5" enum="PropertyHint">
Deprecated hint, unused.
</constant>
- <constant name="PROPERTY_HINT_FLAGS" value="7" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_FLAGS" value="6" enum="PropertyHint">
Hints that an integer property is a bitmask with named bit flags. For example, to allow toggling bits 0, 1, 2 and 4, the hint could be something like [code]"Bit0,Bit1,Bit2,,Bit4"[/code].
</constant>
- <constant name="PROPERTY_HINT_LAYERS_2D_RENDER" value="8" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_LAYERS_2D_RENDER" value="7" enum="PropertyHint">
Hints that an integer property is a bitmask using the optionally named 2D render layers.
</constant>
- <constant name="PROPERTY_HINT_LAYERS_2D_PHYSICS" value="9" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_LAYERS_2D_PHYSICS" value="8" enum="PropertyHint">
Hints that an integer property is a bitmask using the optionally named 2D physics layers.
</constant>
- <constant name="PROPERTY_HINT_LAYERS_2D_NAVIGATION" value="10" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_LAYERS_2D_NAVIGATION" value="9" enum="PropertyHint">
Hints that an integer property is a bitmask using the optionally named 2D navigation layers.
</constant>
- <constant name="PROPERTY_HINT_LAYERS_3D_RENDER" value="11" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_LAYERS_3D_RENDER" value="10" enum="PropertyHint">
Hints that an integer property is a bitmask using the optionally named 3D render layers.
</constant>
- <constant name="PROPERTY_HINT_LAYERS_3D_PHYSICS" value="12" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_LAYERS_3D_PHYSICS" value="11" enum="PropertyHint">
Hints that an integer property is a bitmask using the optionally named 3D physics layers.
</constant>
- <constant name="PROPERTY_HINT_LAYERS_3D_NAVIGATION" value="13" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_LAYERS_3D_NAVIGATION" value="12" enum="PropertyHint">
Hints that an integer property is a bitmask using the optionally named 2D navigation layers.
</constant>
- <constant name="PROPERTY_HINT_FILE" value="14" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_FILE" value="13" enum="PropertyHint">
Hints that a string property is a path to a file. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards like [code]"*.png,*.jpg"[/code].
</constant>
- <constant name="PROPERTY_HINT_DIR" value="15" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_DIR" value="14" enum="PropertyHint">
Hints that a string property is a path to a directory. Editing it will show a file dialog for picking the path.
</constant>
- <constant name="PROPERTY_HINT_GLOBAL_FILE" value="16" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_GLOBAL_FILE" value="15" enum="PropertyHint">
Hints that a string property is an absolute path to a file outside the project folder. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards like [code]"*.png,*.jpg"[/code].
</constant>
- <constant name="PROPERTY_HINT_GLOBAL_DIR" value="17" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_GLOBAL_DIR" value="16" enum="PropertyHint">
Hints that a string property is an absolute path to a directory outside the project folder. Editing it will show a file dialog for picking the path.
</constant>
- <constant name="PROPERTY_HINT_RESOURCE_TYPE" value="18" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_RESOURCE_TYPE" value="17" enum="PropertyHint">
Hints that a property is an instance of a [Resource]-derived type, optionally specified via the hint string (e.g. [code]"Texture2D"[/code]). Editing it will show a popup menu of valid resource types to instantiate.
</constant>
- <constant name="PROPERTY_HINT_MULTILINE_TEXT" value="19" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_MULTILINE_TEXT" value="18" enum="PropertyHint">
Hints that a string property is text with line breaks. Editing it will show a text input field where line breaks can be typed.
</constant>
- <constant name="PROPERTY_HINT_PLACEHOLDER_TEXT" value="20" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_PLACEHOLDER_TEXT" value="19" enum="PropertyHint">
Hints that a string property should have a placeholder text visible on its input field, whenever the property is empty. The hint string is the placeholder text to use.
</constant>
- <constant name="PROPERTY_HINT_COLOR_NO_ALPHA" value="21" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_COLOR_NO_ALPHA" value="20" enum="PropertyHint">
Hints that a color property should be edited without changing its alpha component, i.e. only R, G and B channels are edited.
</constant>
- <constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSY" value="22" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSY" value="21" enum="PropertyHint">
Hints that an image is compressed using lossy compression.
</constant>
- <constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSLESS" value="23" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSLESS" value="22" enum="PropertyHint">
Hints that an image is compressed using lossless compression.
</constant>
- <constant name="PROPERTY_HINT_TYPE_STRING" value="25" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_TYPE_STRING" value="24" enum="PropertyHint">
Hint that a property represents a particular type. If a property is [constant TYPE_STRING], allows to set a type from the create dialog. If you need to create an [Array] to contain elements of a specific type, the [code]hint_string[/code] must encode nested types using [code]":"[/code] and [code]"/"[/code] for specifying [Resource] types. For instance:
[codeblock]
hint_string = "%s:" % [TYPE_INT] # Array of inteters.
diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml
index 1bbf9bcd93..7fbf53c7d1 100644
--- a/doc/classes/ArrayMesh.xml
+++ b/doc/classes/ArrayMesh.xml
@@ -43,7 +43,7 @@
[/csharp]
[/codeblocks]
The [MeshInstance3D] is ready to be added to the [SceneTree] to be shown.
- See also [ImmediateGeometry3D], [MeshDataTool] and [SurfaceTool] for procedural geometry generation.
+ See also [ImmediateMesh], [MeshDataTool] and [SurfaceTool] for procedural geometry generation.
[b]Note:[/b] Godot uses clockwise [url=https://learnopengl.com/Advanced-OpenGL/Face-culling]winding order[/url] for front faces of triangle primitive modes.
</description>
<tutorials>
@@ -202,7 +202,31 @@
Sets a name for a given surface.
</description>
</method>
- <method name="surface_update_region">
+ <method name="surface_update_attribute_region">
+ <return type="void">
+ </return>
+ <argument index="0" name="surf_idx" type="int">
+ </argument>
+ <argument index="1" name="offset" type="int">
+ </argument>
+ <argument index="2" name="data" type="PackedByteArray">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="surface_update_skin_region">
+ <return type="void">
+ </return>
+ <argument index="0" name="surf_idx" type="int">
+ </argument>
+ <argument index="1" name="offset" type="int">
+ </argument>
+ <argument index="2" name="data" type="PackedByteArray">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="surface_update_vertex_region">
<return type="void">
</return>
<argument index="0" name="surf_idx" type="int">
@@ -212,8 +236,6 @@
<argument index="2" name="data" type="PackedByteArray">
</argument>
<description>
- Updates a specified region of mesh arrays on the GPU.
- [b]Warning:[/b] Only use if you know what you are doing. You can easily cause crashes by calling this function with improper arguments.
</description>
</method>
</methods>
diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml
index c9078a4de5..239e0bb2d9 100644
--- a/doc/classes/Button.xml
+++ b/doc/classes/Button.xml
@@ -85,6 +85,9 @@
<member name="icon" type="Texture2D" setter="set_button_icon" getter="get_button_icon">
Button's icon, if text is present the icon will be placed before the text.
</member>
+ <member name="icon_align" type="int" setter="set_icon_align" getter="get_icon_align" enum="Button.TextAlign" default="0">
+ Specifies if the icon should be aligned to the left, right, or center of a button. Uses the same [enum TextAlign] constants as the text alignment. If centered, text will draw on top of the icon.
+ </member>
<member name="language" type="String" setter="set_language" getter="get_language" default="&quot;&quot;">
Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
</member>
diff --git a/doc/classes/CallbackTweener.xml b/doc/classes/CallbackTweener.xml
new file mode 100644
index 0000000000..8ac285c3df
--- /dev/null
+++ b/doc/classes/CallbackTweener.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="CallbackTweener" inherits="Tweener" version="4.0">
+ <brief_description>
+ Calls the specified method after optional delay.
+ </brief_description>
+ <description>
+ [CallbackTweener] is used to call a method in a tweening sequence. See [method Tween.tween_callback] for more usage information.
+ [b]Note:[/b] [method Tween.tween_callback] is the only correct way to create [CallbackTweener]. Any [CallbackTweener] created manually will not function correctly.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="set_delay">
+ <return type="CallbackTweener">
+ </return>
+ <argument index="0" name="delay" type="float">
+ </argument>
+ <description>
+ Makes the callback call delayed by given time in seconds. Example:
+ [codeblock]
+ var tween = get_tree().create_tween()
+ tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() after 2 seconds
+ [/codeblock]
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/CanvasLayer.xml b/doc/classes/CanvasLayer.xml
index f4c04d7bca..eb99368079 100644
--- a/doc/classes/CanvasLayer.xml
+++ b/doc/classes/CanvasLayer.xml
@@ -39,9 +39,6 @@
<member name="rotation" type="float" setter="set_rotation" getter="get_rotation" default="0.0">
The layer's rotation in radians.
</member>
- <member name="rotation_degrees" type="float" setter="set_rotation_degrees" getter="get_rotation_degrees" default="0.0">
- The layer's rotation in degrees.
- </member>
<member name="scale" type="Vector2" setter="set_scale" getter="get_scale" default="Vector2(1, 1)">
The layer's scale.
</member>
diff --git a/doc/classes/CharacterBody2D.xml b/doc/classes/CharacterBody2D.xml
index fbe5c34d7d..b2d8aba174 100644
--- a/doc/classes/CharacterBody2D.xml
+++ b/doc/classes/CharacterBody2D.xml
@@ -101,9 +101,6 @@
<member name="floor_max_angle" type="float" setter="set_floor_max_angle" getter="get_floor_max_angle" default="0.785398">
Maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall, when calling [method move_and_slide]. The default value equals 45 degrees.
</member>
- <member name="floor_max_angle_degrees" type="float" setter="set_floor_max_angle_degrees" getter="get_floor_max_angle_degrees" default="45.0">
- Maximum angle (in degrees) where a slope is still considered a floor (or a ceiling), rather than a wall, when calling [method move_and_slide].
- </member>
<member name="infinite_inertia" type="bool" setter="set_infinite_inertia_enabled" getter="is_infinite_inertia_enabled" default="true">
If [code]true[/code], the body will be able to push [RigidBody2D] nodes when calling [method move_and_slide], but it also won't detect any collisions with them. If [code]false[/code], it will interact with [RigidBody2D] nodes like with [StaticBody2D].
</member>
diff --git a/doc/classes/CharacterBody3D.xml b/doc/classes/CharacterBody3D.xml
index f6c3d68b3c..c76e02fac0 100644
--- a/doc/classes/CharacterBody3D.xml
+++ b/doc/classes/CharacterBody3D.xml
@@ -87,9 +87,6 @@
<member name="floor_max_angle" type="float" setter="set_floor_max_angle" getter="get_floor_max_angle" default="0.785398">
Maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall, when calling [method move_and_slide]. The default value equals 45 degrees.
</member>
- <member name="floor_max_angle_degrees" type="float" setter="set_floor_max_angle_degrees" getter="get_floor_max_angle_degrees" default="45.0">
- Maximum angle (in degrees) where a slope is still considered a floor (or a ceiling), rather than a wall, when calling [method move_and_slide].
- </member>
<member name="infinite_inertia" type="bool" setter="set_infinite_inertia_enabled" getter="is_infinite_inertia_enabled" default="true">
If [code]true[/code], the body will be able to push [RigidBody3D] nodes when calling [method move_and_slide], but it also won't detect any collisions with them. If [code]false[/code], it will interact with [RigidBody3D] nodes like with [StaticBody3D].
</member>
diff --git a/doc/classes/ClassDB.xml b/doc/classes/ClassDB.xml
index 860bdc7c8f..028781d313 100644
--- a/doc/classes/ClassDB.xml
+++ b/doc/classes/ClassDB.xml
@@ -9,7 +9,7 @@
<tutorials>
</tutorials>
<methods>
- <method name="can_instance" qualifiers="const">
+ <method name="can_instantiate" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="class" type="StringName">
@@ -187,7 +187,7 @@
Returns the parent class of [code]class[/code].
</description>
</method>
- <method name="instance" qualifiers="const">
+ <method name="instantiate" qualifiers="const">
<return type="Variant">
</return>
<argument index="0" name="class" type="StringName">
diff --git a/doc/classes/CodeEdit.xml b/doc/classes/CodeEdit.xml
index c7dbd86c55..30fd47cdb6 100644
--- a/doc/classes/CodeEdit.xml
+++ b/doc/classes/CodeEdit.xml
@@ -143,6 +143,20 @@
Inserts the selected entry into the text. If [code]replace[/code] is true, any existing text is replaced rather then merged.
</description>
</method>
+ <method name="do_indent">
+ <return type="void">
+ </return>
+ <description>
+ Perform an indent as if the user activated the "ui_text_indent" action.
+ </description>
+ </method>
+ <method name="do_unindent">
+ <return type="void">
+ </return>
+ <description>
+ Perform an unindent as if the user activated the "ui_text_unindent" action.
+ </description>
+ </method>
<method name="fold_all_lines">
<return type="void">
</return>
@@ -278,6 +292,13 @@
Returns [code]true[/code] if string [code]start_key[/code] exists.
</description>
</method>
+ <method name="indent_lines">
+ <return type="void">
+ </return>
+ <description>
+ Indents selected lines, or in the case of no selection the caret line by one.
+ </description>
+ </method>
<method name="is_in_comment" qualifiers="const">
<return type="int">
</return>
@@ -441,6 +462,13 @@
Unfolds all lines that were previously folded.
</description>
</method>
+ <method name="unindent_lines">
+ <return type="void">
+ </return>
+ <description>
+ Unindents selected lines, or in the case of no selection the caret line by one.
+ </description>
+ </method>
<method name="update_code_completion_options">
<return type="void">
</return>
@@ -475,6 +503,18 @@
</member>
<member name="draw_line_numbers" type="bool" setter="set_draw_line_numbers" getter="is_draw_line_numbers_enabled" default="false">
</member>
+ <member name="indent_automatic" type="bool" setter="set_auto_indent_enabled" getter="is_auto_indent_enabled" default="false">
+ Sets whether automatic indent are enabled, this will add an extra indent if a prefix or brace is found.
+ </member>
+ <member name="indent_automatic_prefixes" type="String[]" setter="set_auto_indent_prefixes" getter="get_auto_indent_prefixes" default="[&quot;(&quot;, &quot;:&quot;, &quot;[&quot;, &quot;{&quot;]">
+ Prefixes to trigger an automatic indent.
+ </member>
+ <member name="indent_size" type="int" setter="set_indent_size" getter="get_indent_size" default="4">
+ Size of tabs, if [code]indent_use_spaces[/code] is enabled the amount of spaces to use.
+ </member>
+ <member name="indent_use_spaces" type="bool" setter="set_indent_using_spaces" getter="is_indent_using_spaces" default="false">
+ Use spaces instead of tabs for indentation.
+ </member>
<member name="layout_direction" type="int" setter="set_layout_direction" getter="get_layout_direction" override="true" enum="Control.LayoutDirection" default="2" />
<member name="line_folding" type="bool" setter="set_line_folding_enabled" getter="is_line_folding_enabled" default="true">
Sets whether line folding is allowed.
diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml
index 29c21b3213..7b1415e40d 100644
--- a/doc/classes/Color.xml
+++ b/doc/classes/Color.xml
@@ -80,14 +80,16 @@
</argument>
<argument index="2" name="b" type="float">
</argument>
+ <argument index="3" name="a" type="float">
+ </argument>
<description>
- Constructs a [Color] from RGB values, typically between 0 and 1. Alpha will be 1.
+ Constructs a [Color] from RGBA values, typically between 0 and 1.
[codeblocks]
[gdscript]
- var color = Color(0.2, 1.0, 0.7) # Similar to `Color8(51, 255, 178, 255)`
+ var color = Color(0.2, 1.0, 0.7, 0.8) # Similar to `Color8(51, 255, 178, 204)`
[/gdscript]
[csharp]
- var color = new Color(0.2f, 1.0f, 0.7f); // Similar to `Color.Color8(51, 255, 178, 255)`
+ var color = new Color(0.2f, 1.0f, 0.7f, 0.8f); // Similar to `Color.Color8(51, 255, 178, 255, 204)`
[/csharp]
[/codeblocks]
</description>
@@ -101,16 +103,14 @@
</argument>
<argument index="2" name="b" type="float">
</argument>
- <argument index="3" name="a" type="float">
- </argument>
<description>
- Constructs a [Color] from RGBA values, typically between 0 and 1.
+ Constructs a [Color] from RGB values, typically between 0 and 1. Alpha will be 1.
[codeblocks]
[gdscript]
- var color = Color(0.2, 1.0, 0.7, 0.8) # Similar to `Color8(51, 255, 178, 204)`
+ var color = Color(0.2, 1.0, 0.7) # Similar to `Color8(51, 255, 178, 255)`
[/gdscript]
[csharp]
- var color = new Color(0.2f, 1.0f, 0.7f, 0.8f); // Similar to `Color.Color8(51, 255, 178, 255, 204)`
+ var color = new Color(0.2f, 1.0f, 0.7f); // Similar to `Color.Color8(51, 255, 178, 255)`
[/csharp]
[/codeblocks]
</description>
@@ -349,12 +349,6 @@
<method name="operator +" qualifiers="operator">
<return type="Color">
</return>
- <description>
- </description>
- </method>
- <method name="operator +" qualifiers="operator">
- <return type="Color">
- </return>
<argument index="0" name="right" type="Color">
</argument>
<description>
@@ -363,12 +357,6 @@
<method name="operator -" qualifiers="operator">
<return type="Color">
</return>
- <description>
- </description>
- </method>
- <method name="operator -" qualifiers="operator">
- <return type="Color">
- </return>
<argument index="0" name="right" type="Color">
</argument>
<description>
@@ -414,6 +402,18 @@
<description>
</description>
</method>
+ <method name="operator unary+" qualifiers="operator">
+ <return type="Color">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="operator unary-" qualifiers="operator">
+ <return type="Color">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="to_abgr32" qualifiers="const">
<return type="int">
</return>
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index 9015caa0b4..47e26b7a2e 100644
--- a/doc/classes/Control.xml
+++ b/doc/classes/Control.xml
@@ -50,14 +50,6 @@
[/codeblocks]
</description>
</method>
- <method name="_clips_input" qualifiers="virtual">
- <return type="bool">
- </return>
- <description>
- Virtual method to be implemented by the user. Returns whether [method _gui_input] should not be called for children controls outside this control's rectangle. Input will be clipped to the Rect of this [Control]. Similar to [member rect_clip_content], but doesn't affect visibility.
- If not overridden, defaults to [code]false[/code].
- </description>
- </method>
<method name="_drop_data" qualifiers="virtual">
<return type="void">
</return>
@@ -155,13 +147,13 @@
* control has [member mouse_filter] set to [constant MOUSE_FILTER_IGNORE];
* control is obstructed by another [Control] on top of it, which doesn't have [member mouse_filter] set to [constant MOUSE_FILTER_IGNORE];
* control's parent has [member mouse_filter] set to [constant MOUSE_FILTER_STOP] or has accepted the event;
- * it happens outside parent's rectangle and the parent has either [member rect_clip_content] or [method _clips_input] enabled.
+ * it happens outside parent's rectangle and the parent has either [member rect_clip_content] enabled.
</description>
</method>
- <method name="_has_point" qualifiers="virtual">
+ <method name="_has_point" qualifiers="virtual const">
<return type="bool">
</return>
- <argument index="0" name="point" type="Vector2">
+ <argument index="0" name="" type="Vector2">
</argument>
<description>
Virtual method to be implemented by the user. Returns whether the given [code]point[/code] is inside this control.
@@ -201,14 +193,14 @@
[codeblocks]
[gdscript]
func _make_custom_tooltip(for_text):
- var tooltip = preload("res://SomeTooltipScene.tscn").instance()
+ var tooltip = preload("res://SomeTooltipScene.tscn").instantiate()
tooltip.get_node("Label").text = for_text
return tooltip
[/gdscript]
[csharp]
public override Godot.Control _MakeCustomTooltip(String forText)
{
- Node tooltip = ResourceLoader.Load&lt;PackedScene&gt;("res://SomeTooltipScene.tscn").Instance();
+ Node tooltip = ResourceLoader.Load&lt;PackedScene&gt;("res://SomeTooltipScene.tscn").Instantiate();
tooltip.GetNode&lt;Label&gt;("Label").Text = forText;
return tooltip;
}
@@ -1135,7 +1127,7 @@
Offsets are often controlled by one or multiple parent [Container] nodes, so you should not modify them manually if your node is a direct child of a [Container]. Offsets update automatically when you move or resize the node.
</member>
<member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents" default="false">
- Enables whether rendering of [CanvasItem] based children should be clipped to this control's rectangle. If [code]true[/code], parts of a child which would be visibly outside of this control's rectangle will not be rendered.
+ Enables whether rendering of [CanvasItem] based children should be clipped to this control's rectangle. If [code]true[/code], parts of a child which would be visibly outside of this control's rectangle will not be rendered and won't receive input.
</member>
<member name="rect_global_position" type="Vector2" setter="_set_global_position" getter="get_global_position">
The node's global position, relative to the world (usually to the top-left corner of the window).
@@ -1152,13 +1144,10 @@
<member name="rect_rotation" type="float" setter="set_rotation" getter="get_rotation" default="0.0">
The node's rotation around its pivot, in radians. See [member rect_pivot_offset] to change the pivot's position.
</member>
- <member name="rect_rotation_degrees" type="float" setter="set_rotation_degrees" getter="get_rotation_degrees" default="0.0">
- The node's rotation around its pivot, in degrees. See [member rect_pivot_offset] to change the pivot's position.
- </member>
<member name="rect_scale" type="Vector2" setter="set_scale" getter="get_scale" default="Vector2(1, 1)">
The node's scale, relative to its [member rect_size]. Change this property to scale the node around its [member rect_pivot_offset]. The Control's [member hint_tooltip] will also scale according to this value.
[b]Note:[/b] This property is mainly intended to be used for animation purposes. Text inside the Control will look pixelated or blurry when the Control is scaled. To support multiple resolutions in your project, use an appropriate viewport stretch mode as described in the [url=https://docs.godotengine.org/en/latest/tutorials/viewports/multiple_resolutions.html]documentation[/url] instead of scaling Controls individually.
- [b]Note:[/b] If the Control node is a child of a [Container] node, the scale will be reset to [code]Vector2(1, 1)[/code] when the scene is instanced. To set the Control's scale when it's instanced, wait for one frame using [code]yield(get_tree(), "idle_frame")[/code] then set its [member rect_scale] property.
+ [b]Note:[/b] If the Control node is a child of a [Container] node, the scale will be reset to [code]Vector2(1, 1)[/code] when the scene is instantiated. To set the Control's scale when it's instantiated, wait for one frame using [code]yield(get_tree(), "idle_frame")[/code] then set its [member rect_scale] property.
</member>
<member name="rect_size" type="Vector2" setter="_set_size" getter="get_size" default="Vector2(0, 0)">
The size of the node's bounding rectangle, in pixels. [Container] nodes update this property automatically.
diff --git a/doc/classes/CylinderMesh.xml b/doc/classes/CylinderMesh.xml
index 3a81e98c3a..827fb5c10c 100644
--- a/doc/classes/CylinderMesh.xml
+++ b/doc/classes/CylinderMesh.xml
@@ -4,7 +4,7 @@
Class representing a cylindrical [PrimitiveMesh].
</brief_description>
<description>
- Class representing a cylindrical [PrimitiveMesh]. This class can be used to create cones by setting either the [member top_radius] or [member bottom_radius] properties to 0.0.
+ Class representing a cylindrical [PrimitiveMesh]. This class can be used to create cones by setting either the [member top_radius] or [member bottom_radius] properties to [code]0.0[/code].
</description>
<tutorials>
</tutorials>
@@ -12,19 +12,19 @@
</methods>
<members>
<member name="bottom_radius" type="float" setter="set_bottom_radius" getter="get_bottom_radius" default="1.0">
- Bottom radius of the cylinder.
+ Bottom radius of the cylinder. If set to [code]0.0[/code], the bottom faces will not be generated, resulting in a conic shape.
</member>
<member name="height" type="float" setter="set_height" getter="get_height" default="2.0">
Full height of the cylinder.
</member>
<member name="radial_segments" type="int" setter="set_radial_segments" getter="get_radial_segments" default="64">
- Number of radial segments on the cylinder.
+ Number of radial segments on the cylinder. Higher values result in a more detailed cylinder/cone at the cost of performance.
</member>
<member name="rings" type="int" setter="set_rings" getter="get_rings" default="4">
- Number of edge rings along the height of the cylinder.
+ 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="1.0">
- Top radius of the cylinder.
+ Top radius of the cylinder. If set to [code]0.0[/code], the top faces will not be generated, resulting in a conic shape.
</member>
</members>
<constants>
diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml
index 0a4807f046..ef20174ee6 100644
--- a/doc/classes/DisplayServer.xml
+++ b/doc/classes/DisplayServer.xml
@@ -436,7 +436,7 @@
</description>
</method>
<method name="mouse_get_button_state" qualifiers="const">
- <return type="int">
+ <return type="int" enum="MouseButton">
</return>
<description>
</description>
diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml
index 0c0439e9d3..a02d318f70 100644
--- a/doc/classes/EditorPlugin.xml
+++ b/doc/classes/EditorPlugin.xml
@@ -404,7 +404,7 @@
</argument>
<description>
Adds a custom type, which will appear in the list of nodes or resources. An icon can be optionally passed.
- When given node or resource is selected, the base type will be instanced (e.g. "Node3D", "Control", "Resource"), then the script will be loaded and set to this object.
+ When given node or resource is selected, the base type will be instantiated (e.g. "Node3D", "Control", "Resource"), then the script will be loaded and set to this object.
You can use the virtual method [method _handles] to check if your custom object is being edited by checking the script or using the [code]is[/code] keyword.
During run-time, this will be a simple object with a script so this function does not need to be called then.
</description>
diff --git a/doc/classes/EditorSpinSlider.xml b/doc/classes/EditorSpinSlider.xml
index 935335943f..b86e5e5c6e 100644
--- a/doc/classes/EditorSpinSlider.xml
+++ b/doc/classes/EditorSpinSlider.xml
@@ -18,6 +18,9 @@
</member>
<member name="read_only" type="bool" setter="set_read_only" getter="is_read_only" default="false">
</member>
+ <member name="suffix" type="String" setter="set_suffix" getter="get_suffix" default="&quot;&quot;">
+ The suffix to display after the value (in a faded color). This should generally be a plural word. You may have to use an abbreviation if the suffix is too long to be displayed.
+ </member>
</members>
<constants>
</constants>
diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml
index ab480c50ab..c0a8407ece 100644
--- a/doc/classes/Engine.xml
+++ b/doc/classes/Engine.xml
@@ -173,6 +173,11 @@
Controls how much physics ticks are synchronized with real time. For 0 or less, the ticks are synchronized. Such values are recommended for network games, where clock synchronization matters. Higher values cause higher deviation of in-game clock and real clock, but allows smoothing out framerate jitters. The default value of 0.5 should be fine for most; values above 2 could cause the game to react to dropped frames with a noticeable delay and are not recommended.
[b]Note:[/b] For best results, when using a custom physics interpolation solution, the physics jitter fix should be disabled by setting [member physics_jitter_fix] to [code]0[/code].
</member>
+ <member name="print_error_messages" type="bool" setter="set_print_error_messages" getter="is_printing_error_messages" default="true">
+ If [code]false[/code], stops printing error and warning messages to the console and editor Output log. This can be used to hide error and warning messages during unit test suite runs. This property is equivalent to the [member ProjectSettings.application/run/disable_stderr] project setting.
+ [b]Warning:[/b] If you set this to [code]false[/code] anywhere in the project, important error messages may be hidden even if they are emitted from other scripts. If this is set to [code]false[/code] in a [code]@tool[/code] script, this will also impact the editor itself. Do [i]not[/i] report bugs before ensuring error messages are enabled (as they are by default).
+ [b]Note:[/b] This property does not impact the editor's Errors tab when running a project from the editor.
+ </member>
<member name="target_fps" type="int" setter="set_target_fps" getter="get_target_fps" default="0">
The desired frames per second. If the hardware cannot keep up, this setting may not be respected. A value of 0 means no limit.
</member>
diff --git a/doc/classes/File.xml b/doc/classes/File.xml
index 7feaaa2040..f98c31dc7f 100644
--- a/doc/classes/File.xml
+++ b/doc/classes/File.xml
@@ -486,6 +486,7 @@
</argument>
<description>
Stores any Variant value in the file. If [code]full_objects[/code] is [code]true[/code], encoding objects is allowed (and can potentially include code).
+ [b]Note:[/b] Not all properties are included. Only properties that are configured with the [constant PROPERTY_USAGE_STORAGE] flag set will be serialized. You can add a new usage flag to a property by overriding the [method Object._get_property_list] method in your class. You can also check how property usage is configured by calling [method Object._get_property_list]. See [enum PropertyUsageFlags] for the possible usage flags.
</description>
</method>
</methods>
diff --git a/doc/classes/ImmediateGeometry3D.xml b/doc/classes/ImmediateGeometry3D.xml
deleted file mode 100644
index d2d663847f..0000000000
--- a/doc/classes/ImmediateGeometry3D.xml
+++ /dev/null
@@ -1,113 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ImmediateGeometry3D" inherits="GeometryInstance3D" version="4.0">
- <brief_description>
- Draws simple geometry from code.
- </brief_description>
- <description>
- Draws simple geometry from code. Uses a drawing mode similar to OpenGL 1.x.
- See also [ArrayMesh], [MeshDataTool] and [SurfaceTool] for procedural geometry generation.
- [b]Note:[/b] ImmediateGeometry3D is best suited to small amounts of mesh data that change every frame. It will be slow when handling large amounts of mesh data. If mesh data doesn't change often, use [ArrayMesh], [MeshDataTool] or [SurfaceTool] instead.
- [b]Note:[/b] Godot uses clockwise [url=https://learnopengl.com/Advanced-OpenGL/Face-culling]winding order[/url] for front faces of triangle primitive modes.
- </description>
- <tutorials>
- </tutorials>
- <methods>
- <method name="add_sphere">
- <return type="void">
- </return>
- <argument index="0" name="lats" type="int">
- </argument>
- <argument index="1" name="lons" type="int">
- </argument>
- <argument index="2" name="radius" type="float">
- </argument>
- <argument index="3" name="add_uv" type="bool" default="true">
- </argument>
- <description>
- Simple helper to draw an UV sphere with given latitude, longitude and radius.
- </description>
- </method>
- <method name="add_vertex">
- <return type="void">
- </return>
- <argument index="0" name="position" type="Vector3">
- </argument>
- <description>
- Adds a vertex in local coordinate space with the currently set color/uv/etc.
- </description>
- </method>
- <method name="begin">
- <return type="void">
- </return>
- <argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType">
- </argument>
- <argument index="1" name="texture" type="Texture2D" default="null">
- </argument>
- <description>
- Begin drawing (and optionally pass a texture override). When done call [method end]. For more information on how this works, search for [code]glBegin()[/code] and [code]glEnd()[/code] references.
- For the type of primitive, see the [enum Mesh.PrimitiveType] enum.
- </description>
- </method>
- <method name="clear">
- <return type="void">
- </return>
- <description>
- Clears everything that was drawn using begin/end.
- </description>
- </method>
- <method name="end">
- <return type="void">
- </return>
- <description>
- Ends a drawing context and displays the results.
- </description>
- </method>
- <method name="set_color">
- <return type="void">
- </return>
- <argument index="0" name="color" type="Color">
- </argument>
- <description>
- The current drawing color.
- </description>
- </method>
- <method name="set_normal">
- <return type="void">
- </return>
- <argument index="0" name="normal" type="Vector3">
- </argument>
- <description>
- The next vertex's normal.
- </description>
- </method>
- <method name="set_tangent">
- <return type="void">
- </return>
- <argument index="0" name="tangent" type="Plane">
- </argument>
- <description>
- The next vertex's tangent (and binormal facing).
- </description>
- </method>
- <method name="set_uv">
- <return type="void">
- </return>
- <argument index="0" name="uv" type="Vector2">
- </argument>
- <description>
- The next vertex's UV.
- </description>
- </method>
- <method name="set_uv2">
- <return type="void">
- </return>
- <argument index="0" name="uv" type="Vector2">
- </argument>
- <description>
- The next vertex's second layer UV.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/ImmediateMesh.xml b/doc/classes/ImmediateMesh.xml
new file mode 100644
index 0000000000..d2ae091cad
--- /dev/null
+++ b/doc/classes/ImmediateMesh.xml
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ImmediateMesh" inherits="Mesh" version="4.0">
+ <brief_description>
+ Mesh optimized for creating geometry manually.
+ </brief_description>
+ <description>
+ Mesh optimized for creating geometry manually, similar to OpenGL1.x immediate mode.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="clear_surfaces">
+ <return type="void">
+ </return>
+ <description>
+ Clear all surfaces.
+ </description>
+ </method>
+ <method name="surface_add_vertex">
+ <return type="void">
+ </return>
+ <argument index="0" name="vertex" type="Vector3">
+ </argument>
+ <description>
+ Add a 3D vertex using the current attributes previously set.
+ </description>
+ </method>
+ <method name="surface_add_vertex_2d">
+ <return type="void">
+ </return>
+ <argument index="0" name="vertex" type="Vector2">
+ </argument>
+ <description>
+ Add a 2D vertex using the current attributes previously set.
+ </description>
+ </method>
+ <method name="surface_begin">
+ <return type="void">
+ </return>
+ <argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType">
+ </argument>
+ <argument index="1" name="material" type="Material" default="null">
+ </argument>
+ <description>
+ Begin a new surface.
+ </description>
+ </method>
+ <method name="surface_end">
+ <return type="void">
+ </return>
+ <description>
+ End and commit current surface. Note that surface being created will not be visible until this function is called.
+ </description>
+ </method>
+ <method name="surface_set_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="color" type="Color">
+ </argument>
+ <description>
+ Set the color attribute that will be pushed with the next vertex.
+ </description>
+ </method>
+ <method name="surface_set_normal">
+ <return type="void">
+ </return>
+ <argument index="0" name="normal" type="Vector3">
+ </argument>
+ <description>
+ Set the normal attribute that will be pushed with the next vertex.
+ </description>
+ </method>
+ <method name="surface_set_tangent">
+ <return type="void">
+ </return>
+ <argument index="0" name="tangent" type="Plane">
+ </argument>
+ <description>
+ Set the tangent attribute that will be pushed with the next vertex.
+ </description>
+ </method>
+ <method name="surface_set_uv">
+ <return type="void">
+ </return>
+ <argument index="0" name="uv" type="Vector2">
+ </argument>
+ <description>
+ Set the UV attribute that will be pushed with the next vertex.
+ </description>
+ </method>
+ <method name="surface_set_uv2">
+ <return type="void">
+ </return>
+ <argument index="0" name="uv2" type="Vector2">
+ </argument>
+ <description>
+ Set the UV2 attribute that will be pushed with the next vertex.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml
index 05a8bd268e..b970070659 100644
--- a/doc/classes/Input.xml
+++ b/doc/classes/Input.xml
@@ -123,7 +123,7 @@
</return>
<argument index="0" name="device" type="int">
</argument>
- <argument index="1" name="axis" type="int">
+ <argument index="1" name="axis" type="int" enum="JoyAxis">
</argument>
<description>
Returns the current value of the joypad axis at given index (see [enum JoyAxis]).
@@ -252,7 +252,7 @@
</return>
<argument index="0" name="device" type="int">
</argument>
- <argument index="1" name="button" type="int">
+ <argument index="1" name="button" type="int" enum="JoyButton">
</argument>
<description>
Returns [code]true[/code] if you are pressing the joypad button (see [enum JoyButton]).
@@ -279,7 +279,7 @@
<method name="is_mouse_button_pressed" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="button" type="int">
+ <argument index="0" name="button" type="int" enum="MouseButton">
</argument>
<description>
Returns [code]true[/code] if you are pressing the mouse button specified with [enum MouseButton].
diff --git a/doc/classes/InputEvent.xml b/doc/classes/InputEvent.xml
index 0c8db0de73..c28c4c4282 100644
--- a/doc/classes/InputEvent.xml
+++ b/doc/classes/InputEvent.xml
@@ -90,20 +90,23 @@
Returns [code]true[/code] if this input event is an echo event (only for events of type [InputEventKey]).
</description>
</method>
- <method name="is_pressed" qualifiers="const">
+ <method name="is_match" qualifiers="const">
<return type="bool">
</return>
+ <argument index="0" name="event" type="InputEvent">
+ </argument>
+ <argument index="1" name="exact_match" type="bool" default="true">
+ </argument>
<description>
- Returns [code]true[/code] if this input event is pressed. Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag].
+ Returns [code]true[/code] if the specified [code]event[/code] matches this event. Only valid for action events i.e key ([InputEventKey]), button ([InputEventMouseButton] or [InputEventJoypadButton]), axis [InputEventJoypadMotion] or action ([InputEventAction]) events.
+ If [code]exact_match[/code] is [code]false[/code], it ignores the input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
</description>
</method>
- <method name="shortcut_match" qualifiers="const">
+ <method name="is_pressed" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="event" type="InputEvent">
- </argument>
<description>
- Returns [code]true[/code] if the given input event is checking for the same key ([InputEventKey]), button ([InputEventJoypadButton]) or action ([InputEventAction]).
+ Returns [code]true[/code] if this input event is pressed. Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag].
</description>
</method>
<method name="xformed_by" qualifiers="const">
diff --git a/doc/classes/InputEventJoypadButton.xml b/doc/classes/InputEventJoypadButton.xml
index b1f4836f6e..f9afe42a7a 100644
--- a/doc/classes/InputEventJoypadButton.xml
+++ b/doc/classes/InputEventJoypadButton.xml
@@ -12,7 +12,7 @@
<methods>
</methods>
<members>
- <member name="button_index" type="int" setter="set_button_index" getter="get_button_index" default="0">
+ <member name="button_index" type="int" setter="set_button_index" getter="get_button_index" enum="JoyButton" default="0">
Button identifier. One of the [enum JoyButton] button constants.
</member>
<member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" default="false">
diff --git a/doc/classes/InputEventJoypadMotion.xml b/doc/classes/InputEventJoypadMotion.xml
index 39fdb14016..398b9eb6f6 100644
--- a/doc/classes/InputEventJoypadMotion.xml
+++ b/doc/classes/InputEventJoypadMotion.xml
@@ -12,7 +12,7 @@
<methods>
</methods>
<members>
- <member name="axis" type="int" setter="set_axis" getter="get_axis" default="0">
+ <member name="axis" type="int" setter="set_axis" getter="get_axis" enum="JoyAxis" default="0">
Axis identifier. Use one of the [enum JoyAxis] axis constants.
</member>
<member name="axis_value" type="float" setter="set_axis_value" getter="get_axis_value" default="0.0">
diff --git a/doc/classes/InputEventMIDI.xml b/doc/classes/InputEventMIDI.xml
index 13bb9d8b85..afc9d476da 100644
--- a/doc/classes/InputEventMIDI.xml
+++ b/doc/classes/InputEventMIDI.xml
@@ -17,7 +17,7 @@
</member>
<member name="instrument" type="int" setter="set_instrument" getter="get_instrument" default="0">
</member>
- <member name="message" type="int" setter="set_message" getter="get_message" default="0">
+ <member name="message" type="int" setter="set_message" getter="get_message" enum="MIDIMessage" default="0">
</member>
<member name="pitch" type="int" setter="set_pitch" getter="get_pitch" default="0">
</member>
diff --git a/doc/classes/InputEventMouseButton.xml b/doc/classes/InputEventMouseButton.xml
index be71b42567..7a6c7410ef 100644
--- a/doc/classes/InputEventMouseButton.xml
+++ b/doc/classes/InputEventMouseButton.xml
@@ -12,7 +12,7 @@
<methods>
</methods>
<members>
- <member name="button_index" type="int" setter="set_button_index" getter="get_button_index" default="0">
+ <member name="button_index" type="int" setter="set_button_index" getter="get_button_index" enum="MouseButton" default="0">
The mouse button identifier, one of the [enum MouseButton] button or button wheel constants.
</member>
<member name="double_click" type="bool" setter="set_double_click" getter="is_double_click" default="false">
diff --git a/doc/classes/InstancePlaceholder.xml b/doc/classes/InstancePlaceholder.xml
index defd23afb1..934764b461 100644
--- a/doc/classes/InstancePlaceholder.xml
+++ b/doc/classes/InstancePlaceholder.xml
@@ -4,7 +4,7 @@
Placeholder for the root [Node] of a [PackedScene].
</brief_description>
<description>
- Turning on the option [b]Load As Placeholder[/b] for an instanced scene in the editor causes it to be replaced by an [InstancePlaceholder] when running the game. This makes it possible to delay actually loading the scene until calling [method create_instance]. This is useful to avoid loading large scenes all at once by loading parts of it selectively.
+ Turning on the option [b]Load As Placeholder[/b] for an instantiated scene in the editor causes it to be replaced by an [InstancePlaceholder] when running the game. This makes it possible to delay actually loading the scene until calling [method create_instance]. This is useful to avoid loading large scenes all at once by loading parts of it selectively.
The [InstancePlaceholder] does not have a transform. This causes any child nodes to be positioned relatively to the [Viewport] from point (0,0), rather than their parent as displayed in the editor. Replacing the placeholder with a scene with a transform will transform children relatively to their parent again.
</description>
<tutorials>
diff --git a/doc/classes/IntervalTweener.xml b/doc/classes/IntervalTweener.xml
new file mode 100644
index 0000000000..1c59003c70
--- /dev/null
+++ b/doc/classes/IntervalTweener.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="IntervalTweener" inherits="Tweener" version="4.0">
+ <brief_description>
+ Creates an idle interval in a [Tween] animation.
+ </brief_description>
+ <description>
+ [IntervalTweener] is used to make delays in a tweening sequence. See [method Tween.tween_interval] for more usage information.
+ [b]Note:[/b] [method Tween.tween_interval] is the only correct way to create [IntervalTweener]. Any [IntervalTweener] created manually will not function correctly.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/JSON.xml b/doc/classes/JSON.xml
index 7baff7aa39..b95aaed143 100644
--- a/doc/classes/JSON.xml
+++ b/doc/classes/JSON.xml
@@ -1,45 +1,88 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="JSON" inherits="Object" version="4.0">
+<class name="JSON" inherits="RefCounted" version="4.0">
<brief_description>
- Helper class for parsing JSON data.
+ Helper class for creating and parsing JSON data.
</brief_description>
<description>
- Helper class for parsing JSON data. For usage example and other important hints, see [JSONParseResult].
+ The [JSON] enables all data types to be converted to and from a JSON string. This useful for serializing data to save to a file or send over the network.
+ [method stringify] is used to convert any data type into a JSON string.
+ [method parse] is used to convert any existing JSON data into a [Variant] that can be used within Godot. If successfully parsed, use [method get_data] to retrieve the [Variant], and use [code]typeof[/code] to check if the Variant's type is what you expect. JSON Objects are converted into a [Dictionary], but JSON data can be used to store [Array]s, numbers, [String]s and even just a boolean.
+ [b]Example[/b]
+ [codeblock]
+ var data_to_send = ["a", "b", "c"]
+ var json = JSON.new()
+ var json_string = json.stringify(data_to_send)
+ # Save data
+ # ...
+ # Retrieve data
+ var error = json.parse(json_string)
+ if error == OK:
+ var data_received = json.get_data()
+ if typeof(data_received) == TYPE_ARRAY:
+ print(data_received) # Prints array
+ else:
+ print("Unexpected data")
+ else:
+ print("JSON Parse Error: ", json.get_error_message(), " in ", json_string, " at line ", json.get_error_line())
+ [/codeblock]
</description>
<tutorials>
</tutorials>
<methods>
+ <method name="get_data" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <description>
+ Returns the [Variant] containing the data of a successful [method parse].
+ [b]Note:[/b] It will return [code]Null[/code] if the last call to parse was unsuccessful or [method parse] has not yet been called.
+ </description>
+ </method>
+ <method name="get_error_line" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns [code]0[/code] if the last call to [method parse] was successful, or the line number where the parse failed.
+ </description>
+ </method>
+ <method name="get_error_message" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Returns an empty string if the last call to [method parse] was successful, or the error message if it failed.
+ </description>
+ </method>
<method name="parse">
- <return type="JSONParseResult">
+ <return type="int" enum="Error">
</return>
- <argument index="0" name="json" type="String">
+ <argument index="0" name="json_string" type="String">
</argument>
<description>
- Parses a JSON-encoded string and returns a [JSONParseResult] containing the result.
+ Attempts to parse the [code]json_string[/code] provided.
+ Returns an [enum Error]. If the parse was successful, it returns [code]OK[/code] and the result can be retrieved using [method get_data]. If unsuccessful, use [method get_error_line] and [method get_error_message] for identifying the source of the failure.
</description>
</method>
- <method name="print">
+ <method name="stringify">
<return type="String">
</return>
- <argument index="0" name="value" type="Variant">
+ <argument index="0" name="data" type="Variant">
</argument>
<argument index="1" name="indent" type="String" default="&quot;&quot;">
</argument>
- <argument index="2" name="sort_keys" type="bool" default="false">
+ <argument index="2" name="sort_keys" type="bool" default="true">
</argument>
<argument index="3" name="full_precision" type="bool" default="false">
</argument>
<description>
Converts a [Variant] var to JSON text and returns the result. Useful for serializing data to store or send over the network.
[b]Note:[/b] The JSON specification does not define integer or float types, but only a [i]number[/i] type. Therefore, converting a Variant to JSON text will convert all numerical values to [float] types.
- [b]Note:[/b] If [code]full_precision[/code] is true, when printing floats, the unreliable digits are printed in addition to the reliable digits to guarantee exact decoding.
- Use [code]indent[/code] parameter to pretty print the output.
+ [b]Note:[/b] If [code]full_precision[/code] is true, when stringifying floats, the unreliable digits are stringified in addition to the reliable digits to guarantee exact decoding.
+ Use [code]indent[/code] parameter to pretty stringify the output.
[b]Example output:[/b]
[codeblock]
- ## JSON.print(my_dictionary)
+ ## JSON.stringify(my_dictionary)
{"name":"my_dictionary","version":"1.0.0","entities":[{"name":"entity_0","value":"value_0"},{"name":"entity_1","value":"value_1"}]}
- ## JSON.print(my_dictionary, "\t")
+ ## JSON.stringify(my_dictionary, "\t")
{
"name": "my_dictionary",
"version": "1.0.0",
diff --git a/doc/classes/JSONParseResult.xml b/doc/classes/JSONParseResult.xml
deleted file mode 100644
index 7311343b68..0000000000
--- a/doc/classes/JSONParseResult.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="JSONParseResult" inherits="RefCounted" version="4.0">
- <brief_description>
- Data class wrapper for decoded JSON.
- </brief_description>
- <description>
- Returned by [method JSON.parse], [JSONParseResult] contains the decoded JSON or error information if the JSON source wasn't successfully parsed. You can check if the JSON source was successfully parsed with [code]if json_result.error == OK[/code].
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <members>
- <member name="error" type="int" setter="set_error" getter="get_error" enum="Error">
- The error type if the JSON source was not successfully parsed. See the [enum Error] constants.
- </member>
- <member name="error_line" type="int" setter="set_error_line" getter="get_error_line" default="-1">
- The line number where the error occurred if the JSON source was not successfully parsed.
- </member>
- <member name="error_string" type="String" setter="set_error_string" getter="get_error_string" default="&quot;&quot;">
- The error message if the JSON source was not successfully parsed. See the [enum Error] constants.
- </member>
- <member name="result" type="Variant" setter="set_result" getter="get_result">
- A [Variant] containing the parsed JSON. Use [method @GlobalScope.typeof] or the [code]is[/code] keyword to check if it is what you expect. For example, if the JSON source starts with curly braces ([code]{}[/code]), a [Dictionary] will be returned. If the JSON source starts with brackets ([code][][/code]), an [Array] will be returned.
- [b]Note:[/b] The JSON specification does not define integer or float types, but only a [i]number[/i] type. Therefore, parsing a JSON text will convert all numerical values to [float] types.
- [b]Note:[/b] JSON objects do not preserve key order like Godot dictionaries, thus, you should not rely on keys being in a certain order if a dictionary is constructed from JSON. In contrast, JSON arrays retain the order of their elements:
- [codeblocks]
- [gdscript]
- var p = JSON.parse('["hello", "world", "!"]')
- if typeof(p.result) == TYPE_ARRAY:
- print(p.result[0]) # Prints "hello"
- else:
- push_error("Unexpected results.")
- [/gdscript]
- [csharp]
- JSONParseResult p = JSON.Parse("[\"hello\"], \"world\", \"!\"]");
- if (p.Result is Godot.Collections.Array)
- {
- GD.Print((p.Result as Godot.Collections.Array)[0]); // Prints "hello"
- }
- else
- {
- GD.PushError("Unexpected results.");
- }
- [/csharp]
- [/codeblocks]
- </member>
- </members>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/JSONParser.xml b/doc/classes/JSONParser.xml
deleted file mode 100644
index 991629f255..0000000000
--- a/doc/classes/JSONParser.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="JSONParser" inherits="RefCounted" version="4.0">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- <method name="decode_data">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="data" type="Variant">
- </argument>
- <argument index="1" name="indent" type="String" default="&quot;&quot;">
- </argument>
- <argument index="2" name="sort_keys" type="bool" default="true">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_data" qualifiers="const">
- <return type="Variant">
- </return>
- <description>
- </description>
- </method>
- <method name="get_error_line" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_error_text" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_string" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="parse_string">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="json_string" type="String">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml
index ee59f0c85a..0789ac9010 100644
--- a/doc/classes/Label.xml
+++ b/doc/classes/Label.xml
@@ -79,7 +79,7 @@
If [code]true[/code], wraps the text inside the node's bounding rectangle. If you resize the node, it will change its height automatically to show all the text.
</member>
<member name="clip_text" type="bool" setter="set_clip_text" getter="is_clipping_text" default="false">
- If [code]true[/code], the Label only shows the text that fits inside its bounding rectangle. It also lets you scale the node down freely.
+ If [code]true[/code], the Label only shows the text that fits inside its bounding rectangle and will clip text horizontally.
</member>
<member name="language" type="String" setter="set_language" getter="get_language" default="&quot;&quot;">
Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
diff --git a/doc/classes/Light3D.xml b/doc/classes/Light3D.xml
index 84abf57cb6..815d20223d 100644
--- a/doc/classes/Light3D.xml
+++ b/doc/classes/Light3D.xml
@@ -4,7 +4,7 @@
Provides a base class for different kinds of light nodes.
</brief_description>
<description>
- Light3D is the [i]abstract[/i] base class for light nodes. As it can't be instanced, it shouldn't be used directly. Other types of light nodes inherit from it. Light3D contains the common variables and parameters used for lighting.
+ Light3D is the [i]abstract[/i] base class for light nodes. As it can't be instantiated, it shouldn't be used directly. Other types of light nodes inherit from it. Light3D contains the common variables and parameters used for lighting.
</description>
<tutorials>
<link title="3D lights and shadows">https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html</link>
diff --git a/doc/classes/LineShape2D.xml b/doc/classes/LineShape2D.xml
index fed5773583..434e6fba8e 100644
--- a/doc/classes/LineShape2D.xml
+++ b/doc/classes/LineShape2D.xml
@@ -14,8 +14,8 @@
<member name="distance" type="float" setter="set_distance" getter="get_distance" default="0.0">
The line's distance from the origin.
</member>
- <member name="normal" type="Vector2" setter="set_normal" getter="get_normal" default="Vector2(0, 1)">
- The line's normal.
+ <member name="normal" type="Vector2" setter="set_normal" getter="get_normal" default="Vector2(0, -1)">
+ The line's normal. Defaults to [code]Vector2.UP[/code].
</member>
</members>
<constants>
diff --git a/doc/classes/MeshDataTool.xml b/doc/classes/MeshDataTool.xml
index da02511dc0..c0ee1e1956 100644
--- a/doc/classes/MeshDataTool.xml
+++ b/doc/classes/MeshDataTool.xml
@@ -45,7 +45,7 @@
AddChild(mi);
[/csharp]
[/codeblocks]
- See also [ArrayMesh], [ImmediateGeometry3D] and [SurfaceTool] for procedural geometry generation.
+ See also [ArrayMesh], [ImmediateMesh] and [SurfaceTool] for procedural geometry generation.
[b]Note:[/b] Godot uses clockwise [url=https://learnopengl.com/Advanced-OpenGL/Face-culling]winding order[/url] for front faces of triangle primitive modes.
</description>
<tutorials>
diff --git a/doc/classes/MeshInstance3D.xml b/doc/classes/MeshInstance3D.xml
index b5ab296bd0..7c4e75793e 100644
--- a/doc/classes/MeshInstance3D.xml
+++ b/doc/classes/MeshInstance3D.xml
@@ -4,7 +4,7 @@
Node that instances meshes into a scenario.
</brief_description>
<description>
- MeshInstance3D is a node that takes a [Mesh] resource and adds it to the current scenario by creating an instance of it. This is the class most often used render 3D geometry and can be used to instance a single [Mesh] in many places. This allows reuse of geometry which can save on resources. When a [Mesh] has to be instanced more than thousands of times at close proximity, consider using a [MultiMesh] in a [MultiMeshInstance3D] instead.
+ MeshInstance3D is a node that takes a [Mesh] resource and adds it to the current scenario by creating an instance of it. This is the class most often used render 3D geometry and can be used to instance a single [Mesh] in many places. This allows reuse of geometry which can save on resources. When a [Mesh] has to be instantiated more than thousands of times at close proximity, consider using a [MultiMesh] in a [MultiMeshInstance3D] instead.
</description>
<tutorials>
<link title="3D Material Testers Demo">https://godotengine.org/asset-library/asset/123</link>
diff --git a/doc/classes/MethodTweener.xml b/doc/classes/MethodTweener.xml
new file mode 100644
index 0000000000..42b91abf93
--- /dev/null
+++ b/doc/classes/MethodTweener.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="MethodTweener" inherits="Tweener" version="4.0">
+ <brief_description>
+ Interpolates an abstract value and supplies it to a method called over time.
+ </brief_description>
+ <description>
+ [MethodTweener] is similar to a combination of [CallbackTweener] and [PropertyTweener]. It calls a method providing an interpolated value as a paramater. See [method Tween.tween_method] for more usage information.
+ [b]Note:[/b] [method Tween.tween_method] is the only correct way to create [MethodTweener]. Any [MethodTweener] created manually will not function correctly.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="set_delay">
+ <return type="MethodTweener">
+ </return>
+ <argument index="0" name="delay" type="float">
+ </argument>
+ <description>
+ Sets the time in seconds after which the [MethodTweener] will start interpolating. By default there's no delay.
+ </description>
+ </method>
+ <method name="set_ease">
+ <return type="MethodTweener">
+ </return>
+ <argument index="0" name="ease" type="int" enum="Tween.EaseType">
+ </argument>
+ <description>
+ Sets the type of used easing from [enum Tween.EaseType]. If not set, the default easing is used from the [Tween] that contains this Tweener.
+ </description>
+ </method>
+ <method name="set_trans">
+ <return type="MethodTweener">
+ </return>
+ <argument index="0" name="trans" type="int" enum="Tween.TransitionType">
+ </argument>
+ <description>
+ Sets the type of used transition from [enum Tween.TransitionType]. If not set, the default transition is used from the [Tween] that contains this Tweener.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/NativeExtension.xml b/doc/classes/NativeExtension.xml
new file mode 100644
index 0000000000..c48af7df7b
--- /dev/null
+++ b/doc/classes/NativeExtension.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="NativeExtension" inherits="RefCounted" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="close_library">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_minimum_library_initialization_level" qualifiers="const">
+ <return type="int" enum="NativeExtension.InitializationLevel">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="initialize_library">
+ <return type="void">
+ </return>
+ <argument index="0" name="level" type="int" enum="NativeExtension.InitializationLevel">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="is_library_open" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="open_library">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <argument index="1" name="entry_symbol" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="INITIALIZATION_LEVEL_CORE" value="0" enum="InitializationLevel">
+ </constant>
+ <constant name="INITIALIZATION_LEVEL_SERVERS" value="1" enum="InitializationLevel">
+ </constant>
+ <constant name="INITIALIZATION_LEVEL_SCENE" value="2" enum="InitializationLevel">
+ </constant>
+ <constant name="INITIALIZATION_LEVEL_EDITOR" value="3" enum="InitializationLevel">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/NativeExtensionManager.xml b/doc/classes/NativeExtensionManager.xml
new file mode 100644
index 0000000000..ba9018ff4c
--- /dev/null
+++ b/doc/classes/NativeExtensionManager.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="NativeExtensionManager" inherits="Object" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="get_extension">
+ <return type="NativeExtension">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_loaded_extensions" qualifiers="const">
+ <return type="PackedStringArray">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="load_extension">
+ <return type="int" enum="NativeExtensionManager.LoadStatus">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="reload_extension">
+ <return type="int" enum="NativeExtensionManager.LoadStatus">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="unload_extension">
+ <return type="int" enum="NativeExtensionManager.LoadStatus">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="LOAD_STATUS_OK" value="0" enum="LoadStatus">
+ </constant>
+ <constant name="LOAD_STATUS_FAILED" value="1" enum="LoadStatus">
+ </constant>
+ <constant name="LOAD_STATUS_ALREADY_LOADED" value="2" enum="LoadStatus">
+ </constant>
+ <constant name="LOAD_STATUS_NOT_LOADED" value="3" enum="LoadStatus">
+ </constant>
+ <constant name="LOAD_STATUS_NEEDS_RESTART" value="4" enum="LoadStatus">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml
index 7a9cb702e3..88e69968d2 100644
--- a/doc/classes/Node.xml
+++ b/doc/classes/Node.xml
@@ -5,13 +5,13 @@
</brief_description>
<description>
Nodes are Godot's building blocks. They can be assigned as the child of another node, resulting in a tree arrangement. A given node can contain any number of nodes as children with the requirement that all siblings (direct children of a node) should have unique names.
- A tree of nodes is called a [i]scene[/i]. Scenes can be saved to the disk and then instanced into other scenes. This allows for very high flexibility in the architecture and data model of Godot projects.
+ A tree of nodes is called a [i]scene[/i]. Scenes can be saved to the disk and then instantiated into other scenes. This allows for very high flexibility in the architecture and data model of Godot projects.
[b]Scene tree:[/b] The [SceneTree] contains the active tree of nodes. When a node is added to the scene tree, it receives the [constant NOTIFICATION_ENTER_TREE] notification and its [method _enter_tree] callback is triggered. Child nodes are always added [i]after[/i] their parent node, i.e. the [method _enter_tree] callback of a parent node will be triggered before its child's.
Once all nodes have been added in the scene tree, they receive the [constant NOTIFICATION_READY] notification and their respective [method _ready] callbacks are triggered. For groups of nodes, the [method _ready] callback is called in reverse order, starting with the children and moving up to the parent nodes.
This means that when adding a node to the scene tree, the following order will be used for the callbacks: [method _enter_tree] of the parent, [method _enter_tree] of the children, [method _ready] of the children and finally [method _ready] of the parent (recursively for the entire scene tree).
[b]Processing:[/b] Nodes can override the "process" state, so that they receive a callback on each frame requesting them to process (do something). Normal processing (callback [method _process], toggled with [method set_process]) happens as fast as possible and is dependent on the frame rate, so the processing time [i]delta[/i] (in seconds) is passed as an argument. Physics processing (callback [method _physics_process], toggled with [method set_physics_process]) happens a fixed number of times per second (60 by default) and is useful for code related to the physics engine.
Nodes can also process input events. When present, the [method _input] function will be called for each input that the program receives. In many cases, this can be overkill (unless used for simple projects), and the [method _unhandled_input] function might be preferred; it is called when the input event was not handled by anyone else (typically, GUI [Control] nodes), ensuring that the node only receives the events that were meant for it.
- To keep track of the scene hierarchy (especially when instancing scenes into other scenes), an "owner" can be set for the node with the [member owner] property. This keeps track of who instanced what. This is mostly useful when writing editors and tools, though.
+ To keep track of the scene hierarchy (especially when instancing scenes into other scenes), an "owner" can be set for the node with the [member owner] property. This keeps track of who instantiated what. This is mostly useful when writing editors and tools, though.
Finally, when a node is freed with [method Object.free] or [method queue_free], it will also free all its children.
[b]Groups:[/b] Nodes can be added to as many groups as you want to be easy to manage, you could create groups like "enemies" or "collectables" for example, depending on your game. See [method add_to_group], [method is_in_group] and [method remove_from_group]. You can then retrieve all nodes in these groups, iterate them and even call methods on groups via the methods on [SceneTree].
[b]Networking with nodes:[/b] After connecting to a server (or making one, see [NetworkedMultiplayerENet]), it is possible to use the built-in RPC (remote procedure call) system to communicate over the network. By calling [method rpc] with a method name, it will be called locally and in all connected peers (peers = clients and the server that accepts connections). To identify which node receives the RPC call, Godot will use its [NodePath] (make sure node names are the same on all peers). Also, take a look at the high-level networking tutorial and corresponding demos.
@@ -128,7 +128,7 @@
</argument>
<description>
Adds a child node. Nodes can have any number of children, but every child must have a unique name. Child nodes are automatically deleted when the parent node is deleted, so an entire scene can be removed by deleting its topmost node.
- If [code]legible_unique_name[/code] is [code]true[/code], the child node will have a human-readable name based on the name of the node being instanced instead of its type.
+ If [code]legible_unique_name[/code] is [code]true[/code], the child node will have a human-readable name based on the name of the node being instantiated instead of its type.
[b]Note:[/b] If the child node already has a parent, the function will fail. Use [method remove_child] first to remove the node from its current parent. For example:
[codeblocks]
[gdscript]
@@ -159,7 +159,7 @@
</argument>
<description>
Adds a [code]sibling[/code] node to current's node parent, at the same level as that node, right below it.
- If [code]legible_unique_name[/code] is [code]true[/code], the child node will have a human-readable name based on the name of the node being instanced instead of its type.
+ If [code]legible_unique_name[/code] is [code]true[/code], the child node will have a human-readable name based on the name of the node being instantiated instead of its type.
Use [method add_child] instead of this method if you don't need the child node to be added below a specific node in the list of children.
</description>
</method>
@@ -182,6 +182,16 @@
Returns [code]true[/code] if the node can process while the scene tree is paused (see [member process_mode]). Always returns [code]true[/code] if the scene tree is not paused, and [code]false[/code] if the node is not in the tree.
</description>
</method>
+ <method name="create_tween">
+ <return type="Tween">
+ </return>
+ <description>
+ Creates a new [Tween] and binds it to this node. This is equivalent of doing:
+ [codeblock]
+ get_tree().create_tween().bind_node(self)
+ [/codeblock]
+ </description>
+ </method>
<method name="duplicate" qualifiers="const">
<return type="Node">
</return>
@@ -416,7 +426,7 @@
Returns [code]true[/code] if the [NodePath] points to a valid node and its subname points to a valid resource, e.g. [code]Area2D/CollisionShape2D:shape[/code]. Properties with a non-[Resource] type (e.g. nodes or primitive math types) are not considered resources.
</description>
</method>
- <method name="is_a_parent_of" qualifiers="const">
+ <method name="is_ancestor_of" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="node" type="Node">
@@ -795,7 +805,7 @@
The override to the default [MultiplayerAPI]. Set to [code]null[/code] to use the default [SceneTree] one.
</member>
<member name="filename" type="String" setter="set_filename" getter="get_filename">
- When a scene is instanced from a file, its topmost node contains the filename from which it was loaded.
+ When a scene is instantiated from a file, its topmost node contains the filename from which it was loaded.
</member>
<member name="multiplayer" type="MultiplayerAPI" setter="" getter="get_multiplayer">
The [MultiplayerAPI] instance associated with this node. Either the [member custom_multiplayer], or the default SceneTree one (if inside tree).
@@ -874,7 +884,7 @@
Notification received when a node is unparented (parent removed it from the list of children).
</constant>
<constant name="NOTIFICATION_INSTANCED" value="20">
- Notification received when the node is instanced.
+ Notification received when the node is instantiated.
</constant>
<constant name="NOTIFICATION_DRAG_BEGIN" value="21">
Notification received when a drag begins.
diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml
index cc99abf9cb..9ffa333f17 100644
--- a/doc/classes/Node2D.xml
+++ b/doc/classes/Node2D.xml
@@ -122,9 +122,6 @@
<member name="global_rotation" type="float" setter="set_global_rotation" getter="get_global_rotation">
Global rotation in radians.
</member>
- <member name="global_rotation_degrees" type="float" setter="set_global_rotation_degrees" getter="get_global_rotation_degrees">
- Global rotation in degrees.
- </member>
<member name="global_scale" type="Vector2" setter="set_global_scale" getter="get_global_scale">
Global scale.
</member>
@@ -137,16 +134,11 @@
<member name="rotation" type="float" setter="set_rotation" getter="get_rotation" default="0.0">
Rotation in radians, relative to the node's parent.
</member>
- <member name="rotation_degrees" type="float" setter="set_rotation_degrees" getter="get_rotation_degrees" default="0.0">
- Rotation in degrees, relative to the node's parent.
- </member>
<member name="scale" type="Vector2" setter="set_scale" getter="get_scale" default="Vector2(1, 1)">
The node's scale. Unscaled value: [code](1, 1)[/code].
</member>
<member name="skew" type="float" setter="set_skew" getter="get_skew" default="0.0">
</member>
- <member name="skew_degrees" type="float" setter="set_skew_degrees" getter="get_skew_degrees" default="0.0">
- </member>
<member name="transform" type="Transform2D" setter="set_transform" getter="get_transform">
Local [Transform2D].
</member>
diff --git a/doc/classes/Node3D.xml b/doc/classes/Node3D.xml
index 2dc8659d5d..14e03a2186 100644
--- a/doc/classes/Node3D.xml
+++ b/doc/classes/Node3D.xml
@@ -294,13 +294,10 @@
<member name="position" type="Vector3" setter="set_position" getter="get_position" default="Vector3(0, 0, 0)">
Local position or translation of this node relative to the parent. This is equivalent to [code]transform.origin[/code].
</member>
- <member name="rotation" type="Vector3" setter="set_rotation" getter="get_rotation">
+ <member name="rotation" type="Vector3" setter="set_rotation" getter="get_rotation" default="Vector3(0, 0, 0)">
Rotation part of the local transformation in radians, specified in terms of YXZ-Euler angles in the format (X angle, Y angle, Z angle).
[b]Note:[/b] In the mathematical sense, rotation is a matrix and not a vector. The three Euler angles, which are the three independent parameters of the Euler-angle parametrization of the rotation matrix, are stored in a [Vector3] data structure not because the rotation is a vector, but only because [Vector3] exists as a convenient data-structure to store 3 floating-point numbers. Therefore, applying affine operations on the rotation "vector" is not meaningful.
</member>
- <member name="rotation_degrees" type="Vector3" setter="set_rotation_degrees" getter="get_rotation_degrees" default="Vector3(0, 0, 0)">
- Rotation part of the local transformation in degrees, specified in terms of YXZ-Euler angles in the format (X angle, Y angle, Z angle).
- </member>
<member name="scale" type="Vector3" setter="set_scale" getter="get_scale" default="Vector3(1, 1, 1)">
Scale part of the local transformation.
</member>
diff --git a/doc/classes/NodePath.xml b/doc/classes/NodePath.xml
index 817ccd5160..0ba2e73ad4 100644
--- a/doc/classes/NodePath.xml
+++ b/doc/classes/NodePath.xml
@@ -20,6 +20,7 @@
@"/root/Main" # If your main scene's root node were named "Main".
@"/root/MyAutoload" # If you have an autoloaded node or scene.
[/codeblock]
+ [b]Note:[/b] In the editor, [NodePath] properties are automatically updated when moving, renaming or deleting a node in the scene tree, but they are never updated at runtime.
</description>
<tutorials>
<link title="2D Role Playing Game Demo">https://godotengine.org/asset-library/asset/520</link>
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index 0789a7d231..a9396306f4 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -136,6 +136,14 @@
Returns the keycode of the given string (e.g. "Escape").
</description>
</method>
+ <method name="get_cache_dir" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Returns the [i]global[/i] cache data directory according to the operating system's standards. On desktop platforms, this path can be overridden by setting the [code]XDG_CACHE_HOME[/code] environment variable before starting the project. See [url=https://docs.godotengine.org/en/latest/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_config_dir] and [method get_data_dir].
+ Not to be confused with [method get_user_data_dir], which returns the [i]project-specific[/i] user data path.
+ </description>
+ </method>
<method name="get_cmdline_args">
<return type="PackedStringArray">
</return>
@@ -167,6 +175,14 @@
[/codeblocks]
</description>
</method>
+ <method name="get_config_dir" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Returns the [i]global[/i] user configuration directory according to the operating system's standards. On desktop platforms, this path can be overridden by setting the [code]XDG_CONFIG_HOME[/code] environment variable before starting the project. See [url=https://docs.godotengine.org/en/latest/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_cache_dir] and [method get_data_dir].
+ Not to be confused with [method get_user_data_dir], which returns the [i]project-specific[/i] user data path.
+ </description>
+ </method>
<method name="get_connected_midi_inputs">
<return type="PackedStringArray">
</return>
@@ -176,6 +192,14 @@
[b]Note:[/b] This method is implemented on Linux, macOS and Windows.
</description>
</method>
+ <method name="get_data_dir" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Returns the [i]global[/i] user data directory according to the operating system's standards. On desktop platforms, this path can be overridden by setting the [code]XDG_DATA_HOME[/code] environment variable before starting the project. See [url=https://docs.godotengine.org/en/latest/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_cache_dir] and [method get_config_dir].
+ Not to be confused with [method get_user_data_dir], which returns the [i]project-specific[/i] user data path.
+ </description>
+ </method>
<method name="get_environment" qualifiers="const">
<return type="String">
</return>
@@ -310,6 +334,7 @@
On macOS, this is [code]~/Library/Application Support/Godot/app_userdata/[project_name][/code], or [code]~/Library/Application Support/[custom_name][/code] if [code]use_custom_user_dir[/code] is set.
On Windows, this is [code]%APPDATA%\Godot\app_userdata\[project_name][/code], or [code]%APPDATA%\[custom_name][/code] if [code]use_custom_user_dir[/code] is set. [code]%APPDATA%[/code] expands to [code]%USERPROFILE%\AppData\Roaming[/code].
If the project name is empty, [code]user://[/code] falls back to [code]res://[/code].
+ Not to be confused with [method get_data_dir], which returns the [i]global[/i] (non-project-specific) user data directory.
</description>
</method>
<method name="has_environment" qualifiers="const">
diff --git a/doc/classes/PackedScene.xml b/doc/classes/PackedScene.xml
index 5887238a32..f39cae8be5 100644
--- a/doc/classes/PackedScene.xml
+++ b/doc/classes/PackedScene.xml
@@ -11,13 +11,13 @@
[codeblocks]
[gdscript]
# Use load() instead of preload() if the path isn't known at compile-time.
- var scene = preload("res://scene.tscn").instance()
+ var scene = preload("res://scene.tscn").instantiate()
# Add the node as a child of the node the script is attached to.
add_child(scene)
[/gdscript]
[csharp]
// C# has no preload, so you have to always use ResourceLoader.Load&lt;PackedScene&gt;().
- var scene = ResourceLoader.Load&lt;PackedScene&gt;("res://scene.tscn").Instance();
+ var scene = ResourceLoader.Load&lt;PackedScene&gt;("res://scene.tscn").Instantiate();
// Add the node as a child of the node the script is attached to.
AddChild(scene);
[/csharp]
@@ -76,7 +76,7 @@
<link title="2D Role Playing Game Demo">https://godotengine.org/asset-library/asset/520</link>
</tutorials>
<methods>
- <method name="can_instance" qualifiers="const">
+ <method name="can_instantiate" qualifiers="const">
<return type="bool">
</return>
<description>
@@ -90,7 +90,7 @@
Returns the [code]SceneState[/code] representing the scene file contents.
</description>
</method>
- <method name="instance" qualifiers="const">
+ <method name="instantiate" qualifiers="const">
<return type="Node">
</return>
<argument index="0" name="edit_state" type="int" enum="PackedScene.GenEditState" default="0">
@@ -117,14 +117,14 @@
</members>
<constants>
<constant name="GEN_EDIT_STATE_DISABLED" value="0" enum="GenEditState">
- If passed to [method instance], blocks edits to the scene state.
+ If passed to [method instantiate], blocks edits to the scene state.
</constant>
<constant name="GEN_EDIT_STATE_INSTANCE" value="1" enum="GenEditState">
- If passed to [method instance], provides local scene resources to the local scene.
+ If passed to [method instantiate], provides local scene resources to the local scene.
[b]Note:[/b] Only available in editor builds.
</constant>
<constant name="GEN_EDIT_STATE_MAIN" value="2" enum="GenEditState">
- If passed to [method instance], provides local scene resources to the local scene. Only the main scene should receive the main edit state.
+ If passed to [method instantiate], provides local scene resources to the local scene. Only the main scene should receive the main edit state.
[b]Note:[/b] Only available in editor builds.
</constant>
</constants>
diff --git a/doc/classes/Performance.xml b/doc/classes/Performance.xml
index ff73844803..b6013fa83e 100644
--- a/doc/classes/Performance.xml
+++ b/doc/classes/Performance.xml
@@ -157,13 +157,13 @@
Largest amount of memory the message queue buffer has used, in bytes. The message queue is used for deferred functions calls and notifications.
</constant>
<constant name="OBJECT_COUNT" value="6" enum="Monitor">
- Number of objects currently instanced (including nodes).
+ Number of objects currently instantiated (including nodes).
</constant>
<constant name="OBJECT_RESOURCE_COUNT" value="7" enum="Monitor">
Number of resources currently used.
</constant>
<constant name="OBJECT_NODE_COUNT" value="8" enum="Monitor">
- Number of nodes currently instanced in the scene tree. This also includes the root node.
+ Number of nodes currently instantiated in the scene tree. This also includes the root node.
</constant>
<constant name="OBJECT_ORPHAN_NODE_COUNT" value="9" enum="Monitor">
Number of orphan nodes, i.e. nodes which are not parented to a node of the scene tree.
diff --git a/doc/classes/PhysicalBone3D.xml b/doc/classes/PhysicalBone3D.xml
index 736b44ee1c..2ed862e9ce 100644
--- a/doc/classes/PhysicalBone3D.xml
+++ b/doc/classes/PhysicalBone3D.xml
@@ -66,12 +66,9 @@
<member name="joint_offset" type="Transform3D" setter="set_joint_offset" getter="get_joint_offset" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)">
Sets the joint's transform.
</member>
- <member name="joint_rotation" type="Vector3" setter="set_joint_rotation" getter="get_joint_rotation">
+ <member name="joint_rotation" type="Vector3" setter="set_joint_rotation" getter="get_joint_rotation" default="Vector3(0, 0, 0)">
Sets the joint's rotation in radians.
</member>
- <member name="joint_rotation_degrees" type="Vector3" setter="set_joint_rotation_degrees" getter="get_joint_rotation_degrees" default="Vector3(0, 0, 0)">
- Sets the joint's rotation in degrees.
- </member>
<member name="joint_type" type="int" setter="set_joint_type" getter="get_joint_type" enum="PhysicalBone3D.JointType" default="0">
Sets the joint type. See [enum JointType] for possible values.
</member>
diff --git a/doc/classes/PhysicsTestMotionResult2D.xml b/doc/classes/PhysicsTestMotionResult2D.xml
index da04ffa86a..bf3497386e 100644
--- a/doc/classes/PhysicsTestMotionResult2D.xml
+++ b/doc/classes/PhysicsTestMotionResult2D.xml
@@ -19,10 +19,16 @@
</member>
<member name="collider_velocity" type="Vector2" setter="" getter="get_collider_velocity" default="Vector2(0, 0)">
</member>
+ <member name="collision_depth" type="float" setter="" getter="get_collision_depth" default="0.0">
+ </member>
<member name="collision_normal" type="Vector2" setter="" getter="get_collision_normal" default="Vector2(0, 0)">
</member>
<member name="collision_point" type="Vector2" setter="" getter="get_collision_point" default="Vector2(0, 0)">
</member>
+ <member name="collision_safe_fraction" type="float" setter="" getter="get_collision_safe_fraction" default="0.0">
+ </member>
+ <member name="collision_unsafe_fraction" type="float" setter="" getter="get_collision_unsafe_fraction" default="0.0">
+ </member>
<member name="motion" type="Vector2" setter="" getter="get_motion" default="Vector2(0, 0)">
</member>
<member name="motion_remainder" type="Vector2" setter="" getter="get_motion_remainder" default="Vector2(0, 0)">
diff --git a/doc/classes/Plane.xml b/doc/classes/Plane.xml
index cca5793fc7..12869061c4 100644
--- a/doc/classes/Plane.xml
+++ b/doc/classes/Plane.xml
@@ -169,23 +169,23 @@
<description>
</description>
</method>
- <method name="operator +" qualifiers="operator">
- <return type="Plane">
+ <method name="operator ==" qualifiers="operator">
+ <return type="bool">
</return>
+ <argument index="0" name="right" type="Plane">
+ </argument>
<description>
</description>
</method>
- <method name="operator -" qualifiers="operator">
+ <method name="operator unary+" qualifiers="operator">
<return type="Plane">
</return>
<description>
</description>
</method>
- <method name="operator ==" qualifiers="operator">
- <return type="bool">
+ <method name="operator unary-" qualifiers="operator">
+ <return type="Plane">
</return>
- <argument index="0" name="right" type="Plane">
- </argument>
<description>
</description>
</method>
diff --git a/doc/classes/Polygon2D.xml b/doc/classes/Polygon2D.xml
index c33a1424a7..5a53063148 100644
--- a/doc/classes/Polygon2D.xml
+++ b/doc/classes/Polygon2D.xml
@@ -118,12 +118,9 @@
<member name="texture_offset" type="Vector2" setter="set_texture_offset" getter="get_texture_offset" default="Vector2(0, 0)">
Amount to offset the polygon's [code]texture[/code]. If [code](0, 0)[/code] the texture's origin (its top-left corner) will be placed at the polygon's [code]position[/code].
</member>
- <member name="texture_rotation" type="float" setter="set_texture_rotation" getter="get_texture_rotation">
+ <member name="texture_rotation" type="float" setter="set_texture_rotation" getter="get_texture_rotation" default="0.0">
The texture's rotation in radians.
</member>
- <member name="texture_rotation_degrees" type="float" setter="set_texture_rotation_degrees" getter="get_texture_rotation_degrees" default="0.0">
- The texture's rotation in degrees.
- </member>
<member name="texture_scale" type="Vector2" setter="set_texture_scale" getter="get_texture_scale" default="Vector2(1, 1)">
Amount to multiply the [code]uv[/code] coordinates when using a [code]texture[/code]. Larger values make the texture smaller, and vice versa.
</member>
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index 04d1af3f6a..1847a316e1 100644
--- a/doc/classes/ProjectSettings.xml
+++ b/doc/classes/ProjectSettings.xml
@@ -266,10 +266,12 @@
Icon set in [code].ico[/code] format used on Windows to set the game's icon. This is done automatically on start by calling [method DisplayServer.set_native_icon].
</member>
<member name="application/run/disable_stderr" type="bool" setter="" getter="" default="false">
- If [code]true[/code], disables printing to standard error in an exported build.
+ If [code]true[/code], disables printing to standard error. If [code]true[/code], this also hides error and warning messages printed by [method @GlobalScope.push_error] and [method @GlobalScope.push_warning]. See also [member application/run/disable_stdout].
+ Changes to this setting will only be applied upon restarting the application.
</member>
<member name="application/run/disable_stdout" type="bool" setter="" getter="" default="false">
- If [code]true[/code], disables printing to standard output in an exported build.
+ If [code]true[/code], disables printing to standard output. This is equivalent to starting the editor or project with the [code]--quiet[/code] command line argument. See also [member application/run/disable_stderr].
+ Changes to this setting will only be applied upon restarting the application.
</member>
<member name="application/run/flush_stdout_on_print" type="bool" setter="" getter="" default="false">
If [code]true[/code], flushes the standard output stream every time a line is printed. This affects both terminal logging and file logging.
diff --git a/doc/classes/PropertyTweener.xml b/doc/classes/PropertyTweener.xml
new file mode 100644
index 0000000000..1e77bb33c6
--- /dev/null
+++ b/doc/classes/PropertyTweener.xml
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PropertyTweener" inherits="Tweener" version="4.0">
+ <brief_description>
+ Interpolates an [Object]'s property over time.
+ </brief_description>
+ <description>
+ [PropertyTweener] is used to interpolate a property in an object. See [method Tween.tween_property] for more usage information.
+ [b]Note:[/b] [method Tween.tween_property] is the only correct way to create [PropertyTweener]. Any [PropertyTweener] created manually will not function correctly.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="as_relative">
+ <return type="PropertyTweener">
+ </return>
+ <description>
+ When called, the final value will be used as a relative value instead. Example:
+ [codeblock]
+ var tween = get_tree().create_tween()
+ tween.tween_property(self, "position", Vector2.RIGHT * 100, 1).as_relative() #the node will move by 100 pixels to the right
+ [/codeblock]
+ </description>
+ </method>
+ <method name="from">
+ <return type="PropertyTweener">
+ </return>
+ <argument index="0" name="value" type="Variant">
+ </argument>
+ <description>
+ Sets a custom initial value to the [PropertyTweener]. Example:
+ [codeblock]
+ var tween = get_tree().create_tween()
+ tween.tween_property(self, "position", Vector2(200, 100), 1).from(Vector2(100, 100) #this will move the node from position (100, 100) to (200, 100)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="from_current">
+ <return type="PropertyTweener">
+ </return>
+ <description>
+ Makes the [PropertyTweener] use the current property value (i.e. at the time of creating this [PropertyTweener]) as a starting point. This is equivalent of using [method from] with the current value. These two calls will do the same:
+ [codeblock]
+ tween.tween_property(self, "position", Vector2(200, 100), 1).from(position)
+ tween.tween_property(self, "position", Vector2(200, 100), 1).from_current()
+ [/codeblock]
+ </description>
+ </method>
+ <method name="set_delay">
+ <return type="PropertyTweener">
+ </return>
+ <argument index="0" name="delay" type="float">
+ </argument>
+ <description>
+ Sets the time in seconds after which the [PropertyTweener] will start interpolating. By default there's no delay.
+ </description>
+ </method>
+ <method name="set_ease">
+ <return type="PropertyTweener">
+ </return>
+ <argument index="0" name="ease" type="int" enum="Tween.EaseType">
+ </argument>
+ <description>
+ Sets the type of used easing from [enum Tween.EaseType]. If not set, the default easing is used from the [Tween] that contains this Tweener.
+ </description>
+ </method>
+ <method name="set_trans">
+ <return type="PropertyTweener">
+ </return>
+ <argument index="0" name="trans" type="int" enum="Tween.TransitionType">
+ </argument>
+ <description>
+ Sets the type of used transition from [enum Tween.TransitionType]. If not set, the default transition is used from the [Tween] that contains this Tweener.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Quaternion.xml b/doc/classes/Quaternion.xml
index 660204ee7d..06434ab268 100644
--- a/doc/classes/Quaternion.xml
+++ b/doc/classes/Quaternion.xml
@@ -177,17 +177,17 @@
</description>
</method>
<method name="operator *" qualifiers="operator">
- <return type="Quaternion">
+ <return type="Vector3">
</return>
- <argument index="0" name="right" type="Quaternion">
+ <argument index="0" name="right" type="Vector3">
</argument>
<description>
</description>
</method>
<method name="operator *" qualifiers="operator">
- <return type="Vector3">
+ <return type="Quaternion">
</return>
- <argument index="0" name="right" type="Vector3">
+ <argument index="0" name="right" type="Quaternion">
</argument>
<description>
</description>
@@ -211,12 +211,6 @@
<method name="operator +" qualifiers="operator">
<return type="Quaternion">
</return>
- <description>
- </description>
- </method>
- <method name="operator +" qualifiers="operator">
- <return type="Quaternion">
- </return>
<argument index="0" name="right" type="Quaternion">
</argument>
<description>
@@ -225,12 +219,6 @@
<method name="operator -" qualifiers="operator">
<return type="Quaternion">
</return>
- <description>
- </description>
- </method>
- <method name="operator -" qualifiers="operator">
- <return type="Quaternion">
- </return>
<argument index="0" name="right" type="Quaternion">
</argument>
<description>
@@ -268,6 +256,18 @@
<description>
</description>
</method>
+ <method name="operator unary+" qualifiers="operator">
+ <return type="Quaternion">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="operator unary-" qualifiers="operator">
+ <return type="Quaternion">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="slerp" qualifiers="const">
<return type="Quaternion">
</return>
diff --git a/doc/classes/RDFramebufferPass.xml b/doc/classes/RDFramebufferPass.xml
new file mode 100644
index 0000000000..c26c41f93f
--- /dev/null
+++ b/doc/classes/RDFramebufferPass.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="RDFramebufferPass" inherits="RefCounted" version="4.0">
+ <brief_description>
+ Framebuffer pass attachment description.
+ </brief_description>
+ <description>
+ This class contains the list of attachment descriptions for a framebuffer pass. Each points with an index to a previously supplied list of texture attachments.
+ Multipass framebuffers can optimize some configurations in mobile, on desktop they provide little to no advantage.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="color_attachments" type="PackedInt32Array" setter="set_color_attachments" getter="get_color_attachments" default="PackedInt32Array()">
+ Color attachments in order starting from 0. If this attachment is not used by the shader, pass ATTACHMENT_UNUSED to skip.
+ </member>
+ <member name="depth_attachment" type="int" setter="set_depth_attachment" getter="get_depth_attachment" default="-1">
+ Depth attachment. ATTACHMENT_UNUSED should be used if no depth buffer is required for this pass.
+ </member>
+ <member name="input_attachments" type="PackedInt32Array" setter="set_input_attachments" getter="get_input_attachments" default="PackedInt32Array()">
+ Used for multipass framebuffers (more than one render pass). Converts an attachment to an input. Make sure to also supply it properly in the [RDUniform] for the uniform set.
+ </member>
+ <member name="preserve_attachments" type="PackedInt32Array" setter="set_preserve_attachments" getter="get_preserve_attachments" default="PackedInt32Array()">
+ Attachments to preserve in this pass (otherwise they are erased).
+ </member>
+ <member name="resolve_attachments" type="PackedInt32Array" setter="set_resolve_attachments" getter="get_resolve_attachments" default="PackedInt32Array()">
+ If the color attachments are multisampled, non-multisampled resolve attachments can be provided.
+ </member>
+ </members>
+ <constants>
+ <constant name="ATTACHMENT_UNUSED" value="-1">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/ReflectionProbe.xml b/doc/classes/ReflectionProbe.xml
index 1d32a8b509..db01faced8 100644
--- a/doc/classes/ReflectionProbe.xml
+++ b/doc/classes/ReflectionProbe.xml
@@ -28,8 +28,8 @@
<member name="enable_shadows" type="bool" setter="set_enable_shadows" getter="are_shadows_enabled" default="false">
If [code]true[/code], computes shadows in the reflection probe. This makes the reflection probe slower to render; you may want to disable this if using the [constant UPDATE_ALWAYS] [member update_mode].
</member>
- <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)">
- The size of the reflection probe. The larger the extents the more space covered by the probe which will lower the perceived resolution. It is best to keep the extents only as large as you need them.
+ <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(10, 10, 10)">
+ The size of the reflection probe. The larger the extents, the more space covered by the probe, which will lower the perceived resolution. It is best to keep the extents only as large as you need them.
</member>
<member name="intensity" type="float" setter="set_intensity" getter="get_intensity" default="1.0">
Defines the reflection intensity. Intensity modulates the strength of the reflection.
diff --git a/doc/classes/RenderingDevice.xml b/doc/classes/RenderingDevice.xml
index dc56e6fd5d..b66b945025 100644
--- a/doc/classes/RenderingDevice.xml
+++ b/doc/classes/RenderingDevice.xml
@@ -341,13 +341,29 @@
<description>
</description>
</method>
+ <method name="draw_list_switch_to_next_pass">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="draw_list_switch_to_next_pass_split">
+ <return type="PackedInt64Array">
+ </return>
+ <argument index="0" name="splits" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="framebuffer_create">
<return type="RID">
</return>
- <argument index="0" name="textures" type="Array">
+ <argument index="0" name="textures" type="RID[]">
</argument>
<argument index="1" name="validate_with_format" type="int" default="-1">
</argument>
+ <argument index="2" name="view_count" type="int" default="1">
+ </argument>
<description>
</description>
</method>
@@ -363,11 +379,27 @@
<description>
</description>
</method>
+ <method name="framebuffer_create_multipass">
+ <return type="RID">
+ </return>
+ <argument index="0" name="textures" type="RID[]">
+ </argument>
+ <argument index="1" name="passes" type="RDFramebufferPass[]">
+ </argument>
+ <argument index="2" name="validate_with_format" type="int" default="-1">
+ </argument>
+ <argument index="3" name="view_count" type="int" default="1">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="framebuffer_format_create">
<return type="int">
</return>
<argument index="0" name="attachments" type="RDAttachmentFormat[]">
</argument>
+ <argument index="1" name="view_count" type="int" default="1">
+ </argument>
<description>
</description>
</method>
@@ -379,11 +411,25 @@
<description>
</description>
</method>
+ <method name="framebuffer_format_create_multipass">
+ <return type="int">
+ </return>
+ <argument index="0" name="attachments" type="RDAttachmentFormat[]">
+ </argument>
+ <argument index="1" name="passes" type="RDFramebufferPass[]">
+ </argument>
+ <argument index="2" name="view_count" type="int" default="1">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="framebuffer_format_get_texture_samples">
<return type="int" enum="RenderingDevice.TextureSamples">
</return>
<argument index="0" name="format" type="int">
</argument>
+ <argument index="1" name="render_pass" type="int" default="0">
+ </argument>
<description>
</description>
</method>
@@ -524,6 +570,8 @@
</argument>
<argument index="8" name="dynamic_state_flags" type="int" default="0">
</argument>
+ <argument index="9" name="for_render_pass" type="int" default="0">
+ </argument>
<description>
</description>
</method>
diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml
index 44e0202307..acfa277dcb 100644
--- a/doc/classes/RenderingServer.xml
+++ b/doc/classes/RenderingServer.xml
@@ -988,143 +988,6 @@
Returns [code]true[/code] if the OS supports a certain feature. Features might be [code]s3tc[/code], [code]etc[/code], [code]etc2[/code] and [code]pvrtc[/code].
</description>
</method>
- <method name="immediate_begin">
- <return type="void">
- </return>
- <argument index="0" name="immediate" type="RID">
- </argument>
- <argument index="1" name="primitive" type="int" enum="RenderingServer.PrimitiveType">
- </argument>
- <argument index="2" name="texture" type="RID">
- </argument>
- <description>
- Sets up [ImmediateGeometry3D] internals to prepare for drawing. Equivalent to [method ImmediateGeometry3D.begin].
- </description>
- </method>
- <method name="immediate_clear">
- <return type="void">
- </return>
- <argument index="0" name="immediate" type="RID">
- </argument>
- <description>
- Clears everything that was set up between [method immediate_begin] and [method immediate_end]. Equivalent to [method ImmediateGeometry3D.clear].
- </description>
- </method>
- <method name="immediate_color">
- <return type="void">
- </return>
- <argument index="0" name="immediate" type="RID">
- </argument>
- <argument index="1" name="color" type="Color">
- </argument>
- <description>
- Sets the color to be used with next vertex. Equivalent to [method ImmediateGeometry3D.set_color].
- </description>
- </method>
- <method name="immediate_create">
- <return type="RID">
- </return>
- <description>
- Creates an immediate geometry and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]immediate_*[/code] RenderingServer functions.
- Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method.
- To place in a scene, attach this immediate geometry to an instance using [method instance_set_base] using the returned RID.
- </description>
- </method>
- <method name="immediate_end">
- <return type="void">
- </return>
- <argument index="0" name="immediate" type="RID">
- </argument>
- <description>
- Ends drawing the [ImmediateGeometry3D] and displays it. Equivalent to [method ImmediateGeometry3D.end].
- </description>
- </method>
- <method name="immediate_get_material" qualifiers="const">
- <return type="RID">
- </return>
- <argument index="0" name="immediate" type="RID">
- </argument>
- <description>
- Returns the material assigned to the [ImmediateGeometry3D].
- </description>
- </method>
- <method name="immediate_normal">
- <return type="void">
- </return>
- <argument index="0" name="immediate" type="RID">
- </argument>
- <argument index="1" name="normal" type="Vector3">
- </argument>
- <description>
- Sets the normal to be used with next vertex. Equivalent to [method ImmediateGeometry3D.set_normal].
- </description>
- </method>
- <method name="immediate_set_material">
- <return type="void">
- </return>
- <argument index="0" name="immediate" type="RID">
- </argument>
- <argument index="1" name="material" type="RID">
- </argument>
- <description>
- Sets the material to be used to draw the [ImmediateGeometry3D].
- </description>
- </method>
- <method name="immediate_tangent">
- <return type="void">
- </return>
- <argument index="0" name="immediate" type="RID">
- </argument>
- <argument index="1" name="tangent" type="Plane">
- </argument>
- <description>
- Sets the tangent to be used with next vertex. Equivalent to [method ImmediateGeometry3D.set_tangent].
- </description>
- </method>
- <method name="immediate_uv">
- <return type="void">
- </return>
- <argument index="0" name="immediate" type="RID">
- </argument>
- <argument index="1" name="tex_uv" type="Vector2">
- </argument>
- <description>
- Sets the UV to be used with next vertex. Equivalent to [method ImmediateGeometry3D.set_uv].
- </description>
- </method>
- <method name="immediate_uv2">
- <return type="void">
- </return>
- <argument index="0" name="immediate" type="RID">
- </argument>
- <argument index="1" name="tex_uv" type="Vector2">
- </argument>
- <description>
- Sets the UV2 to be used with next vertex. Equivalent to [method ImmediateGeometry3D.set_uv2].
- </description>
- </method>
- <method name="immediate_vertex">
- <return type="void">
- </return>
- <argument index="0" name="immediate" type="RID">
- </argument>
- <argument index="1" name="vertex" type="Vector3">
- </argument>
- <description>
- Adds the next vertex using the information provided in advance. Equivalent to [method ImmediateGeometry3D.add_vertex].
- </description>
- </method>
- <method name="immediate_vertex_2d">
- <return type="void">
- </return>
- <argument index="0" name="immediate" type="RID">
- </argument>
- <argument index="1" name="vertex" type="Vector2">
- </argument>
- <description>
- Adds the next vertex using the information provided in advance. This is a helper class that calls [method immediate_vertex] under the hood. Equivalent to [method ImmediateGeometry3D.add_vertex].
- </description>
- </method>
<method name="init">
<return type="void">
</return>
@@ -1787,21 +1650,6 @@
Sets a mesh's surface's material.
</description>
</method>
- <method name="mesh_surface_update_region">
- <return type="void">
- </return>
- <argument index="0" name="mesh" type="RID">
- </argument>
- <argument index="1" name="surface" type="int">
- </argument>
- <argument index="2" name="offset" type="int">
- </argument>
- <argument index="3" name="data" type="PackedByteArray">
- </argument>
- <description>
- Updates a specific region of a vertex buffer for the specified surface. Warning: this function alters the vertex buffer directly with no safety mechanisms, you can easily corrupt your mesh.
- </description>
- </method>
<method name="multimesh_allocate_data">
<return type="void">
</return>
@@ -3677,35 +3525,32 @@
<constant name="INSTANCE_MULTIMESH" value="2" enum="InstanceType">
The instance is a multimesh.
</constant>
- <constant name="INSTANCE_IMMEDIATE" value="3" enum="InstanceType">
- The instance is an immediate geometry.
- </constant>
- <constant name="INSTANCE_PARTICLES" value="4" enum="InstanceType">
+ <constant name="INSTANCE_PARTICLES" value="3" enum="InstanceType">
The instance is a particle emitter.
</constant>
- <constant name="INSTANCE_PARTICLES_COLLISION" value="5" enum="InstanceType">
+ <constant name="INSTANCE_PARTICLES_COLLISION" value="4" enum="InstanceType">
</constant>
- <constant name="INSTANCE_LIGHT" value="6" enum="InstanceType">
+ <constant name="INSTANCE_LIGHT" value="5" enum="InstanceType">
The instance is a light.
</constant>
- <constant name="INSTANCE_REFLECTION_PROBE" value="7" enum="InstanceType">
+ <constant name="INSTANCE_REFLECTION_PROBE" value="6" enum="InstanceType">
The instance is a reflection probe.
</constant>
- <constant name="INSTANCE_DECAL" value="8" enum="InstanceType">
+ <constant name="INSTANCE_DECAL" value="7" enum="InstanceType">
The instance is a decal.
</constant>
- <constant name="INSTANCE_VOXEL_GI" value="9" enum="InstanceType">
+ <constant name="INSTANCE_VOXEL_GI" value="8" enum="InstanceType">
The instance is a VoxelGI.
</constant>
- <constant name="INSTANCE_LIGHTMAP" value="10" enum="InstanceType">
+ <constant name="INSTANCE_LIGHTMAP" value="9" enum="InstanceType">
The instance is a lightmap.
</constant>
- <constant name="INSTANCE_OCCLUDER" value="11" enum="InstanceType">
+ <constant name="INSTANCE_OCCLUDER" value="10" enum="InstanceType">
</constant>
- <constant name="INSTANCE_MAX" value="13" enum="InstanceType">
+ <constant name="INSTANCE_MAX" value="12" enum="InstanceType">
Represents the size of the [enum InstanceType] enum.
</constant>
- <constant name="INSTANCE_GEOMETRY_MASK" value="30" enum="InstanceType">
+ <constant name="INSTANCE_GEOMETRY_MASK" value="14" enum="InstanceType">
A combination of the flags of geometry instances (mesh, multimesh, immediate and particles).
</constant>
<constant name="INSTANCE_FLAG_USE_BAKED_LIGHT" value="0" enum="InstanceFlags">
diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml
index 6edb3b1a11..c8800a3c25 100644
--- a/doc/classes/Resource.xml
+++ b/doc/classes/Resource.xml
@@ -4,7 +4,7 @@
Base class for all resources.
</brief_description>
<description>
- Resource is the base class for all Godot-specific resource types, serving primarily as data containers. Since they inherit from [RefCounted], resources are reference-counted and freed when no longer in use. They are also cached once loaded from disk, so that any further attempts to load a resource from a given path will return the same reference (all this in contrast to a [Node], which is not reference-counted and can be instanced from disk as many times as desired). Resources can be saved externally on disk or bundled into another object, such as a [Node] or another resource.
+ Resource is the base class for all Godot-specific resource types, serving primarily as data containers. Since they inherit from [RefCounted], resources are reference-counted and freed when no longer in use. They are also cached once loaded from disk, so that any further attempts to load a resource from a given path will return the same reference (all this in contrast to a [Node], which is not reference-counted and can be instantiated from disk as many times as desired). Resources can be saved externally on disk or bundled into another object, such as a [Node] or another resource.
[b]Note:[/b] In C#, resources will not be freed instantly after they are no longer in use. Instead, garbage collection will run periodically and will free resources that are no longer in use. This means that unused resources will linger on for a while before being removed.
</description>
<tutorials>
diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml
index 623ee7520d..38884a027f 100644
--- a/doc/classes/RichTextLabel.xml
+++ b/doc/classes/RichTextLabel.xml
@@ -170,6 +170,15 @@
Terminates the current tag. Use after [code]push_*[/code] methods to close BBCodes manually. Does not need to follow [code]add_*[/code] methods.
</description>
</method>
+ <method name="push_bgcolor">
+ <return type="void">
+ </return>
+ <argument index="0" name="bgcolor" type="Color">
+ </argument>
+ <description>
+ Adds a [code][bgcolor][/code] tag to the tag stack.
+ </description>
+ </method>
<method name="push_bold">
<return type="void">
</return>
@@ -221,6 +230,15 @@
Adds a [code][dropcap][/code] tag to the tag stack. Drop cap (dropped capital) is a decorative element at the beginning of a paragraph that is larger than the rest of the text.
</description>
</method>
+ <method name="push_fgcolor">
+ <return type="void">
+ </return>
+ <argument index="0" name="fgcolor" type="Color">
+ </argument>
+ <description>
+ Adds a [code][fgcolor][/code] tag to the tag stack.
+ </description>
+ </method>
<method name="push_font">
<return type="void">
</return>
@@ -592,11 +610,15 @@
</constant>
<constant name="ITEM_RAINBOW" value="20" enum="ItemType">
</constant>
- <constant name="ITEM_META" value="21" enum="ItemType">
+ <constant name="ITEM_BGCOLOR" value="21" enum="ItemType">
+ </constant>
+ <constant name="ITEM_FGCOLOR" value="22" enum="ItemType">
+ </constant>
+ <constant name="ITEM_META" value="23" enum="ItemType">
</constant>
- <constant name="ITEM_DROPCAP" value="22" enum="ItemType">
+ <constant name="ITEM_DROPCAP" value="24" enum="ItemType">
</constant>
- <constant name="ITEM_CUSTOMFX" value="23" enum="ItemType">
+ <constant name="ITEM_CUSTOMFX" value="25" enum="ItemType">
</constant>
</constants>
<theme_items>
diff --git a/doc/classes/SceneState.xml b/doc/classes/SceneState.xml
index f9e0ef76b9..6d804cc697 100644
--- a/doc/classes/SceneState.xml
+++ b/doc/classes/SceneState.xml
@@ -95,7 +95,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
- Returns the node's index, which is its position relative to its siblings. This is only relevant and saved in scenes for cases where new nodes are added to an instanced or inherited scene among siblings from the base scene. Despite the name, this index is not related to the [code]idx[/code] argument used here and in other methods.
+ Returns the node's index, which is its position relative to its siblings. This is only relevant and saved in scenes for cases where new nodes are added to an instantiated or inherited scene among siblings from the base scene. Despite the name, this index is not related to the [code]idx[/code] argument used here and in other methods.
</description>
</method>
<method name="get_node_instance" qualifiers="const">
@@ -199,14 +199,14 @@
</methods>
<constants>
<constant name="GEN_EDIT_STATE_DISABLED" value="0" enum="GenEditState">
- If passed to [method PackedScene.instance], blocks edits to the scene state.
+ If passed to [method PackedScene.instantiate], blocks edits to the scene state.
</constant>
<constant name="GEN_EDIT_STATE_INSTANCE" value="1" enum="GenEditState">
- If passed to [method PackedScene.instance], provides inherited scene resources to the local scene.
+ If passed to [method PackedScene.instantiate], provides inherited scene resources to the local scene.
[b]Note:[/b] Only available in editor builds.
</constant>
<constant name="GEN_EDIT_STATE_MAIN" value="2" enum="GenEditState">
- If passed to [method PackedScene.instance], provides local scene resources to the local scene. Only the main scene should receive the main edit state.
+ If passed to [method PackedScene.instantiate], provides local scene resources to the local scene. Only the main scene should receive the main edit state.
[b]Note:[/b] Only available in editor builds.
</constant>
</constants>
diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml
index 7a15153fc2..d327e8cbca 100644
--- a/doc/classes/SceneTree.xml
+++ b/doc/classes/SceneTree.xml
@@ -90,6 +90,13 @@
The timer will be automatically freed after its time elapses.
</description>
</method>
+ <method name="create_tween">
+ <return type="Tween">
+ </return>
+ <description>
+ Creates and returns a new [Tween].
+ </description>
+ </method>
<method name="get_first_node_in_group">
<return type="Node">
</return>
@@ -135,6 +142,13 @@
Returns a list of all nodes assigned to the given group.
</description>
</method>
+ <method name="get_processed_tweens">
+ <return type="Array">
+ </return>
+ <description>
+ Returns an array of currently exising [Tween]s in the [SceneTree] (both running and paused).
+ </description>
+ </method>
<method name="get_rpc_sender_id" qualifiers="const">
<return type="int">
</return>
diff --git a/doc/classes/Script.xml b/doc/classes/Script.xml
index 56272760bd..e7527d73e2 100644
--- a/doc/classes/Script.xml
+++ b/doc/classes/Script.xml
@@ -11,11 +11,11 @@
<link title="Scripting">https://docs.godotengine.org/en/latest/getting_started/step_by_step/scripting.html</link>
</tutorials>
<methods>
- <method name="can_instance" qualifiers="const">
+ <method name="can_instantiate" qualifiers="const">
<return type="bool">
</return>
<description>
- Returns [code]true[/code] if the script can be instanced.
+ Returns [code]true[/code] if the script can be instantiated.
</description>
</method>
<method name="get_base_script" qualifiers="const">
diff --git a/doc/classes/Sprite3D.xml b/doc/classes/Sprite3D.xml
index f7f2ff0de1..ddb9d543e8 100644
--- a/doc/classes/Sprite3D.xml
+++ b/doc/classes/Sprite3D.xml
@@ -21,7 +21,6 @@
The number of columns in the sprite sheet.
</member>
<member name="region_enabled" type="bool" setter="set_region_enabled" getter="is_region_enabled" default="false">
- If [code]true[/code], texture will be cut from a larger atlas texture. See [member region_rect].
</member>
<member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2(0, 0, 0, 0)">
The region of the atlas texture to display. [member region_enabled] must be [code]true[/code].
@@ -39,11 +38,6 @@
Emitted when the [member frame] changes.
</description>
</signal>
- <signal name="texture_changed">
- <description>
- Emitted when the [member texture] changes.
- </description>
- </signal>
</signals>
<constants>
</constants>
diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml
index 22d1b52479..a8b836ff0c 100644
--- a/doc/classes/SurfaceTool.xml
+++ b/doc/classes/SurfaceTool.xml
@@ -24,7 +24,7 @@
The above [SurfaceTool] now contains one vertex of a triangle which has a UV coordinate and a specified [Color]. If another vertex were added without calling [method set_uv] or [method set_color], then the last values would be used.
Vertex attributes must be passed [b]before[/b] calling [method add_vertex]. Failure to do so will result in an error when committing the vertex information to a mesh.
Additionally, the attributes used before the first vertex is added determine the format of the mesh. For example, if you only add UVs to the first vertex, you cannot add color to any of the subsequent vertices.
- See also [ArrayMesh], [ImmediateGeometry3D] and [MeshDataTool] for procedural geometry generation.
+ See also [ArrayMesh], [ImmediateMesh] and [MeshDataTool] for procedural geometry generation.
[b]Note:[/b] Godot uses clockwise [url=https://learnopengl.com/Advanced-OpenGL/Face-culling]winding order[/url] for front faces of triangle primitive modes.
</description>
<tutorials>
diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml
index 03e4556c92..6a3c124c60 100644
--- a/doc/classes/TextEdit.xml
+++ b/doc/classes/TextEdit.xml
@@ -10,6 +10,12 @@
<tutorials>
</tutorials>
<methods>
+ <method name="_backspace" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="add_gutter">
<return type="void">
</return>
@@ -18,6 +24,12 @@
<description>
</description>
</method>
+ <method name="backspace">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="center_viewport_to_cursor">
<return type="void">
</return>
@@ -96,6 +108,12 @@
Cut's the current selection.
</description>
</method>
+ <method name="delete_selection">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="deselect">
<return type="void">
</return>
@@ -110,6 +128,14 @@
Gets the caret pixel draw poistion.
</description>
</method>
+ <method name="get_first_non_whitespace_column" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="line" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="get_gutter_count" qualifiers="const">
<return type="int">
</return>
@@ -140,6 +166,14 @@
<description>
</description>
</method>
+ <method name="get_indent_level" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="line" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="get_line" qualifiers="const">
<return type="String">
</return>
@@ -274,6 +308,12 @@
Returns the selection end line.
</description>
</method>
+ <method name="get_tab_size" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_visible_line_count" qualifiers="const">
<return type="int">
</return>
@@ -354,6 +394,16 @@
Triggers a right-click menu action by the specified index. See [enum MenuItems] for a list of available indexes.
</description>
</method>
+ <method name="merge_gutters">
+ <return type="void">
+ </return>
+ <argument index="0" name="from_line" type="int">
+ </argument>
+ <argument index="1" name="to_line" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="paste">
<return type="void">
</return>
@@ -611,6 +661,14 @@
<description>
</description>
</method>
+ <method name="set_tab_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="size" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="undo">
<return type="void">
</return>
diff --git a/doc/classes/TileData.xml b/doc/classes/TileData.xml
index 1f0f807a08..bb793024eb 100644
--- a/doc/classes/TileData.xml
+++ b/doc/classes/TileData.xml
@@ -7,7 +7,7 @@
<tutorials>
</tutorials>
<methods>
- <method name="add_collision_shape">
+ <method name="add_collision_polygon">
<return type="void">
</return>
<argument index="0" name="layer_id" type="int">
@@ -15,27 +15,27 @@
<description>
</description>
</method>
- <method name="get_collision_shape_one_way_margin" qualifiers="const">
+ <method name="get_collision_polygon_one_way_margin" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="layer_id" type="int">
</argument>
- <argument index="1" name="shape_index" type="int">
+ <argument index="1" name="polygon_index" type="int">
</argument>
<description>
</description>
</method>
- <method name="get_collision_shape_shape" qualifiers="const">
- <return type="Shape2D">
+ <method name="get_collision_polygon_points" qualifiers="const">
+ <return type="PackedVector2Array">
</return>
<argument index="0" name="layer_id" type="int">
</argument>
- <argument index="1" name="shape_index" type="int">
+ <argument index="1" name="polygon_index" type="int">
</argument>
<description>
</description>
</method>
- <method name="get_collision_shapes_count" qualifiers="const">
+ <method name="get_collision_polygons_count" qualifiers="const">
<return type="int">
</return>
<argument index="0" name="layer_id" type="int">
@@ -83,68 +83,68 @@
<description>
</description>
</method>
- <method name="is_collision_shape_one_way" qualifiers="const">
+ <method name="is_collision_polygon_one_way" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="layer_id" type="int">
</argument>
- <argument index="1" name="shape_index" type="int">
+ <argument index="1" name="polygon_index" type="int">
</argument>
<description>
</description>
</method>
- <method name="remove_collision_shape">
+ <method name="remove_collision_polygon">
<return type="void">
</return>
<argument index="0" name="layer_id" type="int">
</argument>
- <argument index="1" name="shape_index" type="int">
+ <argument index="1" name="polygon_index" type="int">
</argument>
<description>
</description>
</method>
- <method name="set_collision_shape_one_way">
+ <method name="set_collision_polygon_one_way">
<return type="void">
</return>
<argument index="0" name="layer_id" type="int">
</argument>
- <argument index="1" name="shape_index" type="int">
+ <argument index="1" name="polygon_index" type="int">
</argument>
<argument index="2" name="one_way" type="bool">
</argument>
<description>
</description>
</method>
- <method name="set_collision_shape_one_way_margin">
+ <method name="set_collision_polygon_one_way_margin">
<return type="void">
</return>
<argument index="0" name="layer_id" type="int">
</argument>
- <argument index="1" name="shape_index" type="int">
+ <argument index="1" name="polygon_index" type="int">
</argument>
<argument index="2" name="one_way_margin" type="float">
</argument>
<description>
</description>
</method>
- <method name="set_collision_shape_shape">
+ <method name="set_collision_polygon_points">
<return type="void">
</return>
<argument index="0" name="layer_id" type="int">
</argument>
- <argument index="1" name="shape_index" type="int">
+ <argument index="1" name="polygon_index" type="int">
</argument>
- <argument index="2" name="shape" type="Shape2D">
+ <argument index="2" name="polygon" type="PackedVector2Array">
</argument>
<description>
</description>
</method>
- <method name="set_collision_shapes_count">
+ <method name="set_collision_polygons_count">
<return type="void">
</return>
<argument index="0" name="layer_id" type="int">
</argument>
- <argument index="1" name="shapes_count" type="int">
+ <argument index="1" name="polygons_count" type="int">
</argument>
<description>
</description>
diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml
index 7d8b589f78..55f232c004 100644
--- a/doc/classes/TileSet.xml
+++ b/doc/classes/TileSet.xml
@@ -289,8 +289,6 @@
</member>
<member name="tile_size" type="Vector2i" setter="set_tile_size" getter="get_tile_size" default="Vector2i(16, 16)">
</member>
- <member name="tile_skew" type="Vector2" setter="set_tile_skew" getter="get_tile_skew" default="Vector2(0, 0)">
- </member>
<member name="uv_clipping" type="bool" setter="set_uv_clipping" getter="is_uv_clipping" default="false">
</member>
<member name="y_sorting" type="bool" setter="set_y_sorting" getter="is_y_sorting" default="false">
diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml
index 6a65d4ff7d..be770e6e03 100644
--- a/doc/classes/Tree.xml
+++ b/doc/classes/Tree.xml
@@ -232,7 +232,7 @@
Returns the last pressed button's index.
</description>
</method>
- <method name="get_root">
+ <method name="get_root" qualifiers="const">
<return type="TreeItem">
</return>
<description>
@@ -272,26 +272,26 @@
<description>
</description>
</method>
- <method name="set_column_expand">
+ <method name="set_column_custom_minimum_width">
<return type="void">
</return>
<argument index="0" name="column" type="int">
</argument>
- <argument index="1" name="expand" type="bool">
+ <argument index="1" name="min_width" type="int">
</argument>
<description>
- If [code]true[/code], the column will have the "Expand" flag of [Control]. Columns that have the "Expand" flag will use their "min_width" in a similar fashion to [member Control.size_flags_stretch_ratio].
+ Overrides the calculated minimum width of a column. It can be set to `0` to restore the default behavior. Columns that have the "Expand" flag will use their "min_width" in a similar fashion to [member Control.size_flags_stretch_ratio].
</description>
</method>
- <method name="set_column_min_width">
+ <method name="set_column_expand">
<return type="void">
</return>
<argument index="0" name="column" type="int">
</argument>
- <argument index="1" name="min_width" type="int">
+ <argument index="1" name="expand" type="bool">
</argument>
<description>
- Sets the minimum width of a column. Columns that have the "Expand" flag will use their "min_width" in a similar fashion to [member Control.size_flags_stretch_ratio].
+ If [code]true[/code], the column will have the "Expand" flag of [Control]. Columns that have the "Expand" flag will use their "min_width" in a similar fashion to [member Control.size_flags_stretch_ratio].
</description>
</method>
<method name="set_column_title">
@@ -372,6 +372,12 @@
If [code]true[/code], the tree's root is hidden.
</member>
<member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents" override="true" default="true" />
+ <member name="scroll_horizontal_enabled" type="bool" setter="set_h_scroll_enabled" getter="is_h_scroll_enabled" default="true">
+ If [code]true[/code], enables horizontal scrolling.
+ </member>
+ <member name="scroll_vertical_enabled" type="bool" setter="set_v_scroll_enabled" getter="is_v_scroll_enabled" default="true">
+ If [code]true[/code], enables vertical scrolling.
+ </member>
<member name="select_mode" type="int" setter="set_select_mode" getter="get_select_mode" enum="Tree.SelectMode" default="0">
Allows single or multiple selection. See the [enum SelectMode] constants.
</member>
diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml
index 0256d83fea..85c9caa101 100644
--- a/doc/classes/TreeItem.xml
+++ b/doc/classes/TreeItem.xml
@@ -192,7 +192,7 @@
Returns [code]true[/code] if [code]expand_right[/code] is set.
</description>
</method>
- <method name="get_first_child">
+ <method name="get_first_child" qualifiers="const">
<return type="TreeItem">
</return>
<description>
@@ -260,7 +260,7 @@
Returns the metadata value that was set for the given column using [method set_metadata].
</description>
</method>
- <method name="get_next">
+ <method name="get_next" qualifiers="const">
<return type="TreeItem">
</return>
<description>
@@ -288,7 +288,7 @@
Returns OpenType feature [code]tag[/code] of the item's text.
</description>
</method>
- <method name="get_parent">
+ <method name="get_parent" qualifiers="const">
<return type="TreeItem">
</return>
<description>
@@ -391,7 +391,7 @@
Returns the given column's tooltip.
</description>
</method>
- <method name="get_tree">
+ <method name="get_tree" qualifiers="const">
<return type="Tree">
</return>
<description>
diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml
index 00cca40093..253822cf32 100644
--- a/doc/classes/Tween.xml
+++ b/doc/classes/Tween.xml
@@ -1,453 +1,397 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Tween" inherits="Node" version="4.0">
+<class name="Tween" inherits="RefCounted" version="4.0">
<brief_description>
- Smoothly animates a node's properties over time.
+ Lightweight object used for general-purpose animation via script, using [Tweener]s.
</brief_description>
<description>
- Tweens are useful for animations requiring a numerical property to be interpolated over a range of values. The name [i]tween[/i] comes from [i]in-betweening[/i], an animation technique where you specify [i]keyframes[/i] and the computer interpolates the frames that appear between them.
- [Tween] is more suited than [AnimationPlayer] for animations where you don't know the final values in advance. For example, interpolating a dynamically-chosen camera zoom value is best done with a [Tween] node; it would be difficult to do the same thing with an [AnimationPlayer] node.
- Here is a brief usage example that makes a 2D node move smoothly between two positions:
- [codeblocks]
- [gdscript]
- var tween = get_node("Tween")
- tween.interpolate_property($Node2D, "position",
- Vector2(0, 0), Vector2(100, 100), 1,
- Tween.TRANS_LINEAR, Tween.EASE_IN_OUT)
- tween.start()
- [/gdscript]
- [csharp]
- var tween = GetNode&lt;Tween&gt;("Tween");
- tween.InterpolateProperty(GetNode&lt;Node2D&gt;("Node2D"), "position",
- new Vector2(0, 0), new Vector2(100, 100), 1,
- Tween.TransitionType.Linear, Tween.EaseType.InOut);
- tween.Start();
- [/csharp]
- [/codeblocks]
- Many methods require a property name, such as [code]"position"[/code] above. You can find the correct property name by hovering over the property in the Inspector. You can also provide the components of a property directly by using [code]"property:component"[/code] (e.g. [code]position:x[/code]), where it would only apply to that particular component.
- Many of the methods accept [code]trans_type[/code] and [code]ease_type[/code]. The first accepts an [enum TransitionType] constant, and refers to the way the timing of the animation is handled (see [url=https://easings.net/]easings.net[/url] for some examples). The second accepts an [enum EaseType] constant, and controls where the [code]trans_type[/code] is applied to the interpolation (in the beginning, the end, or both). If you don't know which transition and easing to pick, you can try different [enum TransitionType] constants with [constant EASE_IN_OUT], and use the one that looks best.
+ Tweens are mostly useful for animations requiring a numerical property to be interpolated over a range of values. The name [i]tween[/i] comes from [i]in-betweening[/i], an animation technique where you specify [i]keyframes[/i] and the computer interpolates the frames that appear between them.
+ [Tween] is more suited than [AnimationPlayer] for animations where you don't know the final values in advance. For example, interpolating a dynamically-chosen camera zoom value is best done with a [Tween]; it would be difficult to do the same thing with an [AnimationPlayer] node. Tweens are also more light-weight than [AnimationPlayer], so they are very much suited for simple animations or general tasks that don't require visual tweaking provided by the editor. They can be used in a fire-and-forget manner for some logic that normally would be done by code. You can e.g. make something shoot periodically by using a looped [CallbackTweener] with a delay.
+ A [Tween] can be created by using either [method SceneTree.create_tween] or [method Node.create_tween]. [Tween]s created manually (i.e. by using [code]Tween.new()[/code]) are invalid. They can't be used for tweening values, but you can do manual interpolation with [method interpolate_value].
+ A [Tween] animation is composed of a sequence of [Tweener]s, which by default are executed one after another. You can create a sequence by appending [Tweener]s to the [Tween]. Animating something with a [Tweener] is called tweening. Example tweening sequence looks like this:
+ [codeblock]
+ var tween = get_tree().create_tween()
+ tween.tween_property($Sprite, "modulate", Color.red, 1)
+ tween.tween_property($Sprite, "scale", Vector2(), 1)
+ tween.tween_callback($Sprite.queue_free)
+ [/codeblock]
+ This sequence will make the [code]$Sprite[/code] node turn red, then shrink and finally the [method Node.queue_free] is called to remove the sprite. See methods [method tween_property], [method tween_interval], [method tween_callback] and [method tween_method] for more usage information.
+ When a [Tweener] is created with one of the [code]tween_*[/code] methods, a chained method call can be used to tweak the properties of this [Tweener]. For example, if you want to set different transition type in the above example, you can do:
+ [codeblock]
+ var tween = get_tree().create_tween()
+ tween.tween_property($Sprite, "modulate", Color.red, 1).set_trans(Tween.TRANS_SINE)
+ tween.tween_property($Sprite, "scale", Vector2(), 1).set_trans(Tween.TRANS_BOUNCE)
+ tween.tween_callback($Sprite.queue_free)
+ [/codeblock]
+ Most of the [Tween] methods can be chained this way too. In this example the [Tween] is bound and have set a default transition:
+ [codeblock]
+ var tween = get_tree().create_tween().bind_node(self).set_trans(Tween.TRANS_ELASTIC)
+ tween.tween_property($Sprite, "modulate", Color.red, 1)
+ tween.tween_property($Sprite, "scale", Vector2(), 1)
+ tween.tween_callback($Sprite.queue_free)
+ [/codeblock]
+ Another interesting use for [Tween]s is animating arbitrary set of objects:
+ [codeblock]
+ var tween = create_tween()
+ for sprite in get_children():
+ tween.tween_property(sprite, "position", Vector2(), 1)
+ [/codeblock]
+ In the example above, all children of a node are moved one after another to position (0, 0).
+ Some [Tweener]s use transitions and eases. The first accepts an [enum TransitionType] constant, and refers to the way the timing of the animation is handled (see [url=https://easings.net/]easings.net[/url] for some examples). The second accepts an [enum EaseType] constant, and controls where the [code]trans_type[/code] is applied to the interpolation (in the beginning, the end, or both). If you don't know which transition and easing to pick, you can try different [enum TransitionType] constants with [constant EASE_IN_OUT], and use the one that looks best.
[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]
+ [b]Note:[/b] All [Tween]s will automatically start by default. To prevent a [Tween] from autostarting, you can call [method stop] immediately after it was created.
</description>
<tutorials>
</tutorials>
<methods>
- <method name="follow_method">
- <return type="void">
+ <method name="bind_node">
+ <return type="Tween">
</return>
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="method" type="StringName">
- </argument>
- <argument index="2" name="initial_val" type="Variant">
- </argument>
- <argument index="3" name="target" type="Object">
- </argument>
- <argument index="4" name="target_method" type="StringName">
- </argument>
- <argument index="5" name="duration" type="float">
- </argument>
- <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType" default="0">
- </argument>
- <argument index="7" name="ease_type" type="int" enum="Tween.EaseType" default="2">
- </argument>
- <argument index="8" name="delay" type="float" default="0">
+ <argument index="0" name="node" type="Node">
</argument>
<description>
- Follows [code]method[/code] of [code]object[/code] and applies the returned value on [code]target_method[/code] of [code]target[/code], beginning from [code]initial_val[/code] for [code]duration[/code] seconds, [code]delay[/code] later. Methods are called with consecutive values.
- Use [enum TransitionType] for [code]trans_type[/code] and [enum EaseType] for [code]ease_type[/code] parameters. These values control the timing and direction of the interpolation. See the class description for more information.
+ Binds this [Tween] with the given [code]node[/code]. [Tween]s are processed directly by the [SceneTree], so they run independently of the animated nodes. When you bind a [Node] with the [Tween], the [Tween] will halt the animation when the object is not inside tree and the [Tween] will be automatically killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] will make the pausing behavior dependent on the bound node.
+ For a shorter way to create and bind a [Tween], you can use [method Node.create_tween].
</description>
</method>
- <method name="follow_property">
- <return type="void">
+ <method name="chain">
+ <return type="Tween">
</return>
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="property" type="NodePath">
- </argument>
- <argument index="2" name="initial_val" type="Variant">
- </argument>
- <argument index="3" name="target" type="Object">
- </argument>
- <argument index="4" name="target_property" type="NodePath">
- </argument>
- <argument index="5" name="duration" type="float">
- </argument>
- <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType" default="0">
- </argument>
- <argument index="7" name="ease_type" type="int" enum="Tween.EaseType" default="2">
- </argument>
- <argument index="8" name="delay" type="float" default="0">
- </argument>
<description>
- Follows [code]property[/code] of [code]object[/code] and applies it on [code]target_property[/code] of [code]target[/code], beginning from [code]initial_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later.
- Use [enum TransitionType] for [code]trans_type[/code] and [enum EaseType] for [code]ease_type[/code] parameters. These values control the timing and direction of the interpolation. See the class description for more information.
+ Used to chain two [Tweener]s after [method set_parallel] is called with [code]true[/code].
+ [codeblock]
+ var tween = create_tween().set_parallel(true)
+ tween.tween_property(...)
+ tween.tween_property(...) #will run parallelly with above
+ tween.chain().tween_property(...) #will run after two above are finished
+ [/codeblock]
</description>
</method>
- <method name="get_runtime" qualifiers="const">
- <return type="float">
+ <method name="custom_step">
+ <return type="bool">
</return>
+ <argument index="0" name="delta" type="float">
+ </argument>
<description>
- Returns the total time needed for all tweens to end. If you have two tweens, one lasting 10 seconds and the other 20 seconds, it would return 20 seconds, as by that time all tweens would have finished.
+ Processes the [Tween] by given [code]delta[/code] value, in seconds. Mostly useful when the [Tween] is paused, for controlling it manually. Can also be used to end the [Tween] animation immediately, by using [code]delta[/code] longer than the whole duration.
+ Returns [code]true[/code] if the [Tween] still has [Tweener]s that haven't finished.
+ [b]Note:[/b] The [Tween] will become invalid after finished, but you can call [method stop] after the step, to keep it and reset.
</description>
</method>
- <method name="interpolate_callback">
- <return type="void">
+ <method name="interpolate_value">
+ <return type="Variant">
</return>
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="duration" type="float">
+ <argument index="0" name="trans_type" type="Variant">
</argument>
- <argument index="2" name="callback" type="String">
+ <argument index="1" name="ease_type" type="Variant">
</argument>
- <argument index="3" name="arg1" type="Variant" default="null">
+ <argument index="2" name="elapsed_time" type="float">
</argument>
- <argument index="4" name="arg2" type="Variant" default="null">
+ <argument index="3" name="initial_value" type="float">
</argument>
- <argument index="5" name="arg3" type="Variant" default="null">
+ <argument index="4" name="delta_value" type="int" enum="Tween.TransitionType">
</argument>
- <argument index="6" name="arg4" type="Variant" default="null">
- </argument>
- <argument index="7" name="arg5" type="Variant" default="null">
+ <argument index="5" name="duration" type="int" enum="Tween.EaseType">
</argument>
<description>
- Calls [code]callback[/code] of [code]object[/code] after [code]duration[/code]. [code]arg1[/code]-[code]arg5[/code] are arguments to be passed to the callback.
+ This method can be used for manual interpolation of a value, when you don't want [Tween] to do animating for you. It's similar to [method @GlobalScope.lerp], but with support for custom transition and easing.
+ [code]elapsed_time[/code] is the time in seconds that passed after the interping started and it's used to control the position of the interpolation. E.g. when it's equal to half of the [code]duration[/code], the interpolated value will be halfway between initial and final values. This value can also be greater than [code]duration[/code] or lower than 0, which will extrapolate the value.
+ [code]initial_value[/code] is the starting value of the interpolation.
+ [code]delta_value[/code] is the change of the value in the interpolation, i.e. it's equal to [code]final_value - initial_value[/code].
+ [code]duration[/code] is the total time of the interpolation.
</description>
</method>
- <method name="interpolate_deferred_callback">
- <return type="void">
+ <method name="is_running">
+ <return type="bool">
</return>
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="duration" type="float">
- </argument>
- <argument index="2" name="callback" type="String">
- </argument>
- <argument index="3" name="arg1" type="Variant" default="null">
- </argument>
- <argument index="4" name="arg2" type="Variant" default="null">
- </argument>
- <argument index="5" name="arg3" type="Variant" default="null">
- </argument>
- <argument index="6" name="arg4" type="Variant" default="null">
- </argument>
- <argument index="7" name="arg5" type="Variant" default="null">
- </argument>
<description>
- Calls [code]callback[/code] of [code]object[/code] after [code]duration[/code] on the main thread (similar to [method Object.call_deferred]). [code]arg1[/code]-[code]arg5[/code] are arguments to be passed to the callback.
+ Returns whether the [Tween] is currently running, i.e. it wasn't paused and it's not finished.
</description>
</method>
- <method name="interpolate_method">
- <return type="void">
+ <method name="is_valid">
+ <return type="bool">
</return>
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="method" type="StringName">
- </argument>
- <argument index="2" name="initial_val" type="Variant">
- </argument>
- <argument index="3" name="final_val" type="Variant">
- </argument>
- <argument index="4" name="duration" type="float">
- </argument>
- <argument index="5" name="trans_type" type="int" enum="Tween.TransitionType" default="0">
- </argument>
- <argument index="6" name="ease_type" type="int" enum="Tween.EaseType" default="2">
- </argument>
- <argument index="7" name="delay" type="float" default="0">
- </argument>
<description>
- Animates [code]method[/code] of [code]object[/code] from [code]initial_val[/code] to [code]final_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later. Methods are called with consecutive values.
- Use [enum TransitionType] for [code]trans_type[/code] and [enum EaseType] for [code]ease_type[/code] parameters. These values control the timing and direction of the interpolation. See the class description for more information.
+ Returns whether the [Tween] is valid. A valid [Tween] is a [Tween] contained by the scene tree (i.e. the array from [method SceneTree.get_processed_tweens] will contain this [Tween]). [Tween] might become invalid when it has finished tweening or was killed, also when created with [code]Tween.new()[/code]. Invalid [Tween] can't have [Tweener]s appended, because it can't animate them. You can however still use [method interpolate_value].
</description>
</method>
- <method name="interpolate_property">
+ <method name="kill">
<return type="void">
</return>
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="property" type="NodePath">
- </argument>
- <argument index="2" name="initial_val" type="Variant">
- </argument>
- <argument index="3" name="final_val" type="Variant">
- </argument>
- <argument index="4" name="duration" type="float">
- </argument>
- <argument index="5" name="trans_type" type="int" enum="Tween.TransitionType" default="0">
- </argument>
- <argument index="6" name="ease_type" type="int" enum="Tween.EaseType" default="2">
- </argument>
- <argument index="7" name="delay" type="float" default="0">
- </argument>
<description>
- Animates [code]property[/code] of [code]object[/code] from [code]initial_val[/code] to [code]final_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later. Setting the initial value to [code]null[/code] uses the current value of the property.
- Use [enum TransitionType] for [code]trans_type[/code] and [enum EaseType] for [code]ease_type[/code] parameters. These values control the timing and direction of the interpolation. See the class description for more information.
+ Aborts all tweening operations and invalidates the [Tween].
</description>
</method>
- <method name="is_active" qualifiers="const">
- <return type="bool">
+ <method name="parallel">
+ <return type="Tween">
</return>
<description>
- Returns [code]true[/code] if any tweens are currently running.
- [b]Note:[/b] This method doesn't consider tweens that have ended.
+ Makes the next [Tweener] run parallely to the previous one. Example:
+ [codeblock]
+ var tween = create_tween()
+ tween.tween_property(...)
+ tween.parallel().tween_property(...)
+ tween.parallel().tween_property(...)
+ [/codeblock]
+ All [Tweener]s in the example will run at the same time.
+ You can make the [Tween] parallel by default by using [method set_parallel].
</description>
</method>
- <method name="remove">
+ <method name="pause">
<return type="void">
</return>
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="key" type="StringName" default="&quot;&quot;">
- </argument>
<description>
- Stops animation and removes a tween, given its object and property/method pair. By default, all tweens are removed, unless [code]key[/code] is specified.
+ Pauses the tweening. The animation can be resumed by using [method play].
</description>
</method>
- <method name="remove_all">
+ <method name="play">
<return type="void">
</return>
<description>
- Stops animation and removes all tweens.
+ Resumes a paused or stopped [Tween].
</description>
</method>
- <method name="reset">
- <return type="void">
+ <method name="set_ease">
+ <return type="Tween">
</return>
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="key" type="StringName" default="&quot;&quot;">
+ <argument index="0" name="ease" type="int" enum="Tween.EaseType">
</argument>
<description>
- Resets a tween to its initial value (the one given, not the one before the tween), given its object and property/method pair. By default, all tweens are removed, unless [code]key[/code] is specified.
+ Sets the default ease type for [PropertyTweener]s and [MethodTweener]s animated by this [Tween].
</description>
</method>
- <method name="reset_all">
- <return type="void">
+ <method name="set_loops">
+ <return type="Tween">
</return>
+ <argument index="0" name="loops" type="int" default="0">
+ </argument>
<description>
- Resets all tweens to their initial values (the ones given, not those before the tween).
+ Sets the number of times the tweening sequence will be repeated, i.e. [code]set_loops(2)[/code] will run the animation twice.
+ Calling this method without arguments will make the [Tween] run infinitely, until it is either killed by [method kill] or by freeing bound node, or all the animated objects have been freed (which makes further animation impossible).
</description>
</method>
- <method name="resume">
- <return type="void">
+ <method name="set_parallel">
+ <return type="Tween">
</return>
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="key" type="StringName" default="&quot;&quot;">
+ <argument index="0" name="parallel" type="bool" default="true">
</argument>
<description>
- Continues animating a stopped tween, given its object and property/method pair. By default, all tweens are resumed, unless [code]key[/code] is specified.
+ If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after this method will by default run simultanously, as opposed to sequentially.
</description>
</method>
- <method name="resume_all">
- <return type="void">
+ <method name="set_pause_mode">
+ <return type="Tween">
</return>
+ <argument index="0" name="mode" type="int" enum="Tween.TweenPauseMode">
+ </argument>
<description>
- Continues animating all stopped tweens.
+ Determines the behavior of the [Tween] when the [SceneTree] is paused. Check [enum TweenPauseMode] for options.
+ Default value is [constant TWEEN_PAUSE_BOUND].
</description>
</method>
- <method name="seek">
- <return type="void">
+ <method name="set_process_mode">
+ <return type="Tween">
</return>
- <argument index="0" name="time" type="float">
+ <argument index="0" name="mode" type="int" enum="Tween.TweenProcessMode">
</argument>
<description>
- Sets the interpolation to the given [code]time[/code] in seconds.
+ Determines whether the [Tween] should run during idle frame (see [method Node._process]) or physics frame (see [method Node._physics_process].
+ Default value is [constant TWEEN_PROCESS_IDLE].
</description>
</method>
- <method name="set_active">
- <return type="void">
+ <method name="set_speed_scale">
+ <return type="Tween">
</return>
- <argument index="0" name="active" type="bool">
+ <argument index="0" name="speed" type="float">
</argument>
<description>
- Activates/deactivates the tween. See also [method stop_all] and [method resume_all].
+ Scales the speed of tweening. This affects all [Tweener]s and their delays.
</description>
</method>
- <method name="start">
- <return type="void">
+ <method name="set_trans">
+ <return type="Tween">
</return>
+ <argument index="0" name="trans" type="int" enum="Tween.TransitionType">
+ </argument>
<description>
- Starts the tween. You can define animations both before and after this.
+ Sets the default transition type for [PropertyTweener]s and [MethodTweener]s animated by this [Tween].
</description>
</method>
<method name="stop">
<return type="void">
</return>
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="key" type="StringName" default="&quot;&quot;">
- </argument>
<description>
- Stops a tween, given its object and property/method pair. By default, all tweens are stopped, unless [code]key[/code] is specified.
+ Stops the tweening and resets the [Tween] to its initial state. This will not remove any appended [Tweener]s.
</description>
</method>
- <method name="stop_all">
- <return type="void">
+ <method name="tween_callback">
+ <return type="CallbackTweener">
</return>
+ <argument index="0" name="callback" type="Callable">
+ </argument>
<description>
- Stops animating all tweens.
+ Creates and appends a [CallbackTweener]. This method can be used to call an arbitrary method in any object. Use [method Callable.bind] to bind additional arguments for the call.
+ Example: object that keeps shooting every 1 second.
+ [codeblock]
+ var tween = get_tree().create_tween().set_loops()
+ tween.tween_callback(shoot).set_delay(1)
+ [/codeblock]
+ Example: turning a sprite red and then blue, with 2 second delay.
+ [codeblock]
+ var tween = get_tree().create_tween()
+ tween.tween_callback($Sprite.set_modulate.bind(Color.red)).set_delay(2)
+ tween.tween_callback($Sprite.set_modulate.bind(Color.blue)).set_delay(2)
+ [/codeblock]
</description>
</method>
- <method name="targeting_method">
- <return type="void">
+ <method name="tween_interval">
+ <return type="IntervalTweener">
</return>
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="method" type="StringName">
- </argument>
- <argument index="2" name="initial" type="Object">
- </argument>
- <argument index="3" name="initial_method" type="StringName">
- </argument>
- <argument index="4" name="final_val" type="Variant">
+ <argument index="0" name="time" type="float">
</argument>
- <argument index="5" name="duration" type="float">
+ <description>
+ Creates and appends an [IntervalTweener]. This method can be used to create delays in the tween animation, as an alternative for using the delay in other [Tweener]s or when there's no animation (in which case the [Tween] acts as a timer). [code]time[/code] is the length of the interval, in seconds.
+ Example: creating an interval in code execution.
+ [codeblock]
+ #... some code
+ var tween = create_tween()
+ tween.tween_interval(2)
+ await tween.finished
+ #... more code
+ [/codeblock]
+ Example: creating an object that moves back and forth and jumps every few seconds.
+ [codeblock]
+ var tween = create_tween().set_loops()
+ tween.tween_property("position:x", 200, 1).as_relative()
+ tween.tween_callback(jump)
+ tween.tween_interval(2)
+ tween.tween_property("position:x", -200, 1).as_relative()
+ tween.tween_callback(jump)
+ tween.tween_interval(2)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="tween_method">
+ <return type="MethodTweener">
+ </return>
+ <argument index="0" name="method" type="Callable">
</argument>
- <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType" default="0">
+ <argument index="1" name="from" type="float">
</argument>
- <argument index="7" name="ease_type" type="int" enum="Tween.EaseType" default="2">
+ <argument index="2" name="to" type="float">
</argument>
- <argument index="8" name="delay" type="float" default="0">
+ <argument index="3" name="duration" type="float">
</argument>
<description>
- Animates [code]method[/code] of [code]object[/code] from the value returned by [code]initial_method[/code] to [code]final_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later. Methods are animated by calling them with consecutive values.
- Use [enum TransitionType] for [code]trans_type[/code] and [enum EaseType] for [code]ease_type[/code] parameters. These values control the timing and direction of the interpolation. See the class description for more information.
+ Creates and appends a [MethodTweener]. This method is similar to a combination of [method tween_callback] and [method tween_property]. It calls a method over time with a tweened value provided as an argument. The value is tweened between [code]from[/code] and [code]to[/code] over the time specified by [code]duration[/code], in seconds. Use [method Callable.bind] to bind additional arguments for the call. You can use [method MethodTweener.set_ease] and [method MethodTweener.set_trans] to tweak the easing and transition of the value or [method MethodTweener.set_delay] to delay the tweening.
+ Example: making a 3D object look from one point to another point.
+ [codeblock]
+ var tween = create_tween()
+ tween.tween_method(look_at.bind(Vector3.UP), Vector3(-1, 0, -1), Vector3(1, 0, -1), 1) #the look_at() method takes up vector as second argument
+ [/codeblock]
+ Example: setting a text of a [Label], using an intermediate method and after a delay.
+ [codeblock]
+ func _ready():
+ var tween = create_tween()
+ tween.tween_method(set_label_text, 0, 10, 1).set_delay(1)
+
+ func set_label_text(value: int):
+ $Label.text = "Counting " + str(value)
+ [/codeblock]
</description>
</method>
- <method name="targeting_property">
- <return type="void">
+ <method name="tween_property">
+ <return type="PropertyTweener">
</return>
<argument index="0" name="object" type="Object">
</argument>
<argument index="1" name="property" type="NodePath">
</argument>
- <argument index="2" name="initial" type="Object">
- </argument>
- <argument index="3" name="initial_val" type="NodePath">
- </argument>
- <argument index="4" name="final_val" type="Variant">
+ <argument index="2" name="final_val" type="Variant">
</argument>
- <argument index="5" name="duration" type="float">
+ <argument index="3" name="duration" type="float">
</argument>
- <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType" default="0">
- </argument>
- <argument index="7" name="ease_type" type="int" enum="Tween.EaseType" default="2">
- </argument>
- <argument index="8" name="delay" type="float" default="0">
- </argument>
- <description>
- Animates [code]property[/code] of [code]object[/code] from the current value of the [code]initial_val[/code] property of [code]initial[/code] to [code]final_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later.
- Use [enum TransitionType] for [code]trans_type[/code] and [enum EaseType] for [code]ease_type[/code] parameters. These values control the timing and direction of the interpolation. See the class description for more information.
- </description>
- </method>
- <method name="tell" qualifiers="const">
- <return type="float">
- </return>
<description>
- Returns the current time of the tween.
+ Creates and appends a [PropertyTweener]. This method tweens a [code]property[/code] of an [code]object[/code] between an initial value and [code]final_val[/code] in a span of time equal to [code]duration[/code], in seconds. The initial value by default is a value at the time the tweening of the [PropertyTweener] start. For example:
+ [codeblock]
+ var tween = create_tween()
+ tween.tween_property($Sprite, "position", Vector2(100, 200)
+ tween.tween_property($Sprite, "position", Vector2(200, 300)
+ [/codeblock]
+ will move the sprite to position (100, 200) and then to (200, 300). If you use [method PropertyTweener.from] or [method PropertyTweener.from_current], the starting position will be overwritten by the given value instead. See other methods in [PropertyTweener] to see how the tweening can be tweaked further.
+ [b]Note:[/b] You can find the correct property name by hovering over the property in the Inspector. You can also provide the components of a property directly by using [code]"property:component"[/code] (eg. [code]position:x[/code]), where it would only apply to that particular component.
+ Example: moving object twice from the same position, with different transition types.
+ [codeblock]
+ var tween = create_tween()
+ tween.tween_property($Sprite, "position", Vector2.RIGHT * 300).as_relative().set_trans(Tween.TRANS_SINE)
+ tween.tween_property($Sprite, "position", Vector2.RIGHT * 300).as_relative().from_current().set_trans(Tween.TRANS_EXPO)
+ [/codeblock]
</description>
</method>
</methods>
- <members>
- <member name="playback_process_mode" type="int" setter="set_tween_process_mode" getter="get_tween_process_mode" enum="Tween.TweenProcessMode" default="1">
- The tween's animation process thread. See [enum TweenProcessMode].
- </member>
- <member name="playback_speed" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0">
- The tween's speed multiplier. For example, set it to [code]1.0[/code] for normal speed, [code]2.0[/code] for two times normal speed, or [code]0.5[/code] for half of the normal speed. A value of [code]0[/code] pauses the animation, but see also [method set_active] or [method stop_all] for this.
- </member>
- <member name="repeat" type="bool" setter="set_repeat" getter="is_repeat" default="false">
- If [code]true[/code], the tween loops.
- </member>
- </members>
<signals>
- <signal name="tween_all_completed">
+ <signal name="finished">
<description>
- Emitted when all processes in a tween end.
+ Emitted when the [Tween] has finished all tweening. Never emitted when the [Tween] is set to infinite looping (see [method set_loops]).
+ [b]Note:[/b] The [Tween] is removed (invalidated) after this signal is emitted, but it doesn't happen immediately, but on the next processing frame. Calling [method stop] inside the signal callback will preserve the [Tween].
</description>
</signal>
- <signal name="tween_completed">
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="key" type="NodePath">
+ <signal name="loop_finished">
+ <argument index="0" name="loop_count" type="int">
</argument>
<description>
- Emitted when a tween ends.
+ Emitted when a full loop is complete (see [method set_loops]), providing the loop index. This signal is not emitted after final loop, use [signal finished] instead for this case.
</description>
</signal>
- <signal name="tween_started">
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="key" type="NodePath">
+ <signal name="step_finished">
+ <argument index="0" name="idx" type="int">
</argument>
<description>
- Emitted when a tween starts.
- </description>
- </signal>
- <signal name="tween_step">
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="key" type="NodePath">
- </argument>
- <argument index="2" name="elapsed" type="float">
- </argument>
- <argument index="3" name="value" type="Object">
- </argument>
- <description>
- Emitted at each step of the animation.
+ Emitted when one step of the [Tween] is complete, providing the step index. One step is either a single [Tweener] or a group of [Tweener]s running parallelly.
</description>
</signal>
</signals>
<constants>
<constant name="TWEEN_PROCESS_PHYSICS" value="0" enum="TweenProcessMode">
- The tween updates with the [code]_physics_process[/code] callback.
+ The [Tween] updates during physics frame.
</constant>
<constant name="TWEEN_PROCESS_IDLE" value="1" enum="TweenProcessMode">
- The tween updates with the [code]_process[/code] callback.
+ The [Tween] updates during idle
+ </constant>
+ <constant name="TWEEN_PAUSE_BOUND" value="0" enum="TweenPauseMode">
+ </constant>
+ <constant name="TWEEN_PAUSE_STOP" value="1" enum="TweenPauseMode">
+ </constant>
+ <constant name="TWEEN_PAUSE_PROCESS" value="2" enum="TweenPauseMode">
</constant>
<constant name="TRANS_LINEAR" value="0" enum="TransitionType">
- The animation is interpolated linearly.
</constant>
<constant name="TRANS_SINE" value="1" enum="TransitionType">
- The animation is interpolated using a sine function.
</constant>
<constant name="TRANS_QUINT" value="2" enum="TransitionType">
- The animation is interpolated with a quintic (to the power of 5) function.
</constant>
<constant name="TRANS_QUART" value="3" enum="TransitionType">
- The animation is interpolated with a quartic (to the power of 4) function.
</constant>
<constant name="TRANS_QUAD" value="4" enum="TransitionType">
- The animation is interpolated with a quadratic (to the power of 2) function.
</constant>
<constant name="TRANS_EXPO" value="5" enum="TransitionType">
- The animation is interpolated with an exponential (to the power of x) function.
</constant>
<constant name="TRANS_ELASTIC" value="6" enum="TransitionType">
- The animation is interpolated with elasticity, wiggling around the edges.
</constant>
<constant name="TRANS_CUBIC" value="7" enum="TransitionType">
- The animation is interpolated with a cubic (to the power of 3) function.
</constant>
<constant name="TRANS_CIRC" value="8" enum="TransitionType">
- The animation is interpolated with a function using square roots.
</constant>
<constant name="TRANS_BOUNCE" value="9" enum="TransitionType">
- The animation is interpolated by bouncing at the end.
</constant>
<constant name="TRANS_BACK" value="10" enum="TransitionType">
- The animation is interpolated backing out at ends.
</constant>
<constant name="EASE_IN" value="0" enum="EaseType">
- The interpolation starts slowly and speeds up towards the end.
</constant>
<constant name="EASE_OUT" value="1" enum="EaseType">
- The interpolation starts quickly and slows down towards the end.
</constant>
<constant name="EASE_IN_OUT" value="2" enum="EaseType">
- A combination of [constant EASE_IN] and [constant EASE_OUT]. The interpolation is slowest at both ends.
</constant>
<constant name="EASE_OUT_IN" value="3" enum="EaseType">
- A combination of [constant EASE_IN] and [constant EASE_OUT]. The interpolation is fastest at both ends.
</constant>
</constants>
</class>
diff --git a/doc/classes/Tweener.xml b/doc/classes/Tweener.xml
new file mode 100644
index 0000000000..5cd502ced9
--- /dev/null
+++ b/doc/classes/Tweener.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Tweener" inherits="RefCounted" version="4.0">
+ <brief_description>
+ Abstract class for all Tweeners used by [Tween].
+ </brief_description>
+ <description>
+ Tweeners are objects that perform a specific animating task, e.g. interpolating a property or calling a method at a given time. A [Tweener] can't be created manually, you need to use a dedicated method from [Tween] or [Node].
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <signals>
+ <signal name="finished">
+ <description>
+ Emited when the [Tweener] has just finished its job.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml
index 07d09c31dc..498aefbef0 100644
--- a/doc/classes/Vector2.xml
+++ b/doc/classes/Vector2.xml
@@ -304,12 +304,6 @@
<method name="operator +" qualifiers="operator">
<return type="Vector2">
</return>
- <description>
- </description>
- </method>
- <method name="operator +" qualifiers="operator">
- <return type="Vector2">
- </return>
<argument index="0" name="right" type="Vector2">
</argument>
<description>
@@ -318,12 +312,6 @@
<method name="operator -" qualifiers="operator">
<return type="Vector2">
</return>
- <description>
- </description>
- </method>
- <method name="operator -" qualifiers="operator">
- <return type="Vector2">
- </return>
<argument index="0" name="right" type="Vector2">
</argument>
<description>
@@ -401,6 +389,18 @@
<description>
</description>
</method>
+ <method name="operator unary+" qualifiers="operator">
+ <return type="Vector2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="operator unary-" qualifiers="operator">
+ <return type="Vector2">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="orthogonal" qualifiers="const">
<return type="Vector2">
</return>
diff --git a/doc/classes/Vector2i.xml b/doc/classes/Vector2i.xml
index 930ec944ba..5f190de8ca 100644
--- a/doc/classes/Vector2i.xml
+++ b/doc/classes/Vector2i.xml
@@ -126,12 +126,6 @@
<method name="operator +" qualifiers="operator">
<return type="Vector2i">
</return>
- <description>
- </description>
- </method>
- <method name="operator +" qualifiers="operator">
- <return type="Vector2i">
- </return>
<argument index="0" name="right" type="Vector2i">
</argument>
<description>
@@ -140,12 +134,6 @@
<method name="operator -" qualifiers="operator">
<return type="Vector2i">
</return>
- <description>
- </description>
- </method>
- <method name="operator -" qualifiers="operator">
- <return type="Vector2i">
- </return>
<argument index="0" name="right" type="Vector2i">
</argument>
<description>
@@ -223,6 +211,18 @@
<description>
</description>
</method>
+ <method name="operator unary+" qualifiers="operator">
+ <return type="Vector2i">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="operator unary-" qualifiers="operator">
+ <return type="Vector2i">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="sign" qualifiers="const">
<return type="Vector2i">
</return>
diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml
index eb1fd5f098..1361666c18 100644
--- a/doc/classes/Vector3.xml
+++ b/doc/classes/Vector3.xml
@@ -318,12 +318,6 @@
<method name="operator +" qualifiers="operator">
<return type="Vector3">
</return>
- <description>
- </description>
- </method>
- <method name="operator +" qualifiers="operator">
- <return type="Vector3">
- </return>
<argument index="0" name="right" type="Vector3">
</argument>
<description>
@@ -332,12 +326,6 @@
<method name="operator -" qualifiers="operator">
<return type="Vector3">
</return>
- <description>
- </description>
- </method>
- <method name="operator -" qualifiers="operator">
- <return type="Vector3">
- </return>
<argument index="0" name="right" type="Vector3">
</argument>
<description>
@@ -415,6 +403,18 @@
<description>
</description>
</method>
+ <method name="operator unary+" qualifiers="operator">
+ <return type="Vector3">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="operator unary-" qualifiers="operator">
+ <return type="Vector3">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="outer" qualifiers="const">
<return type="Basis">
</return>
diff --git a/doc/classes/Vector3i.xml b/doc/classes/Vector3i.xml
index 8b45a62afa..e08bafa665 100644
--- a/doc/classes/Vector3i.xml
+++ b/doc/classes/Vector3i.xml
@@ -134,12 +134,6 @@
<method name="operator +" qualifiers="operator">
<return type="Vector3i">
</return>
- <description>
- </description>
- </method>
- <method name="operator +" qualifiers="operator">
- <return type="Vector3i">
- </return>
<argument index="0" name="right" type="Vector3i">
</argument>
<description>
@@ -148,12 +142,6 @@
<method name="operator -" qualifiers="operator">
<return type="Vector3i">
</return>
- <description>
- </description>
- </method>
- <method name="operator -" qualifiers="operator">
- <return type="Vector3i">
- </return>
<argument index="0" name="right" type="Vector3i">
</argument>
<description>
@@ -231,6 +219,18 @@
<description>
</description>
</method>
+ <method name="operator unary+" qualifiers="operator">
+ <return type="Vector3i">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="operator unary-" qualifiers="operator">
+ <return type="Vector3i">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="sign" qualifiers="const">
<return type="Vector3i">
</return>
diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml
index 292be34a0d..bc0c3c5516 100644
--- a/doc/classes/Viewport.xml
+++ b/doc/classes/Viewport.xml
@@ -208,6 +208,9 @@
<member name="debug_draw" type="int" setter="set_debug_draw" getter="get_debug_draw" enum="Viewport.DebugDraw" default="0">
The overlay mode for test rendered geometry in debug purposes.
</member>
+ <member name="disable_3d" type="bool" setter="set_disable_3d" getter="is_3d_disabled" default="false">
+ Disable 3D rendering (but keep 2D rendering).
+ </member>
<member name="global_canvas_transform" type="Transform2D" setter="set_global_canvas_transform" getter="get_global_canvas_transform">
The global canvas transform of the viewport. The canvas transform is relative to this.
</member>
diff --git a/doc/classes/WorldEnvironment.xml b/doc/classes/WorldEnvironment.xml
index c1cf639ec0..6aa2db00b4 100644
--- a/doc/classes/WorldEnvironment.xml
+++ b/doc/classes/WorldEnvironment.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
The [WorldEnvironment] node is used to configure the default [Environment] for the scene.
- The parameters defined in the [WorldEnvironment] can be overridden by an [Environment] node set on the current [Camera3D]. Additionally, only one [WorldEnvironment] may be instanced in a given scene at a time.
+ The parameters defined in the [WorldEnvironment] can be overridden by an [Environment] node set on the current [Camera3D]. Additionally, only one [WorldEnvironment] may be instantiated in a given scene at a time.
The [WorldEnvironment] allows the user to specify default lighting parameters (e.g. ambient lighting), various post-processing effects (e.g. SSAO, DOF, Tonemapping), and how to draw the background (e.g. solid color, skybox). Usually, these are added in order to improve the realism/color balance of the scene.
</description>
<tutorials>
diff --git a/doc/classes/float.xml b/doc/classes/float.xml
index f75c130039..585c847d22 100644
--- a/doc/classes/float.xml
+++ b/doc/classes/float.xml
@@ -145,16 +145,6 @@
<method name="operator +" qualifiers="operator">
<return type="float">
</return>
- <description>
- Unary plus operator. Doesn't have any effect.
- [codeblock]
- var a = +2.5 # a is 2.5.
- [/codeblock]
- </description>
- </method>
- <method name="operator +" qualifiers="operator">
- <return type="float">
- </return>
<argument index="0" name="right" type="float">
</argument>
<description>
@@ -173,17 +163,6 @@
<method name="operator -" qualifiers="operator">
<return type="float">
</return>
- <description>
- Unary minus operator. Negates the number.
- [codeblock]
- var a = -2.5 # a is -2.5.
- print(-a) # 2.5
- [/codeblock]
- </description>
- </method>
- <method name="operator -" qualifiers="operator">
- <return type="float">
- </return>
<argument index="0" name="right" type="float">
</argument>
<description>
@@ -308,6 +287,18 @@
Returns [code]true[/code] if this [float] is greater than or equal to the given [int].
</description>
</method>
+ <method name="operator unary+" qualifiers="operator">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="operator unary-" qualifiers="operator">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
</methods>
<constants>
</constants>
diff --git a/doc/classes/int.xml b/doc/classes/int.xml
index b0ad963998..95918c9007 100644
--- a/doc/classes/int.xml
+++ b/doc/classes/int.xml
@@ -126,21 +126,21 @@
</description>
</method>
<method name="operator *" qualifiers="operator">
- <return type="float">
+ <return type="int">
</return>
- <argument index="0" name="right" type="float">
+ <argument index="0" name="right" type="int">
</argument>
<description>
- Multiplies an [int] and a [float]. The result is a [float].
+ Multiplies two [int]s.
</description>
</method>
<method name="operator *" qualifiers="operator">
- <return type="int">
+ <return type="float">
</return>
- <argument index="0" name="right" type="int">
+ <argument index="0" name="right" type="float">
</argument>
<description>
- Multiplies two [int]s.
+ Multiplies an [int] and a [float]. The result is a [float].
</description>
</method>
<method name="operator *" qualifiers="operator">
@@ -204,16 +204,6 @@
</description>
</method>
<method name="operator +" qualifiers="operator">
- <return type="int">
- </return>
- <description>
- Unary plus operator. Doesn't have any effect.
- [codeblock]
- var a = +1 # a is 1.
- [/codeblock]
- </description>
- </method>
- <method name="operator +" qualifiers="operator">
<return type="float">
</return>
<argument index="0" name="right" type="float">
@@ -232,17 +222,6 @@
</description>
</method>
<method name="operator -" qualifiers="operator">
- <return type="int">
- </return>
- <description>
- Unary minus operator. Negates the number.
- [codeblock]
- var a = -1 # a is -1.
- print(-a) # 1
- [/codeblock]
- </description>
- </method>
- <method name="operator -" qualifiers="operator">
<return type="float">
</return>
<argument index="0" name="right" type="float">
@@ -414,6 +393,18 @@
[/codeblock]
</description>
</method>
+ <method name="operator unary+" qualifiers="operator">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="operator unary-" qualifiers="operator">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="operator |" qualifiers="operator">
<return type="int">
</return>