summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml20
-rw-r--r--SConstruct2
-rw-r--r--doc/classes/ArrayMesh.xml34
-rw-r--r--doc/classes/Mesh.xml43
-rw-r--r--editor/SCsub3
-rw-r--r--editor/connections_dialog.cpp4
-rw-r--r--editor/plugins/script_editor_plugin.cpp2
-rw-r--r--editor/plugins/spatial_editor_plugin.cpp22
-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--methods.py4
-rw-r--r--modules/bullet/space_bullet.cpp2
-rw-r--r--modules/visual_script/visual_script_property_selector.cpp4
-rw-r--r--platform/uwp/os_uwp.cpp2
-rw-r--r--scene/2d/physics_body_2d.cpp4
-rw-r--r--scene/3d/soft_body.cpp2
17 files changed, 87 insertions, 77 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/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/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/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/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/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/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_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/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/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/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/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;