Commit bf028be8 authored by Dalai Felinto's avatar Dalai Felinto
Browse files

small changes

parent 70939270
...@@ -71,7 +71,7 @@ class HMD_Base: ...@@ -71,7 +71,7 @@ class HMD_Base:
self._color_object = [0, 0] self._color_object = [0, 0]
self._offscreen_object = [None, None] self._offscreen_object = [None, None]
self._eye_pose = [Vector((0.0, 0.0, 0.0)), Vector((0.0, 0.0, 0.0))] self._eye_pose = [Vector((0.0, 0.0, 0.0)), Vector((0.0, 0.0, 0.0))]
self._head_transformation = [Matrix.Identity(4), Matrix.Identity(4)] self._head_transformation = Matrix.Identity(4)
@property @property
def width(self): def width(self):
...@@ -128,6 +128,8 @@ class HMD_Base: ...@@ -128,6 +128,8 @@ class HMD_Base:
except Exception as E: except Exception as E:
print(E) print(E)
self._offscreen_object[0] = None
self._offscreen_object[1] = None
return False return False
else: else:
......
...@@ -89,7 +89,6 @@ class VirtualRealityDisplayOperator(bpy.types.Operator): ...@@ -89,7 +89,6 @@ class VirtualRealityDisplayOperator(bpy.types.Operator):
# quit right away # quit right away
wm.virtual_reality.is_enabled = False wm.virtual_reality.is_enabled = False
self._quit(context) self._quit(context)
self.report({'ERROR'}, "Error initializing device")
return {'CANCELLED'} return {'CANCELLED'}
...@@ -138,9 +137,11 @@ class VirtualRealityDisplayOperator(bpy.types.Operator): ...@@ -138,9 +137,11 @@ class VirtualRealityDisplayOperator(bpy.types.Operator):
self._preview = Preview() self._preview = Preview()
if not self._hmd.isConnected(): if not self._hmd.isConnected():
self.report({'ERROR'}, "Device not connected")
return False return False
if not self._hmd.init(): if not self._hmd.init():
self.report({'ERROR'}, "Error initializing device")
return False return False
# get the data from device # get the data from device
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment