From 9cff9f9f5df034ca27848875c25471dd952c34c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Fri, 6 Aug 2021 15:18:18 +0200 Subject: =?UTF-8?q?Cleanup:=20rename=20`FileList::asset=5Flibrary`=20?= =?UTF-8?q?=E2=86=92=20`asset=5Flibrary=5Fref`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In the `FileList` struct, rename the `AssetLibraryReference *asset_library` field to `asset_library_ref` -- it's a description of which asset library is used, and not the asset library itself. This is to make space for a future `AssetLibrary *asset_library` field, which will point to an actual asset library struct/class. No functional changes. Reviewed by: Severin Differential Revision: https://developer.blender.org/D12151 --- release/scripts/startup/bl_ui/space_filebrowser.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'release') diff --git a/release/scripts/startup/bl_ui/space_filebrowser.py b/release/scripts/startup/bl_ui/space_filebrowser.py index 9f70d26c71b..00ac69595c7 100644 --- a/release/scripts/startup/bl_ui/space_filebrowser.py +++ b/release/scripts/startup/bl_ui/space_filebrowser.py @@ -37,9 +37,9 @@ class FILEBROWSER_HT_header(Header): params = space_data.params row = layout.row(align=True) - row.prop(params, "asset_library", text="") + row.prop(params, "asset_library_ref", text="") # External libraries don't auto-refresh, add refresh button. - if params.asset_library != 'LOCAL': + if params.asset_library_ref != 'LOCAL': row.operator("file.refresh", text="", icon='FILE_REFRESH') layout.separator_spacer() @@ -678,8 +678,8 @@ class ASSETBROWSER_PT_metadata(asset_utils.AssetBrowserPanel, Panel): layout.label(text="No asset selected", icon='INFO') return - asset_library = context.asset_library - asset_lib_path = bpy.types.AssetHandle.get_full_library_path(asset_file_handle, asset_library) + asset_library_ref = context.asset_library_ref + asset_lib_path = bpy.types.AssetHandle.get_full_library_path(asset_file_handle, asset_library_ref) if asset_file_handle.local_id: # If the active file is an ID, use its name directly so renaming is possible from right here. -- cgit v1.2.3