Assets: show all assets by default instead of current file

The "current file" mode is only useful when creating new assets.
However, the far more common use case and the one that should require
fewer steps is to use existing assets.

There is a risk that this causes freezing if the file browser preview
caching does not work properly. So we'll have to keep an eye on the bug
tracker to see if this is an issue in practice.

Pull Request #104749
This commit is contained in:
2023-02-14 17:44:41 +01:00
parent b3fb73f325
commit 7ba59c8a62
2 changed files with 3 additions and 3 deletions

View File

@@ -57,7 +57,7 @@ AssetLibraryReference ED_asset_library_reference_from_enum_value(int value)
/* Note that there is no check if the path exists here. If an invalid library path is used, the
* Asset Browser can give a nice hint on what's wrong. */
if (!user_library) {
library.type = ASSET_LIBRARY_LOCAL;
library.type = ASSET_LIBRARY_ALL;
library.custom_library_index = -1;
}
else {

View File

@@ -104,7 +104,7 @@ static void fileselect_ensure_updated_asset_params(SpaceFile *sfile)
asset_params = sfile->asset_params = static_cast<FileAssetSelectParams *>(
MEM_callocN(sizeof(*asset_params), "FileAssetSelectParams"));
asset_params->base_params.details_flags = U_default.file_space_data.details_flags;
asset_params->asset_library_ref.type = ASSET_LIBRARY_LOCAL;
asset_params->asset_library_ref.type = ASSET_LIBRARY_ALL;
asset_params->asset_library_ref.custom_library_index = -1;
asset_params->import_type = FILE_ASSET_IMPORT_APPEND_REUSE;
}
@@ -422,7 +422,7 @@ static void fileselect_refresh_asset_params(FileAssetSelectParams *asset_params)
user_library = BKE_preferences_asset_library_find_from_index(&U,
library->custom_library_index);
if (!user_library) {
library->type = ASSET_LIBRARY_LOCAL;
library->type = ASSET_LIBRARY_ALL;
}
}