summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTING.md9
-rw-r--r--bin/tests/test_math.cpp81
-rw-r--r--modules/gdscript/gd_editor.cpp24
-rw-r--r--platform/bb10/os_bb10.cpp4
-rw-r--r--platform/bb10/os_bb10.h2
-rw-r--r--scene/animation/animation_player.cpp1
-rw-r--r--scene/audio/stream_player.cpp2
-rw-r--r--scene/resources/packed_scene.cpp3
-rw-r--r--tools/editor/animation_editor.cpp1
-rw-r--r--tools/editor/editor_node.cpp10
-rw-r--r--tools/editor/icons/icon_array_data.pngbin212 -> 176 bytes
-rw-r--r--tools/editor/icons/icon_array_float.pngbin213 -> 177 bytes
-rw-r--r--tools/editor/icons/icon_array_int.pngbin204 -> 172 bytes
-rw-r--r--tools/editor/icons/icon_array_string.pngbin217 -> 178 bytes
-rw-r--r--tools/editor/icons/icon_array_variant.pngbin209 -> 172 bytes
-rw-r--r--tools/editor/icons/icon_bool.pngbin147 -> 164 bytes
-rw-r--r--tools/editor/icons/icon_color.pngbin322 -> 301 bytes
-rw-r--r--tools/editor/icons/icon_integer.pngbin142 -> 162 bytes
-rw-r--r--tools/editor/icons/icon_quat.pngbin265 -> 239 bytes
-rw-r--r--tools/editor/icons/icon_real.pngbin146 -> 162 bytes
-rw-r--r--tools/editor/icons/icon_rect2.pngbin240 -> 193 bytes
-rw-r--r--tools/editor/icons/icon_rect3.pngbin230 -> 202 bytes
-rw-r--r--tools/editor/icons/icon_string.pngbin121 -> 136 bytes
-rw-r--r--tools/editor/icons/icon_vector.pngbin158 -> 183 bytes
-rw-r--r--tools/editor/icons/icon_vector2.pngbin141 -> 172 bytes
-rw-r--r--tools/editor/io_plugins/editor_sample_import_plugin.cpp2
-rw-r--r--tools/editor/plugins/canvas_item_editor_plugin.cpp6
-rw-r--r--tools/editor/plugins/script_editor_plugin.cpp4
-rw-r--r--tools/editor/scene_tree_editor.cpp2
29 files changed, 140 insertions, 11 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 9ff1a69551..97ce9c1403 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -17,7 +17,12 @@ Many bugs can't be reproduced unless specific steps are taken. Please **specify
#### Provide a Simple, Example Project
-Sometimes an unexpected behavior happens in your project. In such case understand that we can't always take a look at your project. Providing **a simple project** that isolates and reproduces the issue is always the **the best way for us to fix it**.
+Sometimes an unexpected behavior happens in your project. In such case understand that:
+
+* What happens to you may not happen to other users.
+* We can't take the time a look at your project, learn it and then figure out why it's failing.
+
+To speed up our work, prepare for us **a simple project** that isolates and reproduces the issue. This is always the **the best way for us to fix it**.
### Contributing Pull Requests
@@ -29,4 +34,4 @@ If you are adding new engine funcitonality, please make sure that:
Thanks!
-The Godot Development Team \ No newline at end of file
+The Godot Development Team
diff --git a/bin/tests/test_math.cpp b/bin/tests/test_math.cpp
index b5041b265f..05acd5c1ec 100644
--- a/bin/tests/test_math.cpp
+++ b/bin/tests/test_math.cpp
@@ -75,9 +75,90 @@ fix: 0, 0, 100, 100
}
+uint32_t ihash( uint32_t a)
+{
+ a = (a+0x7ed55d16) + (a<<12);
+ a = (a^0xc761c23c) ^ (a>>19);
+ a = (a+0x165667b1) + (a<<5);
+ a = (a+0xd3a2646c) ^ (a<<9);
+ a = (a+0xfd7046c5) + (a<<3);
+ a = (a^0xb55a4f09) ^ (a>>16);
+ return a;
+}
+
+uint32_t ihash2( uint32_t a) {
+ a = (a ^ 61) ^ (a >> 16);
+ a = a + (a << 3);
+ a = a ^ (a >> 4);
+ a = a * 0x27d4eb2d;
+ a = a ^ (a >> 15);
+ return a;
+}
+
+uint32_t ihash3( uint32_t a)
+{
+ a = (a+0x479ab41d) + (a<<8);
+ a = (a^0xe4aa10ce) ^ (a>>5);
+ a = (a+0x9942f0a6) - (a<<14);
+ a = (a^0x5aedd67d) ^ (a>>3);
+ a = (a+0x17bea992) + (a<<7);
+ return a;
+}
MainLoop* test() {
+
+ {
+
+ Vector<int32_t> hashes;
+ List<StringName> tl;
+ ObjectTypeDB::get_type_list(&tl);
+
+
+ for (List<StringName>::Element *E=tl.front();E;E=E->next()) {
+
+ Vector<uint8_t> m5b = E->get().operator String().md5_buffer();
+ uint32_t *ub = (uint32_t*)m5b.ptr();
+ //hashes.push_back(ihash(ihash2(ihash3(*ub))));
+ hashes.push_back(hashes.size());
+ //hashes.push_back(E->get().hash());
+
+ }
+
+ //hashes.resize(50);
+
+ for(int i=nearest_shift(hashes.size());i<20;i++) {
+
+ bool success=true;
+ for(int s=0;s<10000;s++) {
+ Set<uint32_t> existing;
+ success=true;
+
+ for(int j=0;j<hashes.size();j++) {
+
+ uint32_t eh = ihash2(ihash3(hashes[j]+ihash(s)+s))&((1<<i)-1);
+ if (existing.has(eh)) {
+ success=false;
+ break;
+ }
+ existing.insert(eh);
+ }
+
+ if (success) {
+ print_line("success at "+itos(i)+"/"+itos(nearest_shift(hashes.size()))+" shift "+itos(s));
+ break;
+ }
+ }
+ if (success)
+ break;
+ }
+
+ print_line("DONE");
+
+
+
+ return NULL;
+ }
{
diff --git a/modules/gdscript/gd_editor.cpp b/modules/gdscript/gd_editor.cpp
index 72740d7bdc..b4e5c04c95 100644
--- a/modules/gdscript/gd_editor.cpp
+++ b/modules/gdscript/gd_editor.cpp
@@ -285,6 +285,30 @@ void GDScriptLanguage::get_public_functions(List<MethodInfo> *p_functions) const
p_functions->push_back(GDFunctions::get_info(GDFunctions::Function(i)));
}
+
+ //not really "functions", but..
+ {
+ MethodInfo mi;
+ mi.name="preload:Resource";
+ mi.arguments.push_back(PropertyInfo(Variant::STRING,"path"));
+ mi.return_val=PropertyInfo(Variant::OBJECT,"",PROPERTY_HINT_RESOURCE_TYPE,"Resource");
+ p_functions->push_back(mi);
+ }
+ {
+ MethodInfo mi;
+ mi.name="yield";
+ mi.arguments.push_back(PropertyInfo(Variant::OBJECT,"object"));
+ mi.arguments.push_back(PropertyInfo(Variant::STRING,"signal"));
+ mi.default_arguments.push_back(Variant::NIL);
+ mi.default_arguments.push_back(Variant::STRING);
+ p_functions->push_back(mi);
+ }
+ {
+ MethodInfo mi;
+ mi.name="assert";
+ mi.arguments.push_back(PropertyInfo(Variant::BOOL,"condition"));
+ p_functions->push_back(mi);
+ }
}
void GDScriptLanguage::get_public_constants(List<Pair<String,Variant> > *p_constants) const {
diff --git a/platform/bb10/os_bb10.cpp b/platform/bb10/os_bb10.cpp
index d2a350cf83..58ea26b8c9 100644
--- a/platform/bb10/os_bb10.cpp
+++ b/platform/bb10/os_bb10.cpp
@@ -29,7 +29,6 @@
#include "os_bb10.h"
#include "drivers/gles2/rasterizer_gles2.h"
-#include "drivers/gles1/rasterizer_gles1.h"
#include "servers/visual/visual_server_raster.h"
#include "core/os/dir_access.h"
@@ -605,6 +604,9 @@ String OSBB10::get_data_dir() const {
return data_dir;
};
+Size2 OSBB10::get_window_size() const {
+ return Vector2(default_videomode.width, default_videomode.height);
+}
OSBB10::OSBB10() {
diff --git a/platform/bb10/os_bb10.h b/platform/bb10/os_bb10.h
index a0481d1190..4ee5af8323 100644
--- a/platform/bb10/os_bb10.h
+++ b/platform/bb10/os_bb10.h
@@ -32,6 +32,7 @@
#include "os/input.h"
#include "drivers/unix/os_unix.h"
#include "os/main_loop.h"
+#include "main/input_default.h"
#include "servers/physics/physics_server_sw.h"
#include "servers/spatial_sound/spatial_sound_server_sw.h"
#include "servers/spatial_sound_2d/spatial_sound_2d_server_sw.h"
@@ -135,6 +136,7 @@ public:
virtual VideoMode get_video_mode(int p_screen=0) const;
virtual void get_fullscreen_mode_list(List<VideoMode> *p_list,int p_screen=0) const;
+ virtual Size2 get_window_size() const;
virtual String get_name();
virtual MainLoop *get_main_loop() const;
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp
index 344fc5ecde..0bc54b3d43 100644
--- a/scene/animation/animation_player.cpp
+++ b/scene/animation/animation_player.cpp
@@ -211,6 +211,7 @@ void AnimationPlayer::_notification(int p_what) {
if (!get_tree()->is_editor_hint() && animation_set.has(autoplay)) {
play(autoplay);
+ set_autoplay(""); //this line is the fix for autoplay issues with animatio
}
} break;
case NOTIFICATION_PROCESS: {
diff --git a/scene/audio/stream_player.cpp b/scene/audio/stream_player.cpp
index fd18803394..c1799ec12c 100644
--- a/scene/audio/stream_player.cpp
+++ b/scene/audio/stream_player.cpp
@@ -106,8 +106,10 @@ void StreamPlayer::_notification(int p_what) {
resume_pos=-1;
} else if (autoplay) {
play();
+ autoplay = false; //this line fix autoplay issues
}
}
+
} break;
case NOTIFICATION_EXIT_TREE: {
diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp
index 43196a43d4..4c23ddbaf7 100644
--- a/scene/resources/packed_scene.cpp
+++ b/scene/resources/packed_scene.cpp
@@ -226,7 +226,7 @@ Node *SceneState::instance(bool p_gen_edit_state) const {
node->add_to_group( snames[ n.groups[j] ], true );
}
- if (n.instance>=0 || n.type!=TYPE_INSTANCED) {
+ if (n.instance>=0 || n.type!=TYPE_INSTANCED || i==0) {
//if node was not part of instance, must set it's name, parenthood and ownership
if (i>0) {
if (parent) {
@@ -239,7 +239,6 @@ Node *SceneState::instance(bool p_gen_edit_state) const {
} else {
node->_set_name_nocheck( snames[ n.name ] );
}
-
}
if (n.owner>=0) {
diff --git a/tools/editor/animation_editor.cpp b/tools/editor/animation_editor.cpp
index dfb09e38fc..668a135bc8 100644
--- a/tools/editor/animation_editor.cpp
+++ b/tools/editor/animation_editor.cpp
@@ -2857,6 +2857,7 @@ void AnimationKeyEditor::_notification(int p_what) {
case NOTIFICATION_VISIBILITY_CHANGED: {
EditorNode::get_singleton()->update_keying();
+ emit_signal("keying_changed");
} break;
case NOTIFICATION_ENTER_TREE: {
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp
index b270d8b8cc..b39a1b5350 100644
--- a/tools/editor/editor_node.cpp
+++ b/tools/editor/editor_node.cpp
@@ -328,12 +328,14 @@ void EditorNode::_notification(int p_what) {
}
*/
+ /* // moved to "_sources_changed"
if (export_defer.platform!="") {
project_export_settings->export_platform(export_defer.platform,export_defer.path,export_defer.debug,export_defer.password,true);
export_defer.platform="";
}
+ */
}
if (p_what == MainLoop::NOTIFICATION_WM_FOCUS_IN) {
@@ -391,6 +393,13 @@ void EditorNode::_fs_changed() {
E->get()->invalidate();
}
+
+ if (export_defer.platform!="") {
+
+ project_export_settings->export_platform(export_defer.platform,export_defer.path,export_defer.debug,export_defer.password,true);
+ export_defer.platform="";
+ }
+
}
void EditorNode::_sources_changed(bool p_exist) {
@@ -406,6 +415,7 @@ void EditorNode::_sources_changed(bool p_exist) {
sources_button->set_disabled(true);
}
+
}
void EditorNode::_vp_resized() {
diff --git a/tools/editor/icons/icon_array_data.png b/tools/editor/icons/icon_array_data.png
index 494d4c71a8..447acaab2b 100644
--- a/tools/editor/icons/icon_array_data.png
+++ b/tools/editor/icons/icon_array_data.png
Binary files differ
diff --git a/tools/editor/icons/icon_array_float.png b/tools/editor/icons/icon_array_float.png
index 558be932dc..d1b78b4c3e 100644
--- a/tools/editor/icons/icon_array_float.png
+++ b/tools/editor/icons/icon_array_float.png
Binary files differ
diff --git a/tools/editor/icons/icon_array_int.png b/tools/editor/icons/icon_array_int.png
index 74925553d9..2c4ec5bafb 100644
--- a/tools/editor/icons/icon_array_int.png
+++ b/tools/editor/icons/icon_array_int.png
Binary files differ
diff --git a/tools/editor/icons/icon_array_string.png b/tools/editor/icons/icon_array_string.png
index 2aeded63df..a2e3f11c35 100644
--- a/tools/editor/icons/icon_array_string.png
+++ b/tools/editor/icons/icon_array_string.png
Binary files differ
diff --git a/tools/editor/icons/icon_array_variant.png b/tools/editor/icons/icon_array_variant.png
index 34cb83cadd..ab294898ad 100644
--- a/tools/editor/icons/icon_array_variant.png
+++ b/tools/editor/icons/icon_array_variant.png
Binary files differ
diff --git a/tools/editor/icons/icon_bool.png b/tools/editor/icons/icon_bool.png
index 3381033b00..80b3a9deb7 100644
--- a/tools/editor/icons/icon_bool.png
+++ b/tools/editor/icons/icon_bool.png
Binary files differ
diff --git a/tools/editor/icons/icon_color.png b/tools/editor/icons/icon_color.png
index 08547caa28..3ab87c98ea 100644
--- a/tools/editor/icons/icon_color.png
+++ b/tools/editor/icons/icon_color.png
Binary files differ
diff --git a/tools/editor/icons/icon_integer.png b/tools/editor/icons/icon_integer.png
index 32c8d9885b..b49390aeb1 100644
--- a/tools/editor/icons/icon_integer.png
+++ b/tools/editor/icons/icon_integer.png
Binary files differ
diff --git a/tools/editor/icons/icon_quat.png b/tools/editor/icons/icon_quat.png
index ebb8719d33..f09d2fcaba 100644
--- a/tools/editor/icons/icon_quat.png
+++ b/tools/editor/icons/icon_quat.png
Binary files differ
diff --git a/tools/editor/icons/icon_real.png b/tools/editor/icons/icon_real.png
index 80fbf7017c..7f5bf08ede 100644
--- a/tools/editor/icons/icon_real.png
+++ b/tools/editor/icons/icon_real.png
Binary files differ
diff --git a/tools/editor/icons/icon_rect2.png b/tools/editor/icons/icon_rect2.png
index e9293b5fad..cf3cfe3b22 100644
--- a/tools/editor/icons/icon_rect2.png
+++ b/tools/editor/icons/icon_rect2.png
Binary files differ
diff --git a/tools/editor/icons/icon_rect3.png b/tools/editor/icons/icon_rect3.png
index e1e81f84e7..8eacfff207 100644
--- a/tools/editor/icons/icon_rect3.png
+++ b/tools/editor/icons/icon_rect3.png
Binary files differ
diff --git a/tools/editor/icons/icon_string.png b/tools/editor/icons/icon_string.png
index 48bf753c40..4a747f7c62 100644
--- a/tools/editor/icons/icon_string.png
+++ b/tools/editor/icons/icon_string.png
Binary files differ
diff --git a/tools/editor/icons/icon_vector.png b/tools/editor/icons/icon_vector.png
index 0ee33ba0b7..0bda8ff7c0 100644
--- a/tools/editor/icons/icon_vector.png
+++ b/tools/editor/icons/icon_vector.png
Binary files differ
diff --git a/tools/editor/icons/icon_vector2.png b/tools/editor/icons/icon_vector2.png
index 5920109a55..5bfd08f52a 100644
--- a/tools/editor/icons/icon_vector2.png
+++ b/tools/editor/icons/icon_vector2.png
Binary files differ
diff --git a/tools/editor/io_plugins/editor_sample_import_plugin.cpp b/tools/editor/io_plugins/editor_sample_import_plugin.cpp
index b81c88c817..47673f8f81 100644
--- a/tools/editor/io_plugins/editor_sample_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_sample_import_plugin.cpp
@@ -481,7 +481,7 @@ Error EditorSampleImportPlugin::import(const String& p_path, const Ref<ResourceI
float mu = pos-Math::floor(pos);
int ipos = int(Math::floor(pos));
- float y0=data[MAX(0,ipos-i)];
+ float y0=data[MAX(0,ipos-1)];
float y1=data[ipos];
float y2=data[MIN(len-1,ipos+1)];
float y3=data[MIN(len-1,ipos+2)];
diff --git a/tools/editor/plugins/canvas_item_editor_plugin.cpp b/tools/editor/plugins/canvas_item_editor_plugin.cpp
index ef2df539e8..f3ff001d84 100644
--- a/tools/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/tools/editor/plugins/canvas_item_editor_plugin.cpp
@@ -409,7 +409,7 @@ void CanvasItemEditor::_node_removed(Node *p_node) {
void CanvasItemEditor::_keying_changed() {
- if (AnimationPlayerEditor::singleton->get_key_editor()->has_keying())
+ if (AnimationPlayerEditor::singleton->get_key_editor()->is_visible())
animation_hb->show();
else
animation_hb->hide();
@@ -2233,6 +2233,8 @@ void CanvasItemEditor::_notification(int p_what) {
p->add_icon_item(get_icon("ControlAlignWide","EditorIcons"),"Full Rect",ANCHOR_ALIGN_WIDE);
+ AnimationPlayerEditor::singleton->get_key_editor()->connect("visibility_changed",this,"_keying_changed");
+ _keying_changed();
}
if (p_what==NOTIFICATION_READY) {
@@ -3477,7 +3479,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
box_selecting=false;
//zoom=0.5;
singleton=this;
- AnimationPlayerEditor::singleton->get_key_editor()->connect("keying_changed",this,"_keying_changed");
+
set_process_unhandled_key_input(true);
can_move_pivot=false;
drag=DRAG_NONE;
diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp
index bef74ebcfe..18f3787cff 100644
--- a/tools/editor/plugins/script_editor_plugin.cpp
+++ b/tools/editor/plugins/script_editor_plugin.cpp
@@ -2486,13 +2486,13 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
script_back->connect("pressed",this,"_history_back");
menu_hb->add_child(script_back);
script_back->set_disabled(true);
- help_search->set_tooltip("Go to previous edited document.");
+ script_back->set_tooltip("Go to previous edited document.");
script_forward = memnew( ToolButton );
script_forward->connect("pressed",this,"_history_forward");
menu_hb->add_child(script_forward);
script_forward->set_disabled(true);
- help_search->set_tooltip("Go to next edited document.");
+ script_forward->set_tooltip("Go to next edited document.");
diff --git a/tools/editor/scene_tree_editor.cpp b/tools/editor/scene_tree_editor.cpp
index ba5cc7568b..45eecacb6b 100644
--- a/tools/editor/scene_tree_editor.cpp
+++ b/tools/editor/scene_tree_editor.cpp
@@ -230,7 +230,7 @@ void SceneTreeEditor::_add_nodes(Node *p_node,TreeItem *p_parent) {
return;
}
} else {
- part_of_subscene = get_scene_node()->get_scene_inherited_state().is_valid() && get_scene_node()->get_scene_inherited_state()->find_node_by_path(get_scene_node()->get_path_to(p_node))>=0;
+ part_of_subscene = p_node!=get_scene_node() && get_scene_node()->get_scene_inherited_state().is_valid() && get_scene_node()->get_scene_inherited_state()->find_node_by_path(get_scene_node()->get_path_to(p_node))>=0;
}
TreeItem *item = tree->create_item(p_parent);