From 10eb954c7e6f36436b1761259f346905c1a11658 Mon Sep 17 00:00:00 2001 From: enricoturri1966 Date: Wed, 25 Mar 2020 10:24:52 +0100 Subject: [PATCH] ENABLE_AUTO_CONSTRAINED_CAMERA set as default --- src/libslic3r/Technologies.hpp | 10 ---------- src/slic3r/GUI/GLCanvas3D.cpp | 10 ---------- 2 files changed, 20 deletions(-) diff --git a/src/libslic3r/Technologies.hpp b/src/libslic3r/Technologies.hpp index a42d6bffd..3895a87a1 100644 --- a/src/libslic3r/Technologies.hpp +++ b/src/libslic3r/Technologies.hpp @@ -34,16 +34,6 @@ #define ENABLE_HACK_CLOSING_ON_OSX_10_9_5 (1 && ENABLE_2_2_0_RC1) -//============ -// 2.2.0 techs -//============ -#define ENABLE_2_2_0 1 - -// Enable automatic switch to constrained camera when manipulating the scene using regular mouse -// while 3D mouse is connected and free camera is not selected -#define ENABLE_AUTO_CONSTRAINED_CAMERA (1 && ENABLE_2_2_0) - - //================== // 2.2.0.final techs //================== diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index 5d77fc1d4..0465d5df9 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -3588,7 +3588,6 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt) if (m_hover_volume_idxs.empty() && m_mouse.is_start_position_3D_defined()) { const Vec3d rot = (Vec3d(pos.x(), pos.y(), 0.) - m_mouse.drag.start_position_3D) * (PI * TRACKBALLSIZE / 180.); -#if ENABLE_AUTO_CONSTRAINED_CAMERA if (wxGetApp().app_config->get("use_free_camera") == "1") // Virtual track ball (similar to the 3DConnexion mouse). m_camera.rotate_local_around_target(Vec3d(rot.y(), rot.x(), 0.)); @@ -3601,13 +3600,6 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt) m_camera.recover_from_free_camera(); m_camera.rotate_on_sphere(rot.x(), rot.y(), wxGetApp().preset_bundle->printers.get_edited_preset().printer_technology() != ptSLA); } -#else - if (wxGetApp().plater()->get_mouse3d_controller().connected() || (wxGetApp().app_config->get("use_free_camera") == "1")) - // Virtual track ball (similar to the 3DConnexion mouse). - m_camera.rotate_local_around_target(Vec3d(rot.y(), rot.x(), 0.)); - else - m_camera.rotate_on_sphere(rot.x(), rot.y(), wxGetApp().preset_bundle->printers.get_edited_preset().printer_technology() != ptSLA); -#endif // ENABLE_AUTO_CONSTRAINED_CAMERA m_dirty = true; } @@ -3622,14 +3614,12 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt) float z = 0.0f; const Vec3d& cur_pos = _mouse_to_3d(pos, &z); Vec3d orig = _mouse_to_3d(m_mouse.drag.start_position_2D, &z); -#if ENABLE_AUTO_CONSTRAINED_CAMERA if (wxGetApp().app_config->get("use_free_camera") != "1") // Forces camera right vector to be parallel to XY plane in case it has been misaligned using the 3D mouse free rotation. // It is cheaper to call this function right away instead of testing wxGetApp().plater()->get_mouse3d_controller().connected(), // which checks an atomics (flushes CPU caches). // See GH issue #3816. m_camera.recover_from_free_camera(); -#endif // ENABLE_AUTO_CONSTRAINED_CAMERA m_camera.set_target(m_camera.get_target() + orig - cur_pos); m_dirty = true;