From 28b1499f09e1a171651853840e28ca7411d8ccc2 Mon Sep 17 00:00:00 2001 From: 3DAlgoLab <83936830+3DAlgoLab@users.noreply.github.com> Date: Wed, 2 Jun 2021 14:21:50 +0900 Subject: [PATCH] Force cameraPosition() to return Vector class. (#1799) * Update GLViewWidget.py Fix the wrong conversion of QVector3D to numpy array. * new way to fix the conversion error * Recover prev. version of pixelSize Co-authored-by: Jaeyoon Jeong --- pyqtgraph/opengl/GLViewWidget.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyqtgraph/opengl/GLViewWidget.py b/pyqtgraph/opengl/GLViewWidget.py index 098d7ce9..add02496 100644 --- a/pyqtgraph/opengl/GLViewWidget.py +++ b/pyqtgraph/opengl/GLViewWidget.py @@ -314,7 +314,7 @@ class GLViewWidget(QtWidgets.QOpenGLWidget): center = self.opts['center'] dist = self.opts['distance'] if self.opts['rotationMethod'] == "quaternion": - pos = center - self.opts['rotation'].rotatedVector( Vector(0,0,dist) ) + pos = Vector(center - self.opts['rotation'].rotatedVector(Vector(0,0,dist) )) else: # using 'euler' rotation method elev = radians(self.opts['elevation'])