Blender V5.0
FileListInternEntry Struct Reference

#include <filelist_intern.hh>

Public Member Functions

blender::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< blender::asset_system::AssetRepresentationasset
bool blenderlib_has_no_preview = false
eFileAttributes attributes = eFileAttributes(0)
BLI_stat_t st = {0}

Detailed Description

Definition at line 46 of file filelist_intern.hh.

Member Function Documentation

◆ get_asset()

blender::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 96 of file filelist_intern.hh.

References asset, and BLI_assert.

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

Member Data Documentation

◆ asset

std::weak_ptr<blender::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 83 of file filelist_intern.hh.

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

◆ attributes

◆ blenderlib_has_no_preview

bool FileListInternEntry::blenderlib_has_no_preview = false

◆ blentype

◆ 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 69 of file filelist_intern.hh.

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 59 of file filelist_intern.hh.

Referenced by compare_tiebreaker(), filelist_file_create_entry(), filelist_intern_entry_free(), filelist_readjob_main_assets_add_items(), is_filtered_asset(), is_filtered_file_name(), is_filtered_lib_type(), and is_filtered_main_assets().

◆ next

FileListInternEntry* FileListInternEntry::next = nullptr

Definition at line 47 of file filelist_intern.hh.

◆ prev

FileListInternEntry * FileListInternEntry::prev = nullptr

Definition at line 47 of file filelist_intern.hh.

◆ preview_image

PreviewImage* FileListInternEntry::preview_image = nullptr

◆ redirection_path

char* FileListInternEntry::redirection_path = nullptr

Optional argument for shortcuts, aliases etc.

Definition at line 57 of file filelist_intern.hh.

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

FileUID FileListInternEntry::uid = 0

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