From 0cbbe96d08d45cfcb571636088120176b9612582 Mon Sep 17 00:00:00 2001 From: Vojtech Bubnik Date: Tue, 12 Sep 2023 13:44:43 +0200 Subject: [PATCH] Removed "input_filename" placeholder, it was not generated correctly since PrusaSlicer 2.0.0 and nobody complained. --- src/libslic3r/PrintBase.cpp | 6 +++--- src/libslic3r/PrintBase.hpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libslic3r/PrintBase.cpp b/src/libslic3r/PrintBase.cpp index 63d1a27067c..18d9833974a 100644 --- a/src/libslic3r/PrintBase.cpp +++ b/src/libslic3r/PrintBase.cpp @@ -21,7 +21,7 @@ void PrintTryCancel::operator()() const size_t PrintStateBase::g_last_timestamp = 0; // Update "scale", "input_filename", "input_filename_base" placeholders from the current m_objects. -void PrintBase::update_object_placeholders(DynamicConfig &config, const std::string &default_ext) const +void PrintBase::update_object_placeholders(DynamicConfig &config, const std::string & /* default_output_ext */) const { // get the first input file name std::string input_file; @@ -54,7 +54,7 @@ void PrintBase::update_object_placeholders(DynamicConfig &config, const std::str // get basename with and without suffix const std::string input_filename = boost::filesystem::path(input_file).filename().string(); const std::string input_filename_base = input_filename.substr(0, input_filename.find_last_of(".")); - config.set_key_value("input_filename", new ConfigOptionString(input_filename_base + default_ext)); +// config.set_key_value("input_filename", new ConfigOptionString(input_filename_base + default_output_ext)); config.set_key_value("input_filename_base", new ConfigOptionString(input_filename_base)); } } @@ -70,7 +70,7 @@ std::string PrintBase::output_filename(const std::string &format, const std::str PlaceholderParser::update_timestamp(cfg); this->update_object_placeholders(cfg, default_ext); if (! filename_base.empty()) { - cfg.set_key_value("input_filename", new ConfigOptionString(filename_base + default_ext)); +// cfg.set_key_value("input_filename", new ConfigOptionString(filename_base + default_ext)); cfg.set_key_value("input_filename_base", new ConfigOptionString(filename_base)); } try { diff --git a/src/libslic3r/PrintBase.hpp b/src/libslic3r/PrintBase.hpp index 779c7674ab0..4b4976ea439 100644 --- a/src/libslic3r/PrintBase.hpp +++ b/src/libslic3r/PrintBase.hpp @@ -552,7 +552,7 @@ class PrintBase : public ObjectBase // To be called by this->output_filename() with the format string pulled from the configuration layer. std::string output_filename(const std::string &format, const std::string &default_ext, const std::string &filename_base, const DynamicConfig *config_override = nullptr) const; // Update "scale", "input_filename", "input_filename_base" placeholders from the current printable ModelObjects. - void update_object_placeholders(DynamicConfig &config, const std::string &default_ext) const; + void update_object_placeholders(DynamicConfig &config, const std::string &default_output_ext) const; Model m_model; DynamicPrintConfig m_full_print_config;