diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp index bd7772f80..794390133 100644 --- a/src/libslic3r/Print.cpp +++ b/src/libslic3r/Print.cpp @@ -661,6 +661,9 @@ Print::ApplyStatus Print::apply(const Model &model, const DynamicPrintConfig &co // Make a copy of the config, normalize it. DynamicPrintConfig config(config_in); + config.option("print_settings_id", true); + config.option("filament_settings_id", true); + config.option("printer_settings_id", true); config.normalize(); // Collect changes to print config. t_config_option_keys print_diff = m_config.diff(config); @@ -688,9 +691,9 @@ Print::ApplyStatus Print::apply(const Model &model, const DynamicPrintConfig &co PlaceholderParser &pp = this->placeholder_parser(); pp.apply_only(config, placeholder_parser_diff); // Set the profile aliases for the PrintBase::output_filename() - pp.set("print_preset", config_in.option("print_settings_id" )->clone()); - pp.set("filament_preset", config_in.option("filament_settings_id")->clone()); - pp.set("printer_preset", config_in.option("printer_settings_id" )->clone()); + pp.set("print_preset", config.option("print_settings_id")->clone()); + pp.set("filament_preset", config.option("filament_settings_id")->clone()); + pp.set("printer_preset", config.option("printer_settings_id")->clone()); } // It is also safe to change m_config now after this->invalidate_state_by_config_options() call. diff --git a/src/libslic3r/SLAPrint.cpp b/src/libslic3r/SLAPrint.cpp index 52f1e032b..0e8e717cc 100644 --- a/src/libslic3r/SLAPrint.cpp +++ b/src/libslic3r/SLAPrint.cpp @@ -118,6 +118,9 @@ SLAPrint::ApplyStatus SLAPrint::apply(const Model &model, const DynamicPrintConf // Make a copy of the config, normalize it. DynamicPrintConfig config(config_in); + config.option("sla_print_settings_id", true); + config.option("sla_material_settings_id", true); + config.option("printer_settings_id", true); config.normalize(); // Collect changes to print config. t_config_option_keys print_diff = m_print_config.diff(config); @@ -151,9 +154,9 @@ SLAPrint::ApplyStatus SLAPrint::apply(const Model &model, const DynamicPrintConf PlaceholderParser &pp = this->placeholder_parser(); pp.apply_config(config); // Set the profile aliases for the PrintBase::output_filename() - pp.set("print_preset", config_in.option("sla_print_settings_id")->clone()); - pp.set("material_preset", config_in.option("sla_material_settings_id")->clone()); - pp.set("printer_preset", config_in.option("printer_settings_id")->clone()); + pp.set("print_preset", config.option("sla_print_settings_id")->clone()); + pp.set("material_preset", config.option("sla_material_settings_id")->clone()); + pp.set("printer_preset", config.option("printer_settings_id")->clone()); } // It is also safe to change m_config now after this->invalidate_state_by_config_options() call. diff --git a/src/slic3r.cpp b/src/slic3r.cpp index f88b84ce7..b60c5b1dd 100644 --- a/src/slic3r.cpp +++ b/src/slic3r.cpp @@ -68,7 +68,7 @@ int CLI::run(int argc, char **argv) // load config files supplied via --load for (auto const &file : load_configs) { if (! boost::filesystem::exists(file)) { - if (m_config.opt_bool("ignore_nonexistent_file")) { + if (m_config.opt_bool("ignore_nonexistent_config")) { continue; } else { boost::nowide::cerr << "No such file: " << file << std::endl; @@ -132,9 +132,9 @@ int CLI::run(int argc, char **argv) // Initialize full print configs for both the FFF and SLA technologies. FullPrintConfig fff_print_config; - SLAFullPrintConfig sla_print_config; +// SLAFullPrintConfig sla_print_config; fff_print_config.apply(m_print_config, true); - sla_print_config.apply(m_print_config, true); +// sla_print_config.apply(m_print_config, true); // Loop through transform options. for (auto const &opt_key : m_transforms) { @@ -530,7 +530,7 @@ bool CLI::setup(int argc, char **argv) for (auto const &opt_key : opt_order) { if (cli_actions_config_def.has(opt_key)) m_actions.emplace_back(opt_key); - if (cli_transform_config_def.has(opt_key)) + else if (cli_transform_config_def.has(opt_key)) m_transforms.emplace_back(opt_key); }