add user name placeholder (#10109)

* Add user name placeholder

* non-ASCII character support

* fix: Explicitly include <boost/nowide/cstdlib.hpp>
This commit is contained in:
krmz-krmz
2025-07-18 16:43:46 +09:00
committed by GitHub
parent 46af00aa01
commit 11e2c054d0
4 changed files with 13 additions and 0 deletions

View File

@@ -2041,6 +2041,7 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
// Prepare the helper object for replacing placeholders in custom G-code and output filename.
m_placeholder_parser_integration.parser = print.placeholder_parser();
m_placeholder_parser_integration.parser.update_timestamp();
m_placeholder_parser_integration.parser.update_user_name();
m_placeholder_parser_integration.context.rng = std::mt19937(std::chrono::high_resolution_clock::now().time_since_epoch().count());
// Enable passing global variables between PlaceholderParser invocations.
m_placeholder_parser_integration.context.global_config = std::make_unique<DynamicConfig>();