Allow previewing colors in G-code loaded from Snapmaker orca
This commit is contained in:
@@ -1359,6 +1359,7 @@ ConfigSubstitutions ConfigBase::load_from_gcode_file(const std::string &file, Fo
|
||||
|
||||
std::string orcaslicer_gcode_header = std::string("; generated by ");
|
||||
orcaslicer_gcode_header += SLIC3R_APP_NAME;
|
||||
std::string snapmaker_orca_gcode_header = "; generated by Snapmaker Orca";
|
||||
|
||||
std::string header;
|
||||
bool header_found = false;
|
||||
@@ -1370,7 +1371,8 @@ ConfigSubstitutions ConfigBase::load_from_gcode_file(const std::string &file, Fo
|
||||
line_c = skip_whitespaces(line_c);
|
||||
// BBS
|
||||
if (strncmp(bambuslicer_gcode_header.c_str(), line_c, strlen(bambuslicer_gcode_header.c_str())) == 0 ||
|
||||
strncmp(orcaslicer_gcode_header.c_str(), line_c, strlen(orcaslicer_gcode_header.c_str())) == 0) {
|
||||
strncmp(orcaslicer_gcode_header.c_str(), line_c, strlen(orcaslicer_gcode_header.c_str())) == 0 ||
|
||||
strncmp(snapmaker_orca_gcode_header.c_str(), line_c, strlen(snapmaker_orca_gcode_header.c_str())) == 0) {
|
||||
header_found = true;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1595,6 +1595,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::OrcaSlicer, SLIC3R_APP_NAME },
|
||||
{ EProducer::OrcaSlicer, "generated by Snapmaker Orca" },
|
||||
{ EProducer::OrcaSlicer, "generated by OrcaSlicer" },
|
||||
{ EProducer::OrcaSlicer, "generated by BambuStudio" },
|
||||
{ EProducer::OrcaSlicer, "BambuStudio" }
|
||||
|
||||
Reference in New Issue
Block a user