diff options
author | Diego Prado Gesto <d.pradogesto@ultimaker.com> | 2018-07-03 14:09:05 +0300 |
---|---|---|
committer | Diego Prado Gesto <d.pradogesto@ultimaker.com> | 2018-07-03 14:09:05 +0300 |
commit | ff6bc9de4e686ba5fbdbd853569e13d472bb1186 (patch) | |
tree | 2047c5025f6f51d868b052ac3342995fa63c7071 /cura/PickingPass.py | |
parent | ae7875a7567bbc7ccdd808e7055e5becb2a0ec2f (diff) |
Fix some more code-style
Diffstat (limited to 'cura/PickingPass.py')
-rw-r--r-- | cura/PickingPass.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cura/PickingPass.py b/cura/PickingPass.py index bfe465ff39..75ee21ef41 100644 --- a/cura/PickingPass.py +++ b/cura/PickingPass.py @@ -69,6 +69,7 @@ class PickingPass(RenderPass): ## Get the world coordinates of a picked point def getPickedPosition(self, x: int, y: int) -> Vector: distance = self.getPickedDepth(x, y) - ray = self._scene.getActiveCamera().getRay(x, y) - - return ray.getPointAlongRay(distance) + camera = self._scene.getActiveCamera() + if camera: + return camera.getRay(x, y).getPointAlongRay(distance) + return Vector() |