Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2021-07-20 22:18:10 +0300
committerJulian Eisel <julian@blender.org>2021-07-20 22:30:04 +0300
commit0af08cea40964b69a48a2be773aeb22304d2b46f (patch)
tree97770d957d9416ef0f215f9b55798270c372beb1 /source/blender/editors/interface
parente99801390c7a2b947fb447715409278d366f176a (diff)
Cleanup: Use asset utility function to get the asset .blend path
For this to work, the utility function needs to be callable without context, which is only needed for a File Browser specific hack anyway (doesn't apply to this usage of it).
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r--source/blender/editors/interface/interface_template_asset_view.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/editors/interface/interface_template_asset_view.cc b/source/blender/editors/interface/interface_template_asset_view.cc
index 1d8420718bb..6fa5300401a 100644
--- a/source/blender/editors/interface/interface_template_asset_view.cc
+++ b/source/blender/editors/interface/interface_template_asset_view.cc
@@ -58,12 +58,10 @@ static void asset_view_item_but_drag_set(uiBut *but,
return;
}
- const blender::StringRef asset_list_path = ED_assetlist_library_path(&list_data->asset_library);
char blend_path[FILE_MAX_LIBEXTRA];
+ ED_asset_handle_get_full_library_path(NULL, &list_data->asset_library, asset_handle, blend_path);
- char path[FILE_MAX_LIBEXTRA];
- BLI_join_dirfile(path, sizeof(path), asset_list_path.data(), asset_handle->file_data->relpath);
- if (BLO_library_path_explode(path, blend_path, nullptr, nullptr)) {
+ if (blend_path[0]) {
ImBuf *imbuf = ED_assetlist_asset_image_get(asset_handle);
UI_but_drag_set_asset(but,
asset_handle->file_data->name,