From 88fcdf4b977a7caacd5354c768e28bf266d95beb Mon Sep 17 00:00:00 2001 From: bubnikv Date: Wed, 11 Mar 2020 18:12:44 +0100 Subject: [PATCH] num_extruders is now available from the output_file_name template. --- src/libslic3r/Print.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp index b4a2a1b3e..9dad843a9 100644 --- a/src/libslic3r/Print.cpp +++ b/src/libslic3r/Print.cpp @@ -2138,6 +2138,7 @@ std::string Print::output_filename(const std::string &filename_base) const // Set the placeholders for the data know first after the G-code export is finished. // 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())); return this->PrintBase::output_filename(m_config.output_filename_format.value, ".gcode", filename_base, &config); }