1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-10 13:00:37 +00:00

SceneMainLoop -> SceneTree

-=-=-=-=-=-=-=-=-=-=-=-=-=-

*YOUR SOURCE MIGHT NOT WORK*
For mor information on fix:
https://github.com/okamstudio/godot/wiki/devel_scene_tree

Other stuff:
-Shower of bullets demo
-Fixes all around
This commit is contained in:
Juan Linietsky
2014-11-05 21:20:42 -03:00
parent d14baf6e41
commit 0dbedd18fc
168 changed files with 1534 additions and 1310 deletions

View File

@@ -140,7 +140,7 @@ void EditorNode::_unhandled_input(const InputEvent& p_event) {
void EditorNode::_notification(int p_what) {
if (p_what==NOTIFICATION_EXIT_SCENE) {
if (p_what==NOTIFICATION_EXIT_TREE) {
editor_data.save_editor_external_data();
log->deinit(); // do not get messages anymore
@@ -213,13 +213,13 @@ void EditorNode::_notification(int p_what) {
}
}
if (p_what==NOTIFICATION_ENTER_SCENE) {
if (p_what==NOTIFICATION_ENTER_TREE) {
//MessageQueue::get_singleton()->push_call(this,"_get_scene_metadata");
get_scene()->set_editor_hint(true);
get_scene()->get_root()->set_as_audio_listener(false);
get_scene()->get_root()->set_as_audio_listener_2d(false);
get_scene()->set_auto_accept_quit(false);
get_tree()->set_editor_hint(true);
get_tree()->get_root()->set_as_audio_listener(false);
get_tree()->get_root()->set_as_audio_listener_2d(false);
get_tree()->set_auto_accept_quit(false);
//VisualServer::get_singleton()->viewport_set_hide_canvas(editor->get_scene_root()->get_viewport(),false);
//import_monitor->scan_changes();
@@ -242,7 +242,7 @@ void EditorNode::_notification(int p_what) {
if (ok!=OK)
OS::get_singleton()->set_exit_code(255);
defer_translatable="";
get_scene()->quit();
get_tree()->quit();
}
/*
@@ -1232,7 +1232,7 @@ void EditorNode::_edit_current() {
Node * current_node = current_obj->cast_to<Node>();
ERR_FAIL_COND(!current_node);
ERR_FAIL_COND(!current_node->is_inside_scene());
ERR_FAIL_COND(!current_node->is_inside_tree());
@@ -1902,7 +1902,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
}
_menu_option_confirm(RUN_STOP,true);
get_scene()->quit();
get_tree()->quit();
} break;
case FILE_EXTERNAL_OPEN_SCENE: {
@@ -2122,7 +2122,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
break;
}
get_scene()->quit();
get_tree()->quit();
String exec = OS::get_singleton()->get_executable_path();
List<String> args;
@@ -2380,8 +2380,8 @@ void EditorNode::set_edited_scene(Node *p_scene) {
if (edited_scene && edited_scene->cast_to<Popup>())
edited_scene->cast_to<Popup>()->show(); //show popups
scene_tree_dock->set_edited_scene(edited_scene);
if (get_scene())
get_scene()->set_edited_scene_root(edited_scene);
if (get_tree())
get_tree()->set_edited_scene_root(edited_scene);
if (edited_scene) {
if (p_scene->get_parent()!=scene_root)
@@ -2425,7 +2425,7 @@ void EditorNode::_fetch_translatable_strings(const Object *p_object,Set<StringNa
Error EditorNode::save_translatable_strings(const String& p_to_file) {
if (!is_inside_scene()) {
if (!is_inside_tree()) {
defer_translatable=p_to_file;
return OK;
}
@@ -2619,7 +2619,7 @@ Error EditorNode::save_optimized_copy(const String& p_scene,const String& p_pres
Error EditorNode::load_scene(const String& p_scene) {
if (!is_inside_scene()) {
if (!is_inside_tree()) {
defer_load_scene = p_scene;
return OK;
}