|
@@ -59,8 +59,8 @@
|
|
#include "scene/gui/panel.h"
|
|
#include "scene/gui/panel.h"
|
|
#include "scene/gui/panel_container.h"
|
|
#include "scene/gui/panel_container.h"
|
|
#include "scene/gui/split_container.h"
|
|
#include "scene/gui/split_container.h"
|
|
|
|
+#include "scene/gui/tab_bar.h"
|
|
#include "scene/gui/tab_container.h"
|
|
#include "scene/gui/tab_container.h"
|
|
-#include "scene/gui/tabs.h"
|
|
|
|
#include "scene/gui/texture_progress_bar.h"
|
|
#include "scene/gui/texture_progress_bar.h"
|
|
#include "scene/main/window.h"
|
|
#include "scene/main/window.h"
|
|
#include "scene/resources/packed_scene.h"
|
|
#include "scene/resources/packed_scene.h"
|
|
@@ -658,7 +658,7 @@ void EditorNode::_notification(int p_what) {
|
|
} break;
|
|
} break;
|
|
|
|
|
|
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
|
|
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
|
|
- scene_tabs->set_tab_close_display_policy((bool(EDITOR_GET("interface/scene_tabs/always_show_close_button")) ? Tabs::CLOSE_BUTTON_SHOW_ALWAYS : Tabs::CLOSE_BUTTON_SHOW_ACTIVE_ONLY));
|
|
|
|
|
|
+ scene_tabs->set_tab_close_display_policy((bool(EDITOR_GET("interface/scene_tabs/always_show_close_button")) ? TabBar::CLOSE_BUTTON_SHOW_ALWAYS : TabBar::CLOSE_BUTTON_SHOW_ACTIVE_ONLY));
|
|
theme = create_custom_theme(theme_base->get_theme());
|
|
theme = create_custom_theme(theme_base->get_theme());
|
|
|
|
|
|
theme_base->set_theme(theme);
|
|
theme_base->set_theme(theme);
|
|
@@ -838,7 +838,7 @@ void EditorNode::_resources_changed(const Vector<String> &p_resources) {
|
|
}
|
|
}
|
|
|
|
|
|
if (res->get_import_path() != String()) {
|
|
if (res->get_import_path() != String()) {
|
|
- //this is an imported resource, will be reloaded if reimported via the _resources_reimported() callback
|
|
|
|
|
|
+ // this is an imported resource, will be reloaded if reimported via the _resources_reimported() callback
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -942,21 +942,21 @@ void EditorNode::_fs_changed() {
|
|
}
|
|
}
|
|
|
|
|
|
void EditorNode::_resources_reimported(const Vector<String> &p_resources) {
|
|
void EditorNode::_resources_reimported(const Vector<String> &p_resources) {
|
|
- List<String> scenes; //will load later
|
|
|
|
|
|
+ List<String> scenes; // will load later
|
|
int current_tab = scene_tabs->get_current_tab();
|
|
int current_tab = scene_tabs->get_current_tab();
|
|
|
|
|
|
for (int i = 0; i < p_resources.size(); i++) {
|
|
for (int i = 0; i < p_resources.size(); i++) {
|
|
String file_type = ResourceLoader::get_resource_type(p_resources[i]);
|
|
String file_type = ResourceLoader::get_resource_type(p_resources[i]);
|
|
if (file_type == "PackedScene") {
|
|
if (file_type == "PackedScene") {
|
|
scenes.push_back(p_resources[i]);
|
|
scenes.push_back(p_resources[i]);
|
|
- //reload later if needed, first go with normal resources
|
|
|
|
|
|
+ // reload later if needed, first go with normal resources
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
|
|
|
|
if (!ResourceCache::has(p_resources[i])) {
|
|
if (!ResourceCache::has(p_resources[i])) {
|
|
- continue; //not loaded, no need to reload
|
|
|
|
|
|
+ continue; // not loaded, no need to reload
|
|
}
|
|
}
|
|
- //reload normally
|
|
|
|
|
|
+ // reload normally
|
|
Resource *resource = ResourceCache::get(p_resources[i]);
|
|
Resource *resource = ResourceCache::get(p_resources[i]);
|
|
if (resource) {
|
|
if (resource) {
|
|
resource->reload_from_file();
|
|
resource->reload_from_file();
|
|
@@ -1140,7 +1140,7 @@ Error EditorNode::load_resource(const String &p_resource, bool p_ignore_broken_d
|
|
ERR_FAIL_COND_V(!res.is_valid(), ERR_CANT_OPEN);
|
|
ERR_FAIL_COND_V(!res.is_valid(), ERR_CANT_OPEN);
|
|
|
|
|
|
if (!p_ignore_broken_deps && dependency_errors.has(p_resource)) {
|
|
if (!p_ignore_broken_deps && dependency_errors.has(p_resource)) {
|
|
- //current_option = -1;
|
|
|
|
|
|
+ // current_option = -1;
|
|
Vector<String> errors;
|
|
Vector<String> errors;
|
|
for (Set<String>::Element *E = dependency_errors[p_resource].front(); E; E = E->next()) {
|
|
for (Set<String>::Element *E = dependency_errors[p_resource].front(); E; E = E->next()) {
|
|
errors.push_back(E->get());
|
|
errors.push_back(E->get());
|
|
@@ -1216,7 +1216,7 @@ void EditorNode::save_resource_as(const Ref<Resource> &p_resource, const String
|
|
List<String> preferred;
|
|
List<String> preferred;
|
|
for (const String &E : extensions) {
|
|
for (const String &E : extensions) {
|
|
if (p_resource->is_class("Script") && (E == "tres" || E == "res")) {
|
|
if (p_resource->is_class("Script") && (E == "tres" || E == "res")) {
|
|
- //this serves no purpose and confused people
|
|
|
|
|
|
+ // this serves no purpose and confused people
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
file->add_filter("*." + E + " ; " + E.to_upper());
|
|
file->add_filter("*." + E + " ; " + E.to_upper());
|
|
@@ -1325,7 +1325,7 @@ void EditorNode::_get_scene_metadata(const String &p_file) {
|
|
|
|
|
|
Error err = cf->load(path);
|
|
Error err = cf->load(path);
|
|
if (err != OK || !cf->has_section("editor_states")) {
|
|
if (err != OK || !cf->has_section("editor_states")) {
|
|
- return; //must not exist
|
|
|
|
|
|
+ return; // must not exist
|
|
}
|
|
}
|
|
|
|
|
|
List<String> esl;
|
|
List<String> esl;
|
|
@@ -1349,7 +1349,7 @@ void EditorNode::_set_scene_metadata(const String &p_file, int p_idx) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
- scene->set_meta("__editor_run_settings__", Variant()); //clear it (no point in keeping it)
|
|
|
|
|
|
+ scene->set_meta("__editor_run_settings__", Variant()); // clear it (no point in keeping it)
|
|
scene->set_meta("__editor_plugin_states__", Variant());
|
|
scene->set_meta("__editor_plugin_states__", Variant());
|
|
|
|
|
|
String path = EditorSettings::get_singleton()->get_project_settings_dir().plus_file(p_file.get_file() + "-editstate-" + p_file.md5_text() + ".cfg");
|
|
String path = EditorSettings::get_singleton()->get_project_settings_dir().plus_file(p_file.get_file() + "-editstate-" + p_file.md5_text() + ".cfg");
|
|
@@ -1392,10 +1392,10 @@ bool EditorNode::_find_and_save_resource(RES p_res, Map<RES, bool> &processed, i
|
|
|
|
|
|
if (p_res->get_path().is_resource_file()) {
|
|
if (p_res->get_path().is_resource_file()) {
|
|
if (changed || subchanged) {
|
|
if (changed || subchanged) {
|
|
- //save
|
|
|
|
|
|
+ // save
|
|
ResourceSaver::save(p_res->get_path(), p_res, flags);
|
|
ResourceSaver::save(p_res->get_path(), p_res, flags);
|
|
}
|
|
}
|
|
- processed[p_res] = false; //because it's a file
|
|
|
|
|
|
+ processed[p_res] = false; // because it's a file
|
|
return false;
|
|
return false;
|
|
} else {
|
|
} else {
|
|
processed[p_res] = changed;
|
|
processed[p_res] = changed;
|
|
@@ -1493,7 +1493,7 @@ void EditorNode::_save_scene_with_preview(String p_file, int p_idx) {
|
|
_find_node_types(editor_data.get_edited_scene_root(), c2d, c3d);
|
|
_find_node_types(editor_data.get_edited_scene_root(), c2d, c3d);
|
|
|
|
|
|
save.step(TTR("Creating Thumbnail"), 1);
|
|
save.step(TTR("Creating Thumbnail"), 1);
|
|
- //current view?
|
|
|
|
|
|
+ // current view?
|
|
|
|
|
|
Ref<Image> img;
|
|
Ref<Image> img;
|
|
// If neither 3D or 2D nodes are present, make a 1x1 black texture.
|
|
// If neither 3D or 2D nodes are present, make a 1x1 black texture.
|
|
@@ -1546,12 +1546,12 @@ void EditorNode::_save_scene_with_preview(String p_file, int p_idx) {
|
|
}
|
|
}
|
|
img->convert(Image::FORMAT_RGB8);
|
|
img->convert(Image::FORMAT_RGB8);
|
|
|
|
|
|
- //save thumbnail directly, as thumbnailer may not update due to actual scene not changing md5
|
|
|
|
|
|
+ // save thumbnail directly, as thumbnailer may not update due to actual scene not changing md5
|
|
String temp_path = EditorPaths::get_singleton()->get_cache_dir();
|
|
String temp_path = EditorPaths::get_singleton()->get_cache_dir();
|
|
String cache_base = ProjectSettings::get_singleton()->globalize_path(p_file).md5_text();
|
|
String cache_base = ProjectSettings::get_singleton()->globalize_path(p_file).md5_text();
|
|
cache_base = temp_path.plus_file("resthumb-" + cache_base);
|
|
cache_base = temp_path.plus_file("resthumb-" + cache_base);
|
|
|
|
|
|
- //does not have it, try to load a cached thumbnail
|
|
|
|
|
|
+ // does not have it, try to load a cached thumbnail
|
|
|
|
|
|
String file = cache_base + ".png";
|
|
String file = cache_base + ".png";
|
|
|
|
|
|
@@ -1599,7 +1599,7 @@ static bool _find_edited_resources(const Ref<Resource> &p_resource, Set<Ref<Reso
|
|
if (res.is_null()) {
|
|
if (res.is_null()) {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
- if (res->get_path().is_resource_file()) { //not a subresource, continue
|
|
|
|
|
|
+ if (res->get_path().is_resource_file()) { // not a subresource, continue
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
if (_find_edited_resources(res, edited_resources)) {
|
|
if (_find_edited_resources(res, edited_resources)) {
|
|
@@ -1612,7 +1612,7 @@ static bool _find_edited_resources(const Ref<Resource> &p_resource, Set<Ref<Reso
|
|
}
|
|
}
|
|
|
|
|
|
int EditorNode::_save_external_resources() {
|
|
int EditorNode::_save_external_resources() {
|
|
- //save external resources and its subresources if any was modified
|
|
|
|
|
|
+ // save external resources and its subresources if any was modified
|
|
|
|
|
|
int flg = 0;
|
|
int flg = 0;
|
|
if (EditorSettings::get_singleton()->get("filesystem/on_save/compress_binary_resources")) {
|
|
if (EditorSettings::get_singleton()->get("filesystem/on_save/compress_binary_resources")) {
|
|
@@ -1628,7 +1628,7 @@ int EditorNode::_save_external_resources() {
|
|
if (!res->get_path().is_resource_file()) {
|
|
if (!res->get_path().is_resource_file()) {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
- //not only check if this resource is edited, check contained subresources too
|
|
|
|
|
|
+ // not only check if this resource is edited, check contained subresources too
|
|
if (_find_edited_resources(res, edited_subresources)) {
|
|
if (_find_edited_resources(res, edited_subresources)) {
|
|
ResourceSaver::save(res->get_path(), res, flg);
|
|
ResourceSaver::save(res->get_path(), res, flg);
|
|
saved++;
|
|
saved++;
|
|
@@ -1837,7 +1837,7 @@ void EditorNode::_dialog_action(String p_file) {
|
|
case SETTINGS_PICK_MAIN_SCENE: {
|
|
case SETTINGS_PICK_MAIN_SCENE: {
|
|
ProjectSettings::get_singleton()->set("application/run/main_scene", p_file);
|
|
ProjectSettings::get_singleton()->set("application/run/main_scene", p_file);
|
|
ProjectSettings::get_singleton()->save();
|
|
ProjectSettings::get_singleton()->save();
|
|
- //would be nice to show the project manager opened with the highlighted field..
|
|
|
|
|
|
+ // would be nice to show the project manager opened with the highlighted field..
|
|
|
|
|
|
if (pick_main_scene->has_meta("from_native") && (bool)pick_main_scene->get_meta("from_native")) {
|
|
if (pick_main_scene->has_meta("from_native") && (bool)pick_main_scene->get_meta("from_native")) {
|
|
run_native->resume_run_native();
|
|
run_native->resume_run_native();
|
|
@@ -1980,7 +1980,7 @@ void EditorNode::_dialog_action(String p_file) {
|
|
}
|
|
}
|
|
|
|
|
|
} break;
|
|
} break;
|
|
- default: { //save scene?
|
|
|
|
|
|
+ default: { // save scene?
|
|
|
|
|
|
if (file->get_file_mode() == EditorFileDialog::FILE_MODE_SAVE_FILE) {
|
|
if (file->get_file_mode() == EditorFileDialog::FILE_MODE_SAVE_FILE) {
|
|
_save_scene_with_preview(p_file);
|
|
_save_scene_with_preview(p_file);
|
|
@@ -2141,7 +2141,7 @@ void EditorNode::_edit_current() {
|
|
bool is_resource = current_obj->is_class("Resource");
|
|
bool is_resource = current_obj->is_class("Resource");
|
|
bool is_node = current_obj->is_class("Node");
|
|
bool is_node = current_obj->is_class("Node");
|
|
|
|
|
|
- String editable_warning; //none by default
|
|
|
|
|
|
+ String editable_warning; // none by default
|
|
|
|
|
|
if (is_resource) {
|
|
if (is_resource) {
|
|
Resource *current_res = Object::cast_to<Resource>(current_obj);
|
|
Resource *current_res = Object::cast_to<Resource>(current_obj);
|
|
@@ -2243,7 +2243,7 @@ void EditorNode::_edit_current() {
|
|
for (; plugin_index < editor_table.size(); plugin_index++) {
|
|
for (; plugin_index < editor_table.size(); plugin_index++) {
|
|
if (editor_table[plugin_index] == main_plugin) {
|
|
if (editor_table[plugin_index] == main_plugin) {
|
|
if (!main_editor_buttons[plugin_index]->is_visible()) {
|
|
if (!main_editor_buttons[plugin_index]->is_visible()) {
|
|
- main_plugin = nullptr; //if button is not visible, then no plugin active
|
|
|
|
|
|
+ main_plugin = nullptr; // if button is not visible, then no plugin active
|
|
}
|
|
}
|
|
|
|
|
|
break;
|
|
break;
|
|
@@ -2329,7 +2329,7 @@ void EditorNode::_run(bool p_current, const String &p_custom) {
|
|
}
|
|
}
|
|
|
|
|
|
if (run_filename == "") {
|
|
if (run_filename == "") {
|
|
- //evidently, run the scene
|
|
|
|
|
|
+ // evidently, run the scene
|
|
if (!ensure_main_scene(false)) {
|
|
if (!ensure_main_scene(false)) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -2412,7 +2412,7 @@ void EditorNode::_android_build_source_selected(const String &p_file) {
|
|
export_template_manager->install_android_template_from_file(p_file);
|
|
export_template_manager->install_android_template_from_file(p_file);
|
|
}
|
|
}
|
|
void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
|
|
void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
|
|
- if (!p_confirmed) { //this may be a hack..
|
|
|
|
|
|
+ if (!p_confirmed) { // this may be a hack..
|
|
current_option = (MenuOptions)p_option;
|
|
current_option = (MenuOptions)p_option;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2981,7 +2981,7 @@ int EditorNode::_next_unsaved_scene(bool p_valid_filename, int p_start) {
|
|
|
|
|
|
void EditorNode::_exit_editor() {
|
|
void EditorNode::_exit_editor() {
|
|
exiting = true;
|
|
exiting = true;
|
|
- resource_preview->stop(); //stop early to avoid crashes
|
|
|
|
|
|
+ resource_preview->stop(); // stop early to avoid crashes
|
|
_save_docks();
|
|
_save_docks();
|
|
|
|
|
|
// Dim the editor window while it's quitting to make it clearer that it's busy
|
|
// Dim the editor window while it's quitting to make it clearer that it's busy
|
|
@@ -3087,7 +3087,7 @@ void EditorNode::_editor_select(int p_which) {
|
|
|
|
|
|
ERR_FAIL_INDEX(p_which, editor_table.size());
|
|
ERR_FAIL_INDEX(p_which, editor_table.size());
|
|
|
|
|
|
- if (!main_editor_buttons[p_which]->is_visible()) { //button hidden, no editor
|
|
|
|
|
|
+ if (!main_editor_buttons[p_which]->is_visible()) { // button hidden, no editor
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -3229,7 +3229,7 @@ void EditorNode::set_addon_plugin_enabled(const String &p_addon, bool p_enabled,
|
|
if (!p_enabled) {
|
|
if (!p_enabled) {
|
|
EditorPlugin *addon = plugin_addons[p_addon];
|
|
EditorPlugin *addon = plugin_addons[p_addon];
|
|
remove_editor_plugin(addon, p_config_changed);
|
|
remove_editor_plugin(addon, p_config_changed);
|
|
- memdelete(addon); //bye
|
|
|
|
|
|
+ memdelete(addon); // bye
|
|
plugin_addons.erase(p_addon);
|
|
plugin_addons.erase(p_addon);
|
|
_update_addon_config();
|
|
_update_addon_config();
|
|
return;
|
|
return;
|
|
@@ -3321,10 +3321,10 @@ void EditorNode::_remove_edited_scene(bool p_change_tab) {
|
|
|
|
|
|
void EditorNode::_remove_scene(int index, bool p_change_tab) {
|
|
void EditorNode::_remove_scene(int index, bool p_change_tab) {
|
|
if (editor_data.get_edited_scene() == index) {
|
|
if (editor_data.get_edited_scene() == index) {
|
|
- //Scene to remove is current scene
|
|
|
|
|
|
+ // Scene to remove is current scene
|
|
_remove_edited_scene(p_change_tab);
|
|
_remove_edited_scene(p_change_tab);
|
|
} else {
|
|
} else {
|
|
- //Scene to remove is not active scene
|
|
|
|
|
|
+ // Scene to remove is not active scene
|
|
editor_data.remove_scene(index);
|
|
editor_data.remove_scene(index);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -3338,7 +3338,7 @@ void EditorNode::set_edited_scene(Node *p_scene) {
|
|
get_editor_data().set_edited_scene_root(p_scene);
|
|
get_editor_data().set_edited_scene_root(p_scene);
|
|
|
|
|
|
if (Object::cast_to<Popup>(p_scene)) {
|
|
if (Object::cast_to<Popup>(p_scene)) {
|
|
- Object::cast_to<Popup>(p_scene)->show(); //show popups
|
|
|
|
|
|
+ Object::cast_to<Popup>(p_scene)->show(); // show popups
|
|
}
|
|
}
|
|
scene_tree_dock->set_edited_scene(p_scene);
|
|
scene_tree_dock->set_edited_scene(p_scene);
|
|
if (get_tree()) {
|
|
if (get_tree()) {
|
|
@@ -3374,7 +3374,7 @@ Dictionary EditorNode::_get_main_scene_state() {
|
|
|
|
|
|
void EditorNode::_set_main_scene_state(Dictionary p_state, Node *p_for_scene) {
|
|
void EditorNode::_set_main_scene_state(Dictionary p_state, Node *p_for_scene) {
|
|
if (get_edited_scene() != p_for_scene && p_for_scene != nullptr) {
|
|
if (get_edited_scene() != p_for_scene && p_for_scene != nullptr) {
|
|
- return; //not for this scene
|
|
|
|
|
|
+ return; // not for this scene
|
|
}
|
|
}
|
|
|
|
|
|
changing_scene = false;
|
|
changing_scene = false;
|
|
@@ -3389,7 +3389,7 @@ void EditorNode::_set_main_scene_state(Dictionary p_state, Node *p_for_scene) {
|
|
|
|
|
|
if (p_state.has("editor_index")) {
|
|
if (p_state.has("editor_index")) {
|
|
int index = p_state["editor_index"];
|
|
int index = p_state["editor_index"];
|
|
- if (current < 2) { //if currently in spatial/2d, only switch to spatial/2d. if currently in script, stay there
|
|
|
|
|
|
+ if (current < 2) { // if currently in spatial/2d, only switch to spatial/2d. if currently in script, stay there
|
|
if (index < 2 || !get_edited_scene()) {
|
|
if (index < 2 || !get_edited_scene()) {
|
|
_editor_select(index);
|
|
_editor_select(index);
|
|
}
|
|
}
|
|
@@ -3398,7 +3398,7 @@ void EditorNode::_set_main_scene_state(Dictionary p_state, Node *p_for_scene) {
|
|
|
|
|
|
if (get_edited_scene()) {
|
|
if (get_edited_scene()) {
|
|
if (current < 2) {
|
|
if (current < 2) {
|
|
- //use heuristic instead
|
|
|
|
|
|
+ // use heuristic instead
|
|
int n2d = 0, n3d = 0;
|
|
int n2d = 0, n3d = 0;
|
|
_find_node_types(get_edited_scene(), n2d, n3d);
|
|
_find_node_types(get_edited_scene(), n2d, n3d);
|
|
if (n2d > n3d) {
|
|
if (n2d > n3d) {
|
|
@@ -3420,7 +3420,7 @@ void EditorNode::_set_main_scene_state(Dictionary p_state, Node *p_for_scene) {
|
|
scene_tree_dock->set_filter(p_state["node_filter"]);
|
|
scene_tree_dock->set_filter(p_state["node_filter"]);
|
|
}
|
|
}
|
|
|
|
|
|
- //this should only happen at the very end
|
|
|
|
|
|
+ // this should only happen at the very end
|
|
|
|
|
|
EditorDebuggerNode::get_singleton()->update_live_edit_root();
|
|
EditorDebuggerNode::get_singleton()->update_live_edit_root();
|
|
ScriptEditor::get_singleton()->set_scene_root_script(editor_data.get_scene_root_script(editor_data.get_edited_scene()));
|
|
ScriptEditor::get_singleton()->set_scene_root_script(editor_data.get_scene_root_script(editor_data.get_edited_scene()));
|
|
@@ -3441,7 +3441,7 @@ void EditorNode::_clear_undo_history() {
|
|
}
|
|
}
|
|
|
|
|
|
void EditorNode::set_current_scene(int p_idx) {
|
|
void EditorNode::set_current_scene(int p_idx) {
|
|
- //Save the folding in case the scene gets reloaded.
|
|
|
|
|
|
+ // Save the folding in case the scene gets reloaded.
|
|
if (editor_data.get_scene_path(p_idx) != "" && editor_data.get_edited_scene_root(p_idx)) {
|
|
if (editor_data.get_scene_path(p_idx) != "" && editor_data.get_edited_scene_root(p_idx)) {
|
|
editor_folding.save_scene_folding(editor_data.get_edited_scene_root(p_idx), editor_data.get_scene_path(p_idx));
|
|
editor_folding.save_scene_folding(editor_data.get_edited_scene_root(p_idx), editor_data.get_scene_path(p_idx));
|
|
}
|
|
}
|
|
@@ -3469,7 +3469,7 @@ void EditorNode::set_current_scene(int p_idx) {
|
|
Node *new_scene = editor_data.get_edited_scene_root();
|
|
Node *new_scene = editor_data.get_edited_scene_root();
|
|
|
|
|
|
if (Object::cast_to<Popup>(new_scene)) {
|
|
if (Object::cast_to<Popup>(new_scene)) {
|
|
- Object::cast_to<Popup>(new_scene)->show(); //show popups
|
|
|
|
|
|
+ Object::cast_to<Popup>(new_scene)->show(); // show popups
|
|
}
|
|
}
|
|
|
|
|
|
scene_tree_dock->set_edited_scene(new_scene);
|
|
scene_tree_dock->set_edited_scene(new_scene);
|
|
@@ -3488,7 +3488,7 @@ void EditorNode::set_current_scene(int p_idx) {
|
|
|
|
|
|
_update_title();
|
|
_update_title();
|
|
|
|
|
|
- call_deferred(SNAME("_set_main_scene_state"), state, get_edited_scene()); //do after everything else is done setting up
|
|
|
|
|
|
+ call_deferred(SNAME("_set_main_scene_state"), state, get_edited_scene()); // do after everything else is done setting up
|
|
}
|
|
}
|
|
|
|
|
|
bool EditorNode::is_scene_open(const String &p_path) {
|
|
bool EditorNode::is_scene_open(const String &p_path) {
|
|
@@ -3590,7 +3590,7 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b
|
|
return ERR_FILE_MISSING_DEPENDENCIES;
|
|
return ERR_FILE_MISSING_DEPENDENCIES;
|
|
}
|
|
}
|
|
|
|
|
|
- dependency_errors.erase(lpath); //at least not self path
|
|
|
|
|
|
+ dependency_errors.erase(lpath); // at least not self path
|
|
|
|
|
|
for (KeyValue<String, Set<String>> &E : dependency_errors) {
|
|
for (KeyValue<String, Set<String>> &E : dependency_errors) {
|
|
String txt = vformat(TTR("Scene '%s' has broken dependencies:"), E.key) + "\n";
|
|
String txt = vformat(TTR("Scene '%s' has broken dependencies:"), E.key) + "\n";
|
|
@@ -3601,7 +3601,7 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b
|
|
}
|
|
}
|
|
|
|
|
|
if (ResourceCache::has(lpath)) {
|
|
if (ResourceCache::has(lpath)) {
|
|
- //used from somewhere else? no problem! update state and replace sdata
|
|
|
|
|
|
+ // used from somewhere else? no problem! update state and replace sdata
|
|
Ref<PackedScene> ps = Ref<PackedScene>(Object::cast_to<PackedScene>(ResourceCache::get(lpath)));
|
|
Ref<PackedScene> ps = Ref<PackedScene>(Object::cast_to<PackedScene>(ResourceCache::get(lpath)));
|
|
if (ps.is_valid()) {
|
|
if (ps.is_valid()) {
|
|
ps->replace_state(sdata->get_state());
|
|
ps->replace_state(sdata->get_state());
|
|
@@ -3610,7 +3610,7 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b
|
|
}
|
|
}
|
|
|
|
|
|
} else {
|
|
} else {
|
|
- sdata->set_path(lpath, true); //take over path
|
|
|
|
|
|
+ sdata->set_path(lpath, true); // take over path
|
|
}
|
|
}
|
|
|
|
|
|
Node *new_scene = sdata->instantiate(PackedScene::GEN_EDIT_STATE_MAIN);
|
|
Node *new_scene = sdata->instantiate(PackedScene::GEN_EDIT_STATE_MAIN);
|
|
@@ -4224,7 +4224,7 @@ void EditorNode::_dock_make_float() {
|
|
ERR_FAIL_COND(!dock);
|
|
ERR_FAIL_COND(!dock);
|
|
|
|
|
|
const Size2i borders = Size2i(4, 4) * EDSCALE;
|
|
const Size2i borders = Size2i(4, 4) * EDSCALE;
|
|
- Size2 dock_size = dock->get_size() + borders * 2; //remember size
|
|
|
|
|
|
+ Size2 dock_size = dock->get_size() + borders * 2; // remember size
|
|
Point2 dock_screen_pos = dock->get_global_position() + get_tree()->get_root()->get_position() - borders;
|
|
Point2 dock_screen_pos = dock->get_global_position() + get_tree()->get_root()->get_position() - borders;
|
|
|
|
|
|
print_line("dock pos: " + dock->get_global_position() + " window pos: " + get_tree()->get_root()->get_position());
|
|
print_line("dock pos: " + dock->get_global_position() + " window pos: " + get_tree()->get_root()->get_position());
|
|
@@ -4464,7 +4464,7 @@ void EditorNode::_dock_select_draw() {
|
|
|
|
|
|
void EditorNode::_save_docks() {
|
|
void EditorNode::_save_docks() {
|
|
if (waiting_for_first_scan) {
|
|
if (waiting_for_first_scan) {
|
|
- return; //scanning, do not touch docks
|
|
|
|
|
|
+ return; // scanning, do not touch docks
|
|
}
|
|
}
|
|
Ref<ConfigFile> config;
|
|
Ref<ConfigFile> config;
|
|
config.instantiate();
|
|
config.instantiate();
|
|
@@ -4535,7 +4535,7 @@ void EditorNode::_load_docks() {
|
|
config.instantiate();
|
|
config.instantiate();
|
|
Error err = config->load(EditorSettings::get_singleton()->get_project_settings_dir().plus_file("editor_layout.cfg"));
|
|
Error err = config->load(EditorSettings::get_singleton()->get_project_settings_dir().plus_file("editor_layout.cfg"));
|
|
if (err != OK) {
|
|
if (err != OK) {
|
|
- //no config
|
|
|
|
|
|
+ // no config
|
|
if (overridden_default_layout >= 0) {
|
|
if (overridden_default_layout >= 0) {
|
|
_layout_menu_option(overridden_default_layout);
|
|
_layout_menu_option(overridden_default_layout);
|
|
}
|
|
}
|
|
@@ -4648,7 +4648,7 @@ void EditorNode::_load_docks_from_config(Ref<ConfigFile> p_layout, const String
|
|
|
|
|
|
for (int j = 0; j < names.size(); j++) {
|
|
for (int j = 0; j < names.size(); j++) {
|
|
String name = names[j];
|
|
String name = names[j];
|
|
- //find it, in a horribly inefficient way
|
|
|
|
|
|
+ // find it, in a horribly inefficient way
|
|
int atidx = -1;
|
|
int atidx = -1;
|
|
Control *node = nullptr;
|
|
Control *node = nullptr;
|
|
for (int k = 0; k < DOCK_SLOT_MAX; k++) {
|
|
for (int k = 0; k < DOCK_SLOT_MAX; k++) {
|
|
@@ -4662,7 +4662,7 @@ void EditorNode::_load_docks_from_config(Ref<ConfigFile> p_layout, const String
|
|
atidx = k;
|
|
atidx = k;
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
- if (atidx == -1) { //well, it's not anywhere
|
|
|
|
|
|
+ if (atidx == -1) { // well, it's not anywhere
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -4778,7 +4778,7 @@ bool EditorNode::has_scenes_in_session() {
|
|
}
|
|
}
|
|
|
|
|
|
bool EditorNode::ensure_main_scene(bool p_from_native) {
|
|
bool EditorNode::ensure_main_scene(bool p_from_native) {
|
|
- pick_main_scene->set_meta("from_native", p_from_native); //whether from play button or native run
|
|
|
|
|
|
+ pick_main_scene->set_meta("from_native", p_from_native); // whether from play button or native run
|
|
String main_scene = GLOBAL_DEF("application/run/main_scene", "");
|
|
String main_scene = GLOBAL_DEF("application/run/main_scene", "");
|
|
|
|
|
|
if (main_scene == "") {
|
|
if (main_scene == "") {
|
|
@@ -4899,7 +4899,7 @@ void EditorNode::_update_layouts_menu() {
|
|
config.instantiate();
|
|
config.instantiate();
|
|
Error err = config->load(EditorSettings::get_singleton()->get_editor_layouts_config());
|
|
Error err = config->load(EditorSettings::get_singleton()->get_editor_layouts_config());
|
|
if (err != OK) {
|
|
if (err != OK) {
|
|
- return; //no config
|
|
|
|
|
|
+ return; // no config
|
|
}
|
|
}
|
|
|
|
|
|
List<String> layouts;
|
|
List<String> layouts;
|
|
@@ -4940,7 +4940,7 @@ void EditorNode::_layout_menu_option(int p_id) {
|
|
config.instantiate();
|
|
config.instantiate();
|
|
Error err = config->load(EditorSettings::get_singleton()->get_editor_layouts_config());
|
|
Error err = config->load(EditorSettings::get_singleton()->get_editor_layouts_config());
|
|
if (err != OK) {
|
|
if (err != OK) {
|
|
- return; //no config
|
|
|
|
|
|
+ return; // no config
|
|
}
|
|
}
|
|
|
|
|
|
_load_docks_from_config(config, editor_layouts->get_item_text(p_id));
|
|
_load_docks_from_config(config, editor_layouts->get_item_text(p_id));
|
|
@@ -5081,7 +5081,7 @@ void EditorNode::_scene_tab_changed(int p_tab) {
|
|
bool unsaved = (saved_version != editor_data.get_undo_redo().get_version());
|
|
bool unsaved = (saved_version != editor_data.get_undo_redo().get_version());
|
|
|
|
|
|
if (p_tab == editor_data.get_edited_scene()) {
|
|
if (p_tab == editor_data.get_edited_scene()) {
|
|
- return; //pointless
|
|
|
|
|
|
+ return; // pointless
|
|
}
|
|
}
|
|
|
|
|
|
uint64_t next_scene_version = editor_data.get_scene_version(p_tab);
|
|
uint64_t next_scene_version = editor_data.get_scene_version(p_tab);
|
|
@@ -5284,11 +5284,11 @@ Variant EditorNode::drag_resource(const Ref<Resource> &p_res, Control *p_from) {
|
|
Ref<Texture2D> preview;
|
|
Ref<Texture2D> preview;
|
|
|
|
|
|
{
|
|
{
|
|
- //todo make proper previews
|
|
|
|
|
|
+ // todo make proper previews
|
|
Ref<ImageTexture> texture = gui_base->get_theme_icon(SNAME("FileBigThumb"), SNAME("EditorIcons"));
|
|
Ref<ImageTexture> texture = gui_base->get_theme_icon(SNAME("FileBigThumb"), SNAME("EditorIcons"));
|
|
Ref<Image> img = texture->get_image();
|
|
Ref<Image> img = texture->get_image();
|
|
img = img->duplicate();
|
|
img = img->duplicate();
|
|
- img->resize(48, 48); //meh
|
|
|
|
|
|
+ img->resize(48, 48); // meh
|
|
Ref<ImageTexture> resized_pic = Ref<ImageTexture>(memnew(ImageTexture));
|
|
Ref<ImageTexture> resized_pic = Ref<ImageTexture>(memnew(ImageTexture));
|
|
resized_pic->create_from_image(img);
|
|
resized_pic->create_from_image(img);
|
|
preview = resized_pic;
|
|
preview = resized_pic;
|
|
@@ -5306,7 +5306,7 @@ Variant EditorNode::drag_resource(const Ref<Resource> &p_res, Control *p_from) {
|
|
|
|
|
|
drag_control->add_child(label);
|
|
drag_control->add_child(label);
|
|
|
|
|
|
- p_from->set_drag_preview(drag_control); //wait until it enters scene
|
|
|
|
|
|
+ p_from->set_drag_preview(drag_control); // wait until it enters scene
|
|
|
|
|
|
label->set_position(Point2((preview->get_width() - label->get_minimum_size().width) / 2, preview->get_height()));
|
|
label->set_position(Point2((preview->get_width() - label->get_minimum_size().width) / 2, preview->get_height()));
|
|
|
|
|
|
@@ -5360,7 +5360,7 @@ Variant EditorNode::drag_files_and_dirs(const Vector<String> &p_paths, Control *
|
|
}
|
|
}
|
|
vbox->add_child(label);
|
|
vbox->add_child(label);
|
|
}
|
|
}
|
|
- p_from->set_drag_preview(vbox); //wait until it enters scene
|
|
|
|
|
|
+ p_from->set_drag_preview(vbox); // wait until it enters scene
|
|
|
|
|
|
Dictionary drag_data;
|
|
Dictionary drag_data;
|
|
drag_data["type"] = has_folder ? "files_and_dirs" : "files";
|
|
drag_data["type"] = has_folder ? "files_and_dirs" : "files";
|
|
@@ -5477,7 +5477,7 @@ void EditorNode::reload_scene(const String &p_path) {
|
|
|
|
|
|
if (scene_idx == -1) {
|
|
if (scene_idx == -1) {
|
|
if (get_edited_scene()) {
|
|
if (get_edited_scene()) {
|
|
- //scene is not open, so at it might be instantiated. We'll refresh the whole scene later.
|
|
|
|
|
|
+ // scene is not open, so at it might be instantiated. We'll refresh the whole scene later.
|
|
editor_data.get_undo_redo().clear_history();
|
|
editor_data.get_undo_redo().clear_history();
|
|
}
|
|
}
|
|
return;
|
|
return;
|
|
@@ -5488,17 +5488,17 @@ void EditorNode::reload_scene(const String &p_path) {
|
|
_set_scene_metadata(p_path);
|
|
_set_scene_metadata(p_path);
|
|
}
|
|
}
|
|
|
|
|
|
- //remove scene
|
|
|
|
|
|
+ // remove scene
|
|
_remove_scene(scene_idx, false);
|
|
_remove_scene(scene_idx, false);
|
|
|
|
|
|
- //reload scene
|
|
|
|
|
|
+ // reload scene
|
|
load_scene(p_path, true, false, true, true);
|
|
load_scene(p_path, true, false, true, true);
|
|
|
|
|
|
- //adjust index so tab is back a the previous position
|
|
|
|
|
|
+ // adjust index so tab is back a the previous position
|
|
editor_data.move_edited_scene_to_index(scene_idx);
|
|
editor_data.move_edited_scene_to_index(scene_idx);
|
|
get_undo_redo()->clear_history();
|
|
get_undo_redo()->clear_history();
|
|
|
|
|
|
- //recover the tab
|
|
|
|
|
|
+ // recover the tab
|
|
scene_tabs->set_current_tab(current_tab);
|
|
scene_tabs->set_current_tab(current_tab);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -5598,7 +5598,7 @@ void EditorNode::_update_video_driver_color() {
|
|
void EditorNode::_video_driver_selected(int p_which) {
|
|
void EditorNode::_video_driver_selected(int p_which) {
|
|
String driver = video_driver->get_item_metadata(p_which);
|
|
String driver = video_driver->get_item_metadata(p_which);
|
|
|
|
|
|
- String current = ""; //OS::get_singleton()->get_video_driver_name(OS::get_singleton()->get_current_video_driver());
|
|
|
|
|
|
+ String current = ""; // OS::get_singleton()->get_video_driver_name(OS::get_singleton()->get_current_video_driver());
|
|
|
|
|
|
if (driver == current) {
|
|
if (driver == current) {
|
|
return;
|
|
return;
|
|
@@ -5787,9 +5787,9 @@ EditorNode::EditorNode() {
|
|
PhysicsServer2D::get_singleton()->set_active(false); // no physics by default if editor
|
|
PhysicsServer2D::get_singleton()->set_active(false); // no physics by default if editor
|
|
ScriptServer::set_scripting_enabled(false); // no scripting by default if editor
|
|
ScriptServer::set_scripting_enabled(false); // no scripting by default if editor
|
|
|
|
|
|
- EditorHelp::generate_doc(); //before any editor classes are created
|
|
|
|
|
|
+ EditorHelp::generate_doc(); // before any editor classes are created
|
|
SceneState::set_disable_placeholders(true);
|
|
SceneState::set_disable_placeholders(true);
|
|
- ResourceLoader::clear_translation_remaps(); //no remaps using during editor
|
|
|
|
|
|
+ ResourceLoader::clear_translation_remaps(); // no remaps using during editor
|
|
ResourceLoader::clear_path_remaps();
|
|
ResourceLoader::clear_path_remaps();
|
|
|
|
|
|
Input *id = Input::get_singleton();
|
|
Input *id = Input::get_singleton();
|
|
@@ -5803,8 +5803,8 @@ EditorNode::EditorNode() {
|
|
}
|
|
}
|
|
|
|
|
|
if (!found_touchscreen && Input::get_singleton()) {
|
|
if (!found_touchscreen && Input::get_singleton()) {
|
|
- //only if no touchscreen ui hint, set emulation
|
|
|
|
- id->set_emulate_touch_from_mouse(false); //just disable just in case
|
|
|
|
|
|
+ // only if no touchscreen ui hint, set emulation
|
|
|
|
+ id->set_emulate_touch_from_mouse(false); // just disable just in case
|
|
}
|
|
}
|
|
DisplayServer::get_singleton()->cursor_set_custom_image(RES());
|
|
DisplayServer::get_singleton()->cursor_set_custom_image(RES());
|
|
}
|
|
}
|
|
@@ -5871,7 +5871,7 @@ EditorNode::EditorNode() {
|
|
ResourceLoader::set_error_notify_func(this, _load_error_notify);
|
|
ResourceLoader::set_error_notify_func(this, _load_error_notify);
|
|
ResourceLoader::set_dependency_error_notify_func(this, _dependency_error_report);
|
|
ResourceLoader::set_dependency_error_notify_func(this, _dependency_error_report);
|
|
|
|
|
|
- { //register importers at the beginning, so dialogs are created with the right extensions
|
|
|
|
|
|
+ { // register importers at the beginning, so dialogs are created with the right extensions
|
|
Ref<ResourceImporterTexture> import_texture;
|
|
Ref<ResourceImporterTexture> import_texture;
|
|
import_texture.instantiate();
|
|
import_texture.instantiate();
|
|
ResourceFormatImporter::get_singleton()->add_importer(import_texture);
|
|
ResourceFormatImporter::get_singleton()->add_importer(import_texture);
|
|
@@ -5974,7 +5974,7 @@ EditorNode::EditorNode() {
|
|
EditorFileSystem *efs = memnew(EditorFileSystem);
|
|
EditorFileSystem *efs = memnew(EditorFileSystem);
|
|
add_child(efs);
|
|
add_child(efs);
|
|
|
|
|
|
- //used for previews
|
|
|
|
|
|
+ // used for previews
|
|
FileDialog::get_icon_func = _file_dialog_get_icon;
|
|
FileDialog::get_icon_func = _file_dialog_get_icon;
|
|
FileDialog::register_func = _file_dialog_register;
|
|
FileDialog::register_func = _file_dialog_register;
|
|
FileDialog::unregister_func = _file_dialog_unregister;
|
|
FileDialog::unregister_func = _file_dialog_unregister;
|
|
@@ -5993,7 +5993,7 @@ EditorNode::EditorNode() {
|
|
|
|
|
|
ClassDB::set_class_enabled("RootMotionView", true);
|
|
ClassDB::set_class_enabled("RootMotionView", true);
|
|
|
|
|
|
- //defs here, use EDITOR_GET in logic
|
|
|
|
|
|
+ // defs here, use EDITOR_GET in logic
|
|
EDITOR_DEF_RST("interface/scene_tabs/always_show_close_button", false);
|
|
EDITOR_DEF_RST("interface/scene_tabs/always_show_close_button", false);
|
|
EDITOR_DEF_RST("interface/scene_tabs/resize_if_many_tabs", true);
|
|
EDITOR_DEF_RST("interface/scene_tabs/resize_if_many_tabs", true);
|
|
EDITOR_DEF_RST("interface/scene_tabs/minimum_width", 50);
|
|
EDITOR_DEF_RST("interface/scene_tabs/minimum_width", 50);
|
|
@@ -6217,13 +6217,13 @@ EditorNode::EditorNode() {
|
|
tab_preview->set_position(Point2(2, 2) * EDSCALE);
|
|
tab_preview->set_position(Point2(2, 2) * EDSCALE);
|
|
tab_preview_panel->add_child(tab_preview);
|
|
tab_preview_panel->add_child(tab_preview);
|
|
|
|
|
|
- scene_tabs = memnew(Tabs);
|
|
|
|
|
|
+ scene_tabs = memnew(TabBar);
|
|
scene_tabs->add_theme_style_override("tab_selected", gui_base->get_theme_stylebox(SNAME("SceneTabFG"), SNAME("EditorStyles")));
|
|
scene_tabs->add_theme_style_override("tab_selected", gui_base->get_theme_stylebox(SNAME("SceneTabFG"), SNAME("EditorStyles")));
|
|
scene_tabs->add_theme_style_override("tab_unselected", gui_base->get_theme_stylebox(SNAME("SceneTabBG"), SNAME("EditorStyles")));
|
|
scene_tabs->add_theme_style_override("tab_unselected", gui_base->get_theme_stylebox(SNAME("SceneTabBG"), SNAME("EditorStyles")));
|
|
scene_tabs->set_select_with_rmb(true);
|
|
scene_tabs->set_select_with_rmb(true);
|
|
scene_tabs->add_tab("unsaved");
|
|
scene_tabs->add_tab("unsaved");
|
|
- scene_tabs->set_tab_align(Tabs::ALIGN_LEFT);
|
|
|
|
- scene_tabs->set_tab_close_display_policy((bool(EDITOR_DEF("interface/scene_tabs/always_show_close_button", false)) ? Tabs::CLOSE_BUTTON_SHOW_ALWAYS : Tabs::CLOSE_BUTTON_SHOW_ACTIVE_ONLY));
|
|
|
|
|
|
+ scene_tabs->set_tab_align(TabBar::ALIGN_LEFT);
|
|
|
|
+ scene_tabs->set_tab_close_display_policy((bool(EDITOR_DEF("interface/scene_tabs/always_show_close_button", false)) ? TabBar::CLOSE_BUTTON_SHOW_ALWAYS : TabBar::CLOSE_BUTTON_SHOW_ACTIVE_ONLY));
|
|
scene_tabs->set_min_width(int(EDITOR_DEF("interface/scene_tabs/minimum_width", 50)) * EDSCALE);
|
|
scene_tabs->set_min_width(int(EDITOR_DEF("interface/scene_tabs/minimum_width", 50)) * EDSCALE);
|
|
scene_tabs->set_drag_to_rearrange_enabled(true);
|
|
scene_tabs->set_drag_to_rearrange_enabled(true);
|
|
scene_tabs->connect("tab_changed", callable_mp(this, &EditorNode::_scene_tab_changed));
|
|
scene_tabs->connect("tab_changed", callable_mp(this, &EditorNode::_scene_tab_changed));
|
|
@@ -6924,7 +6924,7 @@ EditorNode::EditorNode() {
|
|
|
|
|
|
EditorAudioBuses *audio_bus_editor = EditorAudioBuses::register_editor();
|
|
EditorAudioBuses *audio_bus_editor = EditorAudioBuses::register_editor();
|
|
|
|
|
|
- ScriptTextEditor::register_editor(); //register one for text scripts
|
|
|
|
|
|
+ ScriptTextEditor::register_editor(); // register one for text scripts
|
|
TextEditor::register_editor();
|
|
TextEditor::register_editor();
|
|
|
|
|
|
if (StreamPeerSSL::is_available()) {
|
|
if (StreamPeerSSL::is_available()) {
|
|
@@ -6933,12 +6933,12 @@ EditorNode::EditorNode() {
|
|
WARN_PRINT("Asset Library not available, as it requires SSL to work.");
|
|
WARN_PRINT("Asset Library not available, as it requires SSL to work.");
|
|
}
|
|
}
|
|
|
|
|
|
- //add interface before adding plugins
|
|
|
|
|
|
+ // add interface before adding plugins
|
|
|
|
|
|
editor_interface = memnew(EditorInterface);
|
|
editor_interface = memnew(EditorInterface);
|
|
add_child(editor_interface);
|
|
add_child(editor_interface);
|
|
|
|
|
|
- //more visually meaningful to have this later
|
|
|
|
|
|
+ // more visually meaningful to have this later
|
|
raise_bottom_panel_item(AnimationPlayerEditor::get_singleton());
|
|
raise_bottom_panel_item(AnimationPlayerEditor::get_singleton());
|
|
|
|
|
|
add_editor_plugin(VersionControlEditorPlugin::get_singleton());
|
|
add_editor_plugin(VersionControlEditorPlugin::get_singleton());
|