fix: presence errors whithout 3d viewports

This commit is contained in:
Swann Martinez
2019-11-07 15:28:47 +01:00
parent 88e7fde848
commit 5d3f81081a

View File

@ -31,7 +31,7 @@ def view3d_find():
def refresh_3d_view():
area, region, rv3d = view3d_find()
if area and region and rv3d:
area.tag_redraw()
@ -66,6 +66,7 @@ def get_client_cam_points():
v4 = [0, 0, 0]
v5 = [0, 0, 0]
v6 = [0, 0, 0]
v7 = [0, 0, 0]
if area and region and rv3d:
width = region.width
@ -114,6 +115,7 @@ class User():
current_coords = get_client_cam_points()
area, region, rv3d = view3d_find()
if area and region and rv3d:
current_coords = list(get_client_cam_points())
if current_coords and self.location != current_coords:
self.location = current_coords