Assets: Get asset path via new identifier (not via file browser hacks)
With the asset identifier introduced in the previous commit, we can now locate an asset just from its `AssetRepresentation`, without requiring information from the asset library and the file browser storage. With this we can remove some hacks and function parameters. A RNA/BPY function is also affected, but I didn't remove the paramter to keep compatibility. It's simply ignored and not required anymore, noted this in the parameter description (noted for T102877).
This commit is contained in:
@@ -27,9 +27,7 @@ struct AssetMetaData *ED_asset_handle_get_metadata(const struct AssetHandle *ass
|
||||
struct ID *ED_asset_handle_get_local_id(const struct AssetHandle *asset);
|
||||
ID_Type ED_asset_handle_get_id_type(const struct AssetHandle *asset);
|
||||
int ED_asset_handle_get_preview_icon_id(const struct AssetHandle *asset);
|
||||
void ED_asset_handle_get_full_library_path(const struct bContext *C,
|
||||
const struct AssetLibraryReference *asset_library_ref,
|
||||
const struct AssetHandle *asset,
|
||||
void ED_asset_handle_get_full_library_path(const struct AssetHandle *asset,
|
||||
char r_full_lib_path[]);
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -41,9 +39,7 @@ void ED_asset_handle_get_full_library_path(const struct bContext *C,
|
||||
namespace blender::ed::asset {
|
||||
|
||||
/** If the ID already exists in the database, return it, otherwise add it. */
|
||||
ID *get_local_id_from_asset_or_append_and_reuse(Main &bmain,
|
||||
const AssetLibraryReference &library_ref,
|
||||
AssetHandle asset);
|
||||
ID *get_local_id_from_asset_or_append_and_reuse(Main &bmain, AssetHandle asset);
|
||||
|
||||
} // namespace blender::ed::asset
|
||||
|
||||
|
||||
Reference in New Issue
Block a user