Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuSanka <yusanka@gmail.com>2022-02-07 12:00:49 +0300
committerYuSanka <yusanka@gmail.com>2022-02-07 12:00:49 +0300
commit874da0281de52fd5ce17d3ff1e8798bff1c28242 (patch)
treedd4c86abdd9a645b4147372ba5c988a58b1bf8fa
parent6667852d928fbb64d1660c0b3eb464cf0ab093d8 (diff)
Fixed SPE-1192
Wrong list of SLA-materials, when no SLA-printer is installed, but 3MF with SLA print is loaded
-rw-r--r--src/libslic3r/Preset.cpp2
-rw-r--r--src/slic3r/GUI/Plater.cpp11
2 files changed, 8 insertions, 5 deletions
diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp
index e65b604df..5ab3142e6 100644
--- a/src/libslic3r/Preset.cpp
+++ b/src/libslic3r/Preset.cpp
@@ -412,6 +412,8 @@ void Preset::set_visible_from_appconfig(const AppConfig &app_config)
for (auto it = this->renamed_from.begin(); ! is_visible && it != this->renamed_from.end(); ++ it)
is_visible = has(*it);
}
+ else
+ is_visible = false;
}
}
diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp
index 26aef38ff..c9a55e2b2 100644
--- a/src/slic3r/GUI/Plater.cpp
+++ b/src/slic3r/GUI/Plater.cpp
@@ -2409,16 +2409,17 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
try {
if (type_3mf || type_zip_amf) {
DynamicPrintConfig config;
+ PrinterTechnology loaded_printer_technology;
{
DynamicPrintConfig config_loaded;
ConfigSubstitutionContext config_substitutions{ ForwardCompatibilitySubstitutionRule::Enable };
model = Slic3r::Model::read_from_archive(path.string(), &config_loaded, &config_substitutions, only_if(load_config, Model::LoadAttribute::CheckVersion));
if (load_config && !config_loaded.empty()) {
// Based on the printer technology field found in the loaded config, select the base for the config,
- PrinterTechnology printer_technology = Preset::printer_technology(config_loaded);
+ loaded_printer_technology = Preset::printer_technology(config_loaded);
// We can't to load SLA project if there is at least one multi-part object on the bed
- if (printer_technology == ptSLA) {
+ if (loaded_printer_technology == ptSLA) {
const ModelObjectPtrs& objects = q->model().objects;
for (auto object : objects)
if (object->volumes.size() > 1) {
@@ -2430,7 +2431,7 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
}
}
- config.apply(printer_technology == ptFFF ?
+ config.apply(loaded_printer_technology == ptFFF ?
static_cast<const ConfigBase&>(FullPrintConfig::defaults()) :
static_cast<const ConfigBase&>(SLAFullPrintConfig::defaults()));
// and place the loaded config over the base.
@@ -2461,7 +2462,7 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
};
std::vector<std::string> names;
- if (printer_technology == ptFFF) {
+ if (loaded_printer_technology == ptFFF) {
update_selected_preset_visibility(preset_bundle->prints, names);
for (const std::string& filament : preset_bundle->filament_presets) {
Preset* preset = preset_bundle->filaments.find_preset(filament);
@@ -2492,7 +2493,7 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
}
}
- if (printer_technology == ptFFF)
+ if (loaded_printer_technology == ptFFF)
CustomGCode::update_custom_gcode_per_print_z_from_config(model.custom_gcode_per_print_z, &preset_bundle->project_config);
// For exporting from the amf/3mf we shouldn't check printer_presets for the containing information about "Print Host upload"