mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-31 18:09:33 -07:00
Sphere brush color in MMU painting gizmo is now the same as color used for painting.
This commit is contained in:
@@ -299,7 +299,7 @@ void GLGizmoMmuSegmentation::set_painter_gizmo_data(const Selection &selection)
|
||||
if (m_state != On)
|
||||
return;
|
||||
|
||||
int prev_extruders_count = m_original_extruders_colors.size();
|
||||
int prev_extruders_count = int(m_original_extruders_colors.size());
|
||||
if (prev_extruders_count != wxGetApp().extruders_edited_cnt() || get_extruders_colors() != m_original_extruders_colors) {
|
||||
this->init_extruders_data();
|
||||
// Reinitialize triangle selectors because of change of extruder count need also change the size of GLIndexedVertexArray
|
||||
@@ -594,6 +594,18 @@ PainterGizmoType GLGizmoMmuSegmentation::get_painter_type() const
|
||||
return PainterGizmoType::MMU_SEGMENTATION;
|
||||
}
|
||||
|
||||
std::array<float, 4> GLGizmoMmuSegmentation::get_cursor_sphere_left_button_color() const
|
||||
{
|
||||
const std::array<uint8_t, 3> &color = m_modified_extruders_colors[m_first_selected_extruder_idx];
|
||||
return {float(color[0]) / 255.0f, float(color[1]) / 255.0f, float(color[2]) / 255.0f, 0.25f};
|
||||
}
|
||||
|
||||
std::array<float, 4> GLGizmoMmuSegmentation::get_cursor_sphere_right_button_color() const
|
||||
{
|
||||
const std::array<uint8_t, 3> &color = m_modified_extruders_colors[m_second_selected_extruder_idx];
|
||||
return {float(color[0]) / 255.0f, float(color[1]) / 255.0f, float(color[2]) / 255.0f, 0.25f};
|
||||
}
|
||||
|
||||
void TriangleSelectorMmuGui::render(ImGuiWrapper *imgui)
|
||||
{
|
||||
std::vector<int> color_cnt(m_iva_colors.size());
|
||||
|
||||
Reference in New Issue
Block a user