diff --git a/resources/info/filament_info.json b/resources/info/filament_info.json index 158d78654a..ebcbd09439 100644 --- a/resources/info/filament_info.json +++ b/resources/info/filament_info.json @@ -14,7 +14,7 @@ "PPA-CF", "PPA-GF", "ABS-GF", - "ASA-Aero" + "ASA-AERO" ], "low_temp_filament": [ "PLA", diff --git a/resources/profiles/BBL/filament/Bambu ASA-Aero @base.json b/resources/profiles/BBL/filament/Bambu ASA-Aero @base.json index 4cfe7de309..d09d4cb920 100644 --- a/resources/profiles/BBL/filament/Bambu ASA-Aero @base.json +++ b/resources/profiles/BBL/filament/Bambu ASA-Aero @base.json @@ -31,7 +31,7 @@ "1.5" ], "filament_type": [ - "ASA-Aero" + "ASA-AERO" ], "filament_vendor": [ "Bambu Lab" diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index cf368d7c2f..477ee8e9e1 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -2447,7 +2447,7 @@ void PrintConfigDef::init_fff_params() def->enum_values.push_back("ABS"); def->enum_values.push_back("ABS-GF"); def->enum_values.push_back("ASA"); - def->enum_values.push_back("ASA-Aero"); + def->enum_values.push_back("ASA-AERO"); def->enum_values.push_back("BVOH"); def->enum_values.push_back("PCTG"); def->enum_values.push_back("EVA"); @@ -7263,6 +7263,29 @@ void PrintConfigDef::handle_legacy(t_config_option_key &opt_key, std::string &va } else if (opt_key == "filament_map_mode") { if (value == "Auto") value = "Auto For Flush"; } + else if (opt_key == "filament_type"){ + std::vector type_list; + std::stringstream ss(value); + std::string token; + bool rebuild_value = false; + while (std::getline(ss, token, ';')) { + if (token.size() >= 2 && token.front() == '"' && token.back() == '"') + token = token.substr(1, token.size() - 2); + if (token == "ASA-Aero") { + token = "ASA-AERO"; + rebuild_value = true; + } + type_list.emplace_back(token); + } + if (rebuild_value) { + value.clear(); + for (size_t idx = 0; idx < type_list.size(); ++idx) { + if (idx != 0) + value += ';'; + value += "\"" + type_list[idx] + "\""; + } + } + } // Ignore the following obsolete configuration keys: static std::set ignore = {