|
Blender
V2.93
|
#include <math.h>#include <stdlib.h>#include <string.h>#include <sys/stat.h>#include <time.h>#include <unistd.h>#include "MEM_guardedalloc.h"#include "BLI_blenlib.h"#include "BLI_fileops.h"#include "BLI_fileops_types.h"#include "BLI_fnmatch.h"#include "BLI_ghash.h"#include "BLI_linklist.h"#include "BLI_math.h"#include "BLI_stack.h"#include "BLI_task.h"#include "BLI_threads.h"#include "BLI_utildefines.h"#include "BKE_asset.h"#include "BKE_context.h"#include "BKE_global.h"#include "BKE_icons.h"#include "BKE_idtype.h"#include "BKE_lib_id.h"#include "BKE_main.h"#include "BKE_main_idmap.h"#include "BKE_preferences.h"#include "BLO_readfile.h"#include "DNA_asset_types.h"#include "DNA_space_types.h"#include "ED_datafiles.h"#include "ED_fileselect.h"#include "ED_screen.h"#include "IMB_imbuf.h"#include "IMB_imbuf_types.h"#include "IMB_thumbs.h"#include "PIL_time.h"#include "WM_api.h"#include "WM_types.h"#include "UI_interface_icons.h"#include "UI_resources.h"#include "atomic_ops.h"#include "filelist.h"Go to the source code of this file.
Classes | |
| struct | FolderList |
| struct | FileListInternEntry |
| struct | FileListIntern |
| struct | FileListEntryCache |
| struct | FileListEntryPreview |
| struct | FileListEntryPreviewTaskData |
| struct | FileListFilter |
| struct | FileList |
| struct | FileSortData |
| struct | TodoDir |
| struct | FileListReadJob |
Macros | |
| #define | FILEDIR_NBR_ENTRIES_UNSET -1 |
| #define | FILELIST_ENTRYCACHESIZE_DEFAULT 1024 /* Keep it a power of two! */ |
| #define | SPECIAL_IMG_SIZE 256 |
| #define | SPECIAL_IMG_ROWS 1 |
| #define | SPECIAL_IMG_COLS 7 |
Typedefs | |
| typedef struct FolderList | FolderList |
| typedef struct FileListInternEntry | FileListInternEntry |
| typedef struct FileListIntern | FileListIntern |
| typedef struct FileListEntryCache | FileListEntryCache |
| typedef struct FileListEntryPreview | FileListEntryPreview |
| typedef struct FileListEntryPreviewTaskData | FileListEntryPreviewTaskData |
| typedef struct FileListFilter | FileListFilter |
| typedef struct FileList | FileList |
| typedef struct TodoDir | TodoDir |
| typedef struct FileListReadJob | FileListReadJob |
Enumerations | |
| enum | { FLC_IS_INIT = 1 << 0 , FLC_PREVIEWS_ACTIVE = 1 << 1 } |
| 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_IS_READY = 1 << 1 , FL_IS_PENDING = 1 << 2 , FL_NEED_SORTING = 1 << 3 , FL_NEED_FILTERING = 1 << 4 , FL_SORT_INVERT = 1 << 5 } |
| enum | FileListTags { FILELIST_TAGS_USES_MAIN_DATA = (1 << 0) , FILELIST_TAGS_NO_THREADS = (1 << 2) } |
| enum | { SPECIAL_IMG_DOCUMENT = 0 , SPECIAL_IMG_DRIVE_DISC = 1 , SPECIAL_IMG_FOLDER = 2 , SPECIAL_IMG_PARENT = 3 , SPECIAL_IMG_DRIVE_FIXED = 4 , SPECIAL_IMG_DRIVE_ATTACHED = 5 , SPECIAL_IMG_DRIVE_REMOTE = 6 , SPECIAL_IMG_MAX } |
Functions | |
| void | folderlist_popdir (struct ListBase *folderlist, char *dir) |
| void | folderlist_pushdir (ListBase *folderlist, const char *dir) |
| const char * | folderlist_peeklastdir (ListBase *folderlist) |
| int | folderlist_clear_next (struct SpaceFile *sfile) |
| void | folderlist_free (ListBase *folderlist) |
| static ListBase | folderlist_duplicate (ListBase *folderlist) |
| static FileFolderHistory * | folder_history_find (const SpaceFile *sfile, eFileBrowse_Mode browse_mode) |
| void | folder_history_list_ensure_for_active_browse_mode (SpaceFile *sfile) |
| static void | folder_history_entry_free (SpaceFile *sfile, FileFolderHistory *history) |
| void | folder_history_list_free (SpaceFile *sfile) |
| ListBase | folder_history_list_duplicate (ListBase *listbase) |
| static void | filelist_readjob_main (Main *current_main, FileList *filelist, const char *main_name, short *stop, short *do_update, float *progress, ThreadMutex *lock) |
| static void | filelist_readjob_lib (Main *current_main, FileList *filelist, const char *main_name, short *stop, short *do_update, float *progress, ThreadMutex *lock) |
| static void | filelist_readjob_dir (Main *current_main, FileList *filelist, const char *main_name, short *stop, short *do_update, float *progress, ThreadMutex *lock) |
| static void | filelist_readjob_main_assets (Main *current_main, FileList *filelist, const char *main_name, short *stop, short *do_update, float *progress, ThreadMutex *lock) |
| static int | groupname_to_code (const char *group) |
| static uint64_t | groupname_to_filter_id (const char *group) |
| static void | filelist_filter_clear (FileList *filelist) |
| static void | filelist_cache_clear (FileListEntryCache *cache, size_t new_size) |
| static int | compare_apply_inverted (int val, const struct FileSortData *sort_data) |
| static int | compare_direntry_generic (const FileListInternEntry *entry1, const FileListInternEntry *entry2) |
| static int | compare_name (void *user_data, const void *a1, const void *a2) |
| static int | compare_date (void *user_data, const void *a1, const void *a2) |
| static int | compare_size (void *user_data, const void *a1, const void *a2) |
| static int | compare_extension (void *user_data, const void *a1, const void *a2) |
| void | filelist_sort (struct FileList *filelist) |
| void | filelist_setsorting (struct FileList *filelist, const short sort, bool invert_sort) |
| static bool | is_hidden_dot_filename (const char *filename, const FileListInternEntry *file) |
| static bool | is_filtered_hidden (const char *filename, const FileListFilter *filter, const FileListInternEntry *file) |
| static bool | is_filtered_file (FileListInternEntry *file, const char *UNUSED(root), FileListFilter *filter) |
| static bool | is_filtered_id_file (const FileListInternEntry *file, const char *id_group, const char *name, const FileListFilter *filter) |
| static bool | is_filtered_lib (FileListInternEntry *file, const char *root, FileListFilter *filter) |
| static bool | is_filtered_main (FileListInternEntry *file, const char *UNUSED(dir), FileListFilter *filter) |
| static bool | is_filtered_main_assets (FileListInternEntry *file, const char *UNUSED(dir), FileListFilter *filter) |
| void | filelist_filter (FileList *filelist) |
| void | filelist_setfilter_options (FileList *filelist, const bool do_filter, const bool hide_dot, const bool hide_parent, const uint64_t filter, const uint64_t filter_id, const bool filter_assets_only, const char *filter_glob, const char *filter_search) |
| static bool | filelist_compare_asset_libraries (const FileSelectAssetLibraryUID *library_a, const FileSelectAssetLibraryUID *library_b) |
| void | filelist_setlibrary (FileList *filelist, const FileSelectAssetLibraryUID *asset_library) |
| void | filelist_init_icons (void) |
| void | filelist_free_icons (void) |
| static FileDirEntry * | filelist_geticon_get_file (struct FileList *filelist, const int index) |
| ImBuf * | filelist_getimage (struct FileList *filelist, const int index) |
| ImBuf * | filelist_file_getimage (const FileDirEntry *file) |
| static ImBuf * | filelist_geticon_image_ex (FileDirEntry *file) |
| ImBuf * | filelist_geticon_image (struct FileList *filelist, const int index) |
| static int | filelist_geticon_ex (const FileDirEntry *file, const char *root, const bool is_main, const bool ignore_libdir) |
| int | filelist_geticon (struct FileList *filelist, const int index, const bool is_main) |
| int | ED_file_icon (const FileDirEntry *file) |
| static void | parent_dir_until_exists_or_default_root (char *dir) |
| static bool | filelist_checkdir_dir (struct FileList *UNUSED(filelist), char *r_dir, const bool do_change) |
| static bool | filelist_checkdir_lib (struct FileList *UNUSED(filelist), char *r_dir, const bool do_change) |
| static bool | filelist_checkdir_main (struct FileList *filelist, char *r_dir, const bool do_change) |
| static bool | filelist_checkdir_main_assets (struct FileList *UNUSED(filelist), char *UNUSED(r_dir), const bool UNUSED(do_change)) |
| static void | filelist_entry_clear (FileDirEntry *entry) |
| static void | filelist_entry_free (FileDirEntry *entry) |
| static void | filelist_direntryarr_free (FileDirEntryArr *array) |
| static void | filelist_intern_entry_free (FileListInternEntry *entry) |
| static void | filelist_intern_free (FileListIntern *filelist_intern) |
| static void | filelist_cache_preview_runf (TaskPool *__restrict pool, void *taskdata) |
| static void | filelist_cache_preview_freef (TaskPool *__restrict UNUSED(pool), void *taskdata) |
| static void | filelist_cache_preview_ensure_running (FileListEntryCache *cache) |
| static void | filelist_cache_previews_clear (FileListEntryCache *cache) |
| static void | filelist_cache_previews_free (FileListEntryCache *cache) |
| static void | filelist_cache_previews_push (FileList *filelist, FileDirEntry *entry, const int index) |
| static void | filelist_cache_init (FileListEntryCache *cache, size_t cache_size) |
| static void | filelist_cache_free (FileListEntryCache *cache) |
| FileList * | filelist_new (short type) |
| void | filelist_settype (FileList *filelist, short type) |
| void | filelist_clear_ex (struct FileList *filelist, const bool do_cache, const bool do_selection) |
| void | filelist_clear (struct FileList *filelist) |
| void | filelist_free (struct FileList *filelist) |
| void | filelist_freelib (struct FileList *filelist) |
| BlendHandle * | filelist_lib (struct FileList *filelist) |
| static const char * | fileentry_uiname (const char *root, const char *relpath, const eFileSel_File_Types typeflag, char *buff) |
| const char * | filelist_dir (struct FileList *filelist) |
| bool | filelist_is_dir (struct FileList *filelist, const char *path) |
| void | filelist_setdir (struct FileList *filelist, char *r_dir) |
| void | filelist_setrecursion (struct FileList *filelist, const int recursion_level) |
| bool | filelist_needs_force_reset (FileList *filelist) |
| void | filelist_tag_force_reset (FileList *filelist) |
| bool | filelist_is_ready (struct FileList *filelist) |
| bool | filelist_pending (struct FileList *filelist) |
| bool | filelist_needs_reset_on_main_changes (const FileList *filelist) |
| int | filelist_files_ensure (FileList *filelist) |
| static FileDirEntry * | filelist_file_create_entry (FileList *filelist, const int index) |
| static void | filelist_file_release_entry (FileList *filelist, FileDirEntry *entry) |
| FileDirEntry * | filelist_file_ex (struct FileList *filelist, const int index, const bool use_request) |
| FileDirEntry * | filelist_file (struct FileList *filelist, int index) |
| int | filelist_file_findpath (struct FileList *filelist, const char *filename) |
| ID * | filelist_file_get_id (const FileDirEntry *file) |
| FileDirEntry * | filelist_entry_find_uuid (struct FileList *filelist, const int uuid[4]) |
| void | filelist_file_cache_slidingwindow_set (FileList *filelist, size_t window_size) |
| static bool | filelist_file_cache_block_create (FileList *filelist, const int start_index, const int size, int cursor) |
| static void | filelist_file_cache_block_release (struct FileList *filelist, const int size, int cursor) |
| bool | filelist_file_cache_block (struct FileList *filelist, const int index) |
| void | filelist_cache_previews_set (FileList *filelist, const bool use_previews) |
| bool | filelist_cache_previews_update (FileList *filelist) |
| bool | filelist_cache_previews_running (FileList *filelist) |
| static bool | file_is_blend_backup (const char *str) |
| int | ED_path_extension_type (const char *path) |
| int | ED_file_extension_icon (const char *path) |
| int | filelist_needs_reading (struct FileList *filelist) |
| uint | filelist_entry_select_set (const FileList *filelist, const FileDirEntry *entry, FileSelType select, uint flag, FileCheckType check) |
| void | filelist_entry_select_index_set (FileList *filelist, const int index, FileSelType select, uint flag, FileCheckType check) |
| void | filelist_entries_select_index_range_set (FileList *filelist, FileSelection *sel, FileSelType select, uint flag, FileCheckType check) |
| uint | filelist_entry_select_get (FileList *filelist, FileDirEntry *entry, FileCheckType check) |
| uint | filelist_entry_select_index_get (FileList *filelist, const int index, FileCheckType check) |
| bool | filelist_entry_is_selected (FileList *filelist, const int index) |
| void | filelist_entry_parent_select_set (FileList *filelist, FileSelType select, uint flag, FileCheckType check) |
| bool | filelist_islibrary (struct FileList *filelist, char *dir, char **r_group) |
| static int | filelist_readjob_list_dir (const char *root, ListBase *entries, const char *filter_glob, const bool do_lib, const char *main_name, const bool skip_currpar) |
| static int | filelist_readjob_list_lib (const char *root, ListBase *entries, const bool skip_currpar) |
| static void | filelist_readjob_do (const bool do_lib, FileList *filelist, const char *main_name, const short *stop, short *do_update, float *progress, ThreadMutex *lock) |
| static void | filelist_readjob_dir (Main *UNUSED(current_main), FileList *filelist, const char *main_name, short *stop, short *do_update, float *progress, ThreadMutex *lock) |
| static void | filelist_readjob_lib (Main *UNUSED(current_main), FileList *filelist, const char *main_name, short *stop, short *do_update, float *progress, ThreadMutex *lock) |
| static void | filelist_readjob_main_assets (Main *current_main, FileList *filelist, const char *UNUSED(main_name), short *UNUSED(stop), short *do_update, float *UNUSED(progress), ThreadMutex *UNUSED(lock)) |
| static void | filelist_readjob_startjob (void *flrjv, short *stop, short *do_update, float *progress) |
| static void | filelist_readjob_update (void *flrjv) |
| static void | filelist_readjob_endjob (void *flrjv) |
| static void | filelist_readjob_free (void *flrjv) |
| void | filelist_readjob_start (FileList *filelist, const bContext *C) |
| void | filelist_readjob_stop (wmWindowManager *wm, Scene *owner_scene) |
| int | filelist_readjob_running (wmWindowManager *wm, Scene *owner_scene) |
Variables | |
| static ImBuf * | gSpecialFileImages [SPECIAL_IMG_MAX] |
| #define FILEDIR_NBR_ENTRIES_UNSET -1 |
Definition at line 90 of file filelist.c.
| #define FILELIST_ENTRYCACHESIZE_DEFAULT 1024 /* Keep it a power of two! */ |
Definition at line 312 of file filelist.c.
| #define SPECIAL_IMG_COLS 7 |
Definition at line 445 of file filelist.c.
| #define SPECIAL_IMG_ROWS 1 |
Definition at line 444 of file filelist.c.
| #define SPECIAL_IMG_SIZE 256 |
Definition at line 443 of file filelist.c.
| typedef struct FileListEntryCache FileListEntryCache |
| typedef struct FileListEntryPreview FileListEntryPreview |
| typedef struct FileListEntryPreviewTaskData FileListEntryPreviewTaskData |
| typedef struct FileListFilter FileListFilter |
| typedef struct FileListIntern FileListIntern |
| typedef struct FileListInternEntry FileListInternEntry |
| typedef struct FileListReadJob FileListReadJob |
| typedef struct FolderList FolderList |
From here, we are in 'Job Context', i.e. have to be careful about sharing stuff between background working thread. and main one (used by UI among other things).
| anonymous enum |
| Enumerator | |
|---|---|
| FLC_IS_INIT | |
| FLC_PREVIEWS_ACTIVE | |
Definition at line 341 of file filelist.c.
| anonymous enum |
| Enumerator | |
|---|---|
| FLF_DO_FILTER | |
| FLF_HIDE_DOT | |
| FLF_HIDE_PARENT | |
| FLF_HIDE_LIB_DIR | |
| FLF_ASSETS_ONLY | |
Definition at line 372 of file filelist.c.
| anonymous enum |
| Enumerator | |
|---|---|
| FL_FORCE_RESET | |
| FL_IS_READY | |
| FL_IS_PENDING | |
| FL_NEED_SORTING | |
| FL_NEED_FILTERING | |
| FL_SORT_INVERT | |
Definition at line 426 of file filelist.c.
| anonymous enum |
| Enumerator | |
|---|---|
| SPECIAL_IMG_DOCUMENT | |
| SPECIAL_IMG_DRIVE_DISC | |
| SPECIAL_IMG_FOLDER | |
| SPECIAL_IMG_PARENT | |
| SPECIAL_IMG_DRIVE_FIXED | |
| SPECIAL_IMG_DRIVE_ATTACHED | |
| SPECIAL_IMG_DRIVE_REMOTE | |
| SPECIAL_IMG_MAX | |
Definition at line 447 of file filelist.c.
| enum FileListTags |
| 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 436 of file filelist.c.
|
static |
Definition at line 502 of file filelist.c.
References FileSortData::inverted.
Referenced by compare_date(), compare_extension(), compare_name(), and compare_size().
|
static |
Definition at line 580 of file filelist.c.
References BLI_strcasecmp_natural(), compare_apply_inverted(), compare_direntry_generic(), FileListInternEntry::name, ret, FileListInternEntry::st, and user_data.
Referenced by filelist_sort().
|
static |
Handles inverted sorting itself (currently there's nothing to invert), so if this returns non-0, it should be used as-is and not inverted.
Definition at line 511 of file filelist.c.
References FILE_TYPE_BLENDER, FILE_TYPE_BLENDER_BACKUP, FILE_TYPE_BLENDERLIB, FILE_TYPE_DIR, FILENAME_IS_CURRENT, FILENAME_IS_PARENT, FileListInternEntry::relpath, and FileListInternEntry::typeflag.
Referenced by compare_date(), compare_extension(), compare_name(), and compare_size().
|
static |
Definition at line 636 of file filelist.c.
References FileListInternEntry::blentype, BLI_strcasecmp(), BLI_strcasecmp_natural(), compare_apply_inverted(), compare_direntry_generic(), FILE_TYPE_BLENDERLIB, FILE_TYPE_DIR, FileListInternEntry::name, FileListInternEntry::relpath, ret, FileListInternEntry::typeflag, and user_data.
Referenced by filelist_sort().
|
static |
Definition at line 562 of file filelist.c.
References BLI_strcasecmp_natural(), compare_apply_inverted(), compare_direntry_generic(), FileListInternEntry::name, ret, and user_data.
Referenced by filelist_sort().
|
static |
Definition at line 608 of file filelist.c.
References BLI_strcasecmp_natural(), compare_apply_inverted(), compare_direntry_generic(), FileListInternEntry::name, ret, FileListInternEntry::st, and user_data.
Referenced by filelist_sort().
| int ED_file_extension_icon | ( | const char * | path | ) |
Definition at line 2567 of file filelist.c.
References ED_path_extension_type(), FILE_TYPE_ALEMBIC, FILE_TYPE_ARCHIVE, FILE_TYPE_BLENDER, FILE_TYPE_BLENDER_BACKUP, FILE_TYPE_BTX, FILE_TYPE_COLLADA, FILE_TYPE_FTFONT, FILE_TYPE_IMAGE, FILE_TYPE_MOVIE, FILE_TYPE_OBJECT_IO, FILE_TYPE_PYSCRIPT, FILE_TYPE_SOUND, FILE_TYPE_TEXT, FILE_TYPE_VOLUME, and type.
Referenced by ghost_event_proc().
| int ED_file_icon | ( | const FileDirEntry * | file | ) |
Definition at line 1305 of file filelist.c.
References file, filelist_geticon_ex(), and NULL.
| int ED_path_extension_type | ( | const char * | path | ) |
Definition at line 2498 of file filelist.c.
References BLI_path_extension_check(), BLI_path_extension_check_array(), BLI_path_extension_check_n(), BLO_has_bfile_extension(), file_is_blend_backup(), FILE_TYPE_ALEMBIC, FILE_TYPE_APPLICATIONBUNDLE, FILE_TYPE_ARCHIVE, FILE_TYPE_BLENDER, FILE_TYPE_BLENDER_BACKUP, FILE_TYPE_BTX, FILE_TYPE_COLLADA, FILE_TYPE_FTFONT, FILE_TYPE_IMAGE, FILE_TYPE_MOVIE, FILE_TYPE_OBJECT_IO, FILE_TYPE_PYSCRIPT, FILE_TYPE_SOUND, FILE_TYPE_TEXT, FILE_TYPE_USD, FILE_TYPE_VOLUME, imb_ext_audio, imb_ext_image, imb_ext_movie, IMB_isanim(), and NULL.
Referenced by ED_file_extension_icon(), and filelist_readjob_list_dir().
|
static |
Definition at line 2469 of file filelist.c.
References Freestyle::a, BLI_strcasestr(), and str.
Referenced by ED_path_extension_type().
|
static |
Definition at line 1832 of file filelist.c.
References BLI_assert, BLI_join_dirfile(), BLI_path_basename(), BLO_library_path_explode(), FILE_MAX_LIBEXTRA, FILE_TYPE_BLENDERLIB, FILE_TYPE_DIR, and NULL.
Referenced by filelist_readjob_do().
|
static |
Definition at line 1686 of file filelist.c.
References BLI_ghash_clear_ex(), BLI_listbase_clear(), FileListEntryCache::block_center_index, FileListEntryCache::block_cursor, FileListEntryCache::block_end_index, FileListEntryCache::block_entries, FileListEntryCache::block_start_index, FileListEntryCache::cached_entries, copy_vn_i(), filelist_cache_previews_clear(), filelist_entry_free(), ListBase::first, FileListEntryCache::flags, FLC_IS_INIT, MEM_reallocN, FileListEntryCache::misc_entries, FileListEntryCache::misc_entries_indices, FileDirEntry::next, NULL, FileListEntryCache::size, and FileListEntryCache::uuids.
Referenced by filelist_clear_ex(), filelist_file_cache_slidingwindow_set(), and filelist_filter().
|
static |
Definition at line 1662 of file filelist.c.
References BLI_ghash_free(), BLI_listbase_clear(), FileListEntryCache::block_entries, FileListEntryCache::cached_entries, filelist_cache_previews_free(), filelist_entry_free(), ListBase::first, FileListEntryCache::flags, FLC_IS_INIT, MEM_freeN, FileListEntryCache::misc_entries, FileListEntryCache::misc_entries_indices, FileDirEntry::next, NULL, and FileListEntryCache::uuids.
Referenced by filelist_free().
|
static |
Definition at line 1637 of file filelist.c.
References BLI_ghash_new_ex(), BLI_ghash_ptr_new_ex(), BLI_ghashutil_uinthash_v4_cmp(), BLI_ghashutil_uinthash_v4_p, BLI_listbase_clear(), FileListEntryCache::block_center_index, FileListEntryCache::block_cursor, FileListEntryCache::block_end_index, FileListEntryCache::block_entries, FileListEntryCache::block_start_index, FileListEntryCache::cached_entries, copy_vn_i(), FileListEntryCache::flags, FLC_IS_INIT, IMB_thumb_ensure_translations(), MEM_mallocN, FileListEntryCache::misc_cursor, FileListEntryCache::misc_entries, FileListEntryCache::misc_entries_indices, FileListEntryCache::size, and FileListEntryCache::uuids.
Referenced by filelist_new().
|
static |
Definition at line 1553 of file filelist.c.
References BLI_task_pool_create_background(), BLI_thread_queue_init(), IMB_thumb_locks_acquire(), FileListEntryCache::previews_done, FileListEntryCache::previews_pool, and TASK_PRIORITY_LOW.
Referenced by filelist_cache_previews_push().
|
static |
Definition at line 1537 of file filelist.c.
References BKE_icon_delete(), FileListEntryPreview::icon_id, MEM_freeN, NULL, and FileListEntryPreviewTaskData::preview.
Referenced by filelist_cache_previews_push().
|
static |
Definition at line 1478 of file filelist.c.
References atomic_cas_ptr(), BKE_icon_imbuf_create(), BKE_previewimg_is_finished(), BKE_previewimg_to_imbuf(), BLI_assert, BLI_task_pool_user_data(), BLI_thread_queue_push(), FILE_TYPE_BLENDER, FILE_TYPE_BLENDER_BACKUP, FILE_TYPE_BLENDERLIB, FILE_TYPE_FTFONT, FILE_TYPE_IMAGE, FILE_TYPE_MOVIE, FileListEntryPreview::flags, FileListEntryPreview::icon_id, ICON_SIZE_PREVIEW, IMB_thumb_manage(), IMB_thumb_path_lock(), IMB_thumb_path_unlock(), FileListEntryPreview::in_memory_preview, NULL, FileListEntryPreview::path, blender::compositor::pool, FileListEntryPreviewTaskData::preview, FileListEntryCache::previews_done, THB_LARGE, THB_SOURCE_BLEND, THB_SOURCE_FONT, THB_SOURCE_IMAGE, and THB_SOURCE_MOVIE.
Referenced by filelist_cache_previews_push().
|
static |
Definition at line 1563 of file filelist.c.
References BKE_icon_delete(), BLI_task_pool_cancel(), BLI_thread_queue_pop_timeout(), FileListEntryPreview::icon_id, MEM_freeN, FileListEntryCache::previews_done, and FileListEntryCache::previews_pool.
Referenced by filelist_cache_clear(), filelist_cache_previews_free(), and filelist_file_cache_block().
|
static |
Definition at line 1580 of file filelist.c.
References BLI_task_pool_free(), BLI_thread_queue_free(), BLI_thread_queue_nowait(), filelist_cache_previews_clear(), FileListEntryCache::flags, FLC_PREVIEWS_ACTIVE, IMB_thumb_locks_release(), NULL, FileListEntryCache::previews_done, and FileListEntryCache::previews_pool.
Referenced by filelist_cache_free(), and filelist_cache_previews_set().
|
static |
Definition at line 1598 of file filelist.c.
References BLI_assert, BLI_join_dirfile(), BLI_strncpy(), BLI_task_pool_push(), FILE_ENTRY_INVALID_PREVIEW, FILE_MAXDIR, FILE_TYPE_BLENDER, FILE_TYPE_BLENDER_BACKUP, FILE_TYPE_BLENDERLIB, FILE_TYPE_FTFONT, FILE_TYPE_IMAGE, FILE_TYPE_MOVIE, FileList::filelist, FileList::filelist_cache, filelist_cache_preview_ensure_running(), filelist_cache_preview_freef(), filelist_cache_preview_runf(), FileList::filelist_intern, FileListIntern::filtered, FileListEntryCache::flags, FileListEntryPreview::flags, FileDirEntry::flags, FLC_PREVIEWS_ACTIVE, FileListEntryPreview::icon_id, FileListEntryPreview::in_memory_preview, FileListEntryPreview::index, FileListInternEntry::local_data, MEM_mallocN, FileListEntryPreview::path, FileListEntryPreviewTaskData::preview, FileDirEntry::preview_icon_id, FileListInternEntry::preview_image, FileListEntryCache::previews_pool, FileDirEntry::redirection_path, FileDirEntry::relpath, FileDirEntryArr::root, and FileDirEntry::typeflag.
Referenced by filelist_file_cache_block(), and filelist_file_ex().
| bool filelist_cache_previews_running | ( | FileList * | filelist | ) |
Definition at line 2461 of file filelist.c.
References FileList::filelist_cache, NULL, and FileListEntryCache::previews_pool.
Referenced by file_draw_list().
| void filelist_cache_previews_set | ( | FileList * | filelist, |
| const bool | use_previews | ||
| ) |
Definition at line 2384 of file filelist.c.
References BLI_assert, FileList::filelist_cache, filelist_cache_previews_free(), FL_IS_READY, FileListEntryCache::flags, FileList::flags, FLC_PREVIEWS_ACTIVE, NULL, FileListEntryCache::previews_done, and FileListEntryCache::previews_pool.
Referenced by file_refresh().
| bool filelist_cache_previews_update | ( | FileList * | filelist | ) |
Definition at line 2408 of file filelist.c.
References BKE_icon_delete(), BLI_thread_queue_is_empty(), BLI_thread_queue_pop(), FILE_ENTRY_INVALID_PREVIEW, FileList::filelist_cache, filelist_file_ex(), FileDirEntry::flags, FileListEntryPreview::icon_id, FileListEntryPreview::index, MEM_freeN, blender::compositor::pool, FileDirEntry::preview_icon_id, FileListEntryCache::previews_done, and FileListEntryCache::previews_pool.
Referenced by file_draw_list(), file_listener(), and filelist_file_cache_block().
|
static |
Definition at line 1324 of file filelist.c.
References BLI_is_dir(), and parent_dir_until_exists_or_default_root().
Referenced by filelist_settype().
|
static |
Definition at line 1335 of file filelist.c.
References BLI_is_dir(), BLI_is_file(), BLO_library_path_explode(), FILE_MAX_LIBEXTRA, is_valid, NULL, and parent_dir_until_exists_or_default_root().
Referenced by filelist_checkdir_main(), and filelist_settype().
|
static |
Definition at line 1354 of file filelist.c.
References filelist_checkdir_lib().
Referenced by filelist_settype().
|
static |
Definition at line 1360 of file filelist.c.
Referenced by filelist_settype().
| void filelist_clear | ( | struct FileList * | filelist | ) |
Definition at line 1791 of file filelist.c.
References filelist_clear_ex().
Referenced by ED_fileselect_clear(), and file_refresh().
| void filelist_clear_ex | ( | struct FileList * | filelist, |
| const bool | do_cache, | ||
| const bool | do_selection | ||
| ) |
Definition at line 1770 of file filelist.c.
References BLI_ghash_clear(), FileList::filelist, FileList::filelist_cache, filelist_cache_clear(), filelist_direntryarr_free(), filelist_filter_clear(), FileList::filelist_intern, filelist_intern_free(), MEM_freeN, NULL, FileList::selection_state, and FileListEntryCache::size.
Referenced by filelist_clear(), filelist_free(), and filelist_readjob_update().
|
static |
Checks two libraries for equality.
Definition at line 1048 of file filelist.c.
References BKE_preferences_asset_library_find_from_index(), FileSelectAssetLibraryUID::custom_library_index, FILE_ASSET_LIBRARY_CUSTOM, NULL, and FileSelectAssetLibraryUID::type.
Referenced by filelist_setlibrary().
| const char* filelist_dir | ( | struct FileList * | filelist | ) |
Definition at line 1863 of file filelist.c.
References FileList::filelist, and FileDirEntryArr::root.
Referenced by ED_file_change_dir_ex(), and file_draw_list().
|
static |
Definition at line 1428 of file filelist.c.
References BLI_assert, BLI_listbase_clear(), BLI_listbase_is_empty(), FILEDIR_NBR_ENTRIES_UNSET, filelist_entry_free(), and FileDirEntry::next.
Referenced by filelist_clear_ex().
| void filelist_entries_select_index_range_set | ( | FileList * | filelist, |
| FileSelection * | sel, | ||
| FileSelType | select, | ||
| uint | flag, | ||
| FileCheckType | check | ||
| ) |
Definition at line 2666 of file filelist.c.
References FileList::filelist, filelist_entry_select_index_set(), FileSelection::first, FileSelection::last, FileDirEntryArr::nbr_entries_filtered, and select().
Referenced by file_box_select_modal(), file_deselect_all(), file_select(), file_select_all_exec(), and file_walk_select_selection_set().
|
static |
Definition at line 1368 of file filelist.c.
References BKE_icon_delete(), BLI_freelistN(), BLI_listbase_is_empty(), FileDirEntryRevision::comment, FileDirEntryVariant::description, FileDirEntry::description, FileDirEntry::entry, FILE_ENTRY_NAME_FREE, ListBase::first, FileDirEntry::flags, MEM_freeN, FileDirEntryVariant::name, FileDirEntry::name, FileDirEntryRevision::next, FileDirEntryVariant::next, FileDirEntry::preview_icon_id, FileDirEntry::redirection_path, FileDirEntry::relpath, FileDirEntryVariant::revisions, and FileDirEntry::variants.
Referenced by filelist_entry_free().
| FileDirEntry* filelist_entry_find_uuid | ( | struct FileList * | filelist, |
| const int | uuid[4] | ||
| ) |
Definition at line 2076 of file filelist.c.
References BLI_ghash_lookup(), FILEDIR_NBR_ENTRIES_UNSET, FileList::filelist, FileList::filelist_cache, filelist_file(), FileList::filelist_intern, FileListIntern::filtered, FileDirEntryArr::nbr_entries_filtered, NULL, FileListInternEntry::uuid, and FileListEntryCache::uuids.
|
static |
Definition at line 1422 of file filelist.c.
References filelist_entry_clear(), and MEM_freeN.
Referenced by filelist_cache_clear(), filelist_cache_free(), filelist_direntryarr_free(), and filelist_file_release_entry().
| bool filelist_entry_is_selected | ( | FileList * | filelist, |
| const int | index | ||
| ) |
Definition at line 2704 of file filelist.c.
References BLI_assert, BLI_ghash_lookup(), FileList::filelist_intern, FileListIntern::filtered, POINTER_AS_UINT, FileList::selection_state, and FileListInternEntry::uuid.
Referenced by file_current_selection_range_get().
| void filelist_entry_parent_select_set | ( | FileList * | filelist, |
| FileSelType | select, | ||
| uint | flag, | ||
| FileCheckType | check | ||
| ) |
Set selection of the '..' parent entry, but only if it's actually visible.
Definition at line 2720 of file filelist.c.
References filelist_entry_select_index_set(), FileList::filter_data, FileListFilter::flags, FLF_HIDE_PARENT, and select().
Referenced by file_box_select_exec(), file_select_invoke(), and file_walk_select_selection_set().
| uint filelist_entry_select_get | ( | FileList * | filelist, |
| FileDirEntry * | entry, | ||
| FileCheckType | check | ||
| ) |
Definition at line 2679 of file filelist.c.
References BLI_assert, BLI_ghash_lookup(), CHECK_ALL, CHECK_DIRS, CHECK_FILES, ELEM, FILE_TYPE_DIR, POINTER_AS_UINT, FileList::selection_state, FileDirEntry::typeflag, and FileDirEntry::uuid.
Referenced by file_draw_list(), file_rename_state_activate(), and filelist_entry_select_index_get().
| uint filelist_entry_select_index_get | ( | FileList * | filelist, |
| const int | index, | ||
| FileCheckType | check | ||
| ) |
Definition at line 2693 of file filelist.c.
References filelist_entry_select_get(), and filelist_file().
Referenced by file_delete_exec(), file_delete_poll(), file_exec(), file_is_any_selected(), file_select(), file_select_all_exec(), file_selection_get(), file_sfile_to_operator_ex(), file_smoothscroll_invoke(), and file_walk_select_selection_set().
| void filelist_entry_select_index_set | ( | FileList * | filelist, |
| const int | index, | ||
| FileSelType | select, | ||
| uint | flag, | ||
| FileCheckType | check | ||
| ) |
Definition at line 2656 of file filelist.c.
References filelist_entry_select_set(), filelist_file(), and select().
Referenced by file_rename_state_activate(), file_walk_select_selection_set(), filelist_entries_select_index_range_set(), and filelist_entry_parent_select_set().
| uint filelist_entry_select_set | ( | const FileList * | filelist, |
| const FileDirEntry * | entry, | ||
| FileSelType | select, | ||
| uint | flag, | ||
| FileCheckType | check | ||
| ) |
Definition at line 2608 of file filelist.c.
References BLI_assert, BLI_ghash_insert(), BLI_ghash_lookup_p(), BLI_ghash_remove(), CHECK_ALL, CHECK_DIRS, CHECK_FILES, ELEM, FILE_SEL_ADD, FILE_SEL_REMOVE, FILE_SEL_TOGGLE, FILE_TYPE_DIR, MEM_freeN, MEM_mallocN, NULL, POINTER_AS_UINT, POINTER_FROM_UINT, select(), FileList::selection_state, FileDirEntry::typeflag, and FileDirEntry::uuid.
Referenced by ED_fileselect_activate_by_id(), file_box_select_modal(), file_draw_list(), file_params_renamefile_activate(), file_select_match(), and filelist_entry_select_index_set().
| FileDirEntry* filelist_file | ( | struct FileList * | filelist, |
| int | index | ||
| ) |
Definition at line 2041 of file filelist.c.
References filelist_file_ex().
Referenced by autocomplete_file(), ED_fileselect_active_asset_get(), file_box_select_modal(), file_context(), file_delete_exec(), file_draw_list(), file_exec(), file_params_renamefile_activate(), file_rename_state_activate(), file_select_do(), file_select_match(), file_sfile_to_operator_ex(), filelist_entry_find_uuid(), filelist_entry_select_index_get(), filelist_entry_select_index_set(), filelist_geticon_get_file(), and fileselect_file_set().
| bool filelist_file_cache_block | ( | struct FileList * | filelist, |
| const int | index | ||
| ) |
Definition at line 2172 of file filelist.c.
References BLI_assert, FileListEntryCache::block_center_index, FileListEntryCache::block_cursor, FileListEntryCache::block_end_index, FileListEntryCache::block_entries, FileListEntryCache::block_start_index, FileList::filelist, FileList::filelist_cache, filelist_cache_previews_clear(), filelist_cache_previews_push(), filelist_cache_previews_update(), filelist_file_cache_block_create(), filelist_file_cache_block_release(), FL_IS_READY, FileListEntryCache::flags, FileList::flags, FLC_PREVIEWS_ACTIVE, max_ii(), min_ii(), FileDirEntryArr::nbr_entries_filtered, and FileListEntryCache::size.
Referenced by file_draw_list().
|
static |
Definition at line 2120 of file filelist.c.
References BLI_ghash_insert(), BLI_ghash_popkey(), FileListEntryCache::block_entries, FileList::filelist_cache, filelist_file_create_entry(), FileListEntryCache::misc_entries, NULL, POINTER_FROM_INT, size(), FileDirEntry::uuid, and FileListEntryCache::uuids.
Referenced by filelist_file_cache_block().
|
static |
Definition at line 2146 of file filelist.c.
References BLI_ghash_remove(), FileListEntryCache::block_entries, FileList::filelist_cache, filelist_file_release_entry(), NULL, size(), FileDirEntry::uuid, and FileListEntryCache::uuids.
Referenced by filelist_file_cache_block().
| void filelist_file_cache_slidingwindow_set | ( | FileList * | filelist, |
| size_t | window_size | ||
| ) |
Definition at line 2103 of file filelist.c.
References FileList::filelist_cache, filelist_cache_clear(), size(), and FileListEntryCache::size.
Referenced by file_draw_list().
|
static |
Definition at line 1941 of file filelist.c.
References FileListInternEntry::attributes, BKE_icon_imbuf_create(), BKE_previewimg_is_finished(), BKE_previewimg_to_imbuf(), FileListInternEntry::blentype, BLI_addtail(), BLI_strdup(), BLI_strdupcat(), FileListEntryCache::cached_entries, FILE_ENTRY_NAME_FREE, FileList::filelist, FileList::filelist_cache, FileList::filelist_intern, FileListIntern::filtered, FileListInternEntry::free_name, ICON_SIZE_PREVIEW, FileListInternEntry::id, FileListInternEntry::imported_asset_data, FileListInternEntry::local_data, MEM_callocN, FileListInternEntry::name, NULL, FileListInternEntry::preview_image, FileListInternEntry::redirection_path, FileListInternEntry::relpath, ret, FileDirEntryArr::root, FileDirEntryRevision::size, FileListInternEntry::st, FileDirEntryRevision::time, FileListInternEntry::typeflag, and FileListInternEntry::uuid.
Referenced by filelist_file_cache_block_create(), and filelist_file_ex().
| FileDirEntry* filelist_file_ex | ( | struct FileList * | filelist, |
| const int | index, | ||
| const bool | use_request | ||
| ) |
Definition at line 1993 of file filelist.c.
References BLI_ghash_insert(), BLI_ghash_lookup(), BLI_ghash_popkey(), BLI_ghash_remove(), FileListEntryCache::block_cursor, FileListEntryCache::block_entries, FileListEntryCache::block_start_index, FileList::filelist, FileList::filelist_cache, filelist_cache_previews_push(), filelist_file_create_entry(), filelist_file_release_entry(), FileListEntryCache::misc_cursor, FileListEntryCache::misc_entries, FileListEntryCache::misc_entries_indices, FileDirEntryArr::nbr_entries_filtered, NULL, POINTER_FROM_INT, FileListEntryCache::previews_pool, ret, FileListEntryCache::size, and FileListEntryCache::uuids.
Referenced by ED_fileselect_activate_by_id(), filelist_cache_previews_update(), and filelist_file().
| int filelist_file_findpath | ( | struct FileList * | filelist, |
| const char * | filename | ||
| ) |
Definition at line 2046 of file filelist.c.
References FILEDIR_NBR_ENTRIES_UNSET, FileList::filelist, FileList::filelist_intern, FileListIntern::filtered, FileDirEntryArr::nbr_entries_filtered, FileListInternEntry::relpath, and STREQ.
Referenced by file_params_renamefile_activate().
| ID* filelist_file_get_id | ( | const FileDirEntry * | file | ) |
Get the ID a file represents (if any). For FILE_MAIN, FILE_MAIN_ASSET.
Definition at line 2071 of file filelist.c.
References file.
Referenced by ED_fileselect_activate_by_id(), ED_fileselect_active_asset_get(), file_context(), file_delete_single(), file_draw_icon(), and file_draw_preview().
| ImBuf* filelist_file_getimage | ( | const FileDirEntry * | file | ) |
Definition at line 1152 of file filelist.c.
References BKE_icon_imbuf_get_buffer(), file, and NULL.
Referenced by file_draw_icon().
|
static |
Definition at line 1987 of file filelist.c.
References BLI_remlink(), FileListEntryCache::cached_entries, FileList::filelist_cache, and filelist_entry_free().
Referenced by filelist_file_cache_block_release(), and filelist_file_ex().
| int filelist_files_ensure | ( | FileList * | filelist | ) |
Limited version of full update done by space_file's file_refresh(), to be used by operators and such. Ensures given filelist is ready to be used (i.e. it is filtered and sorted), unless it is tagged for a full refresh.
Definition at line 1931 of file filelist.c.
References FileList::filelist, filelist_filter(), filelist_needs_force_reset(), filelist_needs_reading(), filelist_sort(), and FileDirEntryArr::nbr_entries_filtered.
Referenced by autocomplete_file(), ED_fileselect_activate_by_id(), ED_fileselect_init_layout(), file_current_selection_range_get(), file_delete_exec(), file_delete_poll(), file_deselect_all(), file_draw_list(), file_exec(), file_highlight_set(), file_is_any_selected(), file_rename_state_activate(), file_select_all_exec(), file_select_do(), file_select_invoke(), file_select_match(), file_selection_get(), file_sfile_to_operator_ex(), file_smoothscroll_invoke(), and file_walk_select_do().
| void filelist_filter | ( | FileList * | filelist | ) |
Definition at line 937 of file filelist.c.
References ELEM, FileListIntern::entries, file, FILE_MAX_LIBEXTRA, FILEDIR_NBR_ENTRIES_UNSET, FileList::filelist, FileList::filelist_cache, filelist_cache_clear(), FileList::filelist_intern, filelist_islibrary(), FileList::filter_data, FileList::filter_fn, FileListIntern::filtered, ListBase::first, FL_NEED_FILTERING, FileListFilter::flags, FileList::flags, FLF_HIDE_LIB_DIR, FileList::max_recursion, MEM_freeN, MEM_mallocN, FileDirEntryArr::nbr_entries, FileDirEntryArr::nbr_entries_filtered, NULL, FileDirEntryArr::root, and FileListEntryCache::size.
Referenced by file_refresh(), and filelist_files_ensure().
|
static |
Definition at line 932 of file filelist.c.
References FL_NEED_FILTERING, and FileList::flags.
Referenced by filelist_clear_ex(), filelist_setfilter_options(), and filelist_sort().
| void filelist_free | ( | struct FileList * | filelist | ) |
Definition at line 1796 of file filelist.c.
References FileList::asset_library, BLI_ghash_free(), FileList::filelist_cache, filelist_cache_free(), filelist_clear_ex(), FileList::filter_data, FL_NEED_FILTERING, FL_NEED_SORTING, FileList::flags, MEM_freeN, MEM_SAFE_FREE, NULL, and FileList::selection_state.
Referenced by ED_fileselect_exit(), file_free(), and filelist_readjob_free().
| void filelist_free_icons | ( | void | ) |
Definition at line 1128 of file filelist.c.
References BLI_assert, G, gSpecialFileImages, IMB_freeImBuf(), NULL, and SPECIAL_IMG_MAX.
Referenced by ED_file_exit().
| void filelist_freelib | ( | struct FileList * | filelist | ) |
Definition at line 1819 of file filelist.c.
References BLO_blendhandle_close(), FileList::libfiledata, and NULL.
Referenced by ED_fileselect_clear(), file_free(), and filelist_readjob_free().
| int filelist_geticon | ( | struct FileList * | filelist, |
| const int | index, | ||
| const bool | is_main | ||
| ) |
Definition at line 1298 of file filelist.c.
References file, FileList::filelist, filelist_geticon_ex(), filelist_geticon_get_file(), and FileDirEntryArr::root.
Referenced by file_draw_list().
|
static |
Definition at line 1182 of file filelist.c.
References ARRAY_SIZE, BLI_join_dirfile(), BLI_path_slash_ensure(), ED_fsmenu_get(), ED_fsmenu_get_category(), file, FILE_ATTR_ANY_LINK, FILE_ATTR_OFFLINE, FILE_ATTR_SYSTEM, FILE_ATTR_TEMPORARY, FILE_MAX_LIBEXTRA, FILE_TYPE_ALEMBIC, FILE_TYPE_APPLICATIONBUNDLE, FILE_TYPE_ARCHIVE, FILE_TYPE_BLENDER, FILE_TYPE_BLENDER_BACKUP, FILE_TYPE_BLENDERLIB, FILE_TYPE_BTX, FILE_TYPE_COLLADA, FILE_TYPE_DIR, FILE_TYPE_FTFONT, FILE_TYPE_IMAGE, FILE_TYPE_MOVIE, FILE_TYPE_OBJECT_IO, FILE_TYPE_PYSCRIPT, FILE_TYPE_SOUND, FILE_TYPE_TEXT, FILE_TYPE_USD, FILE_TYPE_VOLUME, FILENAME_IS_PARENT, FS_CATEGORY_OTHER, FS_CATEGORY_SYSTEM, FS_CATEGORY_SYSTEM_BOOKMARKS, FSMenuEntry::icon, FSMenuEntry::next, FSMenuEntry::path, ret, STREQ, and UI_icon_from_idcode().
Referenced by ED_file_icon(), and filelist_geticon().
|
static |
Definition at line 1138 of file filelist.c.
References BLI_assert, filelist_file(), and G.
Referenced by filelist_geticon(), filelist_geticon_image(), and filelist_getimage().
Definition at line 1176 of file filelist.c.
References file, filelist_geticon_get_file(), and filelist_geticon_image_ex().
Referenced by file_draw_list().
|
static |
Definition at line 1157 of file filelist.c.
References file, FILE_TYPE_DIR, FILENAME_IS_PARENT, gSpecialFileImages, NULL, SPECIAL_IMG_DOCUMENT, SPECIAL_IMG_FOLDER, and SPECIAL_IMG_PARENT.
Referenced by filelist_geticon_image().
Definition at line 1145 of file filelist.c.
References BKE_icon_imbuf_get_buffer(), file, filelist_geticon_get_file(), and NULL.
Referenced by file_draw_list().
| void filelist_init_icons | ( | void | ) |
Definition at line 1094 of file filelist.c.
References BLI_assert, datatoc_prvicons_png, datatoc_prvicons_png_size, G, gSpecialFileImages, IB_rect, IMB_allocImBuf(), IMB_freeImBuf(), IMB_ibImageFromMemory(), NULL, ImBuf::rect, SPECIAL_IMG_COLS, SPECIAL_IMG_MAX, SPECIAL_IMG_ROWS, SPECIAL_IMG_SIZE, x, and y.
Referenced by ED_file_init().
|
static |
Definition at line 1447 of file filelist.c.
References BKE_asset_metadata_free(), FileListInternEntry::free_name, FileListInternEntry::imported_asset_data, MEM_freeN, FileListInternEntry::name, FileListInternEntry::redirection_path, and FileListInternEntry::relpath.
Referenced by filelist_intern_free().
|
static |
Definition at line 1465 of file filelist.c.
References BLI_listbase_clear(), FileListIntern::entries, filelist_intern_entry_free(), FileListIntern::filtered, ListBase::first, MEM_SAFE_FREE, and FileListInternEntry::next.
Referenced by filelist_clear_ex().
| bool filelist_is_dir | ( | struct FileList * | filelist, |
| const char * | path | ||
| ) |
Definition at line 1868 of file filelist.c.
References FileList::check_dir_fn.
Referenced by ED_file_change_dir_ex(), file_directory_enter_handle(), file_draw_hint_if_invalid(), file_filename_enter_handle(), and filelist_readjob_start().
| bool filelist_is_ready | ( | struct FileList * | filelist | ) |
Definition at line 1910 of file filelist.c.
References FL_IS_READY, and FileList::flags.
Referenced by file_params_renamefile_activate(), and file_smoothscroll_invoke().
| bool filelist_islibrary | ( | struct FileList * | filelist, |
| char * | dir, | ||
| char ** | r_group | ||
| ) |
Definition at line 2731 of file filelist.c.
References BLO_library_path_explode(), FileList::filelist, NULL, and FileDirEntryArr::root.
Referenced by file_delete_poll(), and filelist_filter().
| BlendHandle* filelist_lib | ( | struct FileList * | filelist | ) |
Definition at line 1827 of file filelist.c.
References FileList::libfiledata.
Referenced by ED_file_path_button().
| bool filelist_needs_force_reset | ( | FileList * | filelist | ) |
Definition at line 1900 of file filelist.c.
References FL_FORCE_RESET, and FileList::flags.
Referenced by ED_fileselect_activate_by_id(), file_refresh(), and filelist_files_ensure().
| int filelist_needs_reading | ( | struct FileList * | filelist | ) |
Definition at line 2603 of file filelist.c.
References FILEDIR_NBR_ENTRIES_UNSET, FileList::filelist, and FileDirEntryArr::nbr_entries.
Referenced by file_main_region_needs_refresh_before_draw(), file_refresh(), and filelist_files_ensure().
| bool filelist_needs_reset_on_main_changes | ( | const FileList * | filelist | ) |
Definition at line 1920 of file filelist.c.
References FILELIST_TAGS_USES_MAIN_DATA, and FileList::tags.
Referenced by file_main_region_needs_refresh_before_draw(), file_refresh(), and file_reset_filelist_showing_main_data().
| FileList* filelist_new | ( | short | type | ) |
Definition at line 1721 of file filelist.c.
References BLI_ghash_new(), BLI_ghashutil_uinthash_v4_cmp(), BLI_ghashutil_uinthash_v4_p, FILEDIR_NBR_ENTRIES_UNSET, FileList::filelist, FileList::filelist_cache, filelist_cache_init(), FILELIST_ENTRYCACHESIZE_DEFAULT, filelist_settype(), MEM_callocN, FileDirEntryArr::nbr_entries, FileList::selection_state, and type.
Referenced by file_duplicate(), and file_refresh().
| bool filelist_pending | ( | struct FileList * | filelist | ) |
Definition at line 1915 of file filelist.c.
References FL_IS_PENDING, and FileList::flags.
Referenced by ED_fileselect_activate_by_id(), and file_refresh().
|
static |
Referenced by filelist_readjob_main(), and filelist_settype().
|
static |
Definition at line 3244 of file filelist.c.
References filelist_readjob_do().
|
static |
Definition at line 3109 of file filelist.c.
References atomic_add_and_fetch_uint32(), BLI_assert, BLI_join_dirfile(), BLI_listbase_is_empty(), BLI_movelisttolist(), BLI_mutex_lock(), BLI_mutex_unlock(), BLI_path_normalize_dir(), BLI_path_rel(), BLI_stack_discard(), BLI_stack_free(), BLI_stack_is_empty(), BLI_stack_new, BLI_stack_peek(), BLI_stack_push_r(), BLI_strdup(), BLI_strncpy(), FileListIntern::curr_uuid, TodoDir::dir, FileDirEntryArr::entries, FILE_MAX_LIBEXTRA, FILE_MAXFILE, FILE_TYPE_BLENDER, FILE_TYPE_BLENDER_BACKUP, FILE_TYPE_DIR, FILEDIR_NBR_ENTRIES_UNSET, fileentry_uiname(), FileList::filelist, FileList::filelist_intern, filelist_readjob_list_dir(), filelist_readjob_list_lib(), FILENAME_IS_CURRPAR, FileList::filter_data, FileListFilter::filter_glob, ListBase::first, float(), FileListInternEntry::free_name, TodoDir::level, FileList::max_recursion, MEM_freeN, FileListInternEntry::name, FileDirEntryArr::nbr_entries, FileListInternEntry::next, FileListInternEntry::relpath, FileDirEntryArr::root, FileListInternEntry::typeflag, and FileListInternEntry::uuid.
Referenced by filelist_readjob_dir(), and filelist_readjob_lib().
|
static |
Definition at line 3413 of file filelist.c.
References FileListReadJob::filelist, filelist_readjob_update(), FL_IS_PENDING, FL_IS_READY, and FileList::flags.
Referenced by filelist_readjob_start().
|
static |
Definition at line 3424 of file filelist.c.
References BLI_assert, BLI_listbase_is_empty(), BLI_mutex_end(), FileDirEntryArr::entries, FileList::filelist, filelist_free(), filelist_freelib(), FileListReadJob::lock, MEM_freeN, FileDirEntryArr::nbr_entries, and FileListReadJob::tmp_filelist.
Referenced by filelist_readjob_start().
|
static |
Referenced by filelist_settype().
|
static |
Definition at line 3255 of file filelist.c.
References filelist_readjob_do().
|
static |
Definition at line 2769 of file filelist.c.
References FileListInternEntry::attributes, BLI_addtail(), BLI_file_alias_target(), BLI_file_attributes(), BLI_filelist_dir_contents(), BLI_filelist_free(), BLI_is_dir(), BLI_join_dirfile(), BLI_path_cmp, BLI_path_extension_check_glob(), BLI_path_extension_replace(), BLI_path_slash_ensure(), BLO_has_bfile_extension(), ED_path_extension_type(), FILE_ATTR_ALIAS, FILE_ATTR_HIDDEN, FILE_MAX, FILE_MAXDIR, FILE_TYPE_APPLICATIONBUNDLE, FILE_TYPE_BLENDER, FILE_TYPE_DIR, FILE_TYPE_OPERATOR, FILENAME_IS_CURRPAR, is_hidden_dot_filename(), MEM_callocN, MEM_dupallocN, MEM_freeN, NULL, FileListInternEntry::redirection_path, direntry::relname, FileListInternEntry::relpath, direntry::s, S_ISDIR, FileListInternEntry::st, and FileListInternEntry::typeflag.
Referenced by filelist_readjob_do().
|
static |
Definition at line 2864 of file filelist.c.
References BLODataBlockInfo::asset_data, FileListInternEntry::blentype, BLI_addtail(), BLI_linklist_count(), BLI_linklist_freeN(), BLI_strdup(), BLO_blendhandle_close(), BLO_blendhandle_from_file(), BLO_blendhandle_get_datablock_info(), BLO_blendhandle_get_linkable_groups(), BLO_library_path_explode(), FILE_MAX_LIBEXTRA, FILE_TYPE_ASSET, FILE_TYPE_BLENDERLIB, FILE_TYPE_DIR, FILENAME_PARENT, groupname_to_code(), FileListInternEntry::imported_asset_data, LinkNode::link, MEM_callocN, BLODataBlockInfo::name, names, LinkNode::next, NULL, FileListInternEntry::relpath, and FileListInternEntry::typeflag.
Referenced by filelist_readjob_do().
|
static |
Definition at line 3266 of file filelist.c.
References filelist_readjob_dir().
Referenced by filelist_settype().
|
static |
Referenced by filelist_settype().
|
static |
Definition at line 3281 of file filelist.c.
References ID::asset_data, atomic_add_and_fetch_uint32(), BKE_asset_metadata_preview_get_from_id(), BKE_idtype_idcode_to_name(), FileListInternEntry::blentype, BLI_addtail(), BLI_assert, BLI_listbase_is_empty(), BLI_movelisttolist(), BLI_strdup(), FileListIntern::curr_uuid, FileDirEntryArr::entries, FileDirEntryArr::entry_idx_end, FileDirEntryArr::entry_idx_start, FILE_TYPE_ASSET, FILE_TYPE_BLENDERLIB, FILEDIR_NBR_ENTRIES_UNSET, FileList::filelist, FileList::filelist_intern, FOREACH_MAIN_ID_BEGIN, FOREACH_MAIN_ID_END, FileListInternEntry::free_name, GS, FileListInternEntry::id, FileListInternEntry::local_data, MEM_callocN, FileListInternEntry::name, ID::name, FileDirEntryArr::nbr_entries, FileDirEntryArr::nbr_entries_filtered, FileListInternEntry::preview_image, FileListInternEntry::relpath, FileListInternEntry::typeflag, and FileListInternEntry::uuid.
| int filelist_readjob_running | ( | wmWindowManager * | wm, |
| Scene * | owner_scene | ||
| ) |
Definition at line 3505 of file filelist.c.
References WM_JOB_TYPE_FILESEL_READDIR, and WM_jobs_test().
Definition at line 3445 of file filelist.c.
References BKE_main_blendfile_path(), BLI_mutex_init(), BLI_strncpy(), C, CTX_data_main(), CTX_data_scene(), CTX_wm_manager(), CTX_wm_window(), FileListReadJob::current_main, FileList::filelist, FileListReadJob::filelist, filelist_is_dir(), filelist_readjob_endjob(), filelist_readjob_free(), filelist_readjob_startjob(), filelist_readjob_update(), FILELIST_TAGS_NO_THREADS, FL_FORCE_RESET, FL_IS_PENDING, FL_IS_READY, FileListReadJob::lock, FileListReadJob::main_name, MEM_callocN, NA_JOB_FINISHED, NC_SPACE, ND_SPACE_FILE_LIST, NULL, FileDirEntryArr::root, WM_event_add_notifier(), WM_JOB_PROGRESS, WM_JOB_TYPE_FILESEL_READDIR, WM_jobs_callbacks(), WM_jobs_customdata_set(), WM_jobs_get(), WM_jobs_start(), and WM_jobs_timer().
Referenced by file_refresh().
|
static |
Definition at line 3342 of file filelist.c.
References FileList::asset_library, BLI_assert, BLI_listbase_clear(), BLI_mutex_lock(), BLI_mutex_unlock(), FileListIntern::curr_uuid, FileListReadJob::current_main, FileListIntern::entries, FileDirEntryArr::entries, FILEDIR_NBR_ENTRIES_UNSET, FileList::filelist, FileListReadJob::filelist, FileList::filelist_cache, FileList::filelist_intern, FileListIntern::filtered, FileList::libfiledata, FileListReadJob::lock, FileListReadJob::main_name, MEM_dupallocN, FileDirEntryArr::nbr_entries, NULL, FileList::read_job_fn, FileList::selection_state, and FileListReadJob::tmp_filelist.
Referenced by filelist_readjob_start().
| void filelist_readjob_stop | ( | wmWindowManager * | wm, |
| Scene * | owner_scene | ||
| ) |
Definition at line 3500 of file filelist.c.
References WM_JOB_TYPE_FILESEL_READDIR, and WM_jobs_kill_type().
Referenced by ED_fileselect_clear(), and file_refresh().
|
static |
Definition at line 3380 of file filelist.c.
References BLI_movelisttolist(), BLI_mutex_lock(), BLI_mutex_unlock(), FileListIntern::entries, FileDirEntryArr::entries, FileList::filelist, FileListReadJob::filelist, filelist_clear_ex(), FileList::filelist_intern, FL_NEED_FILTERING, FL_NEED_SORTING, FileList::flags, FileListReadJob::lock, MAX2, FileDirEntryArr::nbr_entries, NULL, and FileListReadJob::tmp_filelist.
Referenced by filelist_readjob_endjob(), and filelist_readjob_start().
| void filelist_setdir | ( | struct FileList * | filelist, |
| char * | r_dir | ||
| ) |
May modify in place given r_dir, which is expected to be FILE_MAX_LIBEXTRA length.
Definition at line 1876 of file filelist.c.
References FileList::asset_library, BKE_main_blendfile_path_from_global(), BLI_assert, BLI_path_normalize_dir(), BLI_strncpy(), FileList::check_dir_fn, FILE_MAX_LIBEXTRA, FileList::filelist, FL_FORCE_RESET, FileList::flags, NULL, FileDirEntryArr::root, STREQ, and UNUSED_VARS_NDEBUG.
Referenced by ED_file_change_dir_ex(), file_duplicate(), and file_refresh().
| void filelist_setfilter_options | ( | FileList * | filelist, |
| const bool | do_filter, | ||
| const bool | hide_dot, | ||
| const bool | hide_parent, | ||
| const uint64_t | filter, | ||
| const uint64_t | filter_id, | ||
| const bool | filter_assets_only, | ||
| const char * | filter_glob, | ||
| const char * | filter_search | ||
| ) |
Definition at line 988 of file filelist.c.
References BLI_strcmp_ignore_pad(), BLI_strncpy(), BLI_strncpy_ensure_pad(), FILE_TYPE_BLENDERLIB, filelist_filter_clear(), FileListFilter::filter, filter(), FileList::filter_data, FileListFilter::filter_glob, FileListFilter::filter_id, FILTER_ID_ALL, FileListFilter::filter_search, FileListFilter::flags, FLF_ASSETS_ONLY, FLF_DO_FILTER, FLF_HIDE_DOT, FLF_HIDE_PARENT, STREQ, and update().
Referenced by file_refresh().
| void filelist_setlibrary | ( | FileList * | filelist, |
| const FileSelectAssetLibraryUID * | asset_library | ||
| ) |
| asset_library | May be NULL to unset the library. |
Definition at line 1068 of file filelist.c.
References FileList::asset_library, filelist_compare_asset_libraries(), FL_FORCE_RESET, FileList::flags, MEM_mallocN, and MEM_SAFE_FREE.
Referenced by file_refresh().
| void filelist_setrecursion | ( | struct FileList * | filelist, |
| const int | recursion_level | ||
| ) |
Definition at line 1892 of file filelist.c.
References FL_FORCE_RESET, FileList::flags, and FileList::max_recursion.
Referenced by file_parent_exec(), file_refresh(), and file_select_do().
| void filelist_setsorting | ( | struct FileList * | filelist, |
| const short | sort, | ||
| bool | invert_sort | ||
| ) |
Definition at line 728 of file filelist.c.
References FL_NEED_SORTING, FL_SORT_INVERT, FileList::flags, sort(), and FileList::sort.
Referenced by file_refresh().
| void filelist_settype | ( | FileList * | filelist, |
| short | type | ||
| ) |
Definition at line 1735 of file filelist.c.
References FileList::check_dir_fn, FILE_LOADLIB, FILE_MAIN, FILE_MAIN_ASSET, filelist_checkdir_dir(), filelist_checkdir_lib(), filelist_checkdir_main(), filelist_checkdir_main_assets(), filelist_readjob_dir(), filelist_readjob_lib(), filelist_readjob_main(), filelist_readjob_main_assets(), FILELIST_TAGS_NO_THREADS, FILELIST_TAGS_USES_MAIN_DATA, FileList::filter_fn, FL_FORCE_RESET, FileList::flags, is_filtered_file(), is_filtered_lib(), is_filtered_main(), is_filtered_main_assets(), FileList::read_job_fn, FileList::tags, FileList::type, and type.
Referenced by file_refresh(), and filelist_new().
| void filelist_sort | ( | struct FileList * | filelist | ) |
Definition at line 695 of file filelist.c.
References BLI_assert, BLI_listbase_sort_r(), compare_date(), compare_extension(), compare_name(), compare_size(), FileListIntern::entries, FILE_SORT_ALPHA, FILE_SORT_DEFAULT, FILE_SORT_EXTENSION, FILE_SORT_SIZE, FILE_SORT_TIME, filelist_filter_clear(), FileList::filelist_intern, FL_NEED_SORTING, FileList::flags, NULL, and FileList::sort.
Referenced by file_refresh(), and filelist_files_ensure().
| void filelist_tag_force_reset | ( | FileList * | filelist | ) |
Definition at line 1905 of file filelist.c.
References FL_FORCE_RESET, and FileList::flags.
Referenced by file_refresh(), and file_tag_reset_list().
|
static |
Definition at line 227 of file filelist.c.
References BLI_freelinkN(), SpaceFile::folder_histories, folderlist_free(), FileFolderHistory::folders_next, SpaceFile::folders_next, FileFolderHistory::folders_prev, SpaceFile::folders_prev, and NULL.
Referenced by folder_history_list_free().
|
static |
Definition at line 202 of file filelist.c.
References SpaceFile::folder_histories, LISTBASE_FOREACH, and NULL.
Referenced by folder_history_list_ensure_for_active_browse_mode().
Definition at line 247 of file filelist.c.
References BLI_addtail(), folderlist_duplicate(), FileFolderHistory::folders_next, FileFolderHistory::folders_prev, LISTBASE_FOREACH, MEM_dupallocN, and NULL.
Referenced by file_duplicate().
| void folder_history_list_ensure_for_active_browse_mode | ( | SpaceFile * | sfile | ) |
Definition at line 213 of file filelist.c.
References BLI_addtail(), FileFolderHistory::browse_mode, SpaceFile::browse_mode, SpaceFile::folder_histories, folder_history_find(), FileFolderHistory::folders_next, SpaceFile::folders_next, FileFolderHistory::folders_prev, SpaceFile::folders_prev, and MEM_callocN.
Referenced by file_refresh(), and fileselect_initialize_params_common().
| void folder_history_list_free | ( | SpaceFile * | sfile | ) |
Definition at line 240 of file filelist.c.
References SpaceFile::folder_histories, folder_history_entry_free(), and LISTBASE_FOREACH_MUTABLE.
Referenced by ED_fileselect_exit(), and file_free().
| int folderlist_clear_next | ( | struct SpaceFile * | sfile | ) |
Definition at line 155 of file filelist.c.
References BLI_listbase_is_empty(), BLI_path_cmp, ED_fileselect_get_active_params(), FolderList::foldername, SpaceFile::folders_next, SpaceFile::folders_prev, ListBase::last, and params.
Referenced by ED_file_change_dir_ex().
Definition at line 188 of file filelist.c.
References BLI_duplicatelist(), ListBase::first, MEM_dupallocN, and NULL.
Referenced by folder_history_list_duplicate().
| void folderlist_free | ( | ListBase * | folderlist | ) |
Definition at line 177 of file filelist.c.
References BLI_freelistN(), ListBase::first, FolderList::foldername, MEM_freeN, and FolderList::next.
Referenced by ED_file_change_dir_ex(), and folder_history_entry_free().
| const char* folderlist_peeklastdir | ( | ListBase * | folderlist | ) |
Definition at line 143 of file filelist.c.
References FolderList::foldername, ListBase::last, and NULL.
Referenced by file_directory_enter_handle().
| void folderlist_popdir | ( | struct ListBase * | folderlist, |
| char * | dir | ||
| ) |
Definition at line 99 of file filelist.c.
References BLI_freelinkN(), BLI_strncpy(), FILE_MAXDIR, FolderList::foldername, ListBase::last, and MEM_freeN.
Referenced by file_next_exec(), and file_previous_exec().
| void folderlist_pushdir | ( | ListBase * | folderlist, |
| const char * | dir | ||
| ) |
Definition at line 119 of file filelist.c.
References BLI_addtail(), BLI_path_cmp, BLI_strdup(), FolderList::foldername, ListBase::last, and MEM_mallocN.
Referenced by ED_file_change_dir_ex(), file_next_exec(), file_previous_exec(), and fileselect_initialize_params_common().
|
static |
Definition at line 2736 of file filelist.c.
References BKE_idtype_idcode_from_name(), BLI_assert, BLI_path_slash_rfind(), BLI_strncpy(), and BLO_GROUP_MAX.
Referenced by filelist_readjob_list_lib(), and groupname_to_filter_id().
|
static |
Definition at line 2752 of file filelist.c.
References BKE_idtype_idcode_to_idfilter(), and groupname_to_code().
Referenced by is_filtered_id_file().
|
static |
Definition at line 816 of file filelist.c.
References file, FILE_TYPE_BLENDER, FILE_TYPE_BLENDER_BACKUP, FILE_TYPE_BLENDERLIB, FILE_TYPE_DIR, FILE_TYPE_FOLDER, FILENAME_IS_CURRPAR, filter(), FLF_DO_FILTER, and is_filtered_hidden().
Referenced by filelist_settype(), and is_filtered_lib().
|
static |
Definition at line 783 of file filelist.c.
References file, FILE_ATTR_HIDDEN, FILE_TYPE_ASSET, FILE_TYPE_BLENDERLIB, FILE_TYPE_DIR, filter(), FLF_ASSETS_ONLY, FLF_HIDE_DOT, FLF_HIDE_PARENT, and is_hidden_dot_filename().
Referenced by is_filtered_file(), is_filtered_id_file(), and is_filtered_main().
|
static |
Definition at line 855 of file filelist.c.
References file, FILE_TYPE_BLENDER, FILE_TYPE_BLENDER_BACKUP, FILE_TYPE_BLENDERLIB, FILE_TYPE_DIR, FILE_TYPE_FOLDER, FILENAME_IS_CURRPAR, filter(), FLF_DO_FILTER, FLF_HIDE_LIB_DIR, groupname_to_filter_id(), and is_filtered_hidden().
Referenced by is_filtered_lib(), and is_filtered_main_assets().
|
static |
Definition at line 900 of file filelist.c.
References BLI_join_dirfile(), BLO_library_path_explode(), file, FILE_MAX_LIBEXTRA, filter(), is_filtered_file(), and is_filtered_id_file().
Referenced by filelist_settype().
|
static |
Definition at line 917 of file filelist.c.
References file, filter(), and is_filtered_hidden().
Referenced by filelist_settype().
|
static |
Definition at line 924 of file filelist.c.
References file, filter(), and is_filtered_id_file().
Referenced by filelist_settype().
|
static |
Definition at line 743 of file filelist.c.
References BLI_assert, BLI_path_slash_rfind(), BLI_strncpy(), ELEM, file, FILE_MAX_LIBEXTRA, and len.
Referenced by filelist_readjob_list_dir(), and is_filtered_hidden().
|
static |
Definition at line 1313 of file filelist.c.
References BLI_path_parent_dir_until_exists(), and BLI_windows_get_default_root_dir().
Referenced by filelist_checkdir_dir(), and filelist_checkdir_lib().
|
static |
Definition at line 458 of file filelist.c.
Referenced by filelist_free_icons(), filelist_geticon_image_ex(), and filelist_init_icons().