Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2020-06-11 21:32:39 +0300
committerBrecht Van Lommel <brecht@blender.org>2020-06-26 14:19:34 +0300
commit74c49492c258dfdb92bc243b623f061bca6f3e35 (patch)
tree14d14e11a943688f4a6d85c78ebef47d1eeeef00 /intern/cycles
parentd865ad59fc3ae991c871febf130fc5b308f306f7 (diff)
Cycles: add experimental preference to replace magic debug value 256
Previously you'd have to run with --debug-value 256, now just make it a preference so the Debug panel can be always available for developers.
Diffstat (limited to 'intern/cycles')
-rw-r--r--intern/cycles/blender/addon/engine.py3
-rw-r--r--intern/cycles/blender/addon/ui.py5
2 files changed, 6 insertions, 2 deletions
diff --git a/intern/cycles/blender/addon/engine.py b/intern/cycles/blender/addon/engine.py
index e7ea5e7a1f6..7566ca28dd7 100644
--- a/intern/cycles/blender/addon/engine.py
+++ b/intern/cycles/blender/addon/engine.py
@@ -179,7 +179,8 @@ def reset(engine, data, depsgraph):
import _cycles
import bpy
- if bpy.app.debug_value == 256:
+ prefs = bpy.context.preferences
+ if prefs.experimental.use_cycles_debug and prefs.view.show_developer_ui:
_cycles.debug_flags_update(depsgraph.scene.as_pointer())
else:
_cycles.debug_flags_reset()
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py
index aa0a47eb9c7..cfb22885eab 100644
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@ -1987,7 +1987,10 @@ class CYCLES_RENDER_PT_debug(CyclesButtonsPanel, Panel):
@classmethod
def poll(cls, context):
- return CyclesButtonsPanel.poll(context) and bpy.app.debug_value == 256
+ prefs = bpy.context.preferences
+ return (CyclesButtonsPanel.poll(context)
+ and prefs.experimental.use_cycles_debug
+ and prefs.view.show_developer_ui)
def draw(self, context):
layout = self.layout