diff options
-rw-r--r-- | intern/cycles/blender/addon/engine.py | 3 | ||||
-rw-r--r-- | intern/cycles/blender/addon/ui.py | 5 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_userpref.py | 7 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_userdef_types.h | 3 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 5 |
5 files changed, 18 insertions, 5 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 diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index c1502165e44..e5171df597a 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -2114,8 +2114,10 @@ class ExperimentalPanel: split = layout.split(factor=0.66) col = split.split() col.prop(experimental, **prop_keywords) - col = split.split() - col.operator("wm.url_open", text=task, icon='URL').url = self.url_prefix + task + + if task: + col = split.split() + col.operator("wm.url_open", text=task, icon='URL').url = self.url_prefix + task """ # Example panel, leave it here so we always have a template to follow even @@ -2163,6 +2165,7 @@ class USERPREF_PT_experimental_debugging(ExperimentalPanel, Panel): self._draw_items( context, ( ({"property": "use_undo_legacy"}, "T60695"), + ({"property": "use_cycles_debug"}, None), ), ) diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 9ea62183b87..d751ad9ac47 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -621,8 +621,9 @@ typedef struct UserDef_Experimental { char use_undo_legacy; char use_new_particle_system; char use_new_hair_type; + char use_cycles_debug; /** `makesdna` does not allow empty structs. */ - char _pad0[5]; + char _pad0[4]; } UserDef_Experimental; #define USER_EXPERIMENTAL_TEST(userdef, member) \ diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 6a6d9f3054f..c31b313d827 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -6079,6 +6079,11 @@ static void rna_def_userdef_experimental(BlenderRNA *brna) prop = RNA_def_property(srna, "use_new_hair_type", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "use_new_hair_type", 1); RNA_def_property_ui_text(prop, "New Hair Type", "Enable the new hair type in the ui"); + + prop = RNA_def_property(srna, "use_cycles_debug", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "use_cycles_debug", 1); + RNA_def_property_ui_text(prop, "Cycles Debug", "Enable Cycles debugging options for developers"); + RNA_def_property_update(prop, 0, "rna_userdef_update"); } static void rna_def_userdef_addon_collection(BlenderRNA *brna, PropertyRNA *cprop) |