diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index eac99600c..cdff815a8 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -1907,7 +1907,7 @@ void GLCanvas3D::render(bool only_init) //BBS add partplater rendering logic bool only_current = false, only_body = false, show_axes = true, no_partplate = false; GLGizmosManager::EType gizmo_type = m_gizmos.get_current_type(); - if (!m_main_toolbar.is_enabled()) { + if (!m_main_toolbar.is_enabled() || m_gizmos.is_show_only_active_plate()) { //only_body = true; only_current = true; } @@ -6865,7 +6865,7 @@ void GLCanvas3D::_render_bed(bool bottom, bool show_axes) */ //bool show_texture = true; //BBS set axes mode - m_bed.set_axes_mode(m_main_toolbar.is_enabled()); + m_bed.set_axes_mode(m_main_toolbar.is_enabled() && !m_gizmos.is_show_only_active_plate()); m_bed.render(*this, bottom, scale_factor, show_axes); } @@ -6994,6 +6994,12 @@ void GLCanvas3D::_render_objects(GLVolumeCollection::ERenderType type, bool with return !volume.is_modifier && !volume.is_wipe_tower; } else { + if (m_gizmos.is_show_only_active_plate()) { + auto plate_box = wxGetApp().plater()->get_partplate_list().get_curr_plate()->get_plate_box(); + if (!plate_box.contains(volume.transformed_bounding_box())) { + return false; + } + } return (m_render_sla_auxiliaries || volume.composite_id.volume_id >= 0); } }, with_outline); diff --git a/src/slic3r/GUI/Gizmos/GLGizmosManager.cpp b/src/slic3r/GUI/Gizmos/GLGizmosManager.cpp index b4957b1e2..adf3d41f6 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmosManager.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmosManager.cpp @@ -666,6 +666,15 @@ bool GLGizmosManager::is_gizmo_click_empty_not_exit() return false; } +bool GLGizmosManager::is_show_only_active_plate() +{ + if (get_current_type() == GLGizmosManager::EType::Cut || + get_current_type() == GLGizmosManager::EType::Text) { + return true; + } + return false; +} + // Returns true if the gizmo used the event to do something, false otherwise. bool GLGizmosManager::gizmo_event(SLAGizmoEventType action, const Vec2d& mouse_position, bool shift_down, bool alt_down, bool control_down) { diff --git a/src/slic3r/GUI/Gizmos/GLGizmosManager.hpp b/src/slic3r/GUI/Gizmos/GLGizmosManager.hpp index ea138d6bf..449c321ed 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmosManager.hpp +++ b/src/slic3r/GUI/Gizmos/GLGizmosManager.hpp @@ -283,6 +283,7 @@ public: bool is_gizmo_activable_when_single_full_instance(); bool is_gizmo_click_empty_not_exit(); + bool is_show_only_active_plate(); bool gizmo_event(SLAGizmoEventType action, const Vec2d& mouse_position = Vec2d::Zero(), bool shift_down = false, bool alt_down = false, bool control_down = false); ClippingPlane get_clipping_plane() const; ClippingPlane get_assemble_view_clipping_plane() const;