1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-02 16:48:55 +00:00

Fixes for new two-dash long command line arguments

- Fixes some single-dash leftovers that were missed in the previous commit
- Reorder the help output for clarity, and document missing options
- Drop obsolete options: --noop, --pack, --editor-scene, --level, --import, --import-script, --no-quit
- Improve error message on malformed arguments and do not display help on error
- Always use long form of arguments when starting a new Godot process from C++, for clarity and easy grepping
- Cleanup obsolete code here and there
This commit is contained in:
Rémi Verschelde
2017-08-19 16:45:03 +02:00
parent 1d757c43d7
commit 93f1fb1c2f
16 changed files with 169 additions and 282 deletions

View File

@@ -1851,47 +1851,6 @@ void EditorNode::_run(bool p_current, const String &p_custom) {
_playing_edited = p_current;
}
void EditorNode::_cleanup_scene() {
#if 0
Node *scene = editor_data.get_edited_scene_root();
editor_selection->clear();
editor_data.clear_editor_states();
editor_history.clear();
_hide_top_editors();
animation_editor->cleanup();
property_editor->edit(NULL);
resources_dock->cleanup();
scene_import_metadata.unref();
//set_edited_scene(NULL);
if (scene) {
if (scene->get_filename()!="") {
previous_scenes.push_back(scene->get_filename());
}
memdelete(scene);
}
editor_data.get_undo_redo().clear_history();
saved_version=editor_data.get_undo_redo().get_version();
run_settings_dialog->set_run_mode(0);
run_settings_dialog->set_custom_arguments("-l $scene");
List<Ref<Resource> > cached;
ResourceCache::get_cached_resources(&cached);
for(List<Ref<Resource> >::Element *E=cached.front();E;E=E->next()) {
String path = E->get()->get_path();
if (path.is_resource_file()) {
ERR_PRINT(("Stray resource not cleaned:"+path).utf8().get_data());
}
}
_update_title();
#endif
}
void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
//print_line("option "+itos(p_option)+" confirm "+itos(p_confirmed));
@@ -1915,8 +1874,6 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
_scene_tab_changed(idx);
editor_data.clear_editor_states();
//_cleanup_scene();
} break;
case FILE_NEW_INHERITED_SCENE:
case FILE_OPEN_SCENE: {
@@ -2737,8 +2694,6 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
import_reload_fn = scene->get_filename();
_save_scene(import_reload_fn);
_cleanup_scene();
}
@@ -3328,8 +3283,6 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b
_scene_tab_changed(idx);
}
//_cleanup_scene(); // i'm sorry but this MUST happen to avoid modified resources to not be reloaded.
dependency_errors.clear();
Ref<PackedScene> sdata = ResourceLoader::load(lpath, "", true);