Suppressed import/adding of the 3mf which contains multi-part objects

+ Try to fix the wrong extruder selection under OSX
This commit is contained in:
YuSanka 2018-12-10 13:39:56 +01:00
parent 1f0c12dd9f
commit 293d6ba8ad
3 changed files with 58 additions and 20 deletions

View file

@ -1453,6 +1453,18 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
}
}
// check multi-part object adding for the SLA-printing
if (printer_technology == ptSLA)
{
for (auto obj : model.objects)
if ( obj->volumes.size()>1 ) {
Slic3r::GUI::show_error(nullptr,
wxString::Format(_(L("You can't to add the object(s) from %s because of one or some of them is(are) multi-part")),
filename.string()));
return std::vector<size_t>();
}
}
if (one_by_one) {
auto loaded_idxs = load_model_objects(model.objects);
obj_idxs.insert(obj_idxs.end(), loaded_idxs.begin(), loaded_idxs.end());