You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-13 13:31:48 +00:00
Merge pull request #83613 from clayjohn/surface_upgrade_tool
Add an editor tool to automatically upgrade and re-save meshes
This commit is contained in:
@@ -153,6 +153,7 @@
|
||||
#include "editor/project_settings_editor.h"
|
||||
#include "editor/register_exporters.h"
|
||||
#include "editor/scene_tree_dock.h"
|
||||
#include "editor/surface_upgrade_tool.h"
|
||||
#include "editor/window_wrapper.h"
|
||||
|
||||
#include <stdio.h>
|
||||
@@ -5501,11 +5502,16 @@ bool EditorNode::ensure_main_scene(bool p_from_native) {
|
||||
void EditorNode::_immediate_dialog_confirmed() {
|
||||
immediate_dialog_confirmed = true;
|
||||
}
|
||||
bool EditorNode::immediate_confirmation_dialog(const String &p_text, const String &p_ok_text, const String &p_cancel_text) {
|
||||
bool EditorNode::immediate_confirmation_dialog(const String &p_text, const String &p_ok_text, const String &p_cancel_text, uint32_t p_wrap_width) {
|
||||
ConfirmationDialog *cd = memnew(ConfirmationDialog);
|
||||
cd->set_text(p_text);
|
||||
cd->set_ok_button_text(p_ok_text);
|
||||
cd->set_cancel_button_text(p_cancel_text);
|
||||
if (p_wrap_width > 0) {
|
||||
cd->set_autowrap(true);
|
||||
cd->get_label()->set_custom_minimum_size(Size2(p_wrap_width, 0) * EDSCALE);
|
||||
}
|
||||
|
||||
cd->connect("confirmed", callable_mp(singleton, &EditorNode::_immediate_dialog_confirmed));
|
||||
singleton->gui_base->add_child(cd);
|
||||
|
||||
@@ -8023,6 +8029,8 @@ EditorNode::EditorNode() {
|
||||
String exec = OS::get_singleton()->get_executable_path();
|
||||
// Save editor executable path for third-party tools.
|
||||
EditorSettings::get_singleton()->set_project_metadata("editor_metadata", "executable_path", exec);
|
||||
|
||||
surface_upgrade_tool = memnew(SurfaceUpgradeTool);
|
||||
}
|
||||
|
||||
EditorNode::~EditorNode() {
|
||||
@@ -8037,6 +8045,7 @@ EditorNode::~EditorNode() {
|
||||
memdelete(editor_plugins_force_over);
|
||||
memdelete(editor_plugins_force_input_forwarding);
|
||||
memdelete(progress_hb);
|
||||
memdelete(surface_upgrade_tool);
|
||||
|
||||
EditorSettings::destroy();
|
||||
EditorColorMap::finish();
|
||||
|
||||
Reference in New Issue
Block a user