From 487773ed24fa5c8e93a1bd4b2700621d6c3aea37 Mon Sep 17 00:00:00 2001 From: Xavier Sellier Date: Mon, 11 Dec 2017 10:59:59 -0500 Subject: [PATCH] Remove funny output during when exporting a project or loading Godot Engine --- core/io/resource_format_binary.cpp | 4 +--- drivers/unix/file_access_unix.cpp | 2 +- editor/asset_library_editor_plugin.cpp | 2 -- editor/editor_data.cpp | 2 -- editor/editor_import_export.cpp | 5 ----- editor/io_plugins/editor_scene_import_plugin.cpp | 2 +- editor/project_export.cpp | 2 +- editor/project_manager.cpp | 6 +++--- scene/io/resource_format_image.cpp | 2 +- scene/resources/surface_tool.cpp | 2 +- servers/physics_2d/physics_2d_server_wrap_mt.cpp | 6 +++--- servers/visual/visual_server_wrap_mt.cpp | 6 +++--- 12 files changed, 15 insertions(+), 26 deletions(-) diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp index a38aed9d2f2..f135d0b190c 100644 --- a/core/io/resource_format_binary.cpp +++ b/core/io/resource_format_binary.cpp @@ -2274,7 +2274,7 @@ Error ResourceFormatSaverBinaryInstance::save(const String &p_path, const RES &p } f->seek_end(); - print_line("SAVING: " + p_path); + print_line("Saving: " + p_path); if (p_resource->get_import_metadata().is_valid()) { uint64_t md_pos = f->get_pos(); Ref imd = p_resource->get_import_metadata(); @@ -2283,8 +2283,6 @@ Error ResourceFormatSaverBinaryInstance::save(const String &p_path, const RES &p for (int i = 0; i < imd->get_source_count(); i++) { save_unicode_string(imd->get_source_path(i)); save_unicode_string(imd->get_source_md5(i)); - print_line("SAVE PATH: " + imd->get_source_path(i)); - print_line("SAVE MD5: " + imd->get_source_md5(i)); } List options; imd->get_options(&options); diff --git a/drivers/unix/file_access_unix.cpp b/drivers/unix/file_access_unix.cpp index 7b3fec229dd..4ed1c3e7075 100644 --- a/drivers/unix/file_access_unix.cpp +++ b/drivers/unix/file_access_unix.cpp @@ -230,7 +230,7 @@ uint64_t FileAccessUnix::_get_modified_time(const String &p_file) { if (success) { return flags.st_mtime; } else { - print_line("ERROR IN: " + p_file); + print_line("Cannot open: " + p_file); ERR_FAIL_V(0); }; diff --git a/editor/asset_library_editor_plugin.cpp b/editor/asset_library_editor_plugin.cpp index d5d4c8e697b..4dd4f42dbd8 100644 --- a/editor/asset_library_editor_plugin.cpp +++ b/editor/asset_library_editor_plugin.cpp @@ -715,8 +715,6 @@ void EditorAssetLibrary::_image_request_completed(int p_status, int p_code, cons if (p_status == HTTPRequest::RESULT_SUCCESS) { - print_line("GOT IMAGE YAY!"); - if (p_code != HTTPClient::RESPONSE_NOT_MODIFIED) { for (int i = 0; i < headers.size(); i++) { if (headers[i].findn("ETag:") == 0) { // Save etag diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp index 66a277908bb..d95c30bf976 100644 --- a/editor/editor_data.cpp +++ b/editor/editor_data.cpp @@ -560,8 +560,6 @@ bool EditorData::check_and_update_scene(int p_idx) { bool must_reload = _find_updated_instances(edited_scene[p_idx].root, edited_scene[p_idx].root, checked_scenes); - print_line("MUST RELOAD? " + itos(must_reload)); - if (must_reload) { Ref pscene; pscene.instance(); diff --git a/editor/editor_import_export.cpp b/editor/editor_import_export.cpp index d3184aa93e0..be69f67232b 100644 --- a/editor/editor_import_export.cpp +++ b/editor/editor_import_export.cpp @@ -227,8 +227,6 @@ static void _edit_files_with_filter(DirAccess *da, const List &p_filters String f = da->get_next(); while (f != "") { - - print_line("HOHO: " + f); if (da->current_is_dir()) dirs.push_back(f); else @@ -241,8 +239,6 @@ static void _edit_files_with_filter(DirAccess *da, const List &p_filters if (!r.ends_with("/")) r += "/"; - print_line("AT: " + r); - for (List::Element *E = files.front(); E; E = E->next()) { String fullpath = r + E->get(); for (const List::Element *F = p_filters.front(); F; F = F->next()) { @@ -977,7 +973,6 @@ Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func if (remap_files.size()) { Vector remapsprop; for (Map::Element *E = remap_files.front(); E; E = E->next()) { - print_line("REMAP: " + String(E->key()) + " -> " + E->get()); remapsprop.push_back(E->key()); remapsprop.push_back(E->get()); } diff --git a/editor/io_plugins/editor_scene_import_plugin.cpp b/editor/io_plugins/editor_scene_import_plugin.cpp index 533c88c8250..5fa996b0cad 100644 --- a/editor/io_plugins/editor_scene_import_plugin.cpp +++ b/editor/io_plugins/editor_scene_import_plugin.cpp @@ -2683,7 +2683,7 @@ Error EditorSceneImportPlugin::import2(Node *scene, const String &p_dest_path, c //packer->set_path(p_dest_path); do not take over, let the changed files reload themselves packer->set_import_metadata(from); - print_line("SAVING TO: " + p_dest_path); + print_line("Saving to: " + p_dest_path); err = ResourceSaver::save(p_dest_path, packer); //do not take over, let the changed files reload themselves //EditorFileSystem::get_singleton()->update_resource(packer); diff --git a/editor/project_export.cpp b/editor/project_export.cpp index ee5ef2ca991..4c3545b069c 100644 --- a/editor/project_export.cpp +++ b/editor/project_export.cpp @@ -421,7 +421,7 @@ void ProjectExportDialog::_export_action(const String &p_file) { while (true) { - print_line("TESTING: " + location.plus_file("engine.cfg")); + print_line("Loading engine file: " + location.plus_file("engine.cfg")); if (FileAccess::exists(location.plus_file("engine.cfg"))) { error->set_text(TTR("Please export outside the project folder!")); diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index d77533cf4ec..50acf638a2b 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -940,7 +940,7 @@ void ProjectManager::_open_project_confirm() { for (Map::Element *E = selected_list.front(); E; E = E->next()) { const String &selected = E->key(); String path = EditorSettings::get_singleton()->get("projects/" + selected); - print_line("OPENING: " + path + " (" + selected + ")"); + print_line("Opening project: " + path + " (" + selected + ")"); List args; @@ -986,7 +986,7 @@ void ProjectManager::_run_project_confirm() { const String &selected = E->key(); String path = EditorSettings::get_singleton()->get("projects/" + selected); - print_line("OPENING: " + path + " (" + selected + ")"); + print_line("Opening project: " + path + " (" + selected + ")"); List args; @@ -1048,7 +1048,7 @@ void ProjectManager::_scan_dir(DirAccess *da, float pos, float total, List projects; DirAccess *da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM); da->change_dir(p_base); diff --git a/scene/io/resource_format_image.cpp b/scene/io/resource_format_image.cpp index 8c3b7115e9e..5ad83a64306 100644 --- a/scene/io/resource_format_image.cpp +++ b/scene/io/resource_format_image.cpp @@ -108,7 +108,7 @@ RES ResourceFormatLoaderImage::load(const String &p_path, const String &p_origin if (!err && debug_load_times) { double total = USEC_TO_SEC((OS::get_singleton()->get_ticks_usec() - begtime)); - print_line("IMAGE: " + itos(image.get_width()) + "x" + itos(image.get_height())); + print_line("Image: " + itos(image.get_width()) + "x" + itos(image.get_height())); print_line(" -load: " + rtos(total)); } diff --git a/scene/resources/surface_tool.cpp b/scene/resources/surface_tool.cpp index 6b6aa4052fb..539ff3e3719 100644 --- a/scene/resources/surface_tool.cpp +++ b/scene/resources/surface_tool.cpp @@ -768,7 +768,7 @@ void SurfaceTool::generate_normals() { vertex_hash.clear(); if (E) { smooth = smooth_groups[count]; - print_line("SMOOTH AT " + itos(count) + ": " + itos(smooth)); + print_line("Smooth at " + itos(count) + ": " + itos(smooth)); } } } diff --git a/servers/physics_2d/physics_2d_server_wrap_mt.cpp b/servers/physics_2d/physics_2d_server_wrap_mt.cpp index 04b15414de0..68227b42e4d 100644 --- a/servers/physics_2d/physics_2d_server_wrap_mt.cpp +++ b/servers/physics_2d/physics_2d_server_wrap_mt.cpp @@ -109,16 +109,16 @@ void Physics2DServerWrapMT::init() { if (create_thread) { step_sem = Semaphore::create(); - print_line("CREATING PHYSICS 2D THREAD"); + print_line("Creating physics 2D thread"); //OS::get_singleton()->release_rendering_thread(); if (create_thread) { thread = Thread::create(_thread_callback, this); - print_line("STARTING PHYISICS 2D THREAD"); + print_line("Starting physics 2D thread"); } while (!step_thread_up) { OS::get_singleton()->delay_usec(1000); } - print_line("DONE PHYSICS 2D THREAD"); + print_line("Done physics 2D thread"); } else { physics_2d_server->init(); diff --git a/servers/visual/visual_server_wrap_mt.cpp b/servers/visual/visual_server_wrap_mt.cpp index b5c64608f46..9511e6d5dc4 100644 --- a/servers/visual/visual_server_wrap_mt.cpp +++ b/servers/visual/visual_server_wrap_mt.cpp @@ -130,16 +130,16 @@ void VisualServerWrapMT::init() { if (create_thread) { draw_mutex = Mutex::create(); - print_line("CREATING RENDER THREAD"); + print_line("Creating render thread"); OS::get_singleton()->release_rendering_thread(); if (create_thread) { thread = Thread::create(_thread_callback, this); - print_line("STARTING RENDER THREAD"); + print_line("Starting render thread"); } while (!draw_thread_up) { OS::get_singleton()->delay_usec(1000); } - print_line("DONE RENDER THREAD"); + print_line("Done render thread"); } else { visual_server->init();