Blender V5.0
filelist_intern.hh File Reference
#include <cstdint>
#include <memory>
#include "BLI_fileops.h"
#include "DNA_listBase.h"
#include "DNA_space_enums.h"
#include "DNA_space_types.h"

Go to the source code of this file.

Classes

struct  FileListInternEntry
struct  FileListIntern
struct  FileListEntryCache
struct  FileListEntryPreview
struct  FileListEntryPreviewTaskData
struct  FileListFilter
struct  FileList

Namespaces

namespace  blender
namespace  blender::asset_system
namespace  blender::ed
namespace  blender::ed::asset_browser

Macros

#define FILEDIR_NBR_ENTRIES_UNSET   -1
#define FILELIST_ENTRYCACHESIZE_DEFAULT   1024 /* Keep it a power of two! */

Enumerations

enum  { FLC_PREVIEWS_ACTIVE = 1 << 0 }
enum  {
  FLF_DO_FILTER = 1 << 0 , FLF_HIDE_DOT = 1 << 1 , FLF_HIDE_PARENT = 1 << 2 , FLF_HIDE_LIB_DIR = 1 << 3 ,
  FLF_ASSETS_ONLY = 1 << 4
}
enum  {
  FL_FORCE_RESET = 1 << 0 , FL_FORCE_RESET_MAIN_FILES = 1 << 1 , FL_IS_READY = 1 << 2 , FL_IS_PENDING = 1 << 3 ,
  FL_NEED_SORTING = 1 << 4 , FL_NEED_FILTERING = 1 << 5 , FL_SORT_INVERT = 1 << 6 , FL_RELOAD_ASSET_LIBRARY = 1 << 7
}
enum  FileListTags { FILELIST_TAGS_USES_MAIN_DATA = (1 << 0) , FILELIST_TAGS_NO_THREADS = (1 << 2) }
enum class  SpecialFileImages { Document , Folder , Parent , _Max }

Functions

void filelist_cache_clear (FileListEntryCache *cache, size_t new_size)
bool filelist_intern_entry_is_main_file (const FileListInternEntry *intern_entry)
void prepare_filter_asset_library (const FileList *filelist, FileListFilter *filter)
bool is_filtered_file (FileListInternEntry *file, const char *, FileListFilter *filter)
bool is_filtered_asset (FileListInternEntry *file, FileListFilter *filter)
bool is_filtered_lib (FileListInternEntry *file, const char *root, FileListFilter *filter)
bool is_filtered_main (FileListInternEntry *file, const char *, FileListFilter *filter)
bool is_filtered_main_assets (FileListInternEntry *file, const char *, FileListFilter *filter)
bool is_filtered_asset_library (FileListInternEntry *file, const char *root, FileListFilter *filter)

Macro Definition Documentation

◆ FILEDIR_NBR_ENTRIES_UNSET

◆ FILELIST_ENTRYCACHESIZE_DEFAULT

#define FILELIST_ENTRYCACHESIZE_DEFAULT   1024 /* Keep it a power of two! */

Definition at line 118 of file filelist_intern.hh.

Referenced by FileListEntryCache::FileListEntryCache().

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

FileListFilter.flags

Enumerator
FLF_DO_FILTER 
FLF_HIDE_DOT 
FLF_HIDE_PARENT 
FLF_HIDE_LIB_DIR 
FLF_ASSETS_ONLY 

Definition at line 186 of file filelist_intern.hh.

◆ anonymous enum

anonymous enum

#FileListCache.flags

Enumerator
FLC_PREVIEWS_ACTIVE 

Definition at line 157 of file filelist_intern.hh.

◆ anonymous enum

anonymous enum

FileList.flags

Enumerator
FL_FORCE_RESET 
FL_FORCE_RESET_MAIN_FILES 
FL_IS_READY 
FL_IS_PENDING 
FL_NEED_SORTING 
FL_NEED_FILTERING 
FL_SORT_INVERT 
FL_RELOAD_ASSET_LIBRARY 

Trigger a call to AS_asset_library_load() to update asset catalogs (won't reload the actual assets)

Definition at line 258 of file filelist_intern.hh.

◆ FileListTags

FileList.tags

Enumerator
FILELIST_TAGS_USES_MAIN_DATA 

The file list has references to main data (IDs) and needs special care.

FILELIST_TAGS_NO_THREADS 

The file list type is not thread-safe.

Definition at line 274 of file filelist_intern.hh.

◆ SpecialFileImages

enum class SpecialFileImages
strong
Enumerator
Document 
Folder 
Parent 
_Max 

Definition at line 281 of file filelist_intern.hh.

Function Documentation

◆ filelist_cache_clear()

◆ filelist_intern_entry_is_main_file()

bool filelist_intern_entry_is_main_file ( const FileListInternEntry * intern_entry)

◆ is_filtered_asset()

◆ is_filtered_asset_library()

bool is_filtered_asset_library ( FileListInternEntry * file,
const char * root,
FileListFilter * filter )

◆ is_filtered_file()

bool is_filtered_file ( FileListInternEntry * file,
const char * ,
FileListFilter * filter )
Returns
true when the file should be in the result set, false if it should be filtered out.

Definition at line 119 of file filelist_filter.cc.

References filter, is_filtered_file_name(), is_filtered_file_relpath(), and is_filtered_file_type().

Referenced by filelist_settype().

◆ is_filtered_lib()

bool is_filtered_lib ( FileListInternEntry * file,
const char * root,
FileListFilter * filter )

Definition at line 236 of file filelist_filter.cc.

References filter, is_filtered_file_relpath(), and is_filtered_lib_type().

Referenced by filelist_settype().

◆ is_filtered_main()

bool is_filtered_main ( FileListInternEntry * file,
const char * ,
FileListFilter * filter )

Definition at line 241 of file filelist_filter.cc.

References filter, is_filtered_hidden(), and FileListInternEntry::relpath.

Referenced by filelist_settype().

◆ is_filtered_main_assets()

bool is_filtered_main_assets ( FileListInternEntry * file,
const char * ,
FileListFilter * filter )

◆ prepare_filter_asset_library()

void prepare_filter_asset_library ( const FileList * filelist,
FileListFilter * filter )

Definition at line 163 of file filelist_filter.cc.

References FileList::asset_library, BLI_assert_msg, and filter.

Referenced by filelist_settype().