summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--COPYRIGHT.txt11
-rw-r--r--core/os/main_loop.cpp4
-rw-r--r--core/resource.cpp2
-rw-r--r--doc/classes/Area.xml8
-rw-r--r--doc/classes/CollisionObject.xml2
-rw-r--r--doc/classes/CollisionObject2D.xml2
-rw-r--r--doc/classes/GraphEdit.xml2
-rw-r--r--doc/classes/RID.xml4
-rw-r--r--doc/classes/ResourceSaver.xml8
-rw-r--r--doc/classes/RigidBody.xml8
-rw-r--r--doc/classes/RigidBody2D.xml8
-rw-r--r--doc/classes/SceneTree.xml6
-rw-r--r--doc/classes/Script.xml17
-rw-r--r--doc/classes/Shape.xml2
-rw-r--r--doc/classes/Spatial.xml8
-rw-r--r--doc/classes/Tree.xml6
-rw-r--r--doc/classes/VisualServer.xml28
-rw-r--r--editor/SCsub12
-rw-r--r--editor/editor_builders.py262
-rw-r--r--editor/editor_help.cpp24
-rw-r--r--editor/plugins/script_text_editor.cpp10
-rw-r--r--editor/plugins/spatial_editor_plugin.cpp3
-rw-r--r--platform/windows/SCsub11
-rw-r--r--scene/2d/collision_object_2d.cpp2
-rw-r--r--scene/2d/physics_body_2d.cpp12
-rw-r--r--scene/3d/area.cpp10
-rw-r--r--scene/3d/collision_object.cpp2
-rw-r--r--scene/3d/physics_body.cpp10
-rw-r--r--scene/gui/control.cpp2
-rw-r--r--scene/gui/graph_edit.cpp2
-rw-r--r--scene/gui/tree.cpp8
-rw-r--r--scene/main/scene_tree.cpp6
-rw-r--r--servers/visual/shader_language.cpp47
33 files changed, 154 insertions, 395 deletions
diff --git a/COPYRIGHT.txt b/COPYRIGHT.txt
index 4ba80941e0..49c602eb84 100644
--- a/COPYRIGHT.txt
+++ b/COPYRIGHT.txt
@@ -10,8 +10,9 @@
# all corresponding files (also recursively in subfolders), apart from those
# with a more explicit copyright statement.
#
-# Licenses are given with their SPDX identifier, and are all included in
-# plain text at the end of this file (in alphabetical order).
+# Licenses are given with their debian/copyright short name (or SPDX identifier
+# if no standard short name exists) and are all included in plain text at the
+# end of this file (in alphabetical order).
#
# Disclaimer for thirdparty libraries:
# ------------------------------------
@@ -139,7 +140,7 @@ Files: ./thirdparty/cvtt/
Comment: Convection Texture Tools Stand-Alone Kernels
Copyright: 2018, Eric Lasota
2018, Microsoft Corp.
-License: MIT
+License: Expat
Files: ./thirdparty/enet/
Comment: ENet
@@ -373,7 +374,7 @@ Files: ./thirdparty/tinyexr/
Comment: TinyEXR
Copyright: 2014-2017, Syoyo Fujita
2002, Industrial Light & Magic, a division of Lucas Digital Ltd. LLC
-License: BSD-3-Clause
+License: BSD-3-clause
Files: ./thirdparty/zlib/
Comment: zlib
@@ -383,7 +384,7 @@ License: Zlib
Files: ./thirdparty/zstd/
Comment: Zstandard
Copyright: 2016-2018, Facebook, Inc.
-License: BSD-3-Clause
+License: BSD-3-clause
diff --git a/core/os/main_loop.cpp b/core/os/main_loop.cpp
index c51801e3e2..6dba77ec9a 100644
--- a/core/os/main_loop.cpp
+++ b/core/os/main_loop.cpp
@@ -33,14 +33,14 @@
void MainLoop::_bind_methods() {
- ClassDB::bind_method(D_METHOD("input_event", "ev"), &MainLoop::input_event);
+ ClassDB::bind_method(D_METHOD("input_event", "event"), &MainLoop::input_event);
ClassDB::bind_method(D_METHOD("input_text", "text"), &MainLoop::input_text);
ClassDB::bind_method(D_METHOD("init"), &MainLoop::init);
ClassDB::bind_method(D_METHOD("iteration", "delta"), &MainLoop::iteration);
ClassDB::bind_method(D_METHOD("idle", "delta"), &MainLoop::idle);
ClassDB::bind_method(D_METHOD("finish"), &MainLoop::finish);
- BIND_VMETHOD(MethodInfo("_input_event", PropertyInfo(Variant::OBJECT, "ev", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent")));
+ BIND_VMETHOD(MethodInfo("_input_event", PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent")));
BIND_VMETHOD(MethodInfo("_input_text", PropertyInfo(Variant::STRING, "text")));
BIND_VMETHOD(MethodInfo("_initialize"));
BIND_VMETHOD(MethodInfo("_iteration", PropertyInfo(Variant::REAL, "delta")));
diff --git a/core/resource.cpp b/core/resource.cpp
index 3078eb135a..f447f785b1 100644
--- a/core/resource.cpp
+++ b/core/resource.cpp
@@ -230,7 +230,7 @@ Ref<Resource> Resource::duplicate(bool p_subresources) const {
Variant p = get(E->get().name);
if ((p.get_type() == Variant::DICTIONARY || p.get_type() == Variant::ARRAY)) {
- p = p.duplicate(p_subresources); //does not make a long of sense but should work?
+ r->set(E->get().name, p.duplicate(p_subresources));
} else if (p.get_type() == Variant::OBJECT && (p_subresources || (E->get().usage & PROPERTY_USAGE_DO_NOT_SHARE_ON_DUPLICATE))) {
RES sr = p;
diff --git a/doc/classes/Area.xml b/doc/classes/Area.xml
index 97de1a0f37..970d09a2ac 100644
--- a/doc/classes/Area.xml
+++ b/doc/classes/Area.xml
@@ -182,14 +182,14 @@
</description>
</signal>
<signal name="body_entered">
- <argument index="0" name="body" type="Object">
+ <argument index="0" name="body" type="Node">
</argument>
<description>
Emitted when a [PhysicsBody] object enters.
</description>
</signal>
<signal name="body_exited">
- <argument index="0" name="body" type="Object">
+ <argument index="0" name="body" type="Node">
</argument>
<description>
Emitted when a [PhysicsBody] object exits.
@@ -198,7 +198,7 @@
<signal name="body_shape_entered">
<argument index="0" name="body_id" type="int">
</argument>
- <argument index="1" name="body" type="Object">
+ <argument index="1" name="body" type="Node">
</argument>
<argument index="2" name="body_shape" type="int">
</argument>
@@ -211,7 +211,7 @@
<signal name="body_shape_exited">
<argument index="0" name="body_id" type="int">
</argument>
- <argument index="1" name="body" type="Object">
+ <argument index="1" name="body" type="Node">
</argument>
<argument index="2" name="body_shape" type="int">
</argument>
diff --git a/doc/classes/CollisionObject.xml b/doc/classes/CollisionObject.xml
index 6fd2630429..5e4e740498 100644
--- a/doc/classes/CollisionObject.xml
+++ b/doc/classes/CollisionObject.xml
@@ -191,7 +191,7 @@
</members>
<signals>
<signal name="input_event">
- <argument index="0" name="camera" type="Object">
+ <argument index="0" name="camera" type="Node">
</argument>
<argument index="1" name="event" type="InputEvent">
</argument>
diff --git a/doc/classes/CollisionObject2D.xml b/doc/classes/CollisionObject2D.xml
index b488202db2..b507204f0d 100644
--- a/doc/classes/CollisionObject2D.xml
+++ b/doc/classes/CollisionObject2D.xml
@@ -204,7 +204,7 @@
</members>
<signals>
<signal name="input_event">
- <argument index="0" name="viewport" type="Object">
+ <argument index="0" name="viewport" type="Node">
</argument>
<argument index="1" name="event" type="InputEvent">
</argument>
diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml
index 48e3c295f1..ce0b619d67 100644
--- a/doc/classes/GraphEdit.xml
+++ b/doc/classes/GraphEdit.xml
@@ -247,7 +247,7 @@
</description>
</signal>
<signal name="node_selected">
- <argument index="0" name="node" type="Object">
+ <argument index="0" name="node" type="Node">
</argument>
<description>
Emitted when a GraphNode is selected.
diff --git a/doc/classes/RID.xml b/doc/classes/RID.xml
index ee34560afd..9eb1462542 100644
--- a/doc/classes/RID.xml
+++ b/doc/classes/RID.xml
@@ -17,14 +17,14 @@
<argument index="0" name="from" type="Object">
</argument>
<description>
- Create a new RID instance with the ID of a given resource. When not handed a valid resource, silently stores the unused ID 0.
+ Creates a new RID instance with the ID of a given resource. When not handed a valid resource, silently stores the unused ID 0.
</description>
</method>
<method name="get_id">
<return type="int">
</return>
<description>
- Retrieve the ID of the referenced resource.
+ Returns the ID of the referenced resource.
</description>
</method>
</methods>
diff --git a/doc/classes/ResourceSaver.xml b/doc/classes/ResourceSaver.xml
index ae0d8e909d..bf3ea95bce 100644
--- a/doc/classes/ResourceSaver.xml
+++ b/doc/classes/ResourceSaver.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ResourceSaver" inherits="Object" category="Core" version="3.1">
<brief_description>
- Resource Saving Interface.
+ Resource saving interface.
</brief_description>
<description>
- Resource Saving Interface. This interface is used for saving resources to disk.
+ Resource saving interface, used for saving resources to disk.
</description>
<tutorials>
</tutorials>
@@ -17,7 +17,7 @@
<argument index="0" name="type" type="Resource">
</argument>
<description>
- Return the list of extensions available for saving a resource of a given type.
+ Returns the list of extensions available for saving a resource of a given type.
</description>
</method>
<method name="save">
@@ -30,7 +30,7 @@
<argument index="2" name="flags" type="int" default="0">
</argument>
<description>
- Save a resource to disk, to a given path.
+ Saves a resource to disk.
</description>
</method>
</methods>
diff --git a/doc/classes/RigidBody.xml b/doc/classes/RigidBody.xml
index 4ae1ef8e94..eea1e0321b 100644
--- a/doc/classes/RigidBody.xml
+++ b/doc/classes/RigidBody.xml
@@ -168,14 +168,14 @@
</members>
<signals>
<signal name="body_entered">
- <argument index="0" name="body" type="Object">
+ <argument index="0" name="body" type="Node">
</argument>
<description>
Emitted when a body enters into contact with this one. Contact monitor and contacts reported must be enabled for this to work.
</description>
</signal>
<signal name="body_exited">
- <argument index="0" name="body" type="Object">
+ <argument index="0" name="body" type="Node">
</argument>
<description>
Emitted when a body shape exits contact with this one. Contact monitor and contacts reported must be enabled for this to work.
@@ -184,7 +184,7 @@
<signal name="body_shape_entered">
<argument index="0" name="body_id" type="int">
</argument>
- <argument index="1" name="body" type="Object">
+ <argument index="1" name="body" type="Node">
</argument>
<argument index="2" name="body_shape" type="int">
</argument>
@@ -198,7 +198,7 @@
<signal name="body_shape_exited">
<argument index="0" name="body_id" type="int">
</argument>
- <argument index="1" name="body" type="Object">
+ <argument index="1" name="body" type="Node">
</argument>
<argument index="2" name="body_shape" type="int">
</argument>
diff --git a/doc/classes/RigidBody2D.xml b/doc/classes/RigidBody2D.xml
index 2265c777c8..1f6b3934c2 100644
--- a/doc/classes/RigidBody2D.xml
+++ b/doc/classes/RigidBody2D.xml
@@ -173,14 +173,14 @@
</members>
<signals>
<signal name="body_entered">
- <argument index="0" name="body" type="Object">
+ <argument index="0" name="body" type="Node">
</argument>
<description>
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].
</description>
</signal>
<signal name="body_exited">
- <argument index="0" name="body" type="Object">
+ <argument index="0" name="body" type="Node">
</argument>
<description>
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].
@@ -189,7 +189,7 @@
<signal name="body_shape_entered">
<argument index="0" name="body_id" type="int">
</argument>
- <argument index="1" name="body" type="Object">
+ <argument index="1" name="body" type="Node">
</argument>
<argument index="2" name="body_shape" type="int">
</argument>
@@ -202,7 +202,7 @@
<signal name="body_shape_exited">
<argument index="0" name="body_id" type="int">
</argument>
- <argument index="1" name="body" type="Object">
+ <argument index="1" name="body" type="Node">
</argument>
<argument index="2" name="body_shape" type="int">
</argument>
diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml
index c85bee9b84..11362ee680 100644
--- a/doc/classes/SceneTree.xml
+++ b/doc/classes/SceneTree.xml
@@ -329,21 +329,21 @@
</description>
</signal>
<signal name="node_added">
- <argument index="0" name="node" type="Object">
+ <argument index="0" name="node" type="Node">
</argument>
<description>
Emitted whenever a node is added to the SceneTree.
</description>
</signal>
<signal name="node_configuration_warning_changed">
- <argument index="0" name="node" type="Object">
+ <argument index="0" name="node" type="Node">
</argument>
<description>
Emitted when a node's configuration changed. Only emitted in tool mode.
</description>
</signal>
<signal name="node_removed">
- <argument index="0" name="node" type="Object">
+ <argument index="0" name="node" type="Node">
</argument>
<description>
Emitted whenever a node is removed from the SceneTree.
diff --git a/doc/classes/Script.xml b/doc/classes/Script.xml
index 09c60afc2f..128d7475cc 100644
--- a/doc/classes/Script.xml
+++ b/doc/classes/Script.xml
@@ -4,8 +4,8 @@
A class stored as a resource.
</brief_description>
<description>
- A class stored as a resource. The script exends the functionality of all objects that instance it.
- The 'new' method of a script subclass creates a new instance. [method Object.set_script] extends an existing object, if that object's class matches one of the script's base classes.
+ A class stored as a resource. A script exends the functionality of all objects that instance it.
+ The [code]new[/code] method of a script subclass creates a new instance. [method Object.set_script] extends an existing object, if that object's class matches one of the script's base classes.
</description>
<tutorials>
<link>http://docs.godotengine.org/en/3.0/getting_started/step_by_step/scripting.html</link>
@@ -17,7 +17,7 @@
<return type="bool">
</return>
<description>
- Returns true if the script can be instanced.
+ Returns [code]true[/code] if the script can be instanced.
</description>
</method>
<method name="get_base_script" qualifiers="const">
@@ -31,6 +31,7 @@
<return type="String">
</return>
<description>
+ Returns the script's base type.
</description>
</method>
<method name="has_script_signal" qualifiers="const">
@@ -39,14 +40,14 @@
<argument index="0" name="signal_name" type="String">
</argument>
<description>
- Returns true if the script, or a base class, defines a signal with the given name.
+ Returns [code]true[/code] if the script, or a base class, defines a signal with the given name.
</description>
</method>
<method name="has_source_code" qualifiers="const">
<return type="bool">
</return>
<description>
- Returns true if the script contains non-empty source code.
+ Returns [code]true[/code] if the script contains non-empty source code.
</description>
</method>
<method name="instance_has" qualifiers="const">
@@ -55,14 +56,14 @@
<argument index="0" name="base_object" type="Object">
</argument>
<description>
- Returns true if 'base_object' is an instance of this script.
+ Returns [code]true[/code] if [code]base_object[/code] is an instance of this script.
</description>
</method>
<method name="is_tool" qualifiers="const">
<return type="bool">
</return>
<description>
- Returns true if the script is a tool script. A tool script can run in the editor.
+ Returns [code]true[/code] if the script is a tool script. A tool script can run in the editor.
</description>
</method>
<method name="reload">
@@ -77,7 +78,7 @@
</methods>
<members>
<member name="source_code" type="String" setter="set_source_code" getter="get_source_code">
- The script source code, or an empty string if source code is not available. When set, does not reload the class implementation automatically.
+ The script source code or an empty string if source code is not available. When set, does not reload the class implementation automatically.
</member>
</members>
<constants>
diff --git a/doc/classes/Shape.xml b/doc/classes/Shape.xml
index d31da20f07..bc1a429418 100644
--- a/doc/classes/Shape.xml
+++ b/doc/classes/Shape.xml
@@ -4,7 +4,7 @@
Base class for all 3D shape resources.
</brief_description>
<description>
- Base class for all 3D shape resources. All 3D shapes that inherit from this can be set into a [PhysicsBody] or [Area].
+ Base class for all 3D shape resources. Nodes that inherit from this can be used as shapes for a [PhysicsBody] or [Area] objects.
</description>
<tutorials>
<link>http://docs.godotengine.org/en/3.0/tutorials/physics/physics_introduction.html</link>
diff --git a/doc/classes/Spatial.xml b/doc/classes/Spatial.xml
index ef1bcc30b3..4fa60b2e44 100644
--- a/doc/classes/Spatial.xml
+++ b/doc/classes/Spatial.xml
@@ -296,11 +296,11 @@
World space (global) [Transform] of this node.
</member>
<member name="rotation" type="Vector3" setter="set_rotation" getter="get_rotation">
- Rotation part of the local transformation, specified in terms of YXZ-Euler angles in the format (X-angle, Y-angle, Z-angle), in radians.
- Note that in the mathematical sense, rotation is a matrix and not a vector. The three Euler angles, which are the three indepdent 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.
+ Rotation part of the local transformation in radians, specified in terms of YXZ-Euler angles in the format (X-angle, Y-angle, Z-angle).
+ Note that 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">
- Rotation part of the local transformation, specified in terms of YXZ-Euler angles in the format (X-angle, Y-angle, Z-angle), in degrees.
+ 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">
Scale part of the local transformation.
@@ -312,7 +312,7 @@
Local translation of this node.
</member>
<member name="visible" type="bool" setter="set_visible" getter="is_visible">
- Visibility of this node. Toggles if this node is rendered.
+ If [code]true[/code] this node is drawn. Default value: [code]true[/code].
</member>
</members>
<signals>
diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml
index 533df57564..5c24df5be2 100644
--- a/doc/classes/Tree.xml
+++ b/doc/classes/Tree.xml
@@ -244,7 +244,7 @@
</members>
<signals>
<signal name="button_pressed">
- <argument index="0" name="item" type="Object">
+ <argument index="0" name="item" type="TreeItem">
</argument>
<argument index="1" name="column" type="int">
</argument>
@@ -286,7 +286,7 @@
</description>
</signal>
<signal name="item_collapsed">
- <argument index="0" name="item" type="Object">
+ <argument index="0" name="item" type="TreeItem">
</argument>
<description>
Emitted when an item is collapsed by a click on the folding arrow.
@@ -324,7 +324,7 @@
</description>
</signal>
<signal name="multi_selected">
- <argument index="0" name="item" type="Object">
+ <argument index="0" name="item" type="TreeItem">
</argument>
<argument index="1" name="column" type="int">
</argument>
diff --git a/doc/classes/VisualServer.xml b/doc/classes/VisualServer.xml
index 395fb9e829..afada05bf7 100644
--- a/doc/classes/VisualServer.xml
+++ b/doc/classes/VisualServer.xml
@@ -1552,7 +1552,7 @@
<argument index="0" name="feature" type="String">
</argument>
<description>
- Returns true, if the OS supports a certain feature. Features might be s3tc, etc, etc2 and pvrtc,
+ Returns [code]true[/code] if the OS supports a certain feature. Features might be s3tc, etc, etc2 and pvrtc,
</description>
</method>
<method name="immediate_begin">
@@ -3110,7 +3110,7 @@
<argument index="2" name="scale" type="bool">
</argument>
<description>
- Sets a boot image. The color defines the background color and if scale is [code]true[/code], the image will be scaled to fit the screen size.
+ Sets a boot image. The color defines the background color and if scale is [code]true[/code] the image will be scaled to fit the screen size.
</description>
</method>
<method name="set_debug_generate_wireframes">
@@ -3484,7 +3484,7 @@
<argument index="0" name="shrink" type="bool">
</argument>
<description>
- If [code]true[/code], sets internal processes to shrink all image data to half the size.
+ If [code]true[/code] sets internal processes to shrink all image data to half the size.
</description>
</method>
<method name="texture_set_size_override">
@@ -3507,7 +3507,7 @@
<argument index="0" name="enable" type="bool">
</argument>
<description>
- If [code]true[/code], the image will be stored in the texture's images array if overwritten.
+ If [code]true[/code] the image will be stored in the texture's images array if overwritten.
</description>
</method>
<method name="viewport_attach_camera">
@@ -3600,7 +3600,7 @@
<argument index="1" name="active" type="bool">
</argument>
<description>
- If [code]true[/code], sets the viewport active, else sets it inactive.
+ If [code]true[/code] sets the viewport active, else sets it inactive.
</description>
</method>
<method name="viewport_set_canvas_layer">
@@ -3659,7 +3659,7 @@
<argument index="1" name="disabled" type="bool">
</argument>
<description>
- If [code]true[/code] a viewport's 3D rendering should be disabled.
+ If [code]true[/code] a viewport's 3D rendering is disabled.
</description>
</method>
<method name="viewport_set_disable_environment">
@@ -3670,7 +3670,7 @@
<argument index="1" name="disabled" type="bool">
</argument>
<description>
- If [code]true[/code] rendering of a viewport's environment should be disabled.
+ If [code]true[/code] rendering of a viewport's environment is disabled.
</description>
</method>
<method name="viewport_set_global_canvas_transform">
@@ -3692,7 +3692,7 @@
<argument index="1" name="enabled" type="bool">
</argument>
<description>
- If [code]true[/code] the viewport should render to hdr.
+ If [code]true[/code] the viewport renders to hdr.
</description>
</method>
<method name="viewport_set_hide_canvas">
@@ -3703,7 +3703,7 @@
<argument index="1" name="hidden" type="bool">
</argument>
<description>
- If [code]true[/code] the viewport's canvas should not be rendered.
+ If [code]true[/code] the viewport's canvas is not rendered.
</description>
</method>
<method name="viewport_set_hide_scenario">
@@ -3795,7 +3795,7 @@
<argument index="1" name="enabled" type="bool">
</argument>
<description>
- If [code]true[/code] the viewport should render its background as transparent.
+ If [code]true[/code] the viewport renders its background as transparent.
</description>
</method>
<method name="viewport_set_update_mode">
@@ -3806,7 +3806,7 @@
<argument index="1" name="update_mode" type="int" enum="VisualServer.ViewportUpdateMode">
</argument>
<description>
- Sets when the viewport should be updated. See VIEWPORT_UPDATE_MODE_* constants for options.
+ Sets when the viewport should be updated. See [enum ViewportUpdateMode] constants for options.
</description>
</method>
<method name="viewport_set_usage">
@@ -3817,7 +3817,7 @@
<argument index="1" name="usage" type="int" enum="VisualServer.ViewportUsage">
</argument>
<description>
- Sets what should be rendered in the viewport. See VIEWPORT_USAGE_* constants for options.
+ Sets the viewport's 2D/3D mode. See [enum ViewportUsage] constants for options.
</description>
</method>
<method name="viewport_set_use_arvr">
@@ -3828,7 +3828,7 @@
<argument index="1" name="use_arvr" type="bool">
</argument>
<description>
- If [code]true[/code] the viewport should use augmented or virtual reality technologies. See [ARVRInterface].
+ If [code]true[/code] the viewport uses augmented or virtual reality technologies. See [ARVRInterface].
</description>
</method>
<method name="viewport_set_vflip">
@@ -3839,7 +3839,7 @@
<argument index="1" name="enabled" type="bool">
</argument>
<description>
- If [code]true[/code] the viewport's rendering should be flipped vertically.
+ If [code]true[/code] the viewport's rendering is flipped vertically.
</description>
</method>
</methods>
diff --git a/editor/SCsub b/editor/SCsub
index d9bdf42d6f..6a4b06a97a 100644
--- a/editor/SCsub
+++ b/editor/SCsub
@@ -81,18 +81,6 @@ if env['tools']:
env.Depends('#editor/builtin_fonts.gen.h', flist)
env.CommandNoCache('#editor/builtin_fonts.gen.h', flist, run_in_subprocess(editor_builders.make_fonts_header))
- # Authors
- env.Depends('#editor/authors.gen.h', "../AUTHORS.md")
- env.CommandNoCache('#editor/authors.gen.h', "../AUTHORS.md", run_in_subprocess(editor_builders.make_authors_header))
-
- # Donors
- env.Depends('#editor/donors.gen.h', "../DONORS.md")
- env.CommandNoCache('#editor/donors.gen.h', "../DONORS.md", run_in_subprocess(editor_builders.make_donors_header))
-
- # License
- env.Depends('#editor/license.gen.h', ["../COPYRIGHT.txt", "../LICENSE.txt"])
- env.CommandNoCache('#editor/license.gen.h', ["../COPYRIGHT.txt", "../LICENSE.txt"], run_in_subprocess(editor_builders.make_license_header))
-
env.add_source_files(env.editor_sources, "*.cpp")
env.add_source_files(env.editor_sources, ["#thirdparty/misc/clipper.cpp"])
diff --git a/editor/editor_builders.py b/editor/editor_builders.py
index 6c2f9e298e..fa037980c2 100644
--- a/editor/editor_builders.py
+++ b/editor/editor_builders.py
@@ -146,267 +146,5 @@ def make_translations_header(target, source, env):
g.close()
-
-def make_authors_header(target, source, env):
-
- sections = ["Project Founders", "Lead Developer", "Project Manager", "Developers"]
- sections_id = ["dev_founders", "dev_lead", "dev_manager", "dev_names"]
-
- src = source[0]
- dst = target[0]
- f = open_utf8(src, "r")
- g = open_utf8(dst, "w")
-
- g.write("/* THIS FILE IS GENERATED DO NOT EDIT */\n")
- g.write("#ifndef _EDITOR_AUTHORS_H\n")
- g.write("#define _EDITOR_AUTHORS_H\n")
-
- current_section = ""
- reading = False
-
- def close_section():
- g.write("\t0\n")
- g.write("};\n")
-
- for line in f:
- if reading:
- if line.startswith(" "):
- g.write("\t\"" + escape_string(line.strip()) + "\",\n")
- continue
- if line.startswith("## "):
- if reading:
- close_section()
- reading = False
- for i in range(len(sections)):
- if line.strip().endswith(sections[i]):
- current_section = escape_string(sections_id[i])
- reading = True
- g.write("static const char *" + current_section + "[] = {\n")
- break
-
- if reading:
- close_section()
-
- g.write("#endif\n")
-
- g.close()
- f.close()
-
-def make_donors_header(target, source, env):
-
- sections = ["Platinum sponsors", "Gold sponsors", "Mini sponsors", "Gold donors", "Silver donors", "Bronze donors"]
- sections_id = ["donor_s_plat", "donor_s_gold", "donor_s_mini", "donor_gold", "donor_silver", "donor_bronze"]
-
- src = source[0]
- dst = target[0]
- f = open_utf8(src, "r")
- g = open_utf8(dst, "w")
-
- g.write("/* THIS FILE IS GENERATED DO NOT EDIT */\n")
- g.write("#ifndef _EDITOR_DONORS_H\n")
- g.write("#define _EDITOR_DONORS_H\n")
-
- current_section = ""
- reading = False
-
- def close_section():
- g.write("\t0\n")
- g.write("};\n")
-
- for line in f:
- if reading >= 0:
- if line.startswith(" "):
- g.write("\t\"" + escape_string(line.strip()) + "\",\n")
- continue
- if line.startswith("## "):
- if reading:
- close_section()
- reading = False
- for i in range(len(sections)):
- if line.strip().endswith(sections[i]):
- current_section = escape_string(sections_id[i])
- reading = True
- g.write("static const char *" + current_section + "[] = {\n")
- break
-
- if reading:
- close_section()
-
- g.write("#endif\n")
-
- g.close()
- f.close()
-
-
-def make_license_header(target, source, env):
-
- src_copyright = source[0]
- src_license = source[1]
- dst = target[0]
- f = open_utf8(src_license, "r")
- fc = open_utf8(src_copyright, "r")
- g = open_utf8(dst, "w")
-
- g.write("/* THIS FILE IS GENERATED DO NOT EDIT */\n")
- g.write("#ifndef _EDITOR_LICENSE_H\n")
- g.write("#define _EDITOR_LICENSE_H\n")
- g.write("static const char *about_license =")
-
- for line in f:
- escaped_string = escape_string(line.strip())
- g.write("\n\t\"" + escaped_string + "\\n\"")
-
- g.write(";\n")
-
- tp_current = 0
- tp_file = ""
- tp_comment = ""
- tp_copyright = ""
- tp_license = ""
-
- tp_licensename = ""
- tp_licensebody = ""
-
- tp = []
- tp_licensetext = []
- for line in fc:
- if line.startswith("#"):
- continue
-
- if line.startswith("Files:"):
- tp_file = line[6:].strip()
- tp_current = 1
- elif line.startswith("Comment:"):
- tp_comment = line[8:].strip()
- tp_current = 2
- elif line.startswith("Copyright:"):
- tp_copyright = line[10:].strip()
- tp_current = 3
- elif line.startswith("License:"):
- if tp_current != 0:
- tp_license = line[8:].strip()
- tp_current = 4
- else:
- tp_licensename = line[8:].strip()
- tp_current = 5
- elif line.startswith(" "):
- if tp_current == 1:
- tp_file += "\n" + line.strip()
- elif tp_current == 3:
- tp_copyright += "\n" + line.strip()
- elif tp_current == 5:
- if line.strip() == ".":
- tp_licensebody += "\n"
- else:
- tp_licensebody += line[1:]
- else:
- if tp_current != 0:
- if tp_current == 5:
- tp_licensetext.append([tp_licensename, tp_licensebody])
-
- tp_licensename = ""
- tp_licensebody = ""
- else:
- added = False
- for i in tp:
- if i[0] == tp_comment:
- i[1].append([tp_file, tp_copyright, tp_license])
- added = True
- break
- if not added:
- tp.append([tp_comment,[[tp_file, tp_copyright, tp_license]]])
-
- tp_file = []
- tp_comment = ""
- tp_copyright = []
- tp_license = ""
- tp_current = 0
-
- tp_licensetext.append([tp_licensename, tp_licensebody])
-
- about_thirdparty = ""
- about_tp_copyright_count = ""
- about_tp_license = ""
- about_tp_copyright = ""
- about_tp_file = ""
-
- for i in tp:
- about_thirdparty += "\t\"" + i[0] + "\",\n"
- about_tp_copyright_count += str(len(i[1])) + ", "
- for j in i[1]:
- file_body = ""
- copyright_body = ""
- for k in j[0].split("\n"):
- if file_body != "":
- file_body += "\\n\"\n"
- escaped_string = escape_string(k.strip())
- file_body += "\t\"" + escaped_string
- for k in j[1].split("\n"):
- if copyright_body != "":
- copyright_body += "\\n\"\n"
- escaped_string = escape_string(k.strip())
- copyright_body += "\t\"" + escaped_string
-
- about_tp_file += "\t" + file_body + "\",\n"
- about_tp_copyright += "\t" + copyright_body + "\",\n"
- about_tp_license += "\t\"" + j[2] + "\",\n"
-
- about_license_name = ""
- about_license_body = ""
-
- for i in tp_licensetext:
- body = ""
- for j in i[1].split("\n"):
- if body != "":
- body += "\\n\"\n"
- escaped_string = escape_string(j.strip())
- body += "\t\"" + escaped_string
-
- about_license_name += "\t\"" + i[0] + "\",\n"
- about_license_body += "\t" + body + "\",\n"
-
- g.write("static const char *about_thirdparty[] = {\n")
- g.write(about_thirdparty)
- g.write("\t0\n")
- g.write("};\n")
- g.write("#define THIRDPARTY_COUNT " + str(len(tp)) + "\n")
-
- g.write("static const int about_tp_copyright_count[] = {\n\t")
- g.write(about_tp_copyright_count)
- g.write("0\n};\n")
-
- g.write("static const char *about_tp_file[] = {\n")
- g.write(about_tp_file)
- g.write("\t0\n")
- g.write("};\n")
-
- g.write("static const char *about_tp_copyright[] = {\n")
- g.write(about_tp_copyright)
- g.write("\t0\n")
- g.write("};\n")
-
- g.write("static const char *about_tp_license[] = {\n")
- g.write(about_tp_license)
- g.write("\t0\n")
- g.write("};\n")
-
- g.write("static const char *about_license_name[] = {\n")
- g.write(about_license_name)
- g.write("\t0\n")
- g.write("};\n")
- g.write("#define LICENSE_COUNT " + str(len(tp_licensetext)) + "\n")
-
- g.write("static const char *about_license_body[] = {\n")
- g.write(about_license_body)
- g.write("\t0\n")
- g.write("};\n")
-
- g.write("#endif\n")
-
- g.close()
- fc.close()
- f.close()
-
-
if __name__ == '__main__':
subprocess_main(globals())
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp
index 5a0a49d577..d84b9bff91 100644
--- a/editor/editor_help.cpp
+++ b/editor/editor_help.cpp
@@ -225,7 +225,6 @@ bool EditorHelpSearch::IncrementalSearch::work(uint64_t slot) {
void EditorHelpSearch::_update_search() {
search_options->clear();
- search_options->set_hide_root(true);
String term = search_box->get_text();
if (term.length() < 2)
@@ -307,6 +306,7 @@ EditorHelpSearch::EditorHelpSearch() {
search_box->connect("text_changed", this, "_text_changed");
search_box->connect("gui_input", this, "_sbox_input");
search_options = memnew(Tree);
+ search_options->set_hide_root(true);
vbc->add_margin_child(TTR("Matches:"), search_options, true);
get_ok()->set_text(TTR("Open"));
get_ok()->set_disabled(true);
@@ -397,6 +397,16 @@ void EditorHelpIndex::_notification(int p_what) {
//_update_icons
search_box->set_right_icon(get_icon("Search", "EditorIcons"));
search_box->set_clear_button_enabled(true);
+
+ bool enable_rl = EditorSettings::get_singleton()->get("docks/scene_tree/draw_relationship_lines");
+ Color rl_color = EditorSettings::get_singleton()->get("docks/scene_tree/relationship_line_color");
+
+ if (enable_rl) {
+ class_list->add_constant_override("draw_relationship_lines", 1);
+ class_list->add_color_override("relationship_line_color", rl_color);
+ } else {
+ class_list->add_constant_override("draw_relationship_lines", 0);
+ }
}
}
@@ -410,7 +420,6 @@ void EditorHelpIndex::_update_class_list() {
class_list->clear();
tree_item_map.clear();
TreeItem *root = class_list->create_item();
- class_list->set_hide_root(true);
String filter = search_box->get_text().strip_edges();
String to_select = "";
@@ -489,10 +498,21 @@ EditorHelpIndex::EditorHelpIndex() {
class_list = memnew(Tree);
vbc->add_margin_child(TTR("Class List:") + " ", class_list, true);
+ class_list->set_hide_root(true);
class_list->set_v_size_flags(SIZE_EXPAND_FILL);
class_list->connect("item_activated", this, "_tree_item_selected");
+ bool enable_rl = EditorSettings::get_singleton()->get("docks/scene_tree/draw_relationship_lines");
+ Color rl_color = EditorSettings::get_singleton()->get("docks/scene_tree/relationship_line_color");
+
+ if (enable_rl) {
+ class_list->add_constant_override("draw_relationship_lines", 1);
+ class_list->add_color_override("relationship_line_color", rl_color);
+ } else {
+ class_list->add_constant_override("draw_relationship_lines", 0);
+ }
+
get_ok()->set_text(TTR("Open"));
set_title(TTR("Search Classes"));
}
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index 66705f85bf..e0eb89d6b6 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -1475,9 +1475,9 @@ ScriptTextEditor::ScriptTextEditor() {
convert_case->set_name("convert_case");
edit_menu->get_popup()->add_child(convert_case);
edit_menu->get_popup()->add_submenu_item(TTR("Convert Case"), "convert_case");
- convert_case->add_shortcut(ED_SHORTCUT("script_text_editor/convert_to_uppercase", TTR("Uppercase")), EDIT_TO_UPPERCASE);
- convert_case->add_shortcut(ED_SHORTCUT("script_text_editor/convert_to_lowercase", TTR("Lowercase")), EDIT_TO_LOWERCASE);
- convert_case->add_shortcut(ED_SHORTCUT("script_text_editor/capitalize", TTR("Capitalize")), EDIT_CAPITALIZE);
+ convert_case->add_shortcut(ED_SHORTCUT("script_text_editor/convert_to_uppercase", TTR("Uppercase"), KEY_MASK_SHIFT | KEY_F4), EDIT_TO_UPPERCASE);
+ convert_case->add_shortcut(ED_SHORTCUT("script_text_editor/convert_to_lowercase", TTR("Lowercase"), KEY_MASK_SHIFT | KEY_F5), EDIT_TO_LOWERCASE);
+ convert_case->add_shortcut(ED_SHORTCUT("script_text_editor/capitalize", TTR("Capitalize"), KEY_MASK_SHIFT | KEY_F6), EDIT_CAPITALIZE);
convert_case->connect("id_pressed", this, "_edit_option");
highlighters["Standard"] = NULL;
@@ -1568,10 +1568,6 @@ void ScriptTextEditor::register_editor() {
ED_SHORTCUT("script_text_editor/goto_next_breakpoint", TTR("Goto Next Breakpoint"), KEY_MASK_CMD | KEY_PERIOD);
ED_SHORTCUT("script_text_editor/goto_previous_breakpoint", TTR("Goto Previous Breakpoint"), KEY_MASK_CMD | KEY_COMMA);
- ED_SHORTCUT("script_text_editor/convert_to_uppercase", TTR("Convert To Uppercase"), KEY_MASK_SHIFT | KEY_F4);
- ED_SHORTCUT("script_text_editor/convert_to_lowercase", TTR("Convert To Lowercase"), KEY_MASK_SHIFT | KEY_F3);
- ED_SHORTCUT("script_text_editor/capitalize", TTR("Capitalize"), KEY_MASK_SHIFT | KEY_F2);
-
ED_SHORTCUT("script_text_editor/find", TTR("Find..."), KEY_MASK_CMD | KEY_F);
#ifdef OSX_ENABLED
ED_SHORTCUT("script_text_editor/find_next", TTR("Find Next"), KEY_MASK_CMD | KEY_G);
diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp
index cfc322d2c1..6425b06879 100644
--- a/editor/plugins/spatial_editor_plugin.cpp
+++ b/editor/plugins/spatial_editor_plugin.cpp
@@ -5379,7 +5379,6 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
ED_SHORTCUT("spatial_editor/tool_move", TTR("Tool Move"), KEY_W);
ED_SHORTCUT("spatial_editor/tool_rotate", TTR("Tool Rotate"), KEY_E);
ED_SHORTCUT("spatial_editor/tool_scale", TTR("Tool Scale"), KEY_R);
- ED_SHORTCUT("spatial_editor/snap_to_floor", TTR("Snap To Floor"), KEY_PAGEDOWN);
ED_SHORTCUT("spatial_editor/freelook_toggle", TTR("Toggle Freelook"), KEY_MASK_SHIFT + KEY_F);
@@ -5390,7 +5389,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
hbc_menu->add_child(transform_menu);
p = transform_menu->get_popup();
- p->add_shortcut(ED_SHORTCUT("spatial_editor/snap_to_floor", TTR("Snap object to floor")), MENU_SNAP_TO_FLOOR);
+ p->add_shortcut(ED_SHORTCUT("spatial_editor/snap_to_floor", TTR("Snap object to floor"), KEY_PAGEDOWN), MENU_SNAP_TO_FLOOR);
p->add_shortcut(ED_SHORTCUT("spatial_editor/configure_snap", TTR("Configure Snap...")), MENU_TRANSFORM_CONFIGURE_SNAP);
p->add_separator();
p->add_shortcut(ED_SHORTCUT("spatial_editor/transform_dialog", TTR("Transform Dialog...")), MENU_TRANSFORM_DIALOG);
diff --git a/platform/windows/SCsub b/platform/windows/SCsub
index 53ed3bf887..586533e817 100644
--- a/platform/windows/SCsub
+++ b/platform/windows/SCsub
@@ -7,6 +7,7 @@ from platform_methods import run_in_subprocess
import platform_windows_builders
common_win = [
+ "godot_win.cpp",
"context_gl_win.cpp",
"crash_handler_win.cpp",
"os_windows.cpp",
@@ -17,17 +18,17 @@ common_win = [
"windows_terminal_logger.cpp"
]
-restarget = "godot_res" + env["OBJSUFFIX"]
+res_file = 'godot_res.rc'
-obj = env.RES(restarget, 'godot_res.rc')
+res_target = "godot_res" + env["OBJSUFFIX"]
-common_win.append(obj)
+res_obj = env.RES(res_target, res_file)
-prog = env.add_program('#bin/godot', ['godot_win.cpp'] + common_win, PROGSUFFIX=env["PROGSUFFIX"])
+prog = env.add_program('#bin/godot', common_win + res_obj, PROGSUFFIX=env["PROGSUFFIX"])
# Microsoft Visual Studio Project Generation
if env['vsproj']:
- env.vs_srcs = env.vs_srcs + ["platform/windows/godot_win.cpp"]
+ env.vs_srcs = env.vs_srcs + ["platform/windows/" + res_file]
for x in common_win:
env.vs_srcs = env.vs_srcs + ["platform/windows/" + str(x)]
diff --git a/scene/2d/collision_object_2d.cpp b/scene/2d/collision_object_2d.cpp
index 1e2184bd41..7ade74e8a6 100644
--- a/scene/2d/collision_object_2d.cpp
+++ b/scene/2d/collision_object_2d.cpp
@@ -384,7 +384,7 @@ void CollisionObject2D::_bind_methods() {
BIND_VMETHOD(MethodInfo("_input_event", PropertyInfo(Variant::OBJECT, "viewport"), PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent"), PropertyInfo(Variant::INT, "shape_idx")));
- ADD_SIGNAL(MethodInfo("input_event", PropertyInfo(Variant::OBJECT, "viewport"), PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent"), PropertyInfo(Variant::INT, "shape_idx")));
+ ADD_SIGNAL(MethodInfo("input_event", PropertyInfo(Variant::OBJECT, "viewport", PROPERTY_HINT_RESOURCE_TYPE, "Node"), PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent"), PropertyInfo(Variant::INT, "shape_idx")));
ADD_SIGNAL(MethodInfo("mouse_entered"));
ADD_SIGNAL(MethodInfo("mouse_exited"));
diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp
index 1ac7799ec5..710ff43252 100644
--- a/scene/2d/physics_body_2d.cpp
+++ b/scene/2d/physics_body_2d.cpp
@@ -396,13 +396,13 @@ void RigidBody2D::_body_inout(int p_status, ObjectID p_instance, int p_body_shap
node->disconnect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree);
node->disconnect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree);
if (in_scene)
- emit_signal(SceneStringNames::get_singleton()->body_exited, obj);
+ emit_signal(SceneStringNames::get_singleton()->body_exited, node);
}
contact_monitor->body_map.erase(E);
}
if (node && in_scene) {
- emit_signal(SceneStringNames::get_singleton()->body_shape_exited, objid, obj, p_body_shape, p_local_shape);
+ emit_signal(SceneStringNames::get_singleton()->body_shape_exited, objid, node, p_body_shape, p_local_shape);
}
}
}
@@ -1046,10 +1046,10 @@ void RigidBody2D::_bind_methods() {
ADD_PROPERTYNZ(PropertyInfo(Variant::VECTOR2, "applied_force"), "set_applied_force", "get_applied_force");
ADD_PROPERTYNZ(PropertyInfo(Variant::REAL, "applied_torque"), "set_applied_torque", "get_applied_torque");
- ADD_SIGNAL(MethodInfo("body_shape_entered", PropertyInfo(Variant::INT, "body_id"), PropertyInfo(Variant::OBJECT, "body"), PropertyInfo(Variant::INT, "body_shape"), PropertyInfo(Variant::INT, "local_shape")));
- ADD_SIGNAL(MethodInfo("body_shape_exited", PropertyInfo(Variant::INT, "body_id"), PropertyInfo(Variant::OBJECT, "body"), PropertyInfo(Variant::INT, "body_shape"), PropertyInfo(Variant::INT, "local_shape")));
- ADD_SIGNAL(MethodInfo("body_entered", PropertyInfo(Variant::OBJECT, "body")));
- ADD_SIGNAL(MethodInfo("body_exited", PropertyInfo(Variant::OBJECT, "body")));
+ ADD_SIGNAL(MethodInfo("body_shape_entered", PropertyInfo(Variant::INT, "body_id"), PropertyInfo(Variant::OBJECT, "body", PROPERTY_HINT_RESOURCE_TYPE, "Node"), PropertyInfo(Variant::INT, "body_shape"), PropertyInfo(Variant::INT, "local_shape")));
+ ADD_SIGNAL(MethodInfo("body_shape_exited", PropertyInfo(Variant::INT, "body_id"), PropertyInfo(Variant::OBJECT, "body", PROPERTY_HINT_RESOURCE_TYPE, "Node"), PropertyInfo(Variant::INT, "body_shape"), PropertyInfo(Variant::INT, "local_shape")));
+ ADD_SIGNAL(MethodInfo("body_entered", PropertyInfo(Variant::OBJECT, "body", PROPERTY_HINT_RESOURCE_TYPE, "Node")));
+ ADD_SIGNAL(MethodInfo("body_exited", PropertyInfo(Variant::OBJECT, "body", PROPERTY_HINT_RESOURCE_TYPE, "Node")));
ADD_SIGNAL(MethodInfo("sleeping_state_changed"));
BIND_ENUM_CONSTANT(MODE_RIGID);
diff --git a/scene/3d/area.cpp b/scene/3d/area.cpp
index 6ea980ec97..40a1029201 100644
--- a/scene/3d/area.cpp
+++ b/scene/3d/area.cpp
@@ -243,7 +243,7 @@ void Area::_clear_monitoring() {
emit_signal(SceneStringNames::get_singleton()->body_shape_exited, E->key(), node, E->get().shapes[i].body_shape, E->get().shapes[i].area_shape);
}
- emit_signal(SceneStringNames::get_singleton()->body_exited, obj);
+ emit_signal(SceneStringNames::get_singleton()->body_exited, node);
node->disconnect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree);
node->disconnect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree);
@@ -699,10 +699,10 @@ void Area::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_reverb_uniformity", "amount"), &Area::set_reverb_uniformity);
ClassDB::bind_method(D_METHOD("get_reverb_uniformity"), &Area::get_reverb_uniformity);
- ADD_SIGNAL(MethodInfo("body_shape_entered", PropertyInfo(Variant::INT, "body_id"), PropertyInfo(Variant::OBJECT, "body"), PropertyInfo(Variant::INT, "body_shape"), PropertyInfo(Variant::INT, "area_shape")));
- ADD_SIGNAL(MethodInfo("body_shape_exited", PropertyInfo(Variant::INT, "body_id"), PropertyInfo(Variant::OBJECT, "body"), PropertyInfo(Variant::INT, "body_shape"), PropertyInfo(Variant::INT, "area_shape")));
- ADD_SIGNAL(MethodInfo("body_entered", PropertyInfo(Variant::OBJECT, "body")));
- ADD_SIGNAL(MethodInfo("body_exited", PropertyInfo(Variant::OBJECT, "body")));
+ ADD_SIGNAL(MethodInfo("body_shape_entered", PropertyInfo(Variant::INT, "body_id"), PropertyInfo(Variant::OBJECT, "body", PROPERTY_HINT_RESOURCE_TYPE, "Node"), PropertyInfo(Variant::INT, "body_shape"), PropertyInfo(Variant::INT, "area_shape")));
+ ADD_SIGNAL(MethodInfo("body_shape_exited", PropertyInfo(Variant::INT, "body_id"), PropertyInfo(Variant::OBJECT, "body", PROPERTY_HINT_RESOURCE_TYPE, "Node"), PropertyInfo(Variant::INT, "body_shape"), PropertyInfo(Variant::INT, "area_shape")));
+ ADD_SIGNAL(MethodInfo("body_entered", PropertyInfo(Variant::OBJECT, "body", PROPERTY_HINT_RESOURCE_TYPE, "Node")));
+ ADD_SIGNAL(MethodInfo("body_exited", PropertyInfo(Variant::OBJECT, "body", PROPERTY_HINT_RESOURCE_TYPE, "Node")));
ADD_SIGNAL(MethodInfo("area_shape_entered", PropertyInfo(Variant::INT, "area_id"), PropertyInfo(Variant::OBJECT, "area", PROPERTY_HINT_RESOURCE_TYPE, "Area"), PropertyInfo(Variant::INT, "area_shape"), PropertyInfo(Variant::INT, "self_shape")));
ADD_SIGNAL(MethodInfo("area_shape_exited", PropertyInfo(Variant::INT, "area_id"), PropertyInfo(Variant::OBJECT, "area", PROPERTY_HINT_RESOURCE_TYPE, "Area"), PropertyInfo(Variant::INT, "area_shape"), PropertyInfo(Variant::INT, "self_shape")));
diff --git a/scene/3d/collision_object.cpp b/scene/3d/collision_object.cpp
index e19e45b263..99b8ce0567 100644
--- a/scene/3d/collision_object.cpp
+++ b/scene/3d/collision_object.cpp
@@ -148,7 +148,7 @@ void CollisionObject::_bind_methods() {
BIND_VMETHOD(MethodInfo("_input_event", PropertyInfo(Variant::OBJECT, "camera"), PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent"), PropertyInfo(Variant::VECTOR3, "click_position"), PropertyInfo(Variant::VECTOR3, "click_normal"), PropertyInfo(Variant::INT, "shape_idx")));
- ADD_SIGNAL(MethodInfo("input_event", PropertyInfo(Variant::OBJECT, "camera"), PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent"), PropertyInfo(Variant::VECTOR3, "click_position"), PropertyInfo(Variant::VECTOR3, "click_normal"), PropertyInfo(Variant::INT, "shape_idx")));
+ ADD_SIGNAL(MethodInfo("input_event", PropertyInfo(Variant::OBJECT, "camera", PROPERTY_HINT_RESOURCE_TYPE, "Node"), PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent"), PropertyInfo(Variant::VECTOR3, "click_position"), PropertyInfo(Variant::VECTOR3, "click_normal"), PropertyInfo(Variant::INT, "shape_idx")));
ADD_SIGNAL(MethodInfo("mouse_entered"));
ADD_SIGNAL(MethodInfo("mouse_exited"));
diff --git a/scene/3d/physics_body.cpp b/scene/3d/physics_body.cpp
index 441f2f2549..1cb156ac73 100644
--- a/scene/3d/physics_body.cpp
+++ b/scene/3d/physics_body.cpp
@@ -407,7 +407,7 @@ void RigidBody::_body_inout(int p_status, ObjectID p_instance, int p_body_shape,
node->disconnect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree);
node->disconnect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree);
if (in_tree)
- emit_signal(SceneStringNames::get_singleton()->body_exited, obj);
+ emit_signal(SceneStringNames::get_singleton()->body_exited, node);
}
contact_monitor->body_map.erase(E);
@@ -1011,10 +1011,10 @@ void RigidBody::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "angular_velocity"), "set_angular_velocity", "get_angular_velocity");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "angular_damp", PROPERTY_HINT_RANGE, "-1,128,0.01"), "set_angular_damp", "get_angular_damp");
- ADD_SIGNAL(MethodInfo("body_shape_entered", PropertyInfo(Variant::INT, "body_id"), PropertyInfo(Variant::OBJECT, "body"), PropertyInfo(Variant::INT, "body_shape"), PropertyInfo(Variant::INT, "local_shape")));
- ADD_SIGNAL(MethodInfo("body_shape_exited", PropertyInfo(Variant::INT, "body_id"), PropertyInfo(Variant::OBJECT, "body"), PropertyInfo(Variant::INT, "body_shape"), PropertyInfo(Variant::INT, "local_shape")));
- ADD_SIGNAL(MethodInfo("body_entered", PropertyInfo(Variant::OBJECT, "body")));
- ADD_SIGNAL(MethodInfo("body_exited", PropertyInfo(Variant::OBJECT, "body")));
+ ADD_SIGNAL(MethodInfo("body_shape_entered", PropertyInfo(Variant::INT, "body_id"), PropertyInfo(Variant::OBJECT, "body", PROPERTY_HINT_RESOURCE_TYPE, "Node"), PropertyInfo(Variant::INT, "body_shape"), PropertyInfo(Variant::INT, "local_shape")));
+ ADD_SIGNAL(MethodInfo("body_shape_exited", PropertyInfo(Variant::INT, "body_id"), PropertyInfo(Variant::OBJECT, "body", PROPERTY_HINT_RESOURCE_TYPE, "Node"), PropertyInfo(Variant::INT, "body_shape"), PropertyInfo(Variant::INT, "local_shape")));
+ ADD_SIGNAL(MethodInfo("body_entered", PropertyInfo(Variant::OBJECT, "body", PROPERTY_HINT_RESOURCE_TYPE, "Node")));
+ ADD_SIGNAL(MethodInfo("body_exited", PropertyInfo(Variant::OBJECT, "body", PROPERTY_HINT_RESOURCE_TYPE, "Node")));
ADD_SIGNAL(MethodInfo("sleeping_state_changed"));
BIND_ENUM_CONSTANT(MODE_RIGID);
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index e094a063be..fad91c29cf 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -2956,7 +2956,7 @@ void Control::_bind_methods() {
BIND_ENUM_CONSTANT(ANCHOR_END);
ADD_SIGNAL(MethodInfo("resized"));
- ADD_SIGNAL(MethodInfo("gui_input", PropertyInfo(Variant::OBJECT, "ev", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent")));
+ ADD_SIGNAL(MethodInfo("gui_input", PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent")));
ADD_SIGNAL(MethodInfo("mouse_entered"));
ADD_SIGNAL(MethodInfo("mouse_exited"));
ADD_SIGNAL(MethodInfo("focus_entered"));
diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp
index a7163adbe6..8797ab6fd3 100644
--- a/scene/gui/graph_edit.cpp
+++ b/scene/gui/graph_edit.cpp
@@ -1279,7 +1279,7 @@ void GraphEdit::_bind_methods() {
ADD_SIGNAL(MethodInfo("disconnection_request", PropertyInfo(Variant::STRING, "from"), PropertyInfo(Variant::INT, "from_slot"), PropertyInfo(Variant::STRING, "to"), PropertyInfo(Variant::INT, "to_slot")));
ADD_SIGNAL(MethodInfo("popup_request", PropertyInfo(Variant::VECTOR2, "p_position")));
ADD_SIGNAL(MethodInfo("duplicate_nodes_request"));
- ADD_SIGNAL(MethodInfo("node_selected", PropertyInfo(Variant::OBJECT, "node")));
+ ADD_SIGNAL(MethodInfo("node_selected", PropertyInfo(Variant::OBJECT, "node", PROPERTY_HINT_RESOURCE_TYPE, "Node")));
ADD_SIGNAL(MethodInfo("connection_to_empty", PropertyInfo(Variant::STRING, "from"), PropertyInfo(Variant::INT, "from_slot"), PropertyInfo(Variant::VECTOR2, "release_position")));
ADD_SIGNAL(MethodInfo("delete_nodes_request"));
ADD_SIGNAL(MethodInfo("_begin_node_move"));
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index 6f09488b64..eaf7ad7670 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -1419,7 +1419,7 @@ int Tree::draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2
while (c) {
- if (cache.draw_relationship_lines == 1) {
+ if (cache.draw_relationship_lines == 1 && (c->get_parent() != root || c->get_parent() == root && !hide_root)) {
int root_ofs = children_pos.x + ((p_item->disable_folding || hide_folding) ? cache.hseparation : cache.item_margin);
int parent_ofs = p_pos.x + ((p_item->disable_folding || hide_folding) ? cache.hseparation : cache.item_margin);
Point2i root_pos = Point2i(root_ofs, children_pos.y + label_h / 2) - cache.offset + p_draw_ofs;
@@ -3831,16 +3831,16 @@ void Tree::_bind_methods() {
ADD_SIGNAL(MethodInfo("item_selected"));
ADD_SIGNAL(MethodInfo("cell_selected"));
- ADD_SIGNAL(MethodInfo("multi_selected", PropertyInfo(Variant::OBJECT, "item"), PropertyInfo(Variant::INT, "column"), PropertyInfo(Variant::BOOL, "selected")));
+ ADD_SIGNAL(MethodInfo("multi_selected", PropertyInfo(Variant::OBJECT, "item", PROPERTY_HINT_RESOURCE_TYPE, "TreeItem"), PropertyInfo(Variant::INT, "column"), PropertyInfo(Variant::BOOL, "selected")));
ADD_SIGNAL(MethodInfo("item_rmb_selected", PropertyInfo(Variant::VECTOR2, "position")));
ADD_SIGNAL(MethodInfo("empty_tree_rmb_selected", PropertyInfo(Variant::VECTOR2, "position")));
ADD_SIGNAL(MethodInfo("item_edited"));
ADD_SIGNAL(MethodInfo("item_rmb_edited"));
ADD_SIGNAL(MethodInfo("item_custom_button_pressed"));
ADD_SIGNAL(MethodInfo("item_double_clicked"));
- ADD_SIGNAL(MethodInfo("item_collapsed", PropertyInfo(Variant::OBJECT, "item")));
+ ADD_SIGNAL(MethodInfo("item_collapsed", PropertyInfo(Variant::OBJECT, "item", PROPERTY_HINT_RESOURCE_TYPE, "TreeItem")));
//ADD_SIGNAL( MethodInfo("item_doubleclicked" ) );
- ADD_SIGNAL(MethodInfo("button_pressed", PropertyInfo(Variant::OBJECT, "item"), PropertyInfo(Variant::INT, "column"), PropertyInfo(Variant::INT, "id")));
+ ADD_SIGNAL(MethodInfo("button_pressed", PropertyInfo(Variant::OBJECT, "item", PROPERTY_HINT_RESOURCE_TYPE, "TreeItem"), PropertyInfo(Variant::INT, "column"), PropertyInfo(Variant::INT, "id")));
ADD_SIGNAL(MethodInfo("custom_popup_edited", PropertyInfo(Variant::BOOL, "arrow_clicked")));
ADD_SIGNAL(MethodInfo("item_activated"));
ADD_SIGNAL(MethodInfo("column_title_pressed", PropertyInfo(Variant::INT, "column")));
diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp
index 1d23650a1e..11268cc5c6 100644
--- a/scene/main/scene_tree.cpp
+++ b/scene/main/scene_tree.cpp
@@ -1862,10 +1862,10 @@ void SceneTree::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "multiplayer_poll"), "set_multiplayer_poll_enabled", "is_multiplayer_poll_enabled");
ADD_SIGNAL(MethodInfo("tree_changed"));
- ADD_SIGNAL(MethodInfo("node_added", PropertyInfo(Variant::OBJECT, "node")));
- ADD_SIGNAL(MethodInfo("node_removed", PropertyInfo(Variant::OBJECT, "node")));
+ ADD_SIGNAL(MethodInfo("node_added", PropertyInfo(Variant::OBJECT, "node", PROPERTY_HINT_RESOURCE_TYPE, "Node")));
+ ADD_SIGNAL(MethodInfo("node_removed", PropertyInfo(Variant::OBJECT, "node", PROPERTY_HINT_RESOURCE_TYPE, "Node")));
ADD_SIGNAL(MethodInfo("screen_resized"));
- ADD_SIGNAL(MethodInfo("node_configuration_warning_changed", PropertyInfo(Variant::OBJECT, "node")));
+ ADD_SIGNAL(MethodInfo("node_configuration_warning_changed", PropertyInfo(Variant::OBJECT, "node", PROPERTY_HINT_RESOURCE_TYPE, "Node")));
ADD_SIGNAL(MethodInfo("idle_frame"));
ADD_SIGNAL(MethodInfo("physics_frame"));
diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp
index ffb130048f..9500f35732 100644
--- a/servers/visual/shader_language.cpp
+++ b/servers/visual/shader_language.cpp
@@ -2368,9 +2368,9 @@ int ShaderLanguage::get_cardinality(DataType p_type) {
2,
3,
4,
- 2,
- 3,
4,
+ 9,
+ 16,
1,
1,
1,
@@ -3307,7 +3307,9 @@ ShaderLanguage::Node *ShaderLanguage::_reduce_expression(BlockNode *p_block, Sha
ERR_FAIL_COND_V(op->arguments[0]->type != Node::TYPE_VARIABLE, p_node);
- DataType base = get_scalar_type(op->get_datatype());
+ DataType type = op->get_datatype();
+ DataType base = get_scalar_type(type);
+ int cardinality = get_cardinality(type);
Vector<ConstantNode::Value> values;
@@ -3318,19 +3320,9 @@ ShaderLanguage::Node *ShaderLanguage::_reduce_expression(BlockNode *p_block, Sha
ConstantNode *cn = static_cast<ConstantNode *>(op->arguments[i]);
if (get_scalar_type(cn->datatype) == base) {
-
- int cardinality = get_cardinality(op->arguments[i]->get_datatype());
- if (cn->values.size() == cardinality) {
-
- for (int j = 0; j < cn->values.size(); j++) {
- values.push_back(cn->values[j]);
- }
- } else if (cn->values.size() == 1) {
-
- for (int j = 0; j < cardinality; j++) {
- values.push_back(cn->values[0]);
- }
- } // else: should be filtered by the parser as it's an invalid constructor
+ for (int j = 0; j < cn->values.size(); j++) {
+ values.push_back(cn->values[j]);
+ }
} else if (get_scalar_type(cn->datatype) == cn->datatype) {
ConstantNode::Value v;
@@ -3347,6 +3339,29 @@ ShaderLanguage::Node *ShaderLanguage::_reduce_expression(BlockNode *p_block, Sha
}
}
+ if (values.size() == 1) {
+ if (type >= TYPE_MAT2 && type <= TYPE_MAT4) {
+ ConstantNode::Value value = values[0];
+ ConstantNode::Value zero;
+ zero.real = 0.0f;
+ int size = 2 + (type - TYPE_MAT2);
+
+ values.clear();
+ for (int i = 0; i < size; i++) {
+ for (int j = 0; j < size; j++) {
+ values.push_back(i == j ? value : zero);
+ }
+ }
+ } else {
+ for (int i = 1; i < cardinality; i++) {
+ values.push_back(values[0]);
+ }
+ }
+ } else if (values.size() != cardinality) {
+ ERR_PRINT("Failed to reduce expression, values and cardinality mismatch.");
+ return p_node;
+ }
+
ConstantNode *cn = alloc_node<ConstantNode>();
cn->datatype = op->get_datatype();
cn->values = values;