Blender V4.3
FileListInternEntry Struct Reference

Public Member Functions

asset_system::AssetRepresentationget_asset () const
 

Public Attributes

FileListInternEntrynext = nullptr
 
FileListInternEntryprev = nullptr
 
FileUID uid = 0
 
eFileSel_File_Types typeflag = eFileSel_File_Types(0)
 
int blentype = 0
 
char * relpath = nullptr
 
char * redirection_path = nullptr
 
const char * name = nullptr
 
bool free_name = false
 
struct { 
 
   ID *   id = nullptr 
 
   PreviewImage *   preview_image = nullptr 
 
local_data 
 
std::weak_ptr< asset_system::AssetRepresentationasset
 
bool blenderlib_has_no_preview = false
 
eFileAttributes attributes = eFileAttributes(0)
 
BLI_stat_t st = {0}
 

Detailed Description

Definition at line 89 of file filelist.cc.

Member Function Documentation

◆ get_asset()

asset_system::AssetRepresentation * FileListInternEntry::get_asset ( ) const
inline

Be careful not to use the returned asset pointer in a context where it might be dangling, e.g. because the file list or the asset library were destroyed.

Definition at line 139 of file filelist.cc.

References asset, and BLI_assert.

Referenced by compare_asset_catalog(), fileentry_uiname(), filelist_entry_get_asset_representation(), and filelist_file_create_entry().

Member Data Documentation

◆ asset

std::weak_ptr<asset_system::AssetRepresentation> FileListInternEntry::asset

References an asset in the asset library storage. The file list inserts this asset representation into the library, and removes it again when the file list is destructed. In that sense it manages the asset but doesn't own it.

Weak pointer so access is protected in case the asset library gets destructed externally.

Definition at line 126 of file filelist.cc.

Referenced by filelist_intern_entry_free(), filelist_readjob_list_lib_add_datablock(), filelist_readjob_main_assets_add_items(), and get_asset().

◆ attributes

eFileAttributes FileListInternEntry::attributes = eFileAttributes(0)

Defined in BLI_fileops.h

Definition at line 132 of file filelist.cc.

Referenced by filelist_file_create_entry(), and filelist_readjob_list_dir().

◆ blenderlib_has_no_preview

bool FileListInternEntry::blenderlib_has_no_preview = false

◆ blentype

int FileListInternEntry::blentype = 0

◆ free_name

bool FileListInternEntry::free_name = false

◆ id

ID* FileListInternEntry::id = nullptr

When showing local IDs (FILE_MAIN, FILE_MAIN_ASSET), the ID this file entry represents.

Definition at line 112 of file filelist.cc.

Referenced by compare_tiebreaker(), filelist_entry_get_id(), filelist_file_create_entry(), filelist_file_find_id(), filelist_intern_entry_is_main_file(), and filelist_readjob_main_assets_add_items().

◆ [struct]

struct { ... } FileListInternEntry::local_data

This is data from the current main, represented by this file. It's crucial that this is updated correctly on undo, redo and file reading (without UI). The space is responsible to take care of that.

Referenced by compare_tiebreaker(), filelist_cache_previews_push(), filelist_entry_get_id(), filelist_file_create_entry(), filelist_file_find_id(), filelist_intern_entry_is_main_file(), and filelist_readjob_main_assets_add_items().

◆ name

const char* FileListInternEntry::name = nullptr

not strictly needed, but used during sorting, avoids to have to recompute it there...

Definition at line 102 of file filelist.cc.

Referenced by compare_tiebreaker(), filelist_file_create_entry(), filelist_intern_entry_free(), and filelist_readjob_main_assets_add_items().

◆ next

FileListInternEntry* FileListInternEntry::next = nullptr

Definition at line 90 of file filelist.cc.

◆ prev

FileListInternEntry * FileListInternEntry::prev = nullptr

Definition at line 90 of file filelist.cc.

◆ preview_image

PreviewImage* FileListInternEntry::preview_image = nullptr

◆ redirection_path

char* FileListInternEntry::redirection_path = nullptr

Optional argument for shortcuts, aliases etc.

Definition at line 100 of file filelist.cc.

Referenced by filelist_file_create_entry(), filelist_intern_entry_free(), and filelist_readjob_list_dir().

◆ relpath

◆ st

BLI_stat_t FileListInternEntry::st = {0}

◆ typeflag

◆ uid


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