BProjection: Make the turnable rotation more accurate
authorGeo Kgeo <kgeogeo@hotmail.com>
Mon, 25 Feb 2013 23:32:45 +0000 (23:32 +0000)
committerGeo Kgeo <kgeogeo@hotmail.com>
Mon, 25 Feb 2013 23:32:45 +0000 (23:32 +0000)
space_view3d_paint_bprojection.py

index b14cd8d06ea0e41e30742063f4f1797eeb0ef53e..fbcedd021f495ec4f04a7e45d32dfc2b1f9588e5 100644 (file)
@@ -1542,13 +1542,13 @@ class RotateView3D(Operator):
         sd.region_3d.view_location = origine
         
         vz = Vector((0,0,1))
-        qz =  Quaternion(vz,-(mx-self.first_mouse.x)*pi/180)
+        qz =  Quaternion(vz,-8*(mx-self.first_mouse.x)/width)
         sd.region_3d.view_rotation.rotate(qz)
         sd.region_3d.update()
 
         vx = Vector((1,0,0))
         vx.rotate(sd.region_3d.view_rotation)        
-        qx =  Quaternion(vx,(my-self.first_mouse.y)*pi/180)        
+        qx =  Quaternion(vx,8*(my-self.first_mouse.y)/height)        
         sd.region_3d.view_rotation.rotate(qx)                
         sd.region_3d.update()