Add a Run Script dialog for running MCP scripts in the app

This commit is contained in:
SoftFever committed 2026-10-30 07:46:10 +08:00
1 parent 2496ee0908
commit c9db694c32
46 files changed
+3692 -178

No files matched your search

+12
View File
@@ -85,6 +85,7 @@
#include "3DScene.hpp"
#include "ParamsDialog.hpp"
#include "PrintHostDialogs.hpp"
#include "ScriptRunnerDialog.hpp"
#include "libslic3r_version.h"
#include "wxExtensions.hpp"
#include "GUI_ObjectList.hpp"
@@ -3201,6 +3202,9 @@ void MainFrame::init_menubar_as_editor()
append_submenu(fileMenu, export_menu, wxID_ANY, _L("Export"), "");
append_menu_item(fileMenu, wxID_ANY, _L("Run Script") + dots, _L("Open or paste a script and run its steps"),
[this](wxCommandEvent&) { show_script_runner(); }, "", nullptr, []() { return true; }, this);
fileMenu->AppendSeparator();
#ifndef __APPLE__
@@ -4029,6 +4033,14 @@ struct ConfigsOverwriteConfirmDialog : MessageDialog
}
};
void MainFrame::show_script_runner()
{
if (!m_script_runner)
m_script_runner = new ScriptRunnerDialog(this);
m_script_runner->Show();
m_script_runner->Raise();
}
void MainFrame::export_config()
{
ExportConfigsDialog export_configs_dlg(nullptr);