Blender
V4.3
source
blender
editors
asset
intern
asset_ui_utils.cc
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2024 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9
#include <string>
10
11
#include "
AS_asset_representation.hh
"
12
13
#include "
ED_asset.hh
"
14
15
namespace
blender::ed::asset
{
16
17
std::string
asset_tooltip
(
const
asset_system::AssetRepresentation
&
asset
,
const
bool
include_name)
18
{
19
std::string complete_string;
20
21
if
(include_name) {
22
complete_string +=
asset
.get_name();
23
}
24
25
const
AssetMetaData
&meta_data =
asset
.get_metadata();
26
if
(meta_data.
description
) {
27
complete_string +=
'\n'
;
28
complete_string += meta_data.
description
;
29
}
30
return
complete_string;
31
}
32
33
}
// namespace blender::ed::asset
AS_asset_representation.hh
Main runtime representation of an asset.
ED_asset.hh
blender::asset_system::AssetRepresentation
Definition
AS_asset_representation.hh:34
blender::ed::asset
Definition
ED_asset_catalog.hh:28
blender::ed::asset::asset_tooltip
std::string asset_tooltip(const asset_system::AssetRepresentation &asset, const bool include_name)
Definition
asset_ui_utils.cc:17
AssetMetaData
The meta-data of an asset. By creating and giving this for a data-block (ID.asset_data),...
Definition
DNA_asset_types.h:45
AssetMetaData::description
char * description
Definition
DNA_asset_types.h:69
Generated on Sat Oct 4 2025 05:32:23 for Blender by
doxygen
1.14.0