3mf and amf import: keep loaded volumes transformation as a member of ModelVolume without applying it to the mesh

This commit is contained in:
Enrico Turri 2019-12-20 12:11:58 +01:00
parent 26b7dbd6f5
commit e9bb3c2450
5 changed files with 48 additions and 4 deletions

View file

@ -399,8 +399,13 @@ public:
int object_idx{ -1 };
int volume_idx{ -1 };
Vec3d mesh_offset{ Vec3d::Zero() };
#if ENABLE_KEEP_LOADED_VOLUME_TRANSFORM_AS_STAND_ALONE
Geometry::Transformation transform;
template<class Archive> void serialize(Archive& ar) { ar(input_file, object_idx, volume_idx, mesh_offset, transform); }
#else
template<class Archive> void serialize(Archive& ar) { ar(input_file, object_idx, volume_idx, mesh_offset); }
#endif // ENABLE_KEEP_LOADED_VOLUME_TRANSFORM_AS_STAND_ALONE
};
Source source;