Changed the G-code export and send to OctoPrint GUI code

to store the G-code next to the project file if it exists,
and to process the project name with the PlaceholderParser.
This commit is contained in:
bubnikv 2019-05-17 16:27:00 +02:00
parent e358dd9c01
commit 04397c7948
10 changed files with 55 additions and 31 deletions
src/libslic3r

View file

@ -729,7 +729,7 @@ void GCode::_do_export(Print &print, FILE *file)
// Prepare the helper object for replacing placeholders in custom G-code and output filename.
m_placeholder_parser = print.placeholder_parser();
m_placeholder_parser.update_timestamp();
print.update_object_placeholders(m_placeholder_parser.config_writable());
print.update_object_placeholders(m_placeholder_parser.config_writable(), ".gcode");
// Get optimal tool ordering to minimize tool switches of a multi-exruder print.
// For a print by objects, find the 1st printing object.