diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2021-11-16 18:49:27 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2021-11-16 18:49:27 +0300 |
commit | 07af45eec5870765e7ac66e8639afe41141244b0 (patch) | |
tree | 274618f4d75c5d7a63ff675b0ca001ae3b735d02 /release | |
parent | ce0d817bb7d6ea92b4571fd7262b173217c319cb (diff) |
Asset Browser: hide catalog debug info behind debug option
Add a new "experimental" debug option `show_asset_debug_info`, and use
that to determine the visibility of the active asset's catalog UUID and
simple name. Previously this was only determined by the "Developer
Extras" option, which meant it was visible in too many situations. It's
not really a "developer extra", and really just a debugging tool, so the
new option is more in line with its purpose.
Reviewed by: Severin
Differential Revision: https://developer.blender.org/D13242
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/space_filebrowser.py | 7 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_userpref.py | 1 |
2 files changed, 5 insertions, 3 deletions
diff --git a/release/scripts/startup/bl_ui/space_filebrowser.py b/release/scripts/startup/bl_ui/space_filebrowser.py index 05f505c518d..f601c795660 100644 --- a/release/scripts/startup/bl_ui/space_filebrowser.py +++ b/release/scripts/startup/bl_ui/space_filebrowser.py @@ -707,7 +707,8 @@ class ASSETBROWSER_PT_metadata(asset_utils.AssetBrowserPanel, Panel): asset_library_ref = context.asset_library_ref asset_lib_path = bpy.types.AssetHandle.get_full_library_path(asset_file_handle, asset_library_ref) - show_developer_ui = context.preferences.view.show_developer_ui + prefs = context.preferences + show_asset_debug_info = prefs.view.show_developer_ui and prefs.experimental.show_asset_debug_info layout.use_property_split = True layout.use_property_decorate = False # No animation. @@ -716,7 +717,7 @@ class ASSETBROWSER_PT_metadata(asset_utils.AssetBrowserPanel, Panel): # If the active file is an ID, use its name directly so renaming is possible from right here. layout.prop(asset_file_handle.local_id, "name") - if show_developer_ui: + if show_asset_debug_info: col = layout.column(align=True) col.label(text="Asset Catalog:") col.prop(asset_file_handle.local_id.asset_data, "catalog_id", text="UUID") @@ -724,7 +725,7 @@ class ASSETBROWSER_PT_metadata(asset_utils.AssetBrowserPanel, Panel): else: layout.prop(asset_file_handle, "name") - if show_developer_ui: + if show_asset_debug_info: col = layout.column(align=True) col.enabled = False col.label(text="Asset Catalog:") diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index abd235f1c44..705f6fd788e 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -2316,6 +2316,7 @@ class USERPREF_PT_experimental_debugging(ExperimentalPanel, Panel): ({"property": "proxy_to_override_auto_conversion"}, "T91671"), ({"property": "use_cycles_debug"}, None), ({"property": "use_geometry_nodes_legacy"}, "T91274"), + ({"property": "show_asset_debug_info"}, None), ), ) |