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