Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Dalai Felinto
virtual_reality_viewport
Commits
bf028be8
Commit
bf028be8
authored
Sep 30, 2015
by
Dalai Felinto
Browse files
small changes
parent
70939270
Changes
2
Hide whitespace changes
Inline
Side-by-side
space_view3d_virtual_reality/hmd/__init__.py
View file @
bf028be8
...
@@ -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
:
...
...
space_view3d_virtual_reality/operator.py
View file @
bf028be8
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment