diff --git a/source/blender/editors/interface/regions/interface_region_tooltip.cc b/source/blender/editors/interface/regions/interface_region_tooltip.cc index 2845d3bc154..7b841aee0cc 100644 --- a/source/blender/editors/interface/regions/interface_region_tooltip.cc +++ b/source/blender/editors/interface/regions/interface_region_tooltip.cc @@ -25,6 +25,8 @@ #include +#include "AS_essentials_library.hh" + #include "MEM_guardedalloc.h" #include "DNA_userdef_types.h" @@ -1004,12 +1006,14 @@ static std::unique_ptr ui_tooltip_data_from_button_or_extra_icon( if (but->rnapoin.owner_id) { const ID *id = but->rnapoin.owner_id; if (ID_IS_LINKED(id)) { + std::string assets_path = blender::asset_system::essentials_directory_path(); + const bool is_builtin = BLI_path_contains(assets_path.c_str(), id->lib->filepath); + const std::string title = is_builtin ? TIP_("Built-in Asset") : TIP_("Library"); + const std::string lib_path = id->lib->filepath; + const std::string path = is_builtin ? lib_path.substr(assets_path.size()) : + id->lib->filepath; UI_tooltip_text_field_add( - *data, - fmt::format(fmt::runtime(TIP_("Library: {}")), id->lib->filepath), - {}, - UI_TIP_STYLE_NORMAL, - UI_TIP_LC_NORMAL); + *data, fmt::format("{}: {}", title, path), {}, UI_TIP_STYLE_NORMAL, UI_TIP_LC_NORMAL); } } }