Blender V4.3
blender::ed::asset::list::AssetList Class Reference

Inherits blender::NonCopyable.

Public Member Functions

 AssetList ()=delete
 
 AssetList (AssetList &&other)=default
 
 ~AssetList ()=default
 

Asset list API

Internally re-uses FileList from the File Browser. It does all the heavy lifting already.

 AssetList (eFileSelectType filesel_type, const AssetLibraryReference &asset_library_ref)
 
void setup ()
 
void fetch (const bContext &C)
 
void update_previews (const bContext &C)
 
void clear (const bContext *C)
 
AssetHandle asset_get_by_index (int index) const
 
void previews_job_update (const bContext *C)
 
bool needs_refetch () const
 
bool is_loaded () const
 
bool is_asset_preview_loading (const AssetHandle &asset) const
 
void ensure_asset_preview_requested (const bContext &C, AssetHandle &asset)
 
asset_system::AssetLibraryasset_library () const
 
void iterate (AssetListHandleIterFn fn, FunctionRef< bool(asset_system::AssetRepresentation &)> prefilter_fn) const
 
void iterate (AssetListIterFn fn) const
 
int size () const
 
void tag_main_data_dirty () const
 
void remap_id (ID *id_old, ID *id_new) const
 
static bool listen (const wmNotifier &notifier)
 

Detailed Description

Definition at line 102 of file asset_list.cc.

Constructor & Destructor Documentation

◆ AssetList() [1/3]

blender::ed::asset::list::AssetList::AssetList ( )
delete

◆ AssetList() [2/3]

blender::ed::asset::list::AssetList::AssetList ( eFileSelectType filesel_type,
const AssetLibraryReference & asset_library_ref )

Definition at line 136 of file asset_list.cc.

◆ AssetList() [3/3]

blender::ed::asset::list::AssetList::AssetList ( AssetList && other)
default

◆ ~AssetList()

blender::ed::asset::list::AssetList::~AssetList ( )
default

Member Function Documentation

◆ asset_get_by_index()

AssetHandle blender::ed::asset::list::AssetList::asset_get_by_index ( int index) const

Definition at line 311 of file asset_list.cc.

References filelist_file().

◆ asset_library()

asset_system::AssetLibrary * blender::ed::asset::list::AssetList::asset_library ( ) const

Definition at line 228 of file asset_list.cc.

References filelist_asset_library().

◆ clear()

void blender::ed::asset::list::AssetList::clear ( const bContext * C)

◆ ensure_asset_preview_requested()

void blender::ed::asset::list::AssetList::ensure_asset_preview_requested ( const bContext & C,
AssetHandle & asset )

◆ fetch()

◆ is_asset_preview_loading()

bool blender::ed::asset::list::AssetList::is_asset_preview_loading ( const AssetHandle & asset) const

Definition at line 223 of file asset_list.cc.

References AssetHandle::file_data, and filelist_file_is_preview_pending().

◆ is_loaded()

bool blender::ed::asset::list::AssetList::is_loaded ( ) const

Definition at line 206 of file asset_list.cc.

References filelist_is_ready().

◆ iterate() [1/2]

void blender::ed::asset::list::AssetList::iterate ( AssetListHandleIterFn fn,
FunctionRef< bool(asset_system::AssetRepresentation &)> prefilter_fn ) const

◆ iterate() [2/2]

void blender::ed::asset::list::AssetList::iterate ( AssetListIterFn fn) const

◆ listen()

bool blender::ed::asset::list::AssetList::listen ( const wmNotifier & notifier)
static

◆ needs_refetch()

bool blender::ed::asset::list::AssetList::needs_refetch ( ) const

Definition at line 201 of file asset_list.cc.

References filelist_needs_force_reset(), and filelist_needs_reading().

◆ previews_job_update()

◆ remap_id()

void blender::ed::asset::list::AssetList::remap_id ( ID * id_old,
ID * id_new ) const

Definition at line 356 of file asset_list.cc.

References tag_main_data_dirty().

◆ setup()

◆ size()

int blender::ed::asset::list::AssetList::size ( ) const
Returns
The number of assets in the list.

Definition at line 344 of file asset_list.cc.

References filelist_files_ensure().

◆ tag_main_data_dirty()

void blender::ed::asset::list::AssetList::tag_main_data_dirty ( ) const

◆ update_previews()

void blender::ed::asset::list::AssetList::update_previews ( const bContext & C)

The documentation for this class was generated from the following file: