Switch to Advanced mode if object or volumes imported from 3mf and amf files contain advanced config data

This commit is contained in:
Enrico Turri 2019-04-15 09:22:11 +02:00
parent f244a643ee
commit 07d1d44d8c

View file

@ -1633,6 +1633,14 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
break;
}
// is there any advanced config data ?
auto opt_keys = model_object->config.keys();
if (!opt_keys.empty() && !((opt_keys.size() == 1) && (opt_keys[0] == "extruder")))
{
advanced = true;
break;
}
// is there any modifier ?
for (const ModelVolume* model_volume : model_object->volumes)
{
@ -1641,6 +1649,14 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
advanced = true;
break;
}
// is there any advanced config data ?
opt_keys = model_volume->config.keys();
if (!opt_keys.empty() && !((opt_keys.size() == 1) && (opt_keys[0] == "extruder")))
{
advanced = true;
break;
}
}
if (advanced)