diff --git a/src/libslic3r/PrintBase.cpp b/src/libslic3r/PrintBase.cpp index 3fe9a2b4d..412aae338 100644 --- a/src/libslic3r/PrintBase.cpp +++ b/src/libslic3r/PrintBase.cpp @@ -57,8 +57,10 @@ std::string PrintBase::output_filename(const std::string &format, const std::str PlaceholderParser::update_timestamp(cfg); this->update_object_placeholders(cfg); try { - boost::filesystem::path filename = this->placeholder_parser().process(format, 0, &cfg); - if (filename.extension().empty()) + boost::filesystem::path filename = format.empty() ? + cfg.opt_string("input_filename_base") + "." + default_ext : + this->placeholder_parser().process(format, 0, &cfg); + if (filename.extension().empty()) filename = boost::filesystem::change_extension(filename, default_ext); return filename.string(); } catch (std::runtime_error &err) { diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 8140177b3..3c8849d78 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -1323,7 +1323,7 @@ void PrintConfigDef::init_fff_params() "[input_filename_base]."); def->full_width = true; def->mode = comExpert; - def->set_default_value(new ConfigOptionString("[input_filename_base]")); + def->set_default_value(new ConfigOptionString("[input_filename_base].gcode")); def = this->add("overhangs", coBool); def->label = L("Detect bridging perimeters"); diff --git a/src/slic3r/GUI/PresetBundle.cpp b/src/slic3r/GUI/PresetBundle.cpp index e92311cfe..f6cc73b6f 100644 --- a/src/slic3r/GUI/PresetBundle.cpp +++ b/src/slic3r/GUI/PresetBundle.cpp @@ -78,6 +78,7 @@ PresetBundle::PresetBundle() : this->sla_materials.default_preset().inherits(); this->sla_prints.default_preset().config.optptr("sla_print_settings_id", true); + this->sla_prints.default_preset().config.opt_string("output_filename_format", true) = "[input_filename_base].sl1"; this->sla_prints.default_preset().compatible_printers_condition(); this->sla_prints.default_preset().inherits();