diff options
Diffstat (limited to 'src/libslic3r/PrintConfig.cpp')
-rw-r--r-- | src/libslic3r/PrintConfig.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 1c442d4ce..781b8c880 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -5007,6 +5007,18 @@ void PrintConfigDef::init_sla_params() def->max = 10; def->mode = comExpert; def->set_default_value(new ConfigOptionFloat(2.0)); + + + def = this->add("output_format", coEnum); + def->label = L("Output Format"); + def->tooltip = L("Select the output format for this printer."); + def->enum_keys_map = &ConfigOptionEnum<OutputFormat>::get_enum_values(); + def->enum_values.push_back("mCWS"); + def->enum_values.push_back("SL1"); + def->enum_labels.push_back(L("Masked CWS")); + def->enum_labels.push_back(L("Prusa SL1")); + def->mode = comAdvanced; // output_format should be preconfigured in profiles; + def->set_default_value(new ConfigOptionEnum<OutputFormat>(ofMaskedCWS)); } void PrintConfigDef::handle_legacy(t_config_option_key &opt_key, std::string &value) @@ -5369,6 +5381,16 @@ DynamicPrintConfig* DynamicPrintConfig::new_from_defaults_keys(const std::vector return out; } +OutputFormat output_format(const ConfigBase &cfg) +{ + std::cerr << "Detected technology " << printer_technology(cfg) << "\n"; + if (printer_technology(cfg) == ptFFF) return ofGCode; + const ConfigOptionEnum<OutputFormat> *opt = cfg.option<ConfigOptionEnum<OutputFormat>>("output_format"); + if (opt) return opt->value; + + return ofUnknown; +} + /* double min_object_distance(const ConfigBase &cfg) { |