diff --git a/core/object.cpp b/core/object.cpp
index b36f1420d2d..e07ce0d9e42 100644
--- a/core/object.cpp
+++ b/core/object.cpp
@@ -695,7 +695,7 @@ Variant Object::_call_deferred_bind(const Variant **p_args, int p_argcount, Vari
StringName method = *p_args[0];
- MessageQueue::get_singleton()->push_call(get_instance_id(), method, &p_args[1], p_argcount - 1);
+ MessageQueue::get_singleton()->push_call(get_instance_id(), method, &p_args[1], p_argcount - 1, true);
return Variant();
}
diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml
index 97e6f02907a..fdaef58e111 100644
--- a/doc/classes/CanvasItem.xml
+++ b/doc/classes/CanvasItem.xml
@@ -479,7 +479,7 @@
- Returns [code]true[/code] if the node is present in the [SceneTree], its [member visible] property is [code]true[/code] and its inherited visibility is also [code]true[/code].
+ Returns [code]true[/code] if the node is present in the [SceneTree], its [member visible] property is [code]true[/code] and all its antecedents are also visible. If any antecedent is hidden, this node will not be visible in the scene tree.
@@ -565,7 +565,8 @@
If [code]true[/code], the parent [CanvasItem]'s [member material] property is used as this one's material.
- If [code]true[/code], this [CanvasItem] is drawn. For controls that inherit [Popup], the correct way to make them visible is to call one of the multiple [code]popup*()[/code] functions instead.
+ If [code]true[/code], this [CanvasItem] is drawn. The node is only visible if all of its antecedents are visible as well (in other words, [method is_visible_in_tree] must return [code]true[/code]).
+ [b]Note:[/b] For controls that inherit [Popup], the correct way to make them visible is to call one of the multiple [code]popup*()[/code] functions instead.
diff --git a/doc/classes/EditorInspector.xml b/doc/classes/EditorInspector.xml
index d853cc1f8a4..5ca4a65c130 100644
--- a/doc/classes/EditorInspector.xml
+++ b/doc/classes/EditorInspector.xml
@@ -20,9 +20,7 @@
-
- If [code]true[/code], horizontal scrolling is enabled. An horizontal scroll bar will display at the bottom of the inspector.
-
+
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index 9e9360076b8..72c1c55dbf0 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -161,7 +161,7 @@
[codeblock]
var arguments = {}
for argument in OS.get_cmdline_args():
- if argument.find("=") > -1:
+ if argument.find("=") > -1:
var key_value = argument.split("=")
arguments[key_value[0].lstrip("--")] = key_value[1]
[/codeblock]
diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml
index 59d4f47ba57..7c5b676cf22 100644
--- a/doc/classes/Object.xml
+++ b/doc/classes/Object.xml
@@ -17,8 +17,10 @@
[/codeblock]
The [code]in[/code] operator will evaluate to [code]true[/code] as long as the key exists, even if the value is [code]null[/code].
Objects also receive notifications. Notifications are a simple way to notify the object about different events, so they can all be handled together. See [method _notification].
+ [b]Note:[/b] Unlike references to a [Reference], references to an Object stored in a variable can become invalid without warning. Therefore, it's recommended to use [Reference] for data classes instead of [Object].
+ https://docs.godotengine.org/en/latest/getting_started/workflow/best_practices/node_alternatives.html
@@ -521,7 +523,7 @@
One-shot connections disconnect themselves after emission.
- Connect a signal as reference counted. This means that a given signal can be connected several times to the same target, and will only be fully disconnected once no references are left.
+ Connect a signal as reference-counted. This means that a given signal can be connected several times to the same target, and will only be fully disconnected once no references are left.
diff --git a/doc/classes/Reference.xml b/doc/classes/Reference.xml
index 23623fb46f9..5dc4b468a11 100644
--- a/doc/classes/Reference.xml
+++ b/doc/classes/Reference.xml
@@ -5,10 +5,11 @@
Base class for any object that keeps a reference count. [Resource] and many other helper objects inherit this class.
- References keep an internal reference counter so that they are automatically released when no longer in use, and only then. References therefore do not need to be freed manually with [method Object.free].
+ Unlike [Object]s, References keep an internal reference counter so that they are automatically released when no longer in use, and only then. References therefore do not need to be freed manually with [method Object.free].
In the vast majority of use cases, instantiating and using [Reference]-derived types is all you need to do. The methods provided in this class are only for advanced users, and can cause issues if misused.
+ https://docs.godotengine.org/en/latest/getting_started/workflow/best_practices/node_alternatives.html
diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml
index 1904a15ceec..b1df9db2673 100644
--- a/doc/classes/Resource.xml
+++ b/doc/classes/Resource.xml
@@ -4,10 +4,11 @@
Base class for all resources.
- Resource is the base class for all Godot-specific resource types, serving primarily as data containers. They 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. Unlike [Object]s, they 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.
- https://docs.godotengine.org/en/latest/getting_started/step_by_step/resources.html
+ https://docs.godotengine.org/en/latest/getting_started/step_by_step/resources.html
+ https://docs.godotengine.org/en/latest/getting_started/workflow/best_practices/node_alternatives.html
diff --git a/doc/classes/RigidBody.xml b/doc/classes/RigidBody.xml
index a67513e26e2..feb445ab36d 100644
--- a/doc/classes/RigidBody.xml
+++ b/doc/classes/RigidBody.xml
@@ -96,10 +96,17 @@
- Returns a list of the bodies colliding with this one. By default, number of max contacts reported is at 0, see the [member contacts_reported] property to increase it.
+ Returns a list of the bodies colliding with this one. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions.
[b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead.
+
+
+
+
+ Returns the inverse inertia tensor basis. This is used to calculate the angular acceleration resulting from a torque applied to the RigidBody.
+
+
@@ -120,13 +127,6 @@
Sets an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior.
-
-
-
-
- Returns the inverse inertia tensor basis. This is used to calculate the angular acceleration resulting from a torque applied to the RigidBody.
-
-
@@ -161,10 +161,11 @@
If [code]true[/code], the body can enter sleep mode when there is no movement. See [member sleeping].
- If [code]true[/code], the RigidBody will emit signals when it collides with another RigidBody.
+ If [code]true[/code], the RigidBody will emit signals when it collides with another RigidBody. See also [member contacts_reported].
- The maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0.
+ The maximum number of contacts that will be recorded. Requires [member contact_monitor] to be set to [code]true[/code].
+ [b]Note:[/b] The number of contacts is different from the number of collisions. Collisions between parallel edges will result in two contacts (one at each end), and collisions between parallel faces will result in four contacts (one at each corner).
If [code]true[/code], continuous collision detection is used.
@@ -208,14 +209,14 @@
- Emitted when a body enters into contact with this one. Contact monitor and contacts reported must be enabled for this to work.
+ Emitted when a body enters into contact with this one. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions.
- Emitted when a body shape exits contact with this one. Contact monitor and contacts reported must be enabled for this to work.
+ Emitted when a body shape exits contact with this one. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions.
@@ -228,7 +229,7 @@
- Emitted when a body enters into contact with this one. Contact monitor and contacts reported must be enabled for this to work.
+ Emitted when a body enters into contact with this one. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions.
This signal not only receives the body that collided with this one, but also its [RID] ([code]body_id[/code]), the shape index from the colliding body ([code]body_shape[/code]), and the shape index from this body ([code]local_shape[/code]) the other body collided with.
@@ -242,7 +243,7 @@
- Emitted when a body shape exits contact with this one. Contact monitor and contacts reported must be enabled for this to work.
+ Emitted when a body shape exits contact with this one. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions.
This signal not only receives the body that stopped colliding with this one, but also its [RID] ([code]body_id[/code]), the shape index from the colliding body ([code]body_shape[/code]), and the shape index from this body ([code]local_shape[/code]) the other body stopped colliding with.
diff --git a/doc/classes/RigidBody2D.xml b/doc/classes/RigidBody2D.xml
index 60f1e151da5..415769e3105 100644
--- a/doc/classes/RigidBody2D.xml
+++ b/doc/classes/RigidBody2D.xml
@@ -84,7 +84,7 @@
- Returns a list of the bodies colliding with this one. Use [member contacts_reported] to set the maximum number reported. You must also set [member contact_monitor] to [code]true[/code].
+ Returns a list of the bodies colliding with this one. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions.
[b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead.
@@ -137,7 +137,8 @@
If [code]true[/code], the body will emit signals when it collides with another RigidBody2D. See also [member contacts_reported].
- The maximum number of contacts to report.
+ The maximum number of contacts that will be recorded. Requires [member contact_monitor] to be set to [code]true[/code].
+ [b]Note:[/b] The number of contacts is different from the number of collisions. Collisions between parallel edges will result in two contacts (one at each end), and collisions between parallel faces will result in four contacts (one at each corner).
Continuous collision detection mode.
@@ -184,14 +185,14 @@
- Emitted when a body enters into contact with this one. [member contact_monitor] must be [code]true[/code] and [member contacts_reported] greater than [code]0[/code].
+ Emitted when a body enters into contact with this one. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions.
- Emitted when a body exits contact with this one. [member contact_monitor] must be [code]true[/code] and [member contacts_reported] greater than [code]0[/code].
+ Emitted when a body exits contact with this one. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions.
@@ -204,7 +205,7 @@
- Emitted when a body enters into contact with this one. Reports colliding shape information. See [CollisionObject2D] for shape index information. [member contact_monitor] must be [code]true[/code] and [member contacts_reported] greater than [code]0[/code].
+ Emitted when a body enters into contact with this one. Reports colliding shape information. See [CollisionObject2D] for shape index information. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions.
@@ -217,7 +218,7 @@
- Emitted when a body shape exits contact with this one. Reports colliding shape information. See [CollisionObject2D] for shape index information. [member contact_monitor] must be [code]true[/code] and [member contacts_reported] greater than [code]0[/code].
+ Emitted when a body shape exits contact with this one. Reports colliding shape information. See [CollisionObject2D] for shape index information. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions.
diff --git a/doc/classes/Spatial.xml b/doc/classes/Spatial.xml
index 01a2c6060b6..086081b6709 100644
--- a/doc/classes/Spatial.xml
+++ b/doc/classes/Spatial.xml
@@ -101,7 +101,7 @@
- Returns whether the node is visible, taking into consideration that its parents visibility.
+ Returns [code]true[/code] if the node is present in the [SceneTree], its [member visible] property is [code]true[/code] and all its antecedents are also visible. If any antecedent is hidden, this node will not be visible in the scene tree.
@@ -323,7 +323,7 @@
Local translation of this node.
- If [code]true[/code], this node is drawn.
+ If [code]true[/code], this node is drawn. The node is only visible if all of its antecedents are visible as well (in other words, [method is_visible_in_tree] must return [code]true[/code]).
diff --git a/doc/classes/String.xml b/doc/classes/String.xml
index 3aa56a0e502..5e197cea0fa 100644
--- a/doc/classes/String.xml
+++ b/doc/classes/String.xml
@@ -4,7 +4,7 @@
Built-in string class.
- This is the built-in string class (and the one used by GDScript). It supports Unicode and provides all necessary means for string handling. Strings are reference counted and use a copy-on-write approach, so passing them around is cheap in resources.
+ This is the built-in string class (and the one used by GDScript). It supports Unicode and provides all necessary means for string handling. Strings are reference-counted and use a copy-on-write approach, so passing them around is cheap in resources.
https://docs.godotengine.org/en/latest/getting_started/scripting/gdscript/gdscript_format_string.html
diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml
index f8a5be11717..df977adddee 100644
--- a/doc/classes/TileSet.xml
+++ b/doc/classes/TileSet.xml
@@ -478,7 +478,17 @@
- Returns an array of the tile's shapes.
+ Returns an array of dictionaries describing the tile's shapes.
+ [b]Dictionary structure in the array returned by this method:[/b]
+ [codeblock]
+ {
+ "autotile_coord": Vector2,
+ "one_way": bool,
+ "one_way_margin": int,
+ "shape": CollisionShape2D,
+ "shape_transform": Transform2D,
+ }
+ [/codeblock]
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index d7dc4aa042e..07f71b8927a 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -1236,7 +1236,10 @@ void EditorNode::_save_scene_with_preview(String p_file, int p_idx) {
img.instance();
img->create(1, 1, 0, Image::FORMAT_RGB8);
} else if (c3d < c2d) {
- img = scene_root->get_texture()->get_data();
+ Ref viewport_texture = scene_root->get_texture();
+ if (viewport_texture->get_width() > 0 && viewport_texture->get_height() > 0) {
+ img = viewport_texture->get_data();
+ }
} else {
// The 3D editor may be disabled as a feature, but scenes can still be opened.
// This check prevents the preview from regenerating in case those scenes are then saved.
@@ -1246,8 +1249,7 @@ void EditorNode::_save_scene_with_preview(String p_file, int p_idx) {
}
}
- if (img.is_valid()) {
-
+ if (img.is_valid() && img->get_width() > 0 && img->get_height() > 0) {
img = img->duplicate();
save.step(TTR("Creating Thumbnail"), 2);
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 56e1b9d2ee6..579ea389c64 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -1559,7 +1559,9 @@ void ScriptEditor::get_breakpoints(List *p_breakpoints) {
List bpoints;
se->get_breakpoints(&bpoints);
String base = script->get_path();
- ERR_CONTINUE(base.begins_with("local://") || base == "");
+ if (base.begins_with("local://") || base == "") {
+ continue;
+ }
for (List::Element *E = bpoints.front(); E; E = E->next()) {
@@ -2055,15 +2057,15 @@ bool ScriptEditor::edit(const RES &p_resource, int p_line, int p_col, bool p_gra
Ref