Use SpaceView3D.grid_scale when snapping to grid