Commit: 9039fbaa9ce171d40a75cc7fb56b2e3f004334bb
Author: Julian Eisel
Date: Mon May 23 20:04:51 2022 +0200
Branches: master
https://developer.blender.org/rB9039fbaa9ce171d40a75cc7fb56b2e3f004334bb
Asset Browser: Show "Current File" icon in sidebar source field
If the asset is stored in the current file, display the corresponding
icon in the "Source" button in the sidebar. This is a nice indicator and
helps users learn what this icon represents (it's used in the main
region without text too).
===================================================================
M release/scripts/startup/bl_ui/space_filebrowser.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_filebrowser.py
b/release/scripts/startup/bl_ui/space_filebrowser.py
index 07ec0cd85a6..e69a1024712 100644
--- a/release/scripts/startup/bl_ui/space_filebrowser.py
+++ b/release/scripts/startup/bl_ui/space_filebrowser.py
@@ -696,11 +696,12 @@ class
ASSETBROWSER_PT_metadata(asset_utils.AssetBrowserPanel, Panel):
prefs = context.preferences
show_asset_debug_info = prefs.view.show_developer_ui and
prefs.experimental.show_asset_debug_info
+ is_local_asset = bool(asset_file_handle.local_id)
layout.use_property_split = True
layout.use_property_decorate = False # No animation.
- if asset_file_handle.local_id:
+ if is_local_asset:
# 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")
@@ -720,7 +721,7 @@ class
ASSETBROWSER_PT_metadata(asset_utils.AssetBrowserPanel, Panel):
col.prop(asset_file_handle.asset_data, "catalog_simple_name",
text="Simple Name")
row = layout.row(align=True)
- row.prop(wm, "asset_path_dummy", text="Source")
+ row.prop(wm, "asset_path_dummy", text="Source", icon='CURRENT_FILE' if
is_local_asset else 'NONE')
row.operator("asset.open_containing_blend_file", text="",
icon='TOOL_SETTINGS')
layout.prop(asset_file_handle.asset_data, "description")
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs