mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-13 01:49:01 +08:00
Load MM painting produced by BambuStudio (#12502)
This commit is contained in:
parent
6e75a2e16d
commit
dba0377c29
@ -1971,7 +1971,15 @@ namespace Slic3r {
|
||||
|
||||
m_curr_object.geometry.custom_supports.push_back(get_attribute_value_string(attributes, num_attributes, CUSTOM_SUPPORTS_ATTR));
|
||||
m_curr_object.geometry.custom_seam.push_back(get_attribute_value_string(attributes, num_attributes, CUSTOM_SEAM_ATTR));
|
||||
m_curr_object.geometry.mm_segmentation.push_back(get_attribute_value_string(attributes, num_attributes, MM_SEGMENTATION_ATTR));
|
||||
|
||||
// Now load MM segmentation data. Unfortunately, BambuStudio has changed the attribute name after they forked us,
|
||||
// leading to https://github.com/prusa3d/PrusaSlicer/issues/12502. Let's try to load both keys if the usual
|
||||
// one that PrusaSlicer uses is not present.
|
||||
std::string mm_segmentation_serialized = get_attribute_value_string(attributes, num_attributes, MM_SEGMENTATION_ATTR);
|
||||
if (mm_segmentation_serialized.empty())
|
||||
mm_segmentation_serialized = get_attribute_value_string(attributes, num_attributes, "paint_color");
|
||||
m_curr_object.geometry.mm_segmentation.push_back(mm_segmentation_serialized);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user