Merge branch 'blender-v4.4-release'
This commit is contained in:
@@ -1008,12 +1008,12 @@ static std::unique_ptr<uiTooltipData> 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();
|
||||
blender::StringRefNull 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;
|
||||
const blender::StringRef title = is_builtin ? TIP_("Built-in Asset") : TIP_("Library");
|
||||
const blender::StringRef lib_path = id->lib->filepath;
|
||||
const blender::StringRef path = is_builtin ? lib_path.substr(assets_path.size()) :
|
||||
id->lib->filepath;
|
||||
UI_tooltip_text_field_add(
|
||||
*data, fmt::format("{}: {}", title, path), {}, UI_TIP_STYLE_NORMAL, UI_TIP_LC_NORMAL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user