diff --git a/lib/Slic3r/Config.pm b/lib/Slic3r/Config.pm index 167c733dd..930917dfd 100644 --- a/lib/Slic3r/Config.pm +++ b/lib/Slic3r/Config.pm @@ -269,12 +269,6 @@ sub validate { qw(perimeter infill solid_infill top_infill support_material first_layer); } - # support material - if ($self->support_material) { - die "Value of 0 is illegal. Use some % value instead (e.g. 150%) for auto.\n" - if $self->support_material_threshold =~ /^0+/; - } - # general validation, quick and dirty foreach my $opt_key (@{$self->get_keys}) { diff --git a/xs/src/libslic3r/PrintConfig.cpp b/xs/src/libslic3r/PrintConfig.cpp index 8a63ef268..e0771d596 100644 --- a/xs/src/libslic3r/PrintConfig.cpp +++ b/xs/src/libslic3r/PrintConfig.cpp @@ -1705,6 +1705,10 @@ PrintConfigBase::_handle_legacy(t_config_option_key &opt_key, std::string &value values is a dirty hack and will need to be removed sometime in the future, but it will avoid lots of complaints for now. */ value = "0"; + } else if (opt_key == "support_material_threshold" && value == "0") { + // 0 used to be automatic threshold, but we introduced percent values so let's + // transform it into the default value + value = "60%"; } // cemetery of old config settings