diff options
author | Julian Eisel <julian@blender.org> | 2021-10-21 21:42:41 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2021-10-21 23:18:59 +0300 |
commit | a28614879986c26c7d354ebe659e2e327503ed28 (patch) | |
tree | 882f021eab1441c29e150069a4c64bee1f81d50d /source/blender/editors/space_file | |
parent | 9aab1a46263a87980efa18ba35d87814eb2f4cda (diff) |
Assets: Allow specific data-block types to be enabled by default
Updates UI code so that we can enable the asset UI for specific data-block
types by default, i.e. irrespective of the "Extended Asset Browser"
experimental feature.
"Mark as Asset" and "Clear Asset" are always visible in the Outliner context
menu now, but are grayed out if not applicable and show a disabled hint in the
tooltip.
A known side-effect of this: The "Mark as Asset" and "Clear Asset" operators
are enabled for action data-blocks now, even though only pose actions created
through the Pose Libraries add-on are supported. If this is something worth
addressing is being discussed still.
Differential Revision: https://developer.blender.org/D12955
Reviewed by: Sybren Stüvel
Diffstat (limited to 'source/blender/editors/space_file')
-rw-r--r-- | source/blender/editors/space_file/space_file.c | 5 |
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 b93f9b34f3b..b5c395c8bc2 100644 --- a/source/blender/editors/space_file/space_file.c +++ b/source/blender/editors/space_file/space_file.c @@ -43,6 +43,7 @@ #include "WM_message.h" #include "WM_types.h" +#include "ED_asset.h" #include "ED_fileselect.h" #include "ED_screen.h" #include "ED_space_api.h" @@ -327,8 +328,8 @@ static void file_refresh(const bContext *C, ScrArea *area) } if (ED_fileselect_is_asset_browser(sfile)) { - /* Only poses supported as non-experimental right now. */ - params->filter_id = U.experimental.use_extended_asset_browser ? FILTER_ID_ALL : FILTER_ID_AC; + /* Ask the asset code for appropriate ID filter flags for the supported assets. */ + params->filter_id = ED_asset_types_supported_as_filter_flags(); } filelist_settype(sfile->files, params->type); |