summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml6
-rw-r--r--core/error_list.h2
-rw-r--r--core/global_constants.cpp1
-rw-r--r--core/object.h5
-rw-r--r--core/os/dir_access.cpp3
-rw-r--r--core/os/file_access.h2
-rw-r--r--core/ustring.cpp2
-rw-r--r--doc/classes/@GlobalScope.xml3
-rw-r--r--doc/classes/Area.xml12
-rw-r--r--doc/classes/CenterContainer.xml1
-rw-r--r--doc/classes/CurveTexture.xml4
-rw-r--r--drivers/gles3/shader_gles3.cpp6
-rw-r--r--drivers/gles3/shaders/scene.glsl2
-rw-r--r--drivers/unix/rw_lock_posix.cpp2
-rw-r--r--drivers/unix/stream_peer_tcp_posix.cpp4
-rw-r--r--editor/doc/doc_data.cpp2
-rw-r--r--editor/editor_about.cpp13
-rw-r--r--editor/editor_about.h6
-rw-r--r--editor/editor_export.cpp12
-rw-r--r--editor/editor_node.cpp15
-rw-r--r--editor/editor_settings.cpp1
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp2
-rw-r--r--editor/project_manager.cpp3
-rw-r--r--editor/property_editor.cpp39
-rw-r--r--editor/property_editor.h17
-rw-r--r--modules/gdnative/gdnative/basis.cpp2
-rw-r--r--modules/gdnative/gdnative/quat.cpp2
-rw-r--r--modules/gdnative/gdnative/vector2.cpp2
-rw-r--r--modules/gdnative/gdnative/vector3.cpp2
-rw-r--r--modules/gdnative/gdnative_api.json8
-rw-r--r--modules/gdnative/include/gdnative/basis.h2
-rw-r--r--modules/gdnative/include/gdnative/gdnative.h2
-rw-r--r--modules/gdnative/include/gdnative/quat.h2
-rw-r--r--modules/gdnative/include/gdnative/vector2.h2
-rw-r--r--modules/gdnative/include/gdnative/vector3.h2
-rw-r--r--modules/gdnative/register_types.cpp22
-rw-r--r--modules/mono/glue/cs_files/Error.cs3
-rw-r--r--modules/opus/audio_stream_opus.cpp2
-rw-r--r--modules/squish/image_compress_squish.cpp2
-rw-r--r--modules/visual_script/visual_script_nodes.cpp8
-rw-r--r--modules/vorbis/audio_stream_ogg_vorbis.cpp2
-rw-r--r--platform/android/build.gradle.template2
-rw-r--r--platform/android/java/src/org/godotengine/godot/Godot.java18
-rw-r--r--platform/osx/os_osx.h1
-rw-r--r--platform/server/os_server.h1
-rw-r--r--platform/windows/stream_peer_winsock.cpp4
-rw-r--r--scene/2d/particles_2d.cpp2
-rw-r--r--scene/gui/rich_text_label.cpp11
-rw-r--r--scene/resources/default_theme/default_theme.cpp2
-rw-r--r--scene/resources/packed_scene.cpp2
-rw-r--r--scene/resources/primitive_meshes.cpp2
-rw-r--r--servers/visual/visual_server_scene.cpp33
-rw-r--r--servers/visual/visual_server_scene.h1
53 files changed, 180 insertions, 129 deletions
diff --git a/.travis.yml b/.travis.yml
index acab89e516..2c4eda9105 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -30,9 +30,9 @@ matrix:
- env: GODOT_TARGET=android TOOLS=no CACHE_NAME=${GODOT_TARGET}-gcc
os: linux
compiler: gcc
- - env: GODOT_TARGET=osx TOOLS=yes CACHE_NAME=${GODOT_TARGET}-clang-tools
- os: osx
- compiler: clang
+ #- env: GODOT_TARGET=osx TOOLS=yes CACHE_NAME=${GODOT_TARGET}-clang-tools
+ # os: osx
+ # compiler: clang
#- env: GODOT_TARGET=iphone TOOLS=no CACHE_NAME=${GODOT_TARGET}-clang
# os: osx
# compiler: clang
diff --git a/core/error_list.h b/core/error_list.h
index 50d248b3d0..9a36b27aab 100644
--- a/core/error_list.h
+++ b/core/error_list.h
@@ -87,8 +87,6 @@ enum Error {
ERR_HELP, ///< user requested help!!
ERR_BUG, ///< a bug in the software certainly happened, due to a double check failing or unexpected behavior.
ERR_PRINTER_ON_FIRE, /// the parallel port printer is engulfed in flames
- ERR_OMFG_THIS_IS_VERY_VERY_BAD, ///< shit happens, has never been used, though
- ERR_WTF = ERR_OMFG_THIS_IS_VERY_VERY_BAD ///< short version of the above
};
#endif
diff --git a/core/global_constants.cpp b/core/global_constants.cpp
index 48101c8cf1..fb432b85db 100644
--- a/core/global_constants.cpp
+++ b/core/global_constants.cpp
@@ -491,7 +491,6 @@ void register_global_constants() {
BIND_GLOBAL_ENUM_CONSTANT(ERR_BUSY);
BIND_GLOBAL_ENUM_CONSTANT(ERR_HELP); ///< user requested help!!
BIND_GLOBAL_ENUM_CONSTANT(ERR_BUG); ///< a bug in the software certainly happened ), due to a double check failing or unexpected behavior.
- BIND_GLOBAL_ENUM_CONSTANT(ERR_WTF);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_NONE);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_RANGE);
diff --git a/core/object.h b/core/object.h
index 3ac699f978..0a0c781649 100644
--- a/core/object.h
+++ b/core/object.h
@@ -1,4 +1,4 @@
-/*************************************************************************/
+/*************************************************************************/
/* object.h */
/*************************************************************************/
/* This file is part of: */
@@ -109,10 +109,11 @@ enum PropertyUsageFlags {
PROPERTY_USAGE_SCRIPT_DEFAULT_VALUE = 1 << 17,
PROPERTY_USAGE_CLASS_IS_ENUM = 1 << 18,
PROPERTY_USAGE_NIL_IS_VARIANT = 1 << 19,
+ PROPERTY_USAGE_INTERNAL = 1 << 20,
PROPERTY_USAGE_DEFAULT = PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_NETWORK,
PROPERTY_USAGE_DEFAULT_INTL = PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_NETWORK | PROPERTY_USAGE_INTERNATIONALIZED,
- PROPERTY_USAGE_NOEDITOR = PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_NETWORK,
+ PROPERTY_USAGE_NOEDITOR = PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_NETWORK | PROPERTY_USAGE_INTERNAL,
};
#define ADD_SIGNAL(m_signal) ClassDB::add_signal(get_class_static(), m_signal)
diff --git a/core/os/dir_access.cpp b/core/os/dir_access.cpp
index 6d4b46f4da..e19c8e8ea5 100644
--- a/core/os/dir_access.cpp
+++ b/core/os/dir_access.cpp
@@ -333,6 +333,9 @@ Error DirAccess::copy(String p_from, String p_to, int chmod_flags) {
if (err == OK && chmod_flags != -1) {
fdst->close();
err = fdst->_chmod(p_to, chmod_flags);
+ // If running on a platform with no chmod support (i.e., Windows), don't fail
+ if (err == ERR_UNAVAILABLE)
+ err = OK;
}
memdelete(fsrc);
diff --git a/core/os/file_access.h b/core/os/file_access.h
index 455dd1ea99..6fda3d9668 100644
--- a/core/os/file_access.h
+++ b/core/os/file_access.h
@@ -141,7 +141,7 @@ public:
virtual Error reopen(const String &p_path, int p_mode_flags); ///< does not change the AccessType
- virtual Error _chmod(const String &p_path, int p_mod) { return FAILED; }
+ virtual Error _chmod(const String &p_path, int p_mod) { return ERR_UNAVAILABLE; }
static FileAccess *create(AccessType p_access); /// Create a file access (for the current platform) this is the only portable way of accessing files.
static FileAccess *create_for_path(const String &p_path);
diff --git a/core/ustring.cpp b/core/ustring.cpp
index a86fb46c8a..3a0708851e 100644
--- a/core/ustring.cpp
+++ b/core/ustring.cpp
@@ -3380,8 +3380,6 @@ bool String::is_valid_float() const {
from++;
}
- //this was pulled out of my ass, i wonder if it's correct...
-
bool exponent_found = false;
bool period_found = false;
bool sign_found = false;
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml
index 5655578459..deddaffdc6 100644
--- a/doc/classes/@GlobalScope.xml
+++ b/doc/classes/@GlobalScope.xml
@@ -1190,9 +1190,6 @@
<constant name="ERR_BUG" value="47" enum="Error">
Bug error
</constant>
- <constant name="ERR_WTF" value="49" enum="Error">
- WTF error (something probably went really wrong)
- </constant>
<constant name="PROPERTY_HINT_NONE" value="0" enum="PropertyHint">
No hint for edited property.
</constant>
diff --git a/doc/classes/Area.xml b/doc/classes/Area.xml
index f58aa3cc0a..b74e767fd2 100644
--- a/doc/classes/Area.xml
+++ b/doc/classes/Area.xml
@@ -17,7 +17,7 @@
<argument index="0" name="bit" type="int">
</argument>
<description>
- Return an individual bit on the layer mask.
+ Returns an individual bit on the layer mask.
</description>
</method>
<method name="get_collision_mask_bit" qualifiers="const">
@@ -26,7 +26,7 @@
<argument index="0" name="bit" type="int">
</argument>
<description>
- Return an individual bit on the collision mask.
+ Returns an individual bit on the collision mask.
</description>
</method>
<method name="get_overlapping_areas" qualifiers="const">
@@ -69,7 +69,7 @@
<argument index="1" name="value" type="bool">
</argument>
<description>
- Set/clear individual bits on the layer mask. This makes getting an area in/out of only one layer easier.
+ Set/clear individual bits on the layer mask. This simplifies editing this [code]Area[code]'s layers.
</description>
</method>
<method name="set_collision_mask_bit">
@@ -80,7 +80,7 @@
<argument index="1" name="value" type="bool">
</argument>
<description>
- Set/clear individual bits on the collision mask. This makes selecting the areas scanned easier.
+ Set/clear individual bits on the collision mask. This simplifies editing which [code]Area[/code] layers this [code]Area[/code] scans.
</description>
</method>
</methods>
@@ -125,12 +125,16 @@
The area's priority. Higher priority areas are processed first. Default value: 0.
</member>
<member name="reverb_bus_amount" type="float" setter="set_reverb_amount" getter="get_reverb_amount">
+ The degree to which this area applies reverb to its associated audio. Ranges from [code]0[/code] to [code]1[/code] with [code]0.1[/code] precision.
</member>
<member name="reverb_bus_enable" type="bool" setter="set_use_reverb_bus" getter="is_using_reverb_bus">
+ If [code]true[/code] the area applies reverb to its associated audio.
</member>
<member name="reverb_bus_name" type="String" setter="set_reverb_bus" getter="get_reverb_bus">
+ The reverb bus name to use for this area's associated audio.
</member>
<member name="reverb_bus_uniformity" type="float" setter="set_reverb_uniformity" getter="get_reverb_uniformity">
+ The degree to which this area's reverb is a uniform effect. Ranges from [code]0[/code] to [code]1[/code] with [code]0.1[/code] precision.
</member>
<member name="space_override" type="int" setter="set_space_override_mode" getter="get_space_override_mode" enum="Area.SpaceOverride">
Override mode for gravity and damping calculations within this area. See the SPACE_OVERRIDE_* constants for values.
diff --git a/doc/classes/CenterContainer.xml b/doc/classes/CenterContainer.xml
index 0db18aed53..6235a3fec4 100644
--- a/doc/classes/CenterContainer.xml
+++ b/doc/classes/CenterContainer.xml
@@ -14,6 +14,7 @@
</methods>
<members>
<member name="use_top_left" type="bool" setter="set_use_top_left" getter="is_using_top_left">
+ If [code]true[/code] centers children relative to the [code]CenterContainer[/code]'s top left corner. Default value: [code]false[/code].
</member>
</members>
<constants>
diff --git a/doc/classes/CurveTexture.xml b/doc/classes/CurveTexture.xml
index 73126de4aa..f62da8a135 100644
--- a/doc/classes/CurveTexture.xml
+++ b/doc/classes/CurveTexture.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CurveTexture" inherits="Texture" category="Core" version="3.0-beta">
<brief_description>
+ A texture that shows a curve.
</brief_description>
<description>
+ Renders a given [Curve] provided to it. Simplifies the task of drawing curves and/or saving them as image files.
</description>
<tutorials>
</tutorials>
@@ -12,8 +14,10 @@
</methods>
<members>
<member name="curve" type="Curve" setter="set_curve" getter="get_curve">
+ The [code]curve[/code] rendered onto the texture.
</member>
<member name="width" type="int" setter="set_width" getter="get_width">
+ The width of the texture.
</member>
</members>
<constants>
diff --git a/drivers/gles3/shader_gles3.cpp b/drivers/gles3/shader_gles3.cpp
index d4ef256a33..9e234f5005 100644
--- a/drivers/gles3/shader_gles3.cpp
+++ b/drivers/gles3/shader_gles3.cpp
@@ -343,7 +343,7 @@ ShaderGLES3::Version *ShaderGLES3::get_current_version() {
glDeleteProgram(v.id);
v.id = 0;
- ERR_PRINT("NO LOG, WTF");
+ ERR_PRINT("Vertex shader compilation failed with empty log");
} else {
if (iloglen == 0) {
@@ -451,7 +451,7 @@ ShaderGLES3::Version *ShaderGLES3::get_current_version() {
glDeleteShader(v.vert_id);
glDeleteProgram(v.id);
v.id = 0;
- ERR_PRINT("NO LOG, WTF");
+ ERR_PRINT("Fragment shader compilation failed with empty log");
} else {
if (iloglen == 0) {
@@ -624,7 +624,7 @@ void ShaderGLES3::setup(const char **p_conditional_defines, int p_conditional_co
feedbacks = p_feedback;
feedback_count = p_feedback_count;
- //split vertex and shader code (thank you, retarded shader compiler programmers from you know what company).
+ //split vertex and shader code (thank you, shader compiler programmers from you know what company).
{
String globals_tag = "\nVERTEX_SHADER_GLOBALS";
String material_tag = "\nMATERIAL_UNIFORMS";
diff --git a/drivers/gles3/shaders/scene.glsl b/drivers/gles3/shaders/scene.glsl
index 79b989be4a..676541649c 100644
--- a/drivers/gles3/shaders/scene.glsl
+++ b/drivers/gles3/shaders/scene.glsl
@@ -1030,7 +1030,7 @@ LIGHT_SHADER_CODE
#if defined(LIGHT_USE_RIM)
- float rim_light = pow(1.0-cNdotV, (1.0-roughness)*16.0);
+ float rim_light = pow(max(0.0,1.0-cNdotV), max(0.0,(1.0-roughness)*16.0));
diffuse_light += rim_light * rim * mix(vec3(1.0),diffuse_color,rim_tint) * light_color;
#endif
}
diff --git a/drivers/unix/rw_lock_posix.cpp b/drivers/unix/rw_lock_posix.cpp
index ab2d6495bd..00125809c0 100644
--- a/drivers/unix/rw_lock_posix.cpp
+++ b/drivers/unix/rw_lock_posix.cpp
@@ -39,7 +39,7 @@ void RWLockPosix::read_lock() {
int err = pthread_rwlock_rdlock(&rwlock);
if (err != 0) {
- perror("wtf: ");
+ perror("Acquiring lock failed");
}
ERR_FAIL_COND(err != 0);
}
diff --git a/drivers/unix/stream_peer_tcp_posix.cpp b/drivers/unix/stream_peer_tcp_posix.cpp
index 3bc2397e6f..e88a7d7de1 100644
--- a/drivers/unix/stream_peer_tcp_posix.cpp
+++ b/drivers/unix/stream_peer_tcp_posix.cpp
@@ -213,7 +213,7 @@ Error StreamPeerTCPPosix::write(const uint8_t *p_data, int p_bytes, int &r_sent,
if (errno != EAGAIN) {
- perror("shit?");
+ perror("Nothing sent");
disconnect_from_host();
ERR_PRINT("Server disconnected!\n");
return FAILED;
@@ -270,7 +270,7 @@ Error StreamPeerTCPPosix::read(uint8_t *p_buffer, int p_bytes, int &r_received,
if (errno != EAGAIN) {
- perror("shit?");
+ perror("Nothing read");
disconnect_from_host();
ERR_PRINT("Server disconnected!\n");
return FAILED;
diff --git a/editor/doc/doc_data.cpp b/editor/doc/doc_data.cpp
index 3a72f8e569..0bb059f425 100644
--- a/editor/doc/doc_data.cpp
+++ b/editor/doc/doc_data.cpp
@@ -235,7 +235,7 @@ void DocData::generate(bool p_basic_types) {
ClassDB::get_property_list(name, &properties, true);
for (List<PropertyInfo>::Element *E = properties.front(); E; E = E->next()) {
- if (E->get().usage & PROPERTY_USAGE_GROUP || E->get().usage & PROPERTY_USAGE_CATEGORY)
+ if (E->get().usage & PROPERTY_USAGE_GROUP || E->get().usage & PROPERTY_USAGE_CATEGORY || E->get().usage & PROPERTY_USAGE_INTERNAL)
continue;
PropertyDoc prop;
diff --git a/editor/editor_about.cpp b/editor/editor_about.cpp
index da41ea87ce..5f026abb6d 100644
--- a/editor/editor_about.cpp
+++ b/editor/editor_about.cpp
@@ -44,8 +44,8 @@ void EditorAbout::_notification(int p_what) {
case NOTIFICATION_THEME_CHANGED: {
Ref<Font> font = EditorNode::get_singleton()->get_gui_base()->get_font("source", "EditorFonts");
- _tpl_text->add_font_override("font", font);
- _license_text->add_font_override("font", font);
+ _tpl_text->add_font_override("normal_font", font);
+ _license_text->add_font_override("normal_font", font);
} break;
}
}
@@ -53,7 +53,6 @@ void EditorAbout::_notification(int p_what) {
void EditorAbout::_license_tree_selected() {
TreeItem *selected = _tpl_tree->get_selected();
- _tpl_text->select(0, 0, 0, 0);
_tpl_text->set_text(selected->get_metadata(0));
}
@@ -165,12 +164,10 @@ EditorAbout::EditorAbout() {
// License
- _license_text = memnew(TextEdit);
+ _license_text = memnew(RichTextLabel);
_license_text->set_name(TTR("License"));
_license_text->set_h_size_flags(Control::SIZE_EXPAND_FILL);
_license_text->set_v_size_flags(Control::SIZE_EXPAND_FILL);
- _license_text->set_wrap(true);
- _license_text->set_readonly(true);
_license_text->set_text(String::utf8(about_license));
tc->add_child(_license_text);
@@ -239,11 +236,9 @@ EditorAbout::EditorAbout() {
tpl_ti_all->set_metadata(0, long_text);
tpl_hbc->add_child(_tpl_tree);
- _tpl_text = memnew(TextEdit);
+ _tpl_text = memnew(RichTextLabel);
_tpl_text->set_h_size_flags(Control::SIZE_EXPAND_FILL);
_tpl_text->set_v_size_flags(Control::SIZE_EXPAND_FILL);
- _tpl_text->set_wrap(true);
- _tpl_text->set_readonly(true);
tpl_hbc->add_child(_tpl_text);
_tpl_tree->connect("item_selected", this, "_license_tree_selected");
diff --git a/editor/editor_about.h b/editor/editor_about.h
index ce29027f05..fe40ce5f14 100644
--- a/editor/editor_about.h
+++ b/editor/editor_about.h
@@ -33,11 +33,11 @@
#include "scene/gui/control.h"
#include "scene/gui/dialogs.h"
#include "scene/gui/item_list.h"
+#include "scene/gui/rich_text_label.h"
#include "scene/gui/scroll_container.h"
#include "scene/gui/separator.h"
#include "scene/gui/split_container.h"
#include "scene/gui/tab_container.h"
-#include "scene/gui/text_edit.h"
#include "scene/gui/texture_rect.h"
#include "scene/gui/tree.h"
@@ -55,8 +55,8 @@ private:
ScrollContainer *_populate_list(const String &p_name, const List<String> &p_sections, const char **p_src[], const int p_flag_single_column = 0);
Tree *_tpl_tree;
- TextEdit *_license_text;
- TextEdit *_tpl_text;
+ RichTextLabel *_license_text;
+ RichTextLabel *_tpl_text;
TextureRect *_logo;
protected:
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp
index 8c8d9c4c79..fc73964764 100644
--- a/editor/editor_export.cpp
+++ b/editor/editor_export.cpp
@@ -743,6 +743,18 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
custom_map["path_remap/remapped_paths"] = path_remaps;
}
+ // Store icon and splash images directly, they need to bypass the import system and be loaded as images
+ String icon = ProjectSettings::get_singleton()->get("application/config/icon");
+ String splash = ProjectSettings::get_singleton()->get("application/boot_splash/image");
+ if (icon != String() && FileAccess::exists(icon)) {
+ Vector<uint8_t> array = FileAccess::get_file_as_array(icon);
+ p_func(p_udata, icon, array, idx, total);
+ }
+ if (splash != String() && FileAccess::exists(splash)) {
+ Vector<uint8_t> array = FileAccess::get_file_as_array(splash);
+ p_func(p_udata, splash, array, idx, total);
+ }
+
String config_file = "project.binary";
String engine_cfb = EditorSettings::get_singleton()->get_cache_dir().plus_file("tmp" + config_file);
ProjectSettings::get_singleton()->save_custom(engine_cfb, custom_map, custom_list);
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index fbf6c86c35..31ed86d05a 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -1394,11 +1394,13 @@ void EditorNode::_property_editor_back() {
}
void EditorNode::_menu_collapseall() {
- property_editor->collapse_all_parent_nodes();
+
+ property_editor->collapse_all_folding();
}
void EditorNode::_menu_expandall() {
- property_editor->expand_all_parent_nodes();
+
+ property_editor->expand_all_folding();
}
void EditorNode::_save_default_environment() {
@@ -1495,7 +1497,7 @@ void EditorNode::_edit_current() {
if (FileAccess::exists(base_path + ".import")) {
editable_warning = TTR("This resource belongs to a scene that was imported, so it's not editable.\nPlease read the documentation relevant to importing scenes to better understand this workflow.");
} else {
- if (!get_edited_scene() || get_edited_scene()->get_filename() != base_path) {
+ if ((!get_edited_scene() || get_edited_scene()->get_filename() != base_path) && ResourceLoader::get_resource_type(base_path) == "PackedScene") {
editable_warning = TTR("This resource belongs to a scene that was instanced or inherited.\nChanges to it will not be kept when saving the current scene.");
}
}
@@ -1674,7 +1676,6 @@ void EditorNode::_resource_selected(const RES &p_res, const String &p_property)
void EditorNode::_run(bool p_current, const String &p_custom) {
if (editor_run.get_status() == EditorRun::STATUS_PLAY) {
-
play_button->set_pressed(!_playing_edited);
play_scene_button->set_pressed(_playing_edited);
return;
@@ -1806,6 +1807,7 @@ void EditorNode::_run(bool p_current, const String &p_custom) {
play_button->set_pressed(true);
play_button->set_icon(gui_base->get_icon("Reload", "EditorIcons"));
}
+ stop_button->set_disabled(false);
_playing_edited = p_current;
}
@@ -2277,6 +2279,8 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
play_scene_button->set_icon(gui_base->get_icon("PlayScene", "EditorIcons"));
play_custom_scene_button->set_pressed(false);
play_custom_scene_button->set_icon(gui_base->get_icon("PlayCustom", "EditorIcons"));
+ stop_button->set_disabled(true);
+
if (bool(EDITOR_DEF("run/output/always_close_output_on_stop", true))) {
for (int i = 0; i < bottom_panel_items.size(); i++) {
if (bottom_panel_items[i].control == log) {
@@ -5264,6 +5268,7 @@ EditorNode::EditorNode() {
stop_button->set_icon(gui_base->get_icon("Stop", "EditorIcons"));
stop_button->connect("pressed", this, "_menu_option", make_binds(RUN_STOP));
stop_button->set_tooltip(TTR("Stop the scene."));
+ stop_button->set_disabled(true);
stop_button->set_shortcut(ED_SHORTCUT("editor/stop", TTR("Stop"), KEY_F8));
run_native = memnew(EditorRunNative);
@@ -5441,7 +5446,7 @@ EditorNode::EditorNode() {
property_editor->set_use_doc_hints(true);
property_editor->set_hide_script(false);
property_editor->set_enable_capitalize_paths(bool(EDITOR_DEF("interface/editor/capitalize_properties", true)));
- property_editor->set_use_folding(bool(EDITOR_DEF("interface/editor/expand_all_properties", false)) == false);
+ property_editor->set_use_folding(!bool(EDITOR_DEF("interface/editor/disable_inspector_folding", false)));
property_editor->hide_top_label();
property_editor->register_text_enter(search_box);
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index 638b23382d..2f73e459ed 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -416,6 +416,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
hints["editors/3d/freelook/freelook_modifier_speed_factor"] = PropertyInfo(Variant::REAL, "editors/3d/freelook/freelook_modifier_speed_factor", PROPERTY_HINT_RANGE, "0.0, 10.0, 0.1");
_initial_set("editors/3d/freelook/freelook_speed_zoom_link", false);
+ _initial_set("editors/2d/guides_color", Color(0.6, 0.0, 0.8));
_initial_set("editors/2d/bone_width", 5);
_initial_set("editors/2d/bone_color1", Color(1.0, 1.0, 1.0, 0.9));
_initial_set("editors/2d/bone_color2", Color(0.75, 0.75, 0.75, 0.9));
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 184ac5d798..ddcdb5a321 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -2294,7 +2294,7 @@ void CanvasItemEditor::_draw_focus() {
void CanvasItemEditor::_draw_guides() {
- Color guide_color = Color(0.6, 0.0, 0.8);
+ Color guide_color = EditorSettings::get_singleton()->get("editors/2d/guides_color");
Transform2D xform = viewport_scrollable->get_transform() * transform;
// Guides already there
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index 60d7e59991..b4d89526b0 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -508,7 +508,8 @@ public:
} else if (current->has_setting("application/config/name")) {
project_name->set_text(current->get("application/config/name"));
}
- project_name->grab_focus();
+
+ project_name->call_deferred("grab_focus");
create_dir->hide();
status_btn->hide();
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp
index 6f9454be2c..11c7e07b6a 100644
--- a/editor/property_editor.cpp
+++ b/editor/property_editor.cpp
@@ -2665,18 +2665,14 @@ TreeItem *PropertyEditor::get_parent_node(String p_path, HashMap<String, TreeIte
item->set_editable(1, false);
item->set_selectable(1, subsection_selectable);
- if (use_folding || folding_behaviour != FB_UNDEFINED) { // Even if you disabled folding (expand all by default), you still can collapse all manually.
+ if (use_folding) { //
if (!obj->editor_is_section_unfolded(p_path)) {
updating_folding = true;
- if (folding_behaviour == FB_COLLAPSEALL)
- item->set_collapsed(true);
- else if (folding_behaviour == FB_EXPANDALL || is_expandall_enabled)
- item->set_collapsed(false);
- else
- item->set_collapsed(true);
+ item->set_collapsed(true);
updating_folding = false;
}
item->set_metadata(0, p_path);
+ foldable_property_cache.push_back(p_path);
}
if (item->get_parent() == root) {
@@ -2725,6 +2721,7 @@ void PropertyEditor::refresh() {
void PropertyEditor::update_tree() {
tree->clear();
+ foldable_property_cache.clear();
if (!obj)
return;
@@ -3733,7 +3730,7 @@ void PropertyEditor::_item_edited() {
_edit_set(name, item->get_text(1), refresh_all);
}
} break;
- // math types
+ // math types
case Variant::VECTOR3: {
@@ -4212,29 +4209,29 @@ void PropertyEditor::set_subsection_selectable(bool p_selectable) {
update_tree();
}
-bool PropertyEditor::is_expand_all_properties_enabled() const {
-
- return (use_folding == false);
-}
-
void PropertyEditor::set_use_folding(bool p_enable) {
use_folding = p_enable;
tree->set_hide_folding(false);
}
-void PropertyEditor::collapse_all_parent_nodes() {
-
- folding_behaviour = FB_COLLAPSEALL;
+void PropertyEditor::collapse_all_folding() {
+ if (!obj)
+ return;
+ for (List<String>::Element *E = foldable_property_cache.front(); E; E = E->next()) {
+ obj->editor_set_section_unfold(E->get(), false);
+ }
update_tree();
- folding_behaviour = FB_UNDEFINED;
}
-void PropertyEditor::expand_all_parent_nodes() {
+void PropertyEditor::expand_all_folding() {
- folding_behaviour = FB_EXPANDALL;
+ if (!obj)
+ return;
+ for (List<String>::Element *E = foldable_property_cache.front(); E; E = E->next()) {
+ obj->editor_set_section_unfold(E->get(), true);
+ }
update_tree();
- folding_behaviour = FB_UNDEFINED;
}
PropertyEditor::PropertyEditor() {
@@ -4309,8 +4306,6 @@ PropertyEditor::PropertyEditor() {
subsection_selectable = false;
property_selectable = false;
show_type_icons = false; // maybe one day will return.
- folding_behaviour = FB_UNDEFINED;
- is_expandall_enabled = bool(EDITOR_DEF("interface/editor/expand_all_properties", true));
}
PropertyEditor::~PropertyEditor() {
diff --git a/editor/property_editor.h b/editor/property_editor.h
index a337a05e46..bcabccc6fd 100644
--- a/editor/property_editor.h
+++ b/editor/property_editor.h
@@ -203,18 +203,9 @@ class PropertyEditor : public Control {
bool hide_script;
bool use_folding;
bool property_selectable;
- bool is_expandall_enabled;
-
bool updating_folding;
- enum FOLDING_BEHAVIOUR {
- FB_UNDEFINED,
- FB_COLLAPSEALL,
- FB_EXPANDALL,
- FB_EXPANDALL_FORCE
- };
- FOLDING_BEHAVIOUR folding_behaviour;
-
+ List<String> foldable_property_cache;
HashMap<String, String> pending;
String selected_property;
@@ -314,10 +305,8 @@ public:
void set_use_folding(bool p_enable);
- bool is_expand_all_properties_enabled() const;
-
- void collapse_all_parent_nodes();
- void expand_all_parent_nodes();
+ void collapse_all_folding();
+ void expand_all_folding();
PropertyEditor();
~PropertyEditor();
};
diff --git a/modules/gdnative/gdnative/basis.cpp b/modules/gdnative/gdnative/basis.cpp
index 39ca754dc7..7a65996036 100644
--- a/modules/gdnative/gdnative/basis.cpp
+++ b/modules/gdnative/gdnative/basis.cpp
@@ -221,7 +221,7 @@ godot_basis GDAPI godot_basis_operator_add(const godot_basis *p_self, const godo
return raw_dest;
}
-godot_basis GDAPI godot_basis_operator_substract(const godot_basis *p_self, const godot_basis *p_b) {
+godot_basis GDAPI godot_basis_operator_subtract(const godot_basis *p_self, const godot_basis *p_b) {
godot_basis raw_dest;
Basis *dest = (Basis *)&raw_dest;
const Basis *self = (const Basis *)p_self;
diff --git a/modules/gdnative/gdnative/quat.cpp b/modules/gdnative/gdnative/quat.cpp
index 2d012c069f..c308e5973d 100644
--- a/modules/gdnative/gdnative/quat.cpp
+++ b/modules/gdnative/gdnative/quat.cpp
@@ -181,7 +181,7 @@ godot_quat GDAPI godot_quat_operator_add(const godot_quat *p_self, const godot_q
return raw_dest;
}
-godot_quat GDAPI godot_quat_operator_substract(const godot_quat *p_self, const godot_quat *p_b) {
+godot_quat GDAPI godot_quat_operator_subtract(const godot_quat *p_self, const godot_quat *p_b) {
godot_quat raw_dest;
Quat *dest = (Quat *)&raw_dest;
const Quat *self = (const Quat *)p_self;
diff --git a/modules/gdnative/gdnative/vector2.cpp b/modules/gdnative/gdnative/vector2.cpp
index 7a5b29e0c4..7be08929b1 100644
--- a/modules/gdnative/gdnative/vector2.cpp
+++ b/modules/gdnative/gdnative/vector2.cpp
@@ -207,7 +207,7 @@ godot_vector2 GDAPI godot_vector2_operator_add(const godot_vector2 *p_self, cons
return raw_dest;
}
-godot_vector2 GDAPI godot_vector2_operator_substract(const godot_vector2 *p_self, const godot_vector2 *p_b) {
+godot_vector2 GDAPI godot_vector2_operator_subtract(const godot_vector2 *p_self, const godot_vector2 *p_b) {
godot_vector2 raw_dest;
Vector2 *dest = (Vector2 *)&raw_dest;
const Vector2 *self = (const Vector2 *)p_self;
diff --git a/modules/gdnative/gdnative/vector3.cpp b/modules/gdnative/gdnative/vector3.cpp
index 11ffb3320b..0027d236f2 100644
--- a/modules/gdnative/gdnative/vector3.cpp
+++ b/modules/gdnative/gdnative/vector3.cpp
@@ -224,7 +224,7 @@ godot_vector3 GDAPI godot_vector3_operator_add(const godot_vector3 *p_self, cons
return raw_dest;
}
-godot_vector3 GDAPI godot_vector3_operator_substract(const godot_vector3 *p_self, const godot_vector3 *p_b) {
+godot_vector3 GDAPI godot_vector3_operator_subtract(const godot_vector3 *p_self, const godot_vector3 *p_b) {
godot_vector3 raw_dest;
Vector3 *dest = (Vector3 *)&raw_dest;
Vector3 *self = (Vector3 *)p_self;
diff --git a/modules/gdnative/gdnative_api.json b/modules/gdnative/gdnative_api.json
index 488ed93206..31f3b0b77b 100644
--- a/modules/gdnative/gdnative_api.json
+++ b/modules/gdnative/gdnative_api.json
@@ -387,7 +387,7 @@
]
},
{
- "name": "godot_vector2_operator_substract",
+ "name": "godot_vector2_operator_subtract",
"return_type": "godot_vector2",
"arguments": [
["const godot_vector2 *", "p_self"],
@@ -663,7 +663,7 @@
]
},
{
- "name": "godot_quat_operator_substract",
+ "name": "godot_quat_operator_subtract",
"return_type": "godot_quat",
"arguments": [
["const godot_quat *", "p_self"],
@@ -907,7 +907,7 @@
]
},
{
- "name": "godot_basis_operator_substract",
+ "name": "godot_basis_operator_subtract",
"return_type": "godot_basis",
"arguments": [
["const godot_basis *", "p_self"],
@@ -1142,7 +1142,7 @@
]
},
{
- "name": "godot_vector3_operator_substract",
+ "name": "godot_vector3_operator_subtract",
"return_type": "godot_vector3",
"arguments": [
["const godot_vector3 *", "p_self"],
diff --git a/modules/gdnative/include/gdnative/basis.h b/modules/gdnative/include/gdnative/basis.h
index 49ca765a01..4898eab24c 100644
--- a/modules/gdnative/include/gdnative/basis.h
+++ b/modules/gdnative/include/gdnative/basis.h
@@ -111,7 +111,7 @@ godot_bool GDAPI godot_basis_operator_equal(const godot_basis *p_self, const god
godot_basis GDAPI godot_basis_operator_add(const godot_basis *p_self, const godot_basis *p_b);
-godot_basis GDAPI godot_basis_operator_substract(const godot_basis *p_self, const godot_basis *p_b);
+godot_basis GDAPI godot_basis_operator_subtract(const godot_basis *p_self, const godot_basis *p_b);
godot_basis GDAPI godot_basis_operator_multiply_vector(const godot_basis *p_self, const godot_basis *p_b);
diff --git a/modules/gdnative/include/gdnative/gdnative.h b/modules/gdnative/include/gdnative/gdnative.h
index 6e69d43469..f7f5606428 100644
--- a/modules/gdnative/include/gdnative/gdnative.h
+++ b/modules/gdnative/include/gdnative/gdnative.h
@@ -115,8 +115,6 @@ typedef enum {
GODOT_ERR_HELP, ///< user requested help!!
GODOT_ERR_BUG, ///< a bug in the software certainly happened, due to a double check failing or unexpected behavior.
GODOT_ERR_PRINTER_ON_FIRE, /// the parallel port printer is engulfed in flames
- GODOT_ERR_OMFG_THIS_IS_VERY_VERY_BAD, ///< shit happens, has never been used, though
- GODOT_ERR_WTF = GODOT_ERR_OMFG_THIS_IS_VERY_VERY_BAD ///< short version of the above
} godot_error;
////// bool
diff --git a/modules/gdnative/include/gdnative/quat.h b/modules/gdnative/include/gdnative/quat.h
index acae6e3e90..2be9d8849d 100644
--- a/modules/gdnative/include/gdnative/quat.h
+++ b/modules/gdnative/include/gdnative/quat.h
@@ -98,7 +98,7 @@ godot_quat GDAPI godot_quat_operator_multiply(const godot_quat *p_self, const go
godot_quat GDAPI godot_quat_operator_add(const godot_quat *p_self, const godot_quat *p_b);
-godot_quat GDAPI godot_quat_operator_substract(const godot_quat *p_self, const godot_quat *p_b);
+godot_quat GDAPI godot_quat_operator_subtract(const godot_quat *p_self, const godot_quat *p_b);
godot_quat GDAPI godot_quat_operator_divide(const godot_quat *p_self, const godot_real p_b);
diff --git a/modules/gdnative/include/gdnative/vector2.h b/modules/gdnative/include/gdnative/vector2.h
index 07105abaf2..4d1117e3aa 100644
--- a/modules/gdnative/include/gdnative/vector2.h
+++ b/modules/gdnative/include/gdnative/vector2.h
@@ -106,7 +106,7 @@ godot_vector2 GDAPI godot_vector2_clamped(const godot_vector2 *p_self, const god
godot_vector2 GDAPI godot_vector2_operator_add(const godot_vector2 *p_self, const godot_vector2 *p_b);
-godot_vector2 GDAPI godot_vector2_operator_substract(const godot_vector2 *p_self, const godot_vector2 *p_b);
+godot_vector2 GDAPI godot_vector2_operator_subtract(const godot_vector2 *p_self, const godot_vector2 *p_b);
godot_vector2 GDAPI godot_vector2_operator_multiply_vector(const godot_vector2 *p_self, const godot_vector2 *p_b);
diff --git a/modules/gdnative/include/gdnative/vector3.h b/modules/gdnative/include/gdnative/vector3.h
index 3ed23778ec..135a13acc8 100644
--- a/modules/gdnative/include/gdnative/vector3.h
+++ b/modules/gdnative/include/gdnative/vector3.h
@@ -117,7 +117,7 @@ godot_vector3 GDAPI godot_vector3_reflect(const godot_vector3 *p_self, const god
godot_vector3 GDAPI godot_vector3_operator_add(const godot_vector3 *p_self, const godot_vector3 *p_b);
-godot_vector3 GDAPI godot_vector3_operator_substract(const godot_vector3 *p_self, const godot_vector3 *p_b);
+godot_vector3 GDAPI godot_vector3_operator_subtract(const godot_vector3 *p_self, const godot_vector3 *p_b);
godot_vector3 GDAPI godot_vector3_operator_multiply_vector(const godot_vector3 *p_self, const godot_vector3 *p_b);
diff --git a/modules/gdnative/register_types.cpp b/modules/gdnative/register_types.cpp
index 34099bf528..365def75bc 100644
--- a/modules/gdnative/register_types.cpp
+++ b/modules/gdnative/register_types.cpp
@@ -103,16 +103,34 @@ static void actual_discoverer_handler() {
Set<String> file_paths = get_gdnative_singletons(dir);
+ bool changed = false;
+ Array current_files = ProjectSettings::get_singleton()->get("gdnative/singletons");
Array files;
files.resize(file_paths.size());
int i = 0;
for (Set<String>::Element *E = file_paths.front(); E; i++, E = E->next()) {
+ if (!current_files.has(E->get())) {
+ changed = true;
+ }
files.set(i, E->get());
}
- ProjectSettings::get_singleton()->set("gdnative/singletons", files);
+ // Check for removed files
+ if (!changed) {
+ for (int i = 0; i < current_files.size(); i++) {
+ if (!file_paths.has(current_files[i])) {
+ changed = true;
+ break;
+ }
+ }
+ }
- ProjectSettings::get_singleton()->save();
+ if (changed) {
+
+ ProjectSettings::get_singleton()->set("gdnative/singletons", files);
+
+ ProjectSettings::get_singleton()->save();
+ }
}
static GDNativeSingletonDiscover *discoverer = NULL;
diff --git a/modules/mono/glue/cs_files/Error.cs b/modules/mono/glue/cs_files/Error.cs
index 3f4a92603d..dee4b88f74 100644
--- a/modules/mono/glue/cs_files/Error.cs
+++ b/modules/mono/glue/cs_files/Error.cs
@@ -42,7 +42,6 @@ namespace Godot
ERR_CYCLIC_LINK = 40,
ERR_BUSY = 44,
ERR_HELP = 46,
- ERR_BUG = 47,
- ERR_WTF = 49
+ ERR_BUG = 47
}
}
diff --git a/modules/opus/audio_stream_opus.cpp b/modules/opus/audio_stream_opus.cpp
index 06eab4c94d..5742102dae 100644
--- a/modules/opus/audio_stream_opus.cpp
+++ b/modules/opus/audio_stream_opus.cpp
@@ -62,7 +62,7 @@ int AudioStreamPlaybackOpus::_op_seek_func(void *_stream, opus_int64 _offset, in
fa->seek_end(_offset);
} break;
default: {
- ERR_PRINT("BUG, wtf was whence set to?\n");
+ ERR_PRINT("Opus seek function failure: Unexpected value in _whence\n");
}
}
int ret = fa->eof_reached() ? -1 : 0;
diff --git a/modules/squish/image_compress_squish.cpp b/modules/squish/image_compress_squish.cpp
index 072f18b990..ac436c3c26 100644
--- a/modules/squish/image_compress_squish.cpp
+++ b/modules/squish/image_compress_squish.cpp
@@ -64,7 +64,7 @@ void image_decompress_squish(Image *p_image) {
} else if (p_image->get_format() == Image::FORMAT_RGTC_RG) {
squish_flags = squish::kBc5;
} else {
- print_line("wtf askd to decompress.. " + itos(p_image->get_format()));
+ print_line("Can't decompress unknown format: " + itos(p_image->get_format()));
ERR_FAIL_COND(true);
return;
}
diff --git a/modules/visual_script/visual_script_nodes.cpp b/modules/visual_script/visual_script_nodes.cpp
index 95ad7256b3..5f98951bec 100644
--- a/modules/visual_script/visual_script_nodes.cpp
+++ b/modules/visual_script/visual_script_nodes.cpp
@@ -390,7 +390,7 @@ PropertyInfo VisualScriptOperator::get_input_value_port_info(int p_idx) const {
{ Variant::NIL, Variant::NIL }, //OP_GREATER_EQUAL,
//mathematic
{ Variant::NIL, Variant::NIL }, //OP_ADD,
- { Variant::NIL, Variant::NIL }, //OP_SUBSTRACT,
+ { Variant::NIL, Variant::NIL }, //OP_SUBTRACT,
{ Variant::NIL, Variant::NIL }, //OP_MULTIPLY,
{ Variant::NIL, Variant::NIL }, //OP_DIVIDE,
{ Variant::NIL, Variant::NIL }, //OP_NEGATE,
@@ -433,7 +433,7 @@ PropertyInfo VisualScriptOperator::get_output_value_port_info(int p_idx) const {
Variant::BOOL, //OP_GREATER_EQUAL,
//mathematic
Variant::NIL, //OP_ADD,
- Variant::NIL, //OP_SUBSTRACT,
+ Variant::NIL, //OP_SUBTRACT,
Variant::NIL, //OP_MULTIPLY,
Variant::NIL, //OP_DIVIDE,
Variant::NIL, //OP_NEGATE,
@@ -474,7 +474,7 @@ static const char *op_names[] = {
"GreaterEq", //OP_GREATER_EQUAL,
//mathematic
"Add", //OP_ADD,
- "Subtract", //OP_SUBSTRACT,
+ "Subtract", //OP_SUBTRACT,
"Multiply", //OP_MULTIPLY,
"Divide", //OP_DIVIDE,
"Negate", //OP_NEGATE,
@@ -514,7 +514,7 @@ String VisualScriptOperator::get_text() const {
L"A \u2265 B", //OP_GREATER_EQUAL,
//mathematic
L"A + B", //OP_ADD,
- L"A - B", //OP_SUBSTRACT,
+ L"A - B", //OP_SUBTRACT,
L"A x B", //OP_MULTIPLY,
L"A \u00F7 B", //OP_DIVIDE,
L"\u00AC A", //OP_NEGATE,
diff --git a/modules/vorbis/audio_stream_ogg_vorbis.cpp b/modules/vorbis/audio_stream_ogg_vorbis.cpp
index 9fb6fa8197..03c0bfb1c2 100644
--- a/modules/vorbis/audio_stream_ogg_vorbis.cpp
+++ b/modules/vorbis/audio_stream_ogg_vorbis.cpp
@@ -64,7 +64,7 @@ int AudioStreamPlaybackOGGVorbis::_ov_seek_func(void *_f, ogg_int64_t offs, int
fa->seek_end(offs);
} else {
- ERR_PRINT("BUG, wtf was whence set to?\n");
+ ERR_PRINT("Vorbis seek function failure: Unexpected value in _whence\n");
}
int ret = fa->eof_reached() ? -1 : 0;
//printf("returning %i\n",ret);
diff --git a/platform/android/build.gradle.template b/platform/android/build.gradle.template
index 11c49fbb50..4a44d1c5f9 100644
--- a/platform/android/build.gradle.template
+++ b/platform/android/build.gradle.template
@@ -31,7 +31,7 @@ android {
disable 'MissingTranslation'
}
- compileSdkVersion 24
+ compileSdkVersion 26
buildToolsVersion "26.0.1"
useLibrary 'org.apache.http.legacy'
diff --git a/platform/android/java/src/org/godotengine/godot/Godot.java b/platform/android/java/src/org/godotengine/godot/Godot.java
index 41dcba5c2c..4daf06142d 100644
--- a/platform/android/java/src/org/godotengine/godot/Godot.java
+++ b/platform/android/java/src/org/godotengine/godot/Godot.java
@@ -970,7 +970,7 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
boolean indeterminate;
switch (newState) {
case IDownloaderClient.STATE_IDLE:
- Log.d("GODOT", "STATE IDLE");
+ Log.d("GODOT", "DOWNLOAD STATE IDLE");
// STATE_IDLE means the service is listening, so it's
// safe to start making calls via mRemoteService.
paused = false;
@@ -978,13 +978,13 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
break;
case IDownloaderClient.STATE_CONNECTING:
case IDownloaderClient.STATE_FETCHING_URL:
- Log.d("GODOT", "STATE CONNECTION / FETCHING URL");
+ Log.d("GODOT", "DOWNLOAD STATE CONNECTION / FETCHING URL");
showDashboard = true;
paused = false;
indeterminate = true;
break;
case IDownloaderClient.STATE_DOWNLOADING:
- Log.d("GODOT", "STATE DOWNLOADING");
+ Log.d("GODOT", "DOWNLOAD STATE DOWNLOADING");
paused = false;
showDashboard = true;
indeterminate = false;
@@ -994,14 +994,14 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
case IDownloaderClient.STATE_FAILED:
case IDownloaderClient.STATE_FAILED_FETCHING_URL:
case IDownloaderClient.STATE_FAILED_UNLICENSED:
- Log.d("GODOT", "MANY TYPES OF FAILING");
+ Log.d("GODOT", "DOWNLOAD STATE: FAILED, CANCELLED, UNLICENSED OR FAILED TO FETCH URL");
paused = true;
showDashboard = false;
indeterminate = false;
break;
case IDownloaderClient.STATE_PAUSED_NEED_CELLULAR_PERMISSION:
case IDownloaderClient.STATE_PAUSED_WIFI_DISABLED_NEED_CELLULAR_PERMISSION:
- Log.d("GODOT", "PAUSED FOR SOME STUPID REASON");
+ Log.d("GODOT", "DOWNLOAD STATE: PAUSED BY MISSING CELLULAR PERMISSION");
showDashboard = false;
paused = true;
indeterminate = false;
@@ -1009,18 +1009,18 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
break;
case IDownloaderClient.STATE_PAUSED_BY_REQUEST:
- Log.d("GODOT", "PAUSED BY STUPID USER");
+ Log.d("GODOT", "DOWNLOAD STATE: PAUSED BY USER");
paused = true;
indeterminate = false;
break;
case IDownloaderClient.STATE_PAUSED_ROAMING:
case IDownloaderClient.STATE_PAUSED_SDCARD_UNAVAILABLE:
- Log.d("GODOT", "PAUSED BY ROAMING WTF!?");
+ Log.d("GODOT", "DOWNLOAD STATE: PAUSED BY ROAMING OR SDCARD UNAVAILABLE");
paused = true;
indeterminate = false;
break;
case IDownloaderClient.STATE_COMPLETED:
- Log.d("GODOT", "COMPLETED");
+ Log.d("GODOT", "DOWNLOAD STATE: COMPLETED");
showDashboard = false;
paused = false;
indeterminate = false;
@@ -1028,7 +1028,7 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
initializeGodot();
return;
default:
- Log.d("GODOT", "DEFAULT ????");
+ Log.d("GODOT", "DOWNLOAD STATE: DEFAULT");
paused = true;
indeterminate = true;
showDashboard = true;
diff --git a/platform/osx/os_osx.h b/platform/osx/os_osx.h
index 9a740a7bea..6543ca7dd2 100644
--- a/platform/osx/os_osx.h
+++ b/platform/osx/os_osx.h
@@ -43,7 +43,6 @@
#include "servers/visual_server.h"
#include <ApplicationServices/ApplicationServices.h>
-//bitch
#undef CursorShape
/**
@author Juan Linietsky <reduzio@gmail.com>
diff --git a/platform/server/os_server.h b/platform/server/os_server.h
index 03f7c2a6c8..40b10c019f 100644
--- a/platform/server/os_server.h
+++ b/platform/server/os_server.h
@@ -38,7 +38,6 @@
#include "servers/visual/rasterizer.h"
#include "servers/visual_server.h"
-//bitch
#undef CursorShape
/**
@author Juan Linietsky <reduzio@gmail.com>
diff --git a/platform/windows/stream_peer_winsock.cpp b/platform/windows/stream_peer_winsock.cpp
index a9d9cb9373..8b83215325 100644
--- a/platform/windows/stream_peer_winsock.cpp
+++ b/platform/windows/stream_peer_winsock.cpp
@@ -141,7 +141,7 @@ Error StreamPeerWinsock::write(const uint8_t *p_data, int p_bytes, int &r_sent,
if (WSAGetLastError() != WSAEWOULDBLOCK) {
- perror("shit?");
+ perror("Nothing sent");
disconnect_from_host();
ERR_PRINT("Server disconnected!\n");
return FAILED;
@@ -197,7 +197,7 @@ Error StreamPeerWinsock::read(uint8_t *p_buffer, int p_bytes, int &r_received, b
if (WSAGetLastError() != WSAEWOULDBLOCK) {
- perror("shit?");
+ perror("Nothing read");
disconnect_from_host();
ERR_PRINT("Server disconnected!\n");
return FAILED;
diff --git a/scene/2d/particles_2d.cpp b/scene/2d/particles_2d.cpp
index aee5d89150..7d53557216 100644
--- a/scene/2d/particles_2d.cpp
+++ b/scene/2d/particles_2d.cpp
@@ -291,7 +291,7 @@ void Particles2D::_notification(int p_what) {
texture_rid = texture->get_rid();
RID normal_rid;
if (normal_map.is_valid())
- normal_rid = texture->get_rid();
+ normal_rid = normal_map->get_rid();
VS::get_singleton()->canvas_item_add_particles(get_canvas_item(), particles, texture_rid, normal_rid, h_frames, v_frames);
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index 124c268c8a..9cf4c105b4 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -793,6 +793,17 @@ void RichTextLabel::_gui_input(Ref<InputEvent> p_event) {
selection.click = item;
selection.click_char = line;
+
+ // Erase previous selection.
+ if (selection.active) {
+ selection.from = NULL;
+ selection.from_char = NULL;
+ selection.to = NULL;
+ selection.to_char = NULL;
+ selection.active = false;
+
+ update();
+ }
}
}
diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp
index c5feecd7c4..819d16f61f 100644
--- a/scene/resources/default_theme/default_theme.cpp
+++ b/scene/resources/default_theme/default_theme.cpp
@@ -257,6 +257,8 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
// LinkButton
+ theme->set_stylebox("focus", "LinkButton", focus);
+
theme->set_font("font", "LinkButton", default_font);
theme->set_color("font_color", "LinkButton", control_font_color);
diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp
index 06829089be..3a5cb7da2e 100644
--- a/scene/resources/packed_scene.cpp
+++ b/scene/resources/packed_scene.cpp
@@ -177,7 +177,7 @@ Node *SceneState::instance(GenEditState p_edit_state) const {
node = Object::cast_to<Node>(obj);
} else {
- print_line("wtf class is disabled for: " + itos(n.type));
+ print_line("Class is disabled for: " + itos(n.type));
print_line("name: " + String(snames[n.type]));
}
diff --git a/scene/resources/primitive_meshes.cpp b/scene/resources/primitive_meshes.cpp
index 3b80db291c..2e8f9cbb33 100644
--- a/scene/resources/primitive_meshes.cpp
+++ b/scene/resources/primitive_meshes.cpp
@@ -164,7 +164,7 @@ void PrimitiveMesh::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_mesh_arrays"), &PrimitiveMesh::get_mesh_arrays);
- ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "material", PROPERTY_HINT_RESOURCE_TYPE, "Material"), "set_material", "get_material");
+ ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "material", PROPERTY_HINT_RESOURCE_TYPE, "SpatialMaterial,ShaderMaterial"), "set_material", "get_material");
}
void PrimitiveMesh::set_material(const Ref<Material> &p_material) {
diff --git a/servers/visual/visual_server_scene.cpp b/servers/visual/visual_server_scene.cpp
index 69827b330d..72fb1df94b 100644
--- a/servers/visual/visual_server_scene.cpp
+++ b/servers/visual/visual_server_scene.cpp
@@ -303,6 +303,23 @@ void VisualServerScene::instance_set_base(RID p_instance, RID p_base) {
VSG::storage->instance_remove_dependency(instance->base, instance);
+ if (instance->base_type == VS::INSTANCE_GI_PROBE) {
+ //if gi probe is baking, wait until done baking, else race condition may happen when removing it
+ //from octree
+ InstanceGIProbeData *gi_probe = static_cast<InstanceGIProbeData *>(instance->base_data);
+
+ //make sure probes are done baking
+ while (!probe_bake_list.empty()) {
+ OS::get_singleton()->delay_usec(1);
+ }
+ //make sure this one is done baking
+
+ while (gi_probe->dynamic.updating_stage == GI_UPDATE_STAGE_LIGHTING) {
+ //wait until bake is done if it's baking
+ OS::get_singleton()->delay_usec(1);
+ }
+ }
+
if (scenario && instance->octree_id) {
scenario->octree.erase(instance->octree_id); //make dependencies generated by the octree go away
instance->octree_id = 0;
@@ -331,10 +348,6 @@ void VisualServerScene::instance_set_base(RID p_instance, RID p_base) {
InstanceGIProbeData *gi_probe = static_cast<InstanceGIProbeData *>(instance->base_data);
- while (gi_probe->dynamic.updating_stage == GI_UPDATE_STAGE_LIGHTING) {
- //wait until bake is done if it's baking
- OS::get_singleton()->delay_usec(1);
- }
if (gi_probe->update_element.in_list()) {
gi_probe_update_list.remove(&gi_probe->update_element);
}
@@ -2589,7 +2602,15 @@ void VisualServerScene::_bake_gi_probe(Instance *p_gi_probe) {
}
//send back to main thread to update un little chunks
+ if (probe_bake_mutex) {
+ probe_bake_mutex->lock();
+ }
+
probe_data->dynamic.updating_stage = GI_UPDATE_STAGE_UPLOADING;
+
+ if (probe_bake_mutex) {
+ probe_bake_mutex->unlock();
+ }
}
bool VisualServerScene::_check_gi_probe(Instance *p_gi_probe) {
@@ -2722,11 +2743,11 @@ void VisualServerScene::render_probes() {
case GI_UPDATE_STAGE_CHECK: {
if (_check_gi_probe(instance_probe) || force_lighting) {
- //send to lighting thread
- probe->dynamic.updating_stage = GI_UPDATE_STAGE_LIGHTING;
+//send to lighting thread
#ifndef NO_THREADS
probe_bake_mutex->lock();
+ probe->dynamic.updating_stage = GI_UPDATE_STAGE_LIGHTING;
probe_bake_list.push_back(instance_probe);
probe_bake_mutex->unlock();
probe_bake_sem->post();
diff --git a/servers/visual/visual_server_scene.h b/servers/visual/visual_server_scene.h
index 9af5ffb74d..bc5d266113 100644
--- a/servers/visual/visual_server_scene.h
+++ b/servers/visual/visual_server_scene.h
@@ -438,6 +438,7 @@ public:
: update_element(this) {
invalid = true;
base_version = 0;
+ dynamic.updating_stage = GI_UPDATE_STAGE_CHECK;
}
};