Assets: hide low-level catalog info behind "developer extra's"

Hide the catalog UUID and the catalog simple name from the Asset Browser
side-panel, unless "Developer Extra's" is enabled in the user prefs.
This commit is contained in:
Sybren A. Stüvel
2021-10-12 12:17:42 +02:00
parent cc04399937
commit b67a937394

View File

@@ -658,10 +658,13 @@ 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
if asset_file_handle.local_id:
# 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", text="")
if show_developer_ui:
col = layout.column(align=True)
col.label(text="Asset Catalog:")
col.prop(asset_file_handle.local_id.asset_data, "catalog_id", text="UUID")
@@ -672,6 +675,7 @@ class ASSETBROWSER_PT_metadata(asset_utils.AssetBrowserPanel, Panel):
else:
layout.prop(asset_file_handle, "name", text="")
if show_developer_ui:
col = layout.column(align=True)
col.enabled = False
col.label(text="Asset Catalog:")