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

dont draw grease pencil

parent 4e3d51b7
...@@ -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):
......
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