mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-06 22:47:32 -06:00
Various improvements to SimplyPrint integration (#4831)
* Allow using BBL's device tab when 3rd party print host is used * Add option to open SimplyPrint panel in device tab after uploading * Fix default print host for prusa connect * Do not set api key in device view when SimplyPrint is used * Sending 3mf file to SimplyPrint when using BBL printers * Fix file extension when uploading 3mf * Prepare for large file uploading * Implement chunk upload * Fix file uploading exceeding content size * Fix wrong field type * Add `temp=true` to all chunk upload calls * Add macro to enable test api * Merge branch 'main' into dev/simplyprint-improve * Fix another missing `temp=true` * Add delete token * Try fixing build error on *nix systems * Merge branch 'main' into dev/simplyprint-improve * Merge branch 'main' into dev/simplyprint-improve * Merge remote-tracking branch 'remote/main' into dev/simplyprint-improve # Conflicts: # src/slic3r/GUI/BackgroundSlicingProcess.cpp * Move the `bbl_use_print_host_webui` option to print host dialog. Also make it a derived option of `print_host_webui` instead. * Merge branch 'main' into dev/simplyprint-improve # Conflicts: # src/slic3r/GUI/MainFrame.cpp # src/slic3r/GUI/Plater.cpp * Merge branch 'main' into dev/simplyprint-improve # Conflicts: # src/slic3r/GUI/Plater.cpp * Use a more generic option instead of SimplyPrint specific * Merge branch 'main' into dev/simplyprint-improve * Merge branch 'main' into dev/simplyprint-improve
This commit is contained in:
parent
b7a0b30578
commit
cd6cd0786f
17 changed files with 505 additions and 110 deletions
|
@ -1615,7 +1615,7 @@ wxBoxSizer* MainFrame::create_side_tools()
|
|||
SidePopup* p = new SidePopup(this);
|
||||
|
||||
if (wxGetApp().preset_bundle
|
||||
&& !wxGetApp().preset_bundle->use_bbl_network()) {
|
||||
&& !wxGetApp().preset_bundle->is_bbl_vendor()) {
|
||||
// ThirdParty Buttons
|
||||
SideButton* export_gcode_btn = new SideButton(p, _L("Export G-code file"), "");
|
||||
export_gcode_btn->SetCornerRadius(0);
|
||||
|
@ -1715,10 +1715,32 @@ wxBoxSizer* MainFrame::create_side_tools()
|
|||
p->Dismiss();
|
||||
});
|
||||
|
||||
bool support_send = true;
|
||||
bool support_print_all = true;
|
||||
|
||||
const auto preset_bundle = wxGetApp().preset_bundle;
|
||||
if (preset_bundle) {
|
||||
if (preset_bundle->use_bbl_network()) {
|
||||
// BBL network support everything
|
||||
} else {
|
||||
support_send = false; // All 3rd print hosts do not have the send options
|
||||
|
||||
auto cfg = preset_bundle->printers.get_edited_preset().config;
|
||||
const auto host_type = cfg.option<ConfigOptionEnum<PrintHostType>>("host_type")->value;
|
||||
|
||||
// Only simply print support uploading all plates
|
||||
support_print_all = host_type == PrintHostType::htSimplyPrint;
|
||||
}
|
||||
}
|
||||
|
||||
p->append_button(print_plate_btn);
|
||||
p->append_button(print_all_btn);
|
||||
p->append_button(send_to_printer_btn);
|
||||
p->append_button(send_to_printer_all_btn);
|
||||
if (support_print_all) {
|
||||
p->append_button(print_all_btn);
|
||||
}
|
||||
if (support_send) {
|
||||
p->append_button(send_to_printer_btn);
|
||||
p->append_button(send_to_printer_all_btn);
|
||||
}
|
||||
if (enable_multi_machine) {
|
||||
SideButton* print_multi_machine_btn = new SideButton(p, _L("Send to Multi-device"), "");
|
||||
print_multi_machine_btn->SetCornerRadius(0);
|
||||
|
@ -3636,14 +3658,14 @@ void MainFrame::load_printer_url(wxString url, wxString apikey)
|
|||
void MainFrame::load_printer_url()
|
||||
{
|
||||
PresetBundle &preset_bundle = *wxGetApp().preset_bundle;
|
||||
if (preset_bundle.use_bbl_network())
|
||||
if (preset_bundle.use_bbl_device_tab())
|
||||
return;
|
||||
|
||||
auto cfg = preset_bundle.printers.get_edited_preset().config;
|
||||
wxString url = cfg.opt_string("print_host_webui").empty() ? cfg.opt_string("print_host") : cfg.opt_string("print_host_webui");
|
||||
wxString apikey;
|
||||
if (cfg.has("printhost_apikey") && (cfg.option<ConfigOptionEnum<PrintHostType>>("host_type")->value == htPrusaLink ||
|
||||
cfg.option<ConfigOptionEnum<PrintHostType>>("host_type")->value == htPrusaConnect))
|
||||
const auto host_type = cfg.option<ConfigOptionEnum<PrintHostType>>("host_type")->value;
|
||||
if (cfg.has("printhost_apikey") && (host_type == htPrusaLink || host_type == htPrusaConnect))
|
||||
apikey = cfg.opt_string("printhost_apikey");
|
||||
if (!url.empty()) {
|
||||
if (!url.Lower().starts_with("http"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue