Fix an issue that OrcaSlicer can't open previously generated gcode/.3mf file #712 #958

This commit is contained in:
SoftFever 2023-05-06 20:13:58 +08:00
parent 52d6dc71eb
commit 4807b9d1b6
3 changed files with 4 additions and 4 deletions

View file

@ -1190,11 +1190,10 @@ ConfigSubstitutions ConfigBase::load_from_gcode_file(const std::string &file, Fo
bool has_delimiters = true;
{
//BBS
std::string bambuslicer_gcode_header = "; ";
bambuslicer_gcode_header += SLIC3R_APP_NAME;
std::string bambuslicer_gcode_header = "; BambuStudio";
std::string orcaslicer_gcode_header = std::string("; generated by ");
orcaslicer_gcode_header += Slic3r::header_slic3r_generated();
orcaslicer_gcode_header += SLIC3R_APP_NAME;
std::string header;
bool header_found = false;

View file

@ -839,6 +839,7 @@ const std::vector<std::pair<GCodeProcessor::EProducer, std::string>> GCodeProces
//BBS: OrcaSlicer is also "bambu". Otherwise the time estimation didn't work.
//FIXME: Workaround and should be handled when do removing-bambu
{ EProducer::BambuStudio, SLIC3R_APP_NAME },
{ EProducer::BambuStudio, "generated by OrcaSlicer" },
{ EProducer::BambuStudio, "generated by BambuStudio" },
{ EProducer::BambuStudio, "BambuStudio" }
//{ EProducer::Slic3rPE, "generated by Slic3r Bambu Edition" },

View file

@ -5,7 +5,7 @@
#define SLIC3R_APP_FULL_NAME "Orca Slicer"
#define GCODEVIEWER_APP_NAME "BambuStudio G-code Viewer"
#define GCODEVIEWER_APP_KEY "BambuStudioGcodeViewer"
#define GCODEVIEWER_BUILD_ID std::string("BambuStudio G-code Viewer-") + std::string(SLIC3R_VERSION) + std::string("-RC")
#define GCODEVIEWER_BUILD_ID std::string("OrcaSlicer G-code Viewer-") + std::string(SLIC3R_VERSION) + std::string("-RC")
// this needs to be included early for MSVC (listing it in Build.PL is not enough)
#include <memory>