mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-16 03:07:55 -06:00
FIX: fix color painting bugs
1. fix a crash when loading a 3mf painting with color idx larger than 15 2. fix the facets not display issue if painted with color 15 Signed-off-by: yifan.wu <yifan.wu@bambulab.com> Change-Id: Idb53b6bb2d3665412815222ab9a1d47948afed56
This commit is contained in:
parent
ad311a66d6
commit
4f44ca4117
3 changed files with 6 additions and 7 deletions
|
@ -690,7 +690,8 @@ void GLGizmoMmuSegmentation::init_model_triangle_selectors()
|
|||
const TriangleMesh* mesh = &mv->mesh();
|
||||
m_triangle_selectors.emplace_back(std::make_unique<TriangleSelectorPatch>(*mesh, ebt_colors, 0.2));
|
||||
// Reset of TriangleSelector is done inside TriangleSelectorMmGUI's constructor, so we don't need it to perform it again in deserialize().
|
||||
m_triangle_selectors.back()->deserialize(mv->mmu_segmentation_facets.get_data(), false, (EnforcerBlockerType)m_extruders_colors.size());
|
||||
EnforcerBlockerType max_ebt = (EnforcerBlockerType)std::min(m_extruders_colors.size(), (size_t)EnforcerBlockerType::ExtruderMax);
|
||||
m_triangle_selectors.back()->deserialize(mv->mmu_segmentation_facets.get_data(), false, max_ebt);
|
||||
m_triangle_selectors.back()->request_update_render_data();
|
||||
m_volumes_extruder_idxs.push_back(mv->extruder_id());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue