Added tech ENABLE_ENHANCED_RELOAD_FROM_DISK

1) Reworked void Plater::priv::reload_from_disk() to be more general

2) Added source data to class ModelVolume

3) Modified .3mf import/export to save/load volume matrices and source data

4) Incremented .3mf version to 2
This commit is contained in:
Enrico Turri 2019-09-19 09:09:11 +02:00
parent a37ad3b552
commit 3a40565d03
10 changed files with 496 additions and 60 deletions

View file

@ -472,7 +472,11 @@ void Selection::volumes_changed(const std::vector<size_t> &map_volume_old_to_new
for (unsigned int idx : m_list)
if (map_volume_old_to_new[idx] != size_t(-1)) {
unsigned int new_idx = (unsigned int)map_volume_old_to_new[idx];
#if ENABLE_ENHANCED_RELOAD_FROM_DISK
(*m_volumes)[new_idx]->selected = true;
#else
assert((*m_volumes)[new_idx]->selected);
#endif // ENABLE_ENHANCED_RELOAD_FROM_DISK
list_new.insert(new_idx);
}
m_list = std::move(list_new);