mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-19 17:02:08 +00:00
Added versioning of the structure of stored data for all three painting gizmos (fdm supports, seam and multi-material).
This commit is contained in:
@@ -557,6 +557,21 @@ std::string Model::propose_export_file_name_and_path(const std::string &new_exte
|
||||
return boost::filesystem::path(this->propose_export_file_name_and_path()).replace_extension(new_extension).string();
|
||||
}
|
||||
|
||||
bool Model::is_fdm_support_painted() const
|
||||
{
|
||||
return std::any_of(this->objects.cbegin(), this->objects.cend(), [](const ModelObject *mo) { return mo->is_fdm_support_painted(); });
|
||||
}
|
||||
|
||||
bool Model::is_seam_painted() const
|
||||
{
|
||||
return std::any_of(this->objects.cbegin(), this->objects.cend(), [](const ModelObject *mo) { return mo->is_seam_painted(); });
|
||||
}
|
||||
|
||||
bool Model::is_mm_painted() const
|
||||
{
|
||||
return std::any_of(this->objects.cbegin(), this->objects.cend(), [](const ModelObject *mo) { return mo->is_mm_painted(); });
|
||||
}
|
||||
|
||||
ModelObject::~ModelObject()
|
||||
{
|
||||
this->clear_volumes();
|
||||
@@ -733,6 +748,16 @@ void ModelObject::clear_volumes()
|
||||
this->invalidate_bounding_box();
|
||||
}
|
||||
|
||||
bool ModelObject::is_fdm_support_painted() const
|
||||
{
|
||||
return std::any_of(this->volumes.cbegin(), this->volumes.cend(), [](const ModelVolume *mv) { return mv->is_fdm_support_painted(); });
|
||||
}
|
||||
|
||||
bool ModelObject::is_seam_painted() const
|
||||
{
|
||||
return std::any_of(this->volumes.cbegin(), this->volumes.cend(), [](const ModelVolume *mv) { return mv->is_seam_painted(); });
|
||||
}
|
||||
|
||||
bool ModelObject::is_mm_painted() const
|
||||
{
|
||||
return std::any_of(this->volumes.cbegin(), this->volumes.cend(), [](const ModelVolume *mv) { return mv->is_mm_painted(); });
|
||||
|
||||
Reference in New Issue
Block a user