You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-12 13:20:55 +00:00
Prevent the surface upgrade tool from running during export
Also add an explicit way to trigger the tool manually at user's will.
This commit is contained in:
@@ -3048,6 +3048,9 @@ void EditorNode::_tool_menu_option(int p_idx) {
|
||||
case TOOLS_ORPHAN_RESOURCES: {
|
||||
orphan_resources->show();
|
||||
} break;
|
||||
case TOOLS_SURFACE_UPGRADE: {
|
||||
surface_upgrade_dialog->popup_centered(Size2(750 * EDSCALE, 0));
|
||||
} break;
|
||||
case TOOLS_CUSTOM: {
|
||||
if (tool_menu->get_item_submenu(p_idx) == "") {
|
||||
Callable callback = tool_menu->get_item_metadata(p_idx);
|
||||
@@ -4671,6 +4674,10 @@ Error EditorNode::export_preset(const String &p_preset, const String &p_path, bo
|
||||
return OK;
|
||||
}
|
||||
|
||||
bool EditorNode::is_project_exporting() const {
|
||||
return project_export && project_export->is_exporting();
|
||||
}
|
||||
|
||||
void EditorNode::show_accept(const String &p_text, const String &p_title) {
|
||||
current_menu_option = -1;
|
||||
if (accept) {
|
||||
@@ -7429,6 +7436,7 @@ EditorNode::EditorNode() {
|
||||
project_menu->add_child(tool_menu);
|
||||
project_menu->add_submenu_item(TTR("Tools"), "Tools");
|
||||
tool_menu->add_item(TTR("Orphan Resource Explorer..."), TOOLS_ORPHAN_RESOURCES);
|
||||
tool_menu->add_item(TTR("Upgrade Mesh Surfaces..."), TOOLS_SURFACE_UPGRADE);
|
||||
|
||||
project_menu->add_separator();
|
||||
project_menu->add_shortcut(ED_SHORTCUT("editor/reload_current_project", TTR("Reload Current Project")), RELOAD_CURRENT_PROJECT);
|
||||
@@ -7768,6 +7776,9 @@ EditorNode::EditorNode() {
|
||||
orphan_resources = memnew(OrphanResourcesDialog);
|
||||
gui_base->add_child(orphan_resources);
|
||||
|
||||
surface_upgrade_dialog = memnew(SurfaceUpgradeDialog);
|
||||
gui_base->add_child(surface_upgrade_dialog);
|
||||
|
||||
confirmation = memnew(ConfirmationDialog);
|
||||
gui_base->add_child(confirmation);
|
||||
confirmation->connect("confirmed", callable_mp(this, &EditorNode::_menu_confirm_current));
|
||||
|
||||
Reference in New Issue
Block a user