Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2021-10-23 00:56:05 +0300
committerJulian Eisel <julian@blender.org>2021-10-23 00:56:05 +0300
commitcfc64261c12e90bf3219cb377d4fe7c008407850 (patch)
tree34f9c727d12991d50b1560ac2a2081f56a2ac4fe /source/blender/editors/space_file/space_file.c
parentc51eac24fea8e010a8fed84f5f8787521067fb42 (diff)
Asset Browser: Filter options for specific ID types
Adds a filter popup to the header that allows specifiying which data-block types to show. The menu automatically reflects all supported ID types, so it shows a checkbox for materials, worlds and actions currently by default, and all ID types with the "Extended Asset Browser" experimental feature enabled.
Diffstat (limited to 'source/blender/editors/space_file/space_file.c')
-rw-r--r--source/blender/editors/space_file/space_file.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c
index b5c395c8bc2..a875b7a2c12 100644
--- a/source/blender/editors/space_file/space_file.c
+++ b/source/blender/editors/space_file/space_file.c
@@ -328,8 +328,9 @@ static void file_refresh(const bContext *C, ScrArea *area)
}
if (ED_fileselect_is_asset_browser(sfile)) {
- /* Ask the asset code for appropriate ID filter flags for the supported assets. */
- params->filter_id = ED_asset_types_supported_as_filter_flags();
+ /* Ask the asset code for appropriate ID filter flags for the supported assets, and mask others
+ * out. */
+ params->filter_id &= ED_asset_types_supported_as_filter_flags();
}
filelist_settype(sfile->files, params->type);