diff options
Diffstat (limited to 'src/PrusaSlicer.cpp')
-rw-r--r-- | src/PrusaSlicer.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/PrusaSlicer.cpp b/src/PrusaSlicer.cpp index 19f2b5592..9f0cda32b 100644 --- a/src/PrusaSlicer.cpp +++ b/src/PrusaSlicer.cpp @@ -37,9 +37,11 @@ #include "libslic3r/TriangleMesh.hpp" #include "libslic3r/Format/AMF.hpp" #include "libslic3r/Format/3mf.hpp" +#include "libslic3r/Format/Format.hpp" #include "libslic3r/Format/STL.hpp" #include "libslic3r/Format/OBJ.hpp" #include "libslic3r/Format/SL1.hpp" +#include "libslic3r/Format/CWS.hpp" #include "libslic3r/Utils.hpp" #include "libslic3r/Thread.hpp" @@ -445,8 +447,9 @@ int CLI::run(int argc, char **argv) std::string outfile = m_config.opt_string("output"); Print fff_print; SLAPrint sla_print; - SL1Archive sla_archive(sla_print.printer_config()); - sla_print.set_printer(&sla_archive); + std::shared_ptr<SL1Archive> sla_archive = Slic3r::get_output_format(m_print_config); + + sla_print.set_printer(sla_archive); sla_print.set_status_callback( [](const PrintBase::SlicingStatus& s) { @@ -504,7 +507,7 @@ int CLI::run(int argc, char **argv) outfile = sla_print.output_filepath(outfile); // We need to finalize the filename beforehand because the export function sets the filename inside the zip metadata outfile_final = sla_print.print_statistics().finalize_output_path(outfile); - sla_archive.export_print(outfile_final, sla_print); + sla_archive->export_print(outfile_final, sla_print); } if (outfile != outfile_final) { if (Slic3r::rename_file(outfile, outfile_final)) { |