Commit 405eecfd authored by Patrik Huber's avatar Patrik Huber

Add CEREAL_NVP to the model and blendshape serialisation

parent a9196f1f
......@@ -55,7 +55,7 @@ struct Blendshape
template<class Archive>
void serialize(Archive& archive)
{
archive(name, deformation);
archive(CEREAL_NVP(name), CEREAL_NVP(deformation));
};
};
......
......@@ -253,7 +253,7 @@ private:
template<class Archive>
void serialize(Archive& archive, const std::uint32_t version)
{
archive(shape_model, color_model, texture_coordinates);
archive(CEREAL_NVP(shape_model), CEREAL_NVP(color_model), CEREAL_NVP(texture_coordinates));
};
};
......
......@@ -38,7 +38,7 @@
namespace eos {
namespace morphablemodel {
// Forward declarations of free functions
// Forward declarations of free functions:
cv::Mat normalise_pca_basis(cv::Mat unnormalised_basis, cv::Mat eigenvalues);
cv::Mat unnormalise_pca_basis(cv::Mat normalised_basis, cv::Mat eigenvalues);
......@@ -265,7 +265,7 @@ private:
template<class Archive>
void serialize(Archive& archive)
{
archive(mean, normalised_pca_basis, unnormalised_pca_basis, eigenvalues, triangle_list);
archive(CEREAL_NVP(mean), CEREAL_NVP(normalised_pca_basis), CEREAL_NVP(unnormalised_pca_basis), CEREAL_NVP(eigenvalues), CEREAL_NVP(triangle_list));
// Note: If the files are too big, We could split this in save/load, only
// store one of the bases, and calculate the other one when loading.
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment