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

Debug option to investigate the performance with the recent proposed optimization

parent bde6d747
......@@ -531,7 +531,8 @@ class VirtualRealityDisplayOperator(bpy.types.Operator):
"""
hide all the scene objects to speed up rendering
"""
if self._is_rendering:
if self._is_rendering or \
context.window_manager.virtual_reality.is_debug:
return
area = context.area
......@@ -549,7 +550,8 @@ class VirtualRealityDisplayOperator(bpy.types.Operator):
"""
show all the hidden objects
"""
if self._is_rendering:
if self._is_rendering or \
context.window_manager.virtual_reality.is_debug:
return
area = context.area
......@@ -666,6 +668,12 @@ class VirtualRealityInfo(bpy.types.PropertyGroup):
default = False,
)
is_debug = BoolProperty(
name = "Debug",
default = False,
description = "Skip the optimization to prevent extra drawing",
)
commands = CollectionProperty(type=VirtualRealityCommandInfo)
......@@ -689,6 +697,7 @@ class VirtualRealityInfo(bpy.types.PropertyGroup):
self.is_enabled = False
self.is_slave_setup = False
self.is_paused = False
self.is_debug = False
# ############################################################
......
......@@ -55,6 +55,9 @@ class VirtualRealityPanel(bpy.types.Panel):
col.separator()
col.label(text=vr.error_message)
col.separator()
col.prop(vr, "is_debug")
# ############################################################
# Un/Registration
......
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