diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp index c62e27400..8d53dbb5a 100644 --- a/src/libslic3r/Print.cpp +++ b/src/libslic3r/Print.cpp @@ -1541,6 +1541,7 @@ std::string Print::output_filename(const std::string &filename_base) const // These values will be just propagated into the output file name. DynamicConfig config = this->finished() ? this->print_statistics().config() : this->print_statistics().placeholders(); config.set_key_value("num_extruders", new ConfigOptionInt((int)m_config.nozzle_diameter.size())); + config.set_key_value("default_output_extension", new ConfigOptionString(".gcode")); return this->PrintBase::output_filename(m_config.output_filename_format.value, ".gcode", filename_base, &config); } diff --git a/src/libslic3r/SLAPrint.cpp b/src/libslic3r/SLAPrint.cpp index f516fb439..9df2862a1 100644 --- a/src/libslic3r/SLAPrint.cpp +++ b/src/libslic3r/SLAPrint.cpp @@ -525,9 +525,6 @@ SLAPrint::ApplyStatus SLAPrint::apply(const Model &model, DynamicPrintConfig con m_full_print_config = std::move(config); - const char *default_ext = get_default_extension(m_printer_config.sla_archive_format.value.c_str()); - m_placeholder_parser.set("default_output_extension", default_ext); - return static_cast(apply_status); } @@ -542,6 +539,10 @@ std::string SLAPrint::output_filename(const std::string &filename_base) const default_ext = "sl1"; default_ext.insert(default_ext.begin(), '.'); + + config.set_key_value("default_output_extension", + new ConfigOptionString(default_ext)); + return this->PrintBase::output_filename(m_print_config.output_filename_format.value, default_ext, filename_base, &config); }