diff options
author | fieldOfView <aldo@fieldofview.com> | 2017-09-16 11:05:45 +0300 |
---|---|---|
committer | fieldOfView <aldo@fieldofview.com> | 2017-09-16 11:05:45 +0300 |
commit | 3f903d2c76fd2540cfcdb81017b47d52af43f908 (patch) | |
tree | 559c5c6e123e7edae3a5d7f2fa33b8fcc7109f12 /cura/CuraActions.py | |
parent | 2502038f76623bf8a81b9441c5308d97dbf2150f (diff) |
Add menu item to reset the camera
Diffstat (limited to 'cura/CuraActions.py')
-rw-r--r-- | cura/CuraActions.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cura/CuraActions.py b/cura/CuraActions.py index eeebd3b6b2..d46448dcec 100644 --- a/cura/CuraActions.py +++ b/cura/CuraActions.py @@ -36,6 +36,15 @@ class CuraActions(QObject): event = CallFunctionEvent(self._openUrl, [QUrl("http://github.com/Ultimaker/Cura/issues")], {}) Application.getInstance().functionEvent(event) + ## Reset camera position and direction to default + @pyqtSlot() + def homeCamera(self) -> None: + scene = Application.getInstance().getController().getScene() + camera = scene.getActiveCamera() + camera.setPosition(Vector(-80, 250, 700)) + camera.setPerspective(True) + camera.lookAt(Vector(0, 0, 0)) + ## Center all objects in the selection @pyqtSlot() def centerSelection(self) -> None: |