Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnrico Turri <enricoturri@seznam.cz>2020-03-09 17:23:29 +0300
committerEnrico Turri <enricoturri@seznam.cz>2020-03-09 17:23:29 +0300
commit6c36577e8e48e27a372f9a53cd2ba2a07e3a49a3 (patch)
treecb47b42bf93abc1c3d2df263ede60936e8fe36db /src/slic3r/GUI/Plater.cpp
parent6723b5f3cd2dd164971594d249682a3a11b8925a (diff)
#3782 - World Z axis always vertical for non-free camera
Diffstat (limited to 'src/slic3r/GUI/Plater.cpp')
-rw-r--r--src/slic3r/GUI/Plater.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp
index 48eb86743..c20764067 100644
--- a/src/slic3r/GUI/Plater.cpp
+++ b/src/slic3r/GUI/Plater.cpp
@@ -2245,6 +2245,14 @@ void Plater::priv::update_ui_from_settings()
// $self->{buttons_sizer}->Layout;
// }
+ camera.set_type(wxGetApp().app_config->get("use_perspective_camera"));
+ if (wxGetApp().app_config->get("use_free_camera") != "1")
+ {
+ // forces camera right vector to be parallel to XY plane
+ if (std::abs(camera.get_dir_right()(2)) > EPSILON)
+ camera.look_at(camera.get_position(), camera.get_target(), Vec3d::UnitZ());
+ }
+
view3D->get_canvas3d()->update_ui_from_settings();
preview->get_canvas3d()->update_ui_from_settings();
}