FIX:Only third-party printers record custom bed
and svg.This can reduce the preset differences in the copying system jira:none Change-Id: I6e6add2a9c796d8d42b7f8b7eccc1052250e5ffe
This commit is contained in:
parent
8cdaea1162
commit
dbe2e5325d
|
@ -5117,21 +5117,23 @@ void Tab::save_preset(std::string name /*= ""*/, bool detach, bool save_to_proje
|
|||
std::map<std::string, std::string> extra_map;
|
||||
{
|
||||
bool is_configed_by_BBL = PresetUtils::system_printer_bed_model(curr_preset).size() > 0;
|
||||
if (is_configed_by_BBL && wxGetApp().app_config->has_section("user_bbl_svg_list")) {
|
||||
auto user_bbl_svg_list = wxGetApp().app_config->get_section("user_bbl_svg_list");
|
||||
if (user_bbl_svg_list.size() > 0 && user_bbl_svg_list[curr_preset_name].size() > 0) {
|
||||
extra_map["bed_custom_texture"] = ConfigOptionString(user_bbl_svg_list[curr_preset_name]);
|
||||
}
|
||||
else {
|
||||
auto logo =wxGetApp().plater()->get_partplate_list().get_logo_texture_filename();
|
||||
if (!logo.empty()) {
|
||||
extra_map["bed_custom_texture"] = logo;
|
||||
if (is_configed_by_BBL) {//only record svg
|
||||
if (wxGetApp().app_config->has_section("user_bbl_svg_list")) {
|
||||
auto user_bbl_svg_list = wxGetApp().app_config->get_section("user_bbl_svg_list");
|
||||
if (user_bbl_svg_list.size() > 0 && user_bbl_svg_list[curr_preset_name].size() > 0) {
|
||||
extra_map["bed_custom_texture"] = ConfigOptionString(user_bbl_svg_list[curr_preset_name]);
|
||||
}
|
||||
}
|
||||
}
|
||||
auto bed_model_path = wxGetApp().plater()->get_partplate_list().get_bed3d()->get_model_filename();
|
||||
if (!bed_model_path.empty()) {
|
||||
extra_map["bed_custom_model"] = bed_model_path;
|
||||
else {//for cutom machine
|
||||
auto bed_model_path = wxGetApp().plater()->get_partplate_list().get_bed3d()->get_model_filename();
|
||||
if (!bed_model_path.empty()) {
|
||||
extra_map["bed_custom_model"] = bed_model_path;
|
||||
}
|
||||
auto logo = wxGetApp().plater()->get_partplate_list().get_logo_texture_filename();
|
||||
if (!logo.empty()) {
|
||||
extra_map["bed_custom_texture"] = logo;
|
||||
}
|
||||
}
|
||||
}
|
||||
bool exist_preset = false;
|
||||
|
|
Loading…
Reference in New Issue