New feature: plate name

This commit is contained in:
SoftFever 2023-03-29 21:36:14 +08:00
parent b243bac282
commit f5c4cc9a54
15 changed files with 254 additions and 113 deletions

View file

@ -2152,6 +2152,8 @@ 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_filaments", new ConfigOptionInt((int)m_config.nozzle_diameter.size()));
config.set_key_value("plate_name", new ConfigOptionString(get_plate_name()));
return this->PrintBase::output_filename(m_config.filename_format.value, ".gcode", filename_base, &config);
}