Cleanup: Assets: Remove now unused AssetHandle type

`AssetHandle` was a hacky design solution that was never meant to be
permanent. `AssetRepresentation` is a better designed type superseding
it. A lot of work was put into relying less and less on `AssetHandle`,
now it's finally unused.

Final step for #108806.
This commit is contained in:
Julian Eisel
2025-06-12 17:07:11 +02:00
parent fbd8d30d63
commit 6c5590ebeb
2 changed files with 0 additions and 24 deletions

View File

@@ -10,7 +10,6 @@
#include "BLI_function_ref.hh"
struct AssetHandle;
struct AssetLibraryReference;
struct bContext;
struct ID;
@@ -39,12 +38,6 @@ asset_system::AssetLibrary *library_get_once_available(
/** Can return false to stop iterating. */
using AssetListIterFn = FunctionRef<bool(asset_system::AssetRepresentation &)>;
/**
* \note This override avoids the file caching system, so it's more performant and avoids pitfalls
* from the other override. Prefer this when access to #AssetRepresentation is enough, and no
* #AssetHandle is needed.
*/
void iterate(const AssetLibraryReference &library_reference, AssetListIterFn fn);
/**

View File

@@ -197,23 +197,6 @@ typedef struct AssetWeakReference {
#endif
} AssetWeakReference;
/**
* To be replaced by #AssetRepresentation!
*
* Not part of the core design, we should try to get rid of it. Only needed to wrap FileDirEntry
* into a type with PropertyGroup as base, so we can have an RNA collection of #AssetHandle's to
* pass to the UI.
*
* \warning Never store this! When using #blender::ed::asset::list::iterate(), only access it
* within the iterator function. The contained file data can be freed since the file cache has a
* maximum number of items.
*/
#
#
typedef struct AssetHandle {
const struct FileDirEntry *file_data;
} AssetHandle;
struct AssetCatalogPathLink {
struct AssetCatalogPathLink *next, *prev;
char *path;