summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml20
-rw-r--r--DONORS.md2
-rw-r--r--SConstruct2
-rw-r--r--core/io/ip.cpp4
-rw-r--r--core/io/stream_peer_tcp.cpp3
-rw-r--r--doc/classes/ArrayMesh.xml34
-rw-r--r--doc/classes/Control.xml2
-rw-r--r--doc/classes/KinematicBody.xml2
-rw-r--r--doc/classes/Mesh.xml43
-rw-r--r--doc/classes/Node.xml6
-rw-r--r--doc/classes/PhysicsMaterial.xml4
-rwxr-xr-x[-rw-r--r--]doc/classes/UndoRedo.xml37
-rw-r--r--doc/classes/Vector2.xml12
-rw-r--r--doc/classes/Vector3.xml14
-rw-r--r--doc/classes/VideoStream.xml1
-rw-r--r--doc/classes/ViewportContainer.xml3
-rw-r--r--doc/classes/WindowDialog.xml2
-rw-r--r--editor/SCsub3
-rw-r--r--editor/connections_dialog.cpp4
-rw-r--r--editor/editor_profiler.cpp5
-rw-r--r--editor/plugins/item_list_editor_plugin.cpp2
-rw-r--r--editor/plugins/script_editor_plugin.cpp2
-rw-r--r--editor/plugins/script_text_editor.cpp10
-rw-r--r--editor/plugins/spatial_editor_plugin.cpp22
-rw-r--r--editor/plugins/tile_map_editor_plugin.cpp4
-rw-r--r--editor/plugins/tile_set_editor_plugin.cpp2
-rw-r--r--editor/rename_dialog.cpp8
-rw-r--r--editor/scene_tree_dock.cpp6
-rw-r--r--main/splash_editor.pngbin32577 -> 37619 bytes
-rw-r--r--methods.py4
-rw-r--r--modules/bullet/space_bullet.cpp2
-rw-r--r--modules/csg/csg_gizmos.cpp12
-rw-r--r--modules/csg/csg_shape.cpp8
-rw-r--r--modules/visual_script/visual_script_property_selector.cpp4
-rw-r--r--modules/webm/libvpx/SCsub12
-rw-r--r--platform/android/detect.py3
-rw-r--r--platform/javascript/detect.py1
-rw-r--r--platform/uwp/os_uwp.cpp2
-rw-r--r--scene/2d/physics_body_2d.cpp4
-rw-r--r--scene/2d/tile_map.cpp4
-rw-r--r--scene/2d/tile_map.h2
-rw-r--r--scene/3d/soft_body.cpp2
-rw-r--r--thirdparty/libvpx/vpx_config.h7
43 files changed, 202 insertions, 124 deletions
diff --git a/.travis.yml b/.travis.yml
index 404bdc9d90..ea182027ad 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -9,7 +9,7 @@ env:
- SCONS_CACHE=$HOME/.scons_cache
- SCONS_CACHE_LIMIT=1024
- OPTIONS="debug_symbols=no verbose=yes progress=no gdnative_wrapper=yes"
- - secure: "QLFRizqry/Y5pnEZvDlQz5S3YydQ+600u4rHEzFgUTd0heYeQaETXAQeMzp0ymuG1BkdRAl5YJoLVJgAzjwI9hrvugvoUlh2//SfpqZCHN/Q1fYbtGgNTn01R3VFEpcfYQL93I2EjrxVm0WTM4PwCvMO+hU0aWTRDvCt1Lty0kMR+RMDQOO/woqunoXh5wvFNxTJJkAmuLe0v962DJYOIwJAnqMLR0aFYjmeQJ20bc/2X5oLt+WuJDuf/lGj6WSlD6z/o/kL3YxHoUyw4A/HAZ2IX0IfNHKuay60ESWzl/NlobnePiPwHAE2pdDVu//q16fanb9VeYnBYRFse49TpFRb86Lo+Qz8nKDJqpQEIY0YKNCFqekrubqTM++Lj6QvGpykQZNxUhybmELcEsRG4PS0UMvCpebdnJD46nNB+DtO2Lgb4xXDLQwpq19z1wizq/XDQ5hz61TIIx8+i8TsgdSQKCTeWovd4HcD4CVjAD5XTLGgyRmI/zC2d+lTnKo6W9diLq/bX/Goq2QPeaTPABqv817IaJka2JyugQ7Qal/+gNTjYRRsimRCL9B2tVh+Uh8rWhTFhQL4QbP5P65HF+p8qojUzqtAhPMbZ8mxUtNukUI3liVgPgiMss96sG0nTVglFgkkAkEjIMFnqMSKnTfG812K4jIhp2jCO2Q3NeI="
+ - secure: "uch9QszCgsl1qVbuzY41P7S2hWL2IiNFV4SbAYRCdi0oJ9MIu+pVyrQdpf3+jG4rH6j4Rffl+sN17Zz4dIDDioFL1JwqyCqyCyswR8uACC0Rr8gr4Mi3+HIRbv+2s2P4cIQq41JM8FJe84k9jLEMGCGh69w+ibCWoWs74CokYVA="
cache:
directories:
@@ -29,15 +29,6 @@ matrix:
- clang-format-6.0
- libstdc++6 # >= 4.9 needed for clang-format-6.0
- coverity_scan:
- project:
- name: "godotengine/godot"
- description: "Godot Engine Coverity scans"
- notification_email: coverity@godotengine.org
- build_command_prepend: ""
- build_command: "scons p=x11 -j2 $OPTIONS"
- branch_pattern: coverity_scan
-
- env: GODOT_TARGET=x11 TOOLS=yes CACHE_NAME=${GODOT_TARGET}-tools-mono-gcc EXTRA_ARGS="module_mono_enabled=yes mono_glue=no"
os: linux
compiler: gcc
@@ -49,6 +40,15 @@ matrix:
- &linux_deps [libasound2-dev, libfreetype6-dev, libgl1-mesa-dev, libglu1-mesa-dev, libx11-dev, libxcursor-dev, libxi-dev, libxinerama-dev, libxrandr-dev]
- &linux_mono_deps [mono-devel, msbuild]
+ coverity_scan:
+ project:
+ name: "godotengine/godot"
+ description: "Godot Engine Coverity scans"
+ notification_email: coverity@godotengine.org
+ build_command_prepend: ""
+ build_command: "scons p=x11 -j2 $OPTIONS"
+ branch_pattern: coverity_scan
+
- env: GODOT_TARGET=x11 TOOLS=no CACHE_NAME=${GODOT_TARGET}-clang
os: linux
compiler: clang
diff --git a/DONORS.md b/DONORS.md
index ddfcd1057b..6153043318 100644
--- a/DONORS.md
+++ b/DONORS.md
@@ -13,11 +13,11 @@ generous deed immortalized in the next stable release of Godot Engine.
## Platinum sponsors
Enjin Coin <https://enjincoin.io>
+ GameDev.TV <https://gdev.tv/godot>
## Gold sponsors
Gamblify <https://www.gamblify.com>
- GameDev.TV <https://www.gamedev.tv>
## Mini sponsors
diff --git a/SConstruct b/SConstruct
index 2cc486fd1b..3bbe97bfe7 100644
--- a/SConstruct
+++ b/SConstruct
@@ -23,7 +23,7 @@ platform_exporters = []
platform_apis = []
global_defaults = []
-for x in glob.glob("platform/*"):
+for x in sorted(glob.glob("platform/*")):
if (not os.path.isdir(x) or not os.path.exists(x + "/detect.py")):
continue
tmppath = "./" + x
diff --git a/core/io/ip.cpp b/core/io/ip.cpp
index 66bd96df4f..82c94ca0b2 100644
--- a/core/io/ip.cpp
+++ b/core/io/ip.cpp
@@ -117,7 +117,7 @@ IP_Address IP::resolve_hostname(const String &p_hostname, IP::Type p_type) {
resolver->mutex->lock();
String key = _IP_ResolverPrivate::get_cache_key(p_hostname, p_type);
- if (resolver->cache.has(key)) {
+ if (resolver->cache.has(key) && resolver->cache[key].is_valid()) {
IP_Address res = resolver->cache[key];
resolver->mutex->unlock();
return res;
@@ -144,7 +144,7 @@ IP::ResolverID IP::resolve_hostname_queue_item(const String &p_hostname, IP::Typ
String key = _IP_ResolverPrivate::get_cache_key(p_hostname, p_type);
resolver->queue[id].hostname = p_hostname;
resolver->queue[id].type = p_type;
- if (resolver->cache.has(key)) {
+ if (resolver->cache.has(key) && resolver->cache[key].is_valid()) {
resolver->queue[id].response = resolver->cache[key];
resolver->queue[id].status = IP::RESOLVER_STATUS_DONE;
} else {
diff --git a/core/io/stream_peer_tcp.cpp b/core/io/stream_peer_tcp.cpp
index 5d008904ff..54ebb3ae0d 100644
--- a/core/io/stream_peer_tcp.cpp
+++ b/core/io/stream_peer_tcp.cpp
@@ -43,8 +43,7 @@ Error StreamPeerTCP::_connect(const String &p_address, int p_port) {
return ERR_CANT_RESOLVE;
}
- connect_to_host(ip, p_port);
- return OK;
+ return connect_to_host(ip, p_port);
}
void StreamPeerTCP::_bind_methods() {
diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml
index 1e2478dd14..453f28fe5a 100644
--- a/doc/classes/ArrayMesh.xml
+++ b/doc/classes/ArrayMesh.xml
@@ -66,13 +66,6 @@
Returns the name of the blend shape at this index.
</description>
</method>
- <method name="get_surface_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the amount of surfaces that the [code]ArrayMesh[/code] holds.
- </description>
- </method>
<method name="lightmap_unwrap">
<return type="int" enum="Error">
</return>
@@ -118,24 +111,6 @@
Return the length in vertices of the vertex array in the requested surface (see [method add_surface_from_arrays]).
</description>
</method>
- <method name="surface_get_arrays" qualifiers="const">
- <return type="Array">
- </return>
- <argument index="0" name="surf_idx" type="int">
- </argument>
- <description>
- Returns the arrays for the vertices, normals, uvs, etc. that make up the requested surface (see [method add_surface_from_arrays]).
- </description>
- </method>
- <method name="surface_get_blend_shape_arrays" qualifiers="const">
- <return type="Array">
- </return>
- <argument index="0" name="surf_idx" type="int">
- </argument>
- <description>
- Returns the blend shape arrays for the requested surface.
- </description>
- </method>
<method name="surface_get_format" qualifiers="const">
<return type="int">
</return>
@@ -145,15 +120,6 @@
Return the format mask of the requested surface (see [method add_surface_from_arrays]).
</description>
</method>
- <method name="surface_get_material" qualifiers="const">
- <return type="Material">
- </return>
- <argument index="0" name="surf_idx" type="int">
- </argument>
- <description>
- Return a [Material] in a given surface. Surface is rendered using this material.
- </description>
- </method>
<method name="surface_get_name" qualifiers="const">
<return type="String">
</return>
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index 4301102e4a..8575a1f498 100644
--- a/doc/classes/Control.xml
+++ b/doc/classes/Control.xml
@@ -38,7 +38,7 @@
<argument index="0" name="event" type="InputEvent">
</argument>
<description>
- The node's parent forwards input events to this method. Use it to process and accept inputs on UI elements. See [method accept_event].
+ Use this method to process and accept inputs on UI elements. See [method accept_event].
Replaces Godot 2's [code]_input_event[/code].
</description>
</method>
diff --git a/doc/classes/KinematicBody.xml b/doc/classes/KinematicBody.xml
index 0c66319ae7..17310ab4dc 100644
--- a/doc/classes/KinematicBody.xml
+++ b/doc/classes/KinematicBody.xml
@@ -115,6 +115,8 @@
<argument index="6" name="floor_max_angle" type="float" default="0.785398">
</argument>
<description>
+ Moves the body while keeping it attached to slopes. Similar to [method move_and_slide].
+ As long as the [code]snap[/code] vector is in contact with the ground, the body will remain attached to the surface. This means you must disable snap in order to jump, for example. You can do this by setting[code]snap[/code] to[code](0, 0, 0)[/code] or by using [method move_and_slide] instead.
</description>
</method>
<method name="test_move">
diff --git a/doc/classes/Mesh.xml b/doc/classes/Mesh.xml
index afb5d7db93..4852d4701d 100644
--- a/doc/classes/Mesh.xml
+++ b/doc/classes/Mesh.xml
@@ -48,6 +48,40 @@
Returns all the vertices that make up the faces of the mesh. Each three vertices represent one triangle.
</description>
</method>
+ <method name="get_surface_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the amount of surfaces that the [code]Mesh[/code] holds.
+ </description>
+ </method>
+ <method name="surface_get_arrays" qualifiers="const">
+ <return type="Array">
+ </return>
+ <argument index="0" name="surf_idx" type="int">
+ </argument>
+ <description>
+ Returns the arrays for the vertices, normals, uvs, etc. that make up the requested surface (see [method ArrayMesh.add_surface_from_arrays]).
+ </description>
+ </method>
+ <method name="surface_get_blend_shape_arrays" qualifiers="const">
+ <return type="Array">
+ </return>
+ <argument index="0" name="surf_idx" type="int">
+ </argument>
+ <description>
+ Returns the blend shape arrays for the requested surface.
+ </description>
+ </method>
+ <method name="surface_get_material" qualifiers="const">
+ <return type="Material">
+ </return>
+ <argument index="0" name="surf_idx" type="int">
+ </argument>
+ <description>
+ Return a [Material] in a given surface. Surface is rendered using this material.
+ </description>
+ </method>
</methods>
<members>
<member name="lightmap_size_hint" type="Vector2" setter="set_lightmap_size_hint" getter="get_lightmap_size_hint">
@@ -124,22 +158,31 @@
<constant name="ARRAY_COMPRESS_DEFAULT" value="97280" enum="ArrayFormat">
</constant>
<constant name="ARRAY_VERTEX" value="0" enum="ArrayType">
+ Array of vertices.
</constant>
<constant name="ARRAY_NORMAL" value="1" enum="ArrayType">
+ Array of normals.
</constant>
<constant name="ARRAY_TANGENT" value="2" enum="ArrayType">
+ Array of tangents as an array of floats, 4 floats per tangent.
</constant>
<constant name="ARRAY_COLOR" value="3" enum="ArrayType">
+ Array of colors.
</constant>
<constant name="ARRAY_TEX_UV" value="4" enum="ArrayType">
+ Array of UV coordinates.
</constant>
<constant name="ARRAY_TEX_UV2" value="5" enum="ArrayType">
+ Array of second set of UV coordinates.
</constant>
<constant name="ARRAY_BONES" value="6" enum="ArrayType">
+ Array of bone data.
</constant>
<constant name="ARRAY_WEIGHTS" value="7" enum="ArrayType">
+ Array of weights.
</constant>
<constant name="ARRAY_INDEX" value="8" enum="ArrayType">
+ Array of indices.
</constant>
<constant name="ARRAY_MAX" value="9" enum="ArrayType">
</constant>
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml
index d02e3dfdfa..dd496e79dd 100644
--- a/doc/classes/Node.xml
+++ b/doc/classes/Node.xml
@@ -50,7 +50,7 @@
<argument index="0" name="event" type="InputEvent">
</argument>
<description>
- Called when there is an input event. The input event propagates through the node tree until a node consumes it.
+ Called when there is an input event. The input event propagates up through the node tree until a node consumes it.
It is only called if input processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process_input].
To consume the input event and stop it propagating further to other nodes, [method SceneTree.set_input_as_handled] can be called.
For gameplay input, [method _unhandled_input] and [method _unhandled_key_input] are usually a better fit as they allow the GUI to intercept the events first.
@@ -93,7 +93,7 @@
<argument index="0" name="event" type="InputEvent">
</argument>
<description>
- Propagated to all nodes when the previous [InputEvent] is not consumed by any nodes.
+ Called when an [InputEvent] hasn't been consumed by [method _input] or any GUI. The input event propagates up through the node tree until a node consumes it.
It is only called if unhandled input processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process_unhandled_input].
To consume the input event and stop it propagating further to other nodes, [method SceneTree.set_input_as_handled] can be called.
For gameplay input, this and [method _unhandled_key_input] are usually a better fit than [method _input] as they allow the GUI to intercept the events first.
@@ -105,7 +105,7 @@
<argument index="0" name="event" type="InputEventKey">
</argument>
<description>
- Propagated to all nodes when the previous [InputEventKey] is not consumed by any nodes.
+ Called when an [InputEventKey] hasn't been consumed by [method _input] or any GUI. The input event propagates up through the node tree until a node consumes it.
It is only called if unhandled key input processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process_unhandled_key_input].
To consume the input event and stop it propagating further to other nodes, [method SceneTree.set_input_as_handled] can be called.
For gameplay input, this and [method _unhandled_input] are usually a better fit than [method _input] as they allow the GUI to intercept the events first.
diff --git a/doc/classes/PhysicsMaterial.xml b/doc/classes/PhysicsMaterial.xml
index bfebb472a5..3eebcc57a1 100644
--- a/doc/classes/PhysicsMaterial.xml
+++ b/doc/classes/PhysicsMaterial.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="PhysicsMaterial" inherits="Resource" category="Core" version="3.1">
<brief_description>
+ A material for physics properties.
</brief_description>
<description>
+ Provides a means of modifying the collision properties of a [PhysicsBody].
</description>
<tutorials>
</tutorials>
@@ -14,8 +16,10 @@
<member name="absorbent" type="bool" setter="set_absorbent" getter="is_absorbent">
</member>
<member name="bounce" type="float" setter="set_bounce" getter="get_bounce">
+ The body's bounciness. Default value: [code]0[/code].
</member>
<member name="friction" type="float" setter="set_friction" getter="get_friction">
+ The body's friction. Values range from [code]0[/code] (frictionless) to [code]1[/code] (maximum friction). Default value: [code]1[/code].
</member>
<member name="rough" type="bool" setter="set_rough" getter="is_rough">
</member>
diff --git a/doc/classes/UndoRedo.xml b/doc/classes/UndoRedo.xml
index b9550c17fb..0ea5c6e005 100644..100755
--- a/doc/classes/UndoRedo.xml
+++ b/doc/classes/UndoRedo.xml
@@ -4,8 +4,29 @@
Helper to manage UndoRedo in the editor or custom tools.
</brief_description>
<description>
- Helper to manage UndoRedo in the editor or custom tools. It works by storing calls to functions in both 'do' an 'undo' lists.
+ Helper to manage UndoRedo in the editor or custom tools. It works by registering methods and property changes inside 'actions'.
Common behavior is to create an action, then add do/undo calls to functions or property changes, then committing the action.
+ Here's an example on how to add an action to Godot editor's own 'undoredo':
+ [codeblock]
+ var undoredo = get_undo_redo() # method of EditorPlugin
+
+ func do_something():
+ pass # put your code here
+
+ func undo_something():
+ pass # put here the code that reverts what's done by "do_something()"
+
+ func _on_MyButton_pressed():
+ var node = get_node("MyNode2D")
+ undoredo.create_action("Move the node")
+ undoredo.add_do_method(self, "do_something")
+ undoredo.add_undo_method(self, "undo_something")
+ undoredo.add_do_property(node, "position", Vector2(100,100))
+ undoredo.add_undo_property(node, "position", node.position)
+ undoredo.commit_action()
+ [/codeblock]
+ [method create_action], [method add_do_method], [method add_undo_method], [method add_do_property], [method add_undo_property], and [method commit_action] should be called one after the other, like in the example. Not doing so could lead to crashes.
+ If you don't need to register a method you can leave [method add_do_method] and [method add_undo_method] out, and so it goes for properties. You can register more than one method/property.
</description>
<tutorials>
</tutorials>
@@ -20,6 +41,7 @@
<argument index="1" name="method" type="String">
</argument>
<description>
+ Register a method that will be called when the action is committed.
</description>
</method>
<method name="add_do_property">
@@ -32,7 +54,7 @@
<argument index="2" name="value" type="Variant">
</argument>
<description>
- Set a property with a custom value.
+ Register a property value change for 'do'.
</description>
</method>
<method name="add_do_reference">
@@ -41,7 +63,7 @@
<argument index="0" name="object" type="Object">
</argument>
<description>
- Add a 'do' reference that will be erased if the 'do' history is lost. This is useful mostly for new nodes created for the 'do' call. Do not use for resources.
+ Register a reference for 'do' that will be erased if the 'do' history is lost. This is useful mostly for new nodes created for the 'do' call. Do not use for resources.
</description>
</method>
<method name="add_undo_method" qualifiers="vararg">
@@ -52,6 +74,7 @@
<argument index="1" name="method" type="String">
</argument>
<description>
+ Register a method that will be called when the action is undone.
</description>
</method>
<method name="add_undo_property">
@@ -64,7 +87,7 @@
<argument index="2" name="value" type="Variant">
</argument>
<description>
- Undo setting of a property with a custom value.
+ Register a property value change for 'undo'.
</description>
</method>
<method name="add_undo_reference">
@@ -73,7 +96,7 @@
<argument index="0" name="object" type="Object">
</argument>
<description>
- Add an 'undo' reference that will be erased if the 'undo' history is lost. This is useful mostly for nodes removed with the 'do' call (not the 'undo' call!).
+ Register a reference for 'undo' that will be erased if the 'undo' history is lost. This is useful mostly for nodes removed with the 'do' call (not the 'undo' call!).
</description>
</method>
<method name="clear_history">
@@ -98,7 +121,7 @@
<argument index="1" name="merge_mode" type="int" enum="UndoRedo.MergeMode" default="0">
</argument>
<description>
- Create a new action. After this is called, do all your calls to [method add_do_method], [method add_undo_method], [method add_do_property] and [method add_undo_property].
+ Create a new action. After this is called, do all your calls to [method add_do_method], [method add_undo_method], [method add_do_property], and [method add_undo_property], then commit the action with [method commit_action].
</description>
</method>
<method name="get_current_action_name" qualifiers="const">
@@ -120,12 +143,14 @@
<return type="bool">
</return>
<description>
+ Redo last action.
</description>
</method>
<method name="undo">
<return type="bool">
</return>
<description>
+ Undo last action.
</description>
</method>
</methods>
diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml
index 4bc18b926e..a721ef50c5 100644
--- a/doc/classes/Vector2.xml
+++ b/doc/classes/Vector2.xml
@@ -109,7 +109,7 @@
<argument index="3" name="t" type="float">
</argument>
<description>
- Cubicly interpolates between this vector and [code]b[/code] using [code]pre_a[/code] and [code]post_b[/code] as handles, and returns the result at position [code]t[/code]. [code]t[/code] is in the range of [code]0.0 - 1.0[/code], or a percentage of how far along the interpolation is.
+ Cubicly interpolates between this vector and [code]b[/code] using [code]pre_a[/code] and [code]post_b[/code] as handles, and returns the result at position [code]t[/code]. [code]t[/code] is in the range of [code]0.0 - 1.0[/code], representing the amount of interpolation.
</description>
</method>
<method name="distance_squared_to">
@@ -175,7 +175,7 @@
<argument index="1" name="t" type="float">
</argument>
<description>
- Returns the result of the linear interpolation between this vector and [code]b[/code] by amount [code]t[/code]. [code]t[/code] is in the range of [code]0.0 - 1.0[/code], a percentage of how far along the interpolation is.
+ Returns the result of the linear interpolation between this vector and [code]b[/code] by amount [code]t[/code]. [code]t[/code] is in the range of [code]0.0 - 1.0[/code], representing the amount of interpolation.
</description>
</method>
<method name="normalized">
@@ -227,7 +227,7 @@
<argument index="1" name="t" type="float">
</argument>
<description>
- Returns the result of SLERP between this vector and "b", by amount "t". "t" should be a float of 0.0-1.0, a percentage of how far along the interpolation is.
+ Returns the result of SLERP between this vector and [code]b[/code], by amount [code]t[/code]. [code]t[/code] is in the range of [code]0.0 - 1.0[/code], representing the amount of interpolation.
Both vectors need to be normalized.
</description>
</method>
@@ -267,16 +267,22 @@
</members>
<constants>
<constant name="ZERO" value="Vector2( 0, 0 )">
+ Null vector.
</constant>
<constant name="INF" value="Vector2( inf, inf )">
+ Infinite vector.
</constant>
<constant name="LEFT" value="Vector2( -1, 0 )">
+ Left unit vector.
</constant>
<constant name="RIGHT" value="Vector2( 1, 0 )">
+ Right unit vector.
</constant>
<constant name="UP" value="Vector2( 0, -1 )">
+ Up unit vector.
</constant>
<constant name="DOWN" value="Vector2( 0, 1 )">
+ Down unit vector.
</constant>
</constants>
</class>
diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml
index b4dcc6c6aa..4211c34d8e 100644
--- a/doc/classes/Vector3.xml
+++ b/doc/classes/Vector3.xml
@@ -78,7 +78,7 @@
<argument index="3" name="t" type="float">
</argument>
<description>
- Performs a cubic interpolation between vectors [code]pre_a[/code], [code]a[/code], [code]b[/code], [code]post_b[/code] ([code]a[/code] is current), by the given amount (t). (t) should be a float of 0.0-1.0, a percentage of how far along the interpolation is.
+ Performs a cubic interpolation between vectors [code]pre_a[/code], [code]a[/code], [code]b[/code], [code]post_b[/code] ([code]a[/code] is current), by the given amount [code]t[/code]. [code]t[/code] is in the range of [code]0.0 - 1.0[/code], representing the amount of interpolation.
</description>
</method>
<method name="distance_squared_to">
@@ -151,7 +151,7 @@
<argument index="1" name="t" type="float">
</argument>
<description>
- Returns the result of the linear interpolation between this vector and [code]b[/code] by amount [code]t[/code]. [code]t[/code] is in the range of [code]0.0 - 1.0[/code], a percentage of how far along the interpolation is.
+ Returns the result of the linear interpolation between this vector and [code]b[/code] by amount [code]t[/code]. [code]t[/code] is in the range of [code]0.0 - 1.0[/code], representing the amount of interpolation..
</description>
</method>
<method name="max_axis">
@@ -228,7 +228,7 @@
<argument index="1" name="t" type="float">
</argument>
<description>
- Returns the result of SLERP between this vector and "b", by amount "t". "t" should be a float of 0.0-1.0, a percentage of how far along the interpolation is.
+ Returns the result of SLERP between this vector and [code]b[/code], by amount [code]t[/code]. [code]t[/code] is in the range of [code]0.0 - 1.0[/code], representing the amount of interpolation.
Both vectors need to be normalized.
</description>
</method>
@@ -280,20 +280,28 @@
Enumerated value for the Z axis.
</constant>
<constant name="ZERO" value="Vector3( 0, 0, 0 )">
+ Null vector.
</constant>
<constant name="INF" value="Vector3( inf, inf, inf )">
+ Infinite vector.
</constant>
<constant name="LEFT" value="Vector3( -1, 0, 0 )">
+ Left unit vector.
</constant>
<constant name="RIGHT" value="Vector3( 1, 0, 0 )">
+ Right unit vector.
</constant>
<constant name="UP" value="Vector3( 0, 1, 0 )">
+ Up unit vector.
</constant>
<constant name="DOWN" value="Vector3( 0, -1, 0 )">
+ Down unit vector.
</constant>
<constant name="FORWARD" value="Vector3( 0, 0, -1 )">
+ Forward unit vector.
</constant>
<constant name="BACK" value="Vector3( 0, 0, 1 )">
+ Back unit vector.
</constant>
</constants>
</class>
diff --git a/doc/classes/VideoStream.xml b/doc/classes/VideoStream.xml
index 6bfa48511b..9f2655ed1b 100644
--- a/doc/classes/VideoStream.xml
+++ b/doc/classes/VideoStream.xml
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VideoStream" inherits="Resource" category="Core" version="3.1">
<brief_description>
+ Base resource for video streams.
</brief_description>
<description>
</description>
diff --git a/doc/classes/ViewportContainer.xml b/doc/classes/ViewportContainer.xml
index 8c60fb473d..dde429440d 100644
--- a/doc/classes/ViewportContainer.xml
+++ b/doc/classes/ViewportContainer.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ViewportContainer" inherits="Container" category="Core" version="3.1">
<brief_description>
+ Control for holding [Viewport]s.
</brief_description>
<description>
+ A [Container] node that holds a [Viewport], automatically setting its size.
</description>
<tutorials>
</tutorials>
@@ -12,6 +14,7 @@
</methods>
<members>
<member name="stretch" type="bool" setter="set_stretch" getter="is_stretch_enabled">
+ If [code]true[/code] the viewport will be scaled to the control's size. Default value:[code]false[/code].
</member>
<member name="stretch_shrink" type="int" setter="set_stretch_shrink" getter="get_stretch_shrink">
</member>
diff --git a/doc/classes/WindowDialog.xml b/doc/classes/WindowDialog.xml
index 39487f5020..f7f2d10fcd 100644
--- a/doc/classes/WindowDialog.xml
+++ b/doc/classes/WindowDialog.xml
@@ -24,7 +24,7 @@
If [code]true[/code] the user can resize the window. Default value: [code]false[/code].
</member>
<member name="window_title" type="String" setter="set_title" getter="get_title">
- The text displayed in the window's title bar. Default value: "Save a File".
+ The text displayed in the window's title bar.
</member>
</members>
<constants>
diff --git a/editor/SCsub b/editor/SCsub
index 4fa287c33b..d9bdf42d6f 100644
--- a/editor/SCsub
+++ b/editor/SCsub
@@ -76,7 +76,8 @@ if env['tools']:
# Fonts
flist = glob.glob(path + "/../thirdparty/fonts/*.ttf")
- flist.append(glob.glob(path + "/../thirdparty/fonts/*.otf"))
+ flist.extend(glob.glob(path + "/../thirdparty/fonts/*.otf"))
+ flist.sort()
env.Depends('#editor/builtin_fonts.gen.h', flist)
env.CommandNoCache('#editor/builtin_fonts.gen.h', flist, run_in_subprocess(editor_builders.make_fonts_header))
diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp
index da73a3930a..85965768cc 100644
--- a/editor/connections_dialog.cpp
+++ b/editor/connections_dialog.cpp
@@ -650,8 +650,8 @@ void ConnectionsDock::_handle_signal_menu_option(int option) {
_open_connection_dialog(*item);
} break;
case DISCONNECT_ALL: {
- StringName signalName = item->get_metadata(0).operator Dictionary()["name"];
- disconnect_all_dialog->set_text(TTR("Are you sure you want to remove all connections from the \"") + signalName + "\" signal?");
+ StringName signal_name = item->get_metadata(0).operator Dictionary()["name"];
+ disconnect_all_dialog->set_text(vformat(TTR("Are you sure you want to remove all connections from the \"%s\" signal?"), signal_name));
disconnect_all_dialog->popup_centered();
} break;
}
diff --git a/editor/editor_profiler.cpp b/editor/editor_profiler.cpp
index f57c863bcf..223bb9df84 100644
--- a/editor/editor_profiler.cpp
+++ b/editor/editor_profiler.cpp
@@ -100,8 +100,6 @@ void EditorProfiler::clear() {
updating_frame = false;
hover_metric = -1;
seeking = false;
-
- _update_plot();
}
static String _get_percent_txt(float p_value, float p_total) {
@@ -169,7 +167,7 @@ void EditorProfiler::_update_plot() {
int w = graph->get_size().width;
int h = graph->get_size().height;
- bool reset_texture = graph_texture.is_null();
+ bool reset_texture = false;
int desired_len = w * h * 4;
@@ -437,6 +435,7 @@ void EditorProfiler::_activate_pressed() {
void EditorProfiler::_clear_pressed() {
clear();
+ _update_plot();
}
void EditorProfiler::_notification(int p_what) {
diff --git a/editor/plugins/item_list_editor_plugin.cpp b/editor/plugins/item_list_editor_plugin.cpp
index f75fb0d109..1f0b4e9e97 100644
--- a/editor/plugins/item_list_editor_plugin.cpp
+++ b/editor/plugins/item_list_editor_plugin.cpp
@@ -296,7 +296,7 @@ void ItemListEditor::_delete_pressed() {
void ItemListEditor::_edit_items() {
- dialog->popup_centered(Vector2(300, 400));
+ dialog->popup_centered(Vector2(300, 400) * EDSCALE);
}
void ItemListEditor::edit(Node *p_item_list) {
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index fa034c97c0..70f1789a86 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -862,7 +862,7 @@ void ScriptEditor::_file_dialog_action(String p_file) {
if (extensions.find(p_file.get_extension())) {
Ref<Script> scr = ResourceLoader::load(p_file);
if (!scr.is_valid()) {
- editor->show_warning(TTR("Error could not load file."), TTR("Error!"));
+ editor->show_warning(TTR("Error: could not load file."), TTR("Error!"));
file_dialog_option = -1;
return;
}
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index 4e7047ee38..66705f85bf 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -1549,10 +1549,11 @@ void ScriptTextEditor::register_editor() {
ED_SHORTCUT("script_text_editor/unfold_all_lines", TTR("Unfold All Lines"), 0);
#ifdef OSX_ENABLED
ED_SHORTCUT("script_text_editor/clone_down", TTR("Clone Down"), KEY_MASK_SHIFT | KEY_MASK_CMD | KEY_C);
+ ED_SHORTCUT("script_text_editor/complete_symbol", TTR("Complete Symbol"), KEY_MASK_CTRL | KEY_SPACE);
#else
ED_SHORTCUT("script_text_editor/clone_down", TTR("Clone Down"), KEY_MASK_CMD | KEY_B);
-#endif
ED_SHORTCUT("script_text_editor/complete_symbol", TTR("Complete Symbol"), KEY_MASK_CMD | KEY_SPACE);
+#endif
ED_SHORTCUT("script_text_editor/trim_trailing_whitespace", TTR("Trim Trailing Whitespace"), KEY_MASK_CMD | KEY_MASK_ALT | KEY_T);
ED_SHORTCUT("script_text_editor/convert_indent_to_spaces", TTR("Convert Indent To Spaces"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_Y);
ED_SHORTCUT("script_text_editor/convert_indent_to_tabs", TTR("Convert Indent To Tabs"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_X);
@@ -1575,15 +1576,20 @@ void ScriptTextEditor::register_editor() {
#ifdef OSX_ENABLED
ED_SHORTCUT("script_text_editor/find_next", TTR("Find Next"), KEY_MASK_CMD | KEY_G);
ED_SHORTCUT("script_text_editor/find_previous", TTR("Find Previous"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_G);
+ ED_SHORTCUT("script_text_editor/replace", TTR("Replace..."), KEY_MASK_ALT | KEY_MASK_CMD | KEY_F);
#else
ED_SHORTCUT("script_text_editor/find_next", TTR("Find Next"), KEY_F3);
ED_SHORTCUT("script_text_editor/find_previous", TTR("Find Previous"), KEY_MASK_SHIFT | KEY_F3);
-#endif
ED_SHORTCUT("script_text_editor/replace", TTR("Replace..."), KEY_MASK_CMD | KEY_R);
+#endif
ED_SHORTCUT("script_text_editor/find_in_files", TTR("Find in files..."), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_F);
+#ifdef OSX_ENABLED
+ ED_SHORTCUT("script_text_editor/goto_function", TTR("Goto Function..."), KEY_MASK_CTRL | KEY_MASK_CMD | KEY_J);
+#else
ED_SHORTCUT("script_text_editor/goto_function", TTR("Goto Function..."), KEY_MASK_ALT | KEY_MASK_CMD | KEY_F);
+#endif
ED_SHORTCUT("script_text_editor/goto_line", TTR("Goto Line..."), KEY_MASK_CMD | KEY_L);
#ifdef OSX_ENABLED
diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp
index 906c51b9f6..cfc322d2c1 100644
--- a/editor/plugins/spatial_editor_plugin.cpp
+++ b/editor/plugins/spatial_editor_plugin.cpp
@@ -307,7 +307,7 @@ ObjectID SpatialEditorViewport::_select_ray(const Point2 &p_pos, bool p_append,
Node *edited_scene = get_tree()->get_edited_scene_root();
ObjectID closest = 0;
- Spatial *item = NULL;
+ Node *item = NULL;
float closest_dist = 1e20;
int selected_handle = -1;
@@ -341,19 +341,16 @@ ObjectID SpatialEditorViewport::_select_ray(const Point2 &p_pos, bool p_append,
if (dist < closest_dist) {
//make sure that whathever is selected is editable
- while (spat && spat != edited_scene && spat->get_owner() != edited_scene && !edited_scene->is_editable_instance(spat->get_owner())) {
-
- spat = Object::cast_to<Spatial>(spat->get_owner());
- }
-
- if (spat) {
- item = spat;
- closest = spat->get_instance_id();
- closest_dist = dist;
- selected_handle = handle;
+ Node *owner = spat->get_owner();
+ if (owner != edited_scene && !edited_scene->is_editable_instance(owner)) {
+ item = owner;
} else {
- ERR_PRINT("Bug?");
+ item = Object::cast_to<Node>(spat);
}
+
+ closest = item->get_instance_id();
+ closest_dist = dist;
+ selected_handle = handle;
}
}
@@ -4468,6 +4465,7 @@ void SpatialEditor::_init_indicators() {
VisualServer::get_singleton()->instance_geometry_set_cast_shadows_setting(origin_instance, VS::SHADOW_CASTING_SETTING_OFF);
+ origin_enabled = true;
grid_enabled = true;
last_grid_snap = 1;
}
diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp
index 598f7034d8..58c3fd015e 100644
--- a/editor/plugins/tile_map_editor_plugin.cpp
+++ b/editor/plugins/tile_map_editor_plugin.cpp
@@ -238,8 +238,8 @@ void TileMapEditor::_create_set_cell_undo(const Vector2 &p_vec, const CellOp &p_
cell_new["transpose"] = p_cell_new.tr;
cell_new["auto_coord"] = p_cell_new.ac;
- undo_redo->add_undo_method(node, "set_celld", p_vec, cell_old);
- undo_redo->add_do_method(node, "set_celld", p_vec, cell_new);
+ undo_redo->add_undo_method(node, "_set_celld", p_vec, cell_old);
+ undo_redo->add_do_method(node, "_set_celld", p_vec, cell_new);
}
void TileMapEditor::_start_undo(const String &p_action) {
diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp
index f981ead7eb..a6a256f0d6 100644
--- a/editor/plugins/tile_set_editor_plugin.cpp
+++ b/editor/plugins/tile_set_editor_plugin.cpp
@@ -581,7 +581,7 @@ void TileSetEditor::_on_textures_added(const PoolStringArray &p_paths) {
texture_list->select(texture_list->get_item_count() - 1);
_on_texture_list_selected(texture_list->get_item_count() - 1);
if (invalid_count > 0) {
- err_dialog->set_text(String::num(invalid_count, 0) + TTR(" file(s) was not added because was already on the list."));
+ err_dialog->set_text(vformat(TTR("%s file(s) were not added because was already on the list."), String::num(invalid_count, 0)));
err_dialog->popup_centered(Size2(300, 60));
}
}
diff --git a/editor/rename_dialog.cpp b/editor/rename_dialog.cpp
index d617089142..bffd7bd155 100644
--- a/editor/rename_dialog.cpp
+++ b/editor/rename_dialog.cpp
@@ -220,21 +220,21 @@ RenameDialog::RenameDialog(SceneTreeEditor *p_scene_tree_editor, UndoRedo *p_und
Label *lbl_count_step = memnew(Label);
lbl_count_step->set_text(TTR("Step"));
- lbl_count_step->set_tooltip(TTR("Ammount by which counter is incremented for each node"));
+ lbl_count_step->set_tooltip(TTR("Amount by which counter is incremented for each node"));
hbc_count_options->add_child(lbl_count_step);
spn_count_step = memnew(SpinBox);
- spn_count_step->set_tooltip(TTR("Ammount by which counter is incremented for each node"));
+ spn_count_step->set_tooltip(TTR("Amount by which counter is incremented for each node"));
spn_count_step->set_step(1);
hbc_count_options->add_child(spn_count_step);
Label *lbl_count_padding = memnew(Label);
lbl_count_padding->set_text(TTR("Padding"));
- lbl_count_padding->set_tooltip(TTR("Minium number of digits for the counter.\nMissing digits are padded with leading zeros."));
+ lbl_count_padding->set_tooltip(TTR("Minimum number of digits for the counter.\nMissing digits are padded with leading zeros."));
hbc_count_options->add_child(lbl_count_padding);
spn_count_padding = memnew(SpinBox);
- spn_count_padding->set_tooltip(TTR("Minium number of digits for the counter.\nMissing digits are padded with leading zeros."));
+ spn_count_padding->set_tooltip(TTR("Minimum number of digits for the counter.\nMissing digits are padded with leading zeros."));
spn_count_padding->set_step(1);
hbc_count_options->add_child(spn_count_padding);
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index 39250ab391..3ace179f7d 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -400,8 +400,10 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
editor_data->get_undo_redo().add_do_method(E->get(), "set_script", empty);
editor_data->get_undo_redo().add_undo_method(E->get(), "set_script", existing);
- editor_data->get_undo_redo().add_do_method(E->get(), "set_meta", "_editor_icon", get_icon(E->get()->get_class(), "EditorIcons"));
- editor_data->get_undo_redo().add_undo_method(E->get(), "set_meta", "_editor_icon", E->get()->get_meta("_editor_icon"));
+ if (E->get()->has_meta("_editor_icon")) {
+ editor_data->get_undo_redo().add_do_method(E->get(), "set_meta", "_editor_icon", get_icon(E->get()->get_class(), "EditorIcons"));
+ editor_data->get_undo_redo().add_undo_method(E->get(), "set_meta", "_editor_icon", E->get()->get_meta("_editor_icon"));
+ }
}
}
diff --git a/main/splash_editor.png b/main/splash_editor.png
index f003995d6f..d5bc2f1ce6 100644
--- a/main/splash_editor.png
+++ b/main/splash_editor.png
Binary files differ
diff --git a/methods.py b/methods.py
index e9450d95e2..1bc10954ba 100644
--- a/methods.py
+++ b/methods.py
@@ -13,7 +13,7 @@ def add_source_files(self, sources, filetype, lib_env=None, shared=False):
if isbasestring(filetype):
dir_path = self.Dir('.').abspath
- filetype = glob.glob(dir_path + "/" + filetype)
+ filetype = sorted(glob.glob(dir_path + "/" + filetype))
for path in filetype:
sources.append(self.Object(path))
@@ -43,7 +43,7 @@ def update_version(module_version_string=""):
f.write("#define VERSION_STATUS \"" + str(version.status) + "\"\n")
f.write("#define VERSION_BUILD \"" + str(build_name) + "\"\n")
f.write("#define VERSION_MODULE_CONFIG \"" + str(version.module_config) + module_version_string + "\"\n")
- f.write("#define VERSION_YEAR " + str(datetime.datetime.now().year) + "\n")
+ f.write("#define VERSION_YEAR " + str(2018) + "\n")
f.close()
# NOTE: It is safe to generate this file here, since this is still executed serially
diff --git a/modules/bullet/space_bullet.cpp b/modules/bullet/space_bullet.cpp
index 4a11bec5af..b12925b073 100644
--- a/modules/bullet/space_bullet.cpp
+++ b/modules/bullet/space_bullet.cpp
@@ -980,7 +980,7 @@ int SpaceBullet::test_ray_separation(RigidBodyBullet *p_body, const Transform &p
btVector3 recover_motion(0, 0, 0);
- int rays_found;
+ int rays_found = 0;
for (int t(RECOVERING_MOVEMENT_CYCLES); 0 < t; --t) {
int last_ray_index = recover_from_penetration_ray(p_body, body_transform, RECOVERING_MOVEMENT_SCALE, p_infinite_inertia, p_result_max, recover_motion, r_results);
diff --git a/modules/csg/csg_gizmos.cpp b/modules/csg/csg_gizmos.cpp
index f9744c72af..07c33ed670 100644
--- a/modules/csg/csg_gizmos.cpp
+++ b/modules/csg/csg_gizmos.cpp
@@ -139,9 +139,9 @@ void CSGShapeSpatialGizmoPlugin::set_handle(EditorSpatialGizmo *p_gizmo, int p_i
d = 0.001;
switch (p_idx) {
- case 0: s->set_width(d); break;
- case 1: s->set_height(d); break;
- case 2: s->set_depth(d); break;
+ case 0: s->set_width(d * 2); break;
+ case 1: s->set_height(d * 2); break;
+ case 2: s->set_depth(d * 2); break;
}
}
@@ -329,9 +329,9 @@ void CSGShapeSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) {
CSGBox *s = Object::cast_to<CSGBox>(cs);
Vector<Vector3> handles;
- handles.push_back(Vector3(s->get_width(), 0, 0));
- handles.push_back(Vector3(0, s->get_height(), 0));
- handles.push_back(Vector3(0, 0, s->get_depth()));
+ handles.push_back(Vector3(s->get_width() * 0.5, 0, 0));
+ handles.push_back(Vector3(0, s->get_height() * 0.5, 0));
+ handles.push_back(Vector3(0, 0, s->get_depth() * 0.5));
p_gizmo->add_handles(handles, handles_material);
}
diff --git a/modules/csg/csg_shape.cpp b/modules/csg/csg_shape.cpp
index 258c628d93..714be16db7 100644
--- a/modules/csg/csg_shape.cpp
+++ b/modules/csg/csg_shape.cpp
@@ -917,7 +917,7 @@ CSGBrush *CSGBox::_build_brush() {
int face = 0;
- Vector3 vertex_mul(width, height, depth);
+ Vector3 vertex_mul(width * 0.5, height * 0.5, depth * 0.5);
{
@@ -1051,9 +1051,9 @@ Ref<Material> CSGBox::get_material() const {
CSGBox::CSGBox() {
// defaults
- width = 1.0;
- height = 1.0;
- depth = 1.0;
+ width = 2.0;
+ height = 2.0;
+ depth = 2.0;
}
///////////////
diff --git a/modules/visual_script/visual_script_property_selector.cpp b/modules/visual_script/visual_script_property_selector.cpp
index f79c81ad88..8d465c8872 100644
--- a/modules/visual_script/visual_script_property_selector.cpp
+++ b/modules/visual_script/visual_script_property_selector.cpp
@@ -191,10 +191,10 @@ void VisualScriptPropertySelector::_update_search() {
if (type_filter.size() && type_filter.find(E->get().type) == -1)
continue;
- String get_text_raw = String(TTR("Get")) + String(" ") + E->get().name;
+ String get_text_raw = String(vformat(TTR("Get %s"), E->get().name));
String get_text = get_text_raw.capitalize();
- String set_text_raw = String(TTR("Set ")) + String(" ") + E->get().name;
+ String set_text_raw = String(vformat(TTR("Set %s"), E->get().name));
String set_text = set_text_raw.capitalize();
String input = search_box->get_text().capitalize();
if (input == String() ||
diff --git a/modules/webm/libvpx/SCsub b/modules/webm/libvpx/SCsub
index c681e2b34f..2daf8c282f 100644
--- a/modules/webm/libvpx/SCsub
+++ b/modules/webm/libvpx/SCsub
@@ -38,7 +38,6 @@ libvpx_sources = [
"vp8/decoder/decodemv.c",
"vp8/decoder/detokenize.c",
"vp8/decoder/onyxd_if.c",
- "vp8/decoder/threading.c",
"vp9/vp9_dx_iface.c",
@@ -102,6 +101,10 @@ libvpx_sources = [
"vpx_util/vpx_thread.c"
]
+libvpx_sources_mt = [
+ "vp8/decoder/threading.c",
+]
+
libvpx_sources_intrin_x86 = [
"vp8/common/x86/filter_x86.c",
"vp8/common/x86/loopfilter_x86.c",
@@ -231,6 +234,7 @@ libvpx_sources_arm_neon_gas_apple = [
]
libvpx_sources = [libvpx_dir + file for file in libvpx_sources]
+libvpx_sources_mt = [libvpx_dir + file for file in libvpx_sources_mt]
libvpx_sources_intrin_x86 = [libvpx_dir + file for file in libvpx_sources_intrin_x86]
libvpx_sources_intrin_x86_mmx = [libvpx_dir + file for file in libvpx_sources_intrin_x86_mmx]
libvpx_sources_intrin_x86_sse2 = [libvpx_dir + file for file in libvpx_sources_intrin_x86_sse2]
@@ -253,6 +257,8 @@ env_webm.Append(CPPPATH=[libvpx_dir])
env_libvpx = env.Clone()
env_libvpx.Append(CPPPATH=[libvpx_dir])
+webm_multithread = env["platform"] != 'javascript'
+
cpu_bits = env["bits"]
webm_cpu_x86 = False
webm_cpu_arm = False
@@ -338,6 +344,10 @@ if webm_simd_optimizations == False:
print("WebM SIMD optimizations are disabled. Check if your CPU architecture, CPU bits or platform are supported!")
env_libvpx.add_source_files(env.modules_sources, libvpx_sources)
+
+if webm_multithread:
+ env_libvpx.add_source_files(env.modules_sources, libvpx_sources_mt)
+
if webm_cpu_x86:
is_clang_or_gcc = ('gcc' in env["CC"]) or ('clang' in env["CC"]) or ("OSXCROSS_ROOT" in os.environ)
diff --git a/platform/android/detect.py b/platform/android/detect.py
index b22e85b2c1..953a2fa6d2 100644
--- a/platform/android/detect.py
+++ b/platform/android/detect.py
@@ -258,9 +258,10 @@ def configure(env):
if ndk_version != None and LooseVersion(ndk_version) >= LooseVersion("15.0.4075724"):
if LooseVersion(ndk_version) >= LooseVersion("17.1.4828580"):
env.Append(LINKFLAGS=['-Wl,--exclude-libs,libgcc.a','-Wl,--exclude-libs,libatomic.a','-nostdlib++'])
+ else:
+ env.Append(LINKFLAGS=[env["ANDROID_NDK_ROOT"] +"/sources/cxx-stl/llvm-libc++/libs/"+arch_subpath+"/libandroid_support.a"])
env.Append(LINKFLAGS=['-shared', '--sysroot=' + lib_sysroot, '-Wl,--warn-shared-textrel'])
env.Append(LIBPATH=[env["ANDROID_NDK_ROOT"] + "/sources/cxx-stl/llvm-libc++/libs/"+arch_subpath+"/"])
- env.Append(LINKFLAGS=[env["ANDROID_NDK_ROOT"] +"/sources/cxx-stl/llvm-libc++/libs/"+arch_subpath+"/libandroid_support.a"])
env.Append(LINKFLAGS=[env["ANDROID_NDK_ROOT"] +"/sources/cxx-stl/llvm-libc++/libs/"+arch_subpath+"/libc++_shared.so"])
else:
env.Append(LINKFLAGS=['-shared', '--sysroot=' + lib_sysroot, '-Wl,--warn-shared-textrel'])
diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py
index fc909f6619..17b31f8d73 100644
--- a/platform/javascript/detect.py
+++ b/platform/javascript/detect.py
@@ -25,7 +25,6 @@ def get_opts():
def get_flags():
return [
('tools', False),
- ('module_theora_enabled', False),
# Disabling the mbedtls module reduces file size.
# The module has little use due to the limited networking functionality
# in this platform. For the available networking methods, the browser
diff --git a/platform/uwp/os_uwp.cpp b/platform/uwp/os_uwp.cpp
index b6c3dcf9e0..b2eb3450e2 100644
--- a/platform/uwp/os_uwp.cpp
+++ b/platform/uwp/os_uwp.cpp
@@ -225,7 +225,7 @@ Error OSUWP::initialize(const VideoMode &p_desired, int p_video_driver, int p_au
RasterizerGLES3::make_current();
break;
} else {
- if (GLOBAL_GET("rendering/quality/driver/driver_fallback") == "Best" || editor) {
+ if (GLOBAL_GET("rendering/quality/driver/driver_fallback") == "Best") {
p_video_driver = VIDEO_DRIVER_GLES2;
opengl_api_type = ContextEGL::GLES_2_0;
continue;
diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp
index 8e31688d90..bd2253809c 100644
--- a/scene/2d/physics_body_2d.cpp
+++ b/scene/2d/physics_body_2d.cpp
@@ -598,12 +598,12 @@ real_t RigidBody2D::get_inertia() const {
void RigidBody2D::set_weight(real_t p_weight) {
- set_mass(p_weight / real_t(GLOBAL_DEF("physics/2d/default_gravity", 98)) / 10);
+ set_mass(p_weight / (real_t(GLOBAL_DEF("physics/2d/default_gravity", 98)) / 10));
}
real_t RigidBody2D::get_weight() const {
- return mass * real_t(GLOBAL_DEF("physics/2d/default_gravity", 98)) / 10;
+ return mass * (real_t(GLOBAL_DEF("physics/2d/default_gravity", 98)) / 10);
}
#ifndef DISABLE_DEPRECATED
diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp
index 80565fa455..8a2fdbacfa 100644
--- a/scene/2d/tile_map.cpp
+++ b/scene/2d/tile_map.cpp
@@ -726,7 +726,7 @@ void TileMap::set_cellv(const Vector2 &p_pos, int p_tile, bool p_flip_x, bool p_
set_cell(p_pos.x, p_pos.y, p_tile, p_flip_x, p_flip_y, p_transpose);
}
-void TileMap::set_celld(const Vector2 &p_pos, const Dictionary &p_data) {
+void TileMap::_set_celld(const Vector2 &p_pos, const Dictionary &p_data) {
set_cell(p_pos.x, p_pos.y, p_data["id"], p_data["flip_h"], p_data["flip_y"], p_data["transpose"], p_data["auto_coord"]);
}
@@ -1612,7 +1612,7 @@ void TileMap::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_cell", "x", "y", "tile", "flip_x", "flip_y", "transpose", "autotile_coord"), &TileMap::set_cell, DEFVAL(false), DEFVAL(false), DEFVAL(false), DEFVAL(Vector2()));
ClassDB::bind_method(D_METHOD("set_cellv", "position", "tile", "flip_x", "flip_y", "transpose"), &TileMap::set_cellv, DEFVAL(false), DEFVAL(false), DEFVAL(false));
- ClassDB::bind_method(D_METHOD("set_celld", "position", "data"), &TileMap::set_celld);
+ ClassDB::bind_method(D_METHOD("_set_celld", "position", "data"), &TileMap::_set_celld);
ClassDB::bind_method(D_METHOD("get_cell", "x", "y"), &TileMap::get_cell);
ClassDB::bind_method(D_METHOD("get_cellv", "position"), &TileMap::get_cellv);
ClassDB::bind_method(D_METHOD("is_cell_x_flipped", "x", "y"), &TileMap::is_cell_x_flipped);
diff --git a/scene/2d/tile_map.h b/scene/2d/tile_map.h
index 52aa6e8e2a..55db33837f 100644
--- a/scene/2d/tile_map.h
+++ b/scene/2d/tile_map.h
@@ -242,7 +242,7 @@ public:
void set_cell_autotile_coord(int p_x, int p_y, const Vector2 &p_coord);
Vector2 get_cell_autotile_coord(int p_x, int p_y) const;
- void set_celld(const Vector2 &p_pos, const Dictionary &p_data);
+ void _set_celld(const Vector2 &p_pos, const Dictionary &p_data);
void set_cellv(const Vector2 &p_pos, int p_tile, bool p_flip_x = false, bool p_flip_y = false, bool p_transpose = false);
int get_cellv(const Vector2 &p_pos) const;
diff --git a/scene/3d/soft_body.cpp b/scene/3d/soft_body.cpp
index 980c348c9b..2f8e4688ef 100644
--- a/scene/3d/soft_body.cpp
+++ b/scene/3d/soft_body.cpp
@@ -401,7 +401,7 @@ String SoftBody::get_configuration_warning() const {
if (!warning.empty())
warning += "\n\n";
- warning += TTR("Size changes to SoftBody will be overriden by the physics engine when running.\nChange the size in children collision shapes instead.");
+ warning += TTR("Size changes to SoftBody will be overridden by the physics engine when running.\nChange the size in children collision shapes instead.");
}
return warning;
diff --git a/thirdparty/libvpx/vpx_config.h b/thirdparty/libvpx/vpx_config.h
index fb9e13c4ad..6caec50c81 100644
--- a/thirdparty/libvpx/vpx_config.h
+++ b/thirdparty/libvpx/vpx_config.h
@@ -67,6 +67,12 @@
#define CONFIG_BIG_ENDIAN 0 //TODO: Autodetect
+#ifdef __EMSCRIPTEN__
+#define CONFIG_MULTITHREAD 0
+#else
+#define CONFIG_MULTITHREAD 1
+#endif
+
#ifdef _WIN32
#define HAVE_PTHREAD_H 0
#define HAVE_UNISTD_H 0
@@ -95,7 +101,6 @@
#define CONFIG_RUNTIME_CPU_DETECT 1
#define CONFIG_POSTPROC 0
#define CONFIG_VP9_POSTPROC 0
-#define CONFIG_MULTITHREAD 1
#define CONFIG_INTERNAL_STATS 0
#define CONFIG_VP8_ENCODER 0
#define CONFIG_VP8_DECODER 1