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
b0c45e76
Commit
b0c45e76
authored
Oct 16, 2015
by
Dalai Felinto
Browse files
dont draw grease pencil
parent
4e3d51b7
Changes
1
Hide whitespace changes
Inline
Side-by-side
space_view3d_virtual_reality/operator.py
View file @
b0c45e76
...
@@ -507,15 +507,31 @@ class VirtualRealityDisplayOperator(bpy.types.Operator):
...
@@ -507,15 +507,31 @@ class VirtualRealityDisplayOperator(bpy.types.Operator):
def
_pre_draw_hide
(
self
,
context
,
visible
):
def
_pre_draw_hide
(
self
,
context
,
visible
):
scene
=
context
.
scene
scene
=
context
.
scene
space
=
context
.
space_data
visible
[
'objects'
]
=
[]
objects
=
visible
[
'objects'
]
for
ob
in
scene
.
objects
:
for
ob
in
scene
.
objects
:
if
not
ob
.
hide
:
if
not
ob
.
hide
:
visible
.
append
(
ob
)
objects
.
append
(
ob
)
ob
.
hide
=
True
ob
.
hide
=
True
visible
[
'show_grease_pencil'
]
=
space
.
show_grease_pencil
space
.
show_grease_pencil
=
False
def
_post_draw_show
(
self
,
context
,
visible
):
def
_post_draw_show
(
self
,
context
,
visible
):
for
ob
in
visible
:
space
=
context
.
space_data
objects
=
visible
[
'objects'
]
for
ob
in
objects
:
ob
.
hide
=
False
ob
.
hide
=
False
visible
[
'objects'
]
=
[]
space
.
show_grease_pencil
=
visible
[
'show_grease_pencil'
]
def
_hide_master
(
self
,
context
):
def
_hide_master
(
self
,
context
):
"""
"""
whether to hide the main 3d viewport
whether to hide the main 3d viewport
...
@@ -542,11 +558,11 @@ class VirtualRealityDisplayOperator(bpy.types.Operator):
...
@@ -542,11 +558,11 @@ class VirtualRealityDisplayOperator(bpy.types.Operator):
hash_area
=
hash
(
area
)
hash_area
=
hash
(
area
)
if
hash_area
==
self
.
_hash_slave
:
if
hash_area
==
self
.
_hash_slave
:
self
.
_visible_slave
=
[]
self
.
_visible_slave
=
{}
self
.
_pre_draw_hide
(
context
,
self
.
_visible_slave
)
self
.
_pre_draw_hide
(
context
,
self
.
_visible_slave
)
elif
hash_area
==
self
.
_hash_master
and
self
.
_hide_master
(
context
):
elif
hash_area
==
self
.
_hash_master
and
self
.
_hide_master
(
context
):
self
.
_visible_master
=
[]
self
.
_visible_master
=
{}
self
.
_pre_draw_hide
(
context
,
self
.
_visible_master
)
self
.
_pre_draw_hide
(
context
,
self
.
_visible_master
)
def
_draw_callback_post
(
self
,
context
):
def
_draw_callback_post
(
self
,
context
):
...
...
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