|
Blender V5.0
|
#include "AS_asset_representation.hh"#include "BLI_fnmatch.h"#include "BLI_listbase.h"#include "BLI_path_utils.hh"#include "BLI_string.h"#include "BLI_string_utf8.h"#include "BKE_idtype.hh"#include "../file_intern.hh"#include "../filelist.hh"#include "filelist_intern.hh"Go to the source code of this file.
|
static |
Return whether at least one tag matches the search filter. Tags are searched as "entire words", so instead of searching for "tag" in the filter string, this function searches for " tag ". Assumes the search filter starts and ends with a space.
Here the tags on the asset are written in set notation:
asset_tag_matches_filter(" some tags ", {"some", "blue"}) -> true asset_tag_matches_filter(" some tags ", {"som", "tag"}) -> false asset_tag_matches_filter(" some tags ", {}) -> false
Definition at line 188 of file filelist_filter.cc.
References BLI_strcasestr(), LISTBASE_FOREACH, and AssetMetaData::tags.
Referenced by is_filtered_asset().
|
static |
Get the asset metadata of a file, if it represents an asset. This may either be of a local ID (ID in the current Main) or read from an external asset library.
Definition at line 155 of file filelist_filter.cc.
References FileListInternEntry::get_asset().
Referenced by is_filtered_asset().
| void filelist_filter | ( | FileList * | filelist | ) |
Definition at line 274 of file filelist_filter.cc.
References ELEM, FileListIntern::entries, FileDirEntryArr::entries_filtered_num, FileDirEntryArr::entries_num, 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, FL_NEED_FILTERING, FileList::flags, FileListFilter::flags, FLF_HIDE_LIB_DIR, LISTBASE_FOREACH, FileList::max_recursion, MEM_freeN(), MEM_mallocN(), FileList::prepare_filter_fn, FileDirEntryArr::root, and FileListEntryCache::size.
Referenced by blender::ed::asset::list::AssetList::ensure_blocking(), blender::ed::asset::list::AssetList::fetch(), file_refresh(), and filelist_files_ensure().
| bool filelist_needs_filtering | ( | FileList * | filelist | ) |
Definition at line 269 of file filelist_filter.cc.
References FL_NEED_FILTERING, and FileList::flags.
Referenced by 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 330 of file filelist_filter.cc.
References BLI_strcmp_ignore_pad(), BLI_strncpy_ensure_pad(), FILE_TYPE_BLENDERLIB, filelist_tag_needs_filtering(), 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, STRNCPY_UTF8, and update().
Referenced by file_refresh(), and blender::ed::asset::list::AssetList::setup().
| void filelist_tag_needs_filtering | ( | FileList * | filelist | ) |
Definition at line 264 of file filelist_filter.cc.
References FL_NEED_FILTERING, and FileList::flags.
Referenced by blender::ed::asset_browser::AssetCatalogDropTarget::drop_assets_into_catalog(), filelist_clear_ex(), filelist_clear_main_files(), filelist_set_asset_catalog_filter_options(), filelist_setfilter_options(), and filelist_sort().
| bool is_filtered_asset | ( | FileListInternEntry * | file, |
| FileListFilter * | filter ) |
Definition at line 198 of file filelist_filter.cc.
References asset_tag_matches_filter(), BLI_strcasestr(), filelist_file_internal_get_asset_data(), filter, FileListFilter::filter_search, FileListInternEntry::name, and STRNCPY_RLEN.
Referenced by is_filtered_asset_library(), and is_filtered_main_assets().
| bool is_filtered_asset_library | ( | FileListInternEntry * | file, |
| const char * | root, | ||
| FileListFilter * | filter ) |
Definition at line 255 of file filelist_filter.cc.
References filelist_intern_entry_is_main_file(), filter, is_filtered_asset(), is_filtered_lib_type(), and is_filtered_main_assets().
Referenced by filelist_settype().
| bool is_filtered_file | ( | FileListInternEntry * | file, |
| const char * | , | ||
| FileListFilter * | filter ) |
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().
|
static |
Apply the filter string as matching pattern on file name.
Definition at line 75 of file filelist_filter.cc.
References filter, and FileListInternEntry::name.
Referenced by is_filtered_file().
|
static |
Apply the filter string as file path matching pattern.
Definition at line 61 of file filelist_filter.cc.
References filter, and FileListInternEntry::relpath.
Referenced by is_filtered_file(), and is_filtered_lib().
|
static |
Definition at line 86 of file filelist_filter.cc.
References FILE_TYPE_BLENDER, FILE_TYPE_BLENDER_BACKUP, FILE_TYPE_BLENDERLIB, FILE_TYPE_DIR, FILE_TYPE_FOLDER, FILENAME_IS_CURRPAR, filter, FLF_DO_FILTER, is_filtered_hidden(), FileListInternEntry::relpath, and FileListInternEntry::typeflag.
Referenced by is_filtered_file(), is_filtered_id_file_type(), and is_filtered_lib_type().
|
static |
Definition at line 26 of file filelist_filter.cc.
References FileListInternEntry::attributes, FILE_ATTR_HIDDEN, FILE_TYPE_ASSET, FILE_TYPE_BLENDERLIB, FILE_TYPE_DIR, filter, FLF_ASSETS_ONLY, FLF_HIDE_DOT, FLF_HIDE_PARENT, and FileListInternEntry::typeflag.
Referenced by is_filtered_file_type(), and is_filtered_main().
|
static |
Definition at line 125 of file filelist_filter.cc.
References BKE_idtype_idcode_to_idfilter(), filter, FLF_DO_FILTER, FLF_HIDE_LIB_DIR, is_filtered_file_type(), and name.
Referenced by is_filtered_lib_type(), and is_filtered_main_assets().
| 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().
|
static |
Definition at line 226 of file filelist_filter.cc.
References FileListInternEntry::blentype, FILE_TYPE_BLENDERLIB, filter, is_filtered_file_type(), is_filtered_id_file_type(), FileListInternEntry::name, and FileListInternEntry::typeflag.
Referenced by is_filtered_asset_library(), and is_filtered_lib().
| 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().
| bool is_filtered_main_assets | ( | FileListInternEntry * | file, |
| const char * | , | ||
| FileListFilter * | filter ) |
Definition at line 246 of file filelist_filter.cc.
References FileListInternEntry::blentype, filter, is_filtered_asset(), is_filtered_id_file_type(), and FileListInternEntry::name.
Referenced by filelist_settype(), and is_filtered_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().