Asset Browser: Allow renaming asset data-blocks from the sidebar directly

This is something we wanted to support doing. It's confusing if users see the
name but it's always grayed out. So be convenient and avoid the confusion.
This commit is contained in:
Julian Eisel 2020-12-16 01:07:01 +01:00
parent 055ef5df61
commit 0ae15e68c7
Notes: blender-bot 2023-02-14 06:05:22 +01:00
Referenced by commit 2945c1e3e5, Fix asset data-block name button not showing up in custom repositories
1 changed files with 2 additions and 1 deletions

View File

@ -598,7 +598,8 @@ class ASSETBROWSER_PT_metadata(asset_utils.AssetBrowserPanel, Panel):
box.template_icon(icon_value=active_file.preview_icon_id, scale=5.0)
if bpy.ops.ed.lib_id_load_custom_preview.poll():
box.operator("ed.lib_id_load_custom_preview", icon='FILEBROWSER', text="Load Custom")
layout.prop(active_file, "name")
# If the active file is an ID, use its name directly so renaming is possible from right here.
layout.prop(context.id if not None else active_file, "name")
class ASSETBROWSER_PT_metadata_details(asset_utils.AssetBrowserPanel, Panel):