diff options
author | Julian Eisel <julian@blender.org> | 2022-04-04 18:54:39 +0300 |
---|---|---|
committer | Fabian Schempp <fabianschempp@googlemail.com> | 2022-04-11 01:31:57 +0300 |
commit | 6986a34db629672fe5b23cc97e274b44314a6958 (patch) | |
tree | b6d38935a46d90b8540781fba5d675332fb05716 /source | |
parent | 301f2c6d34840fb213f7642771c10d83eebfedfe (diff) |
Fix collection assets hidden in old files with asset browser open
Make sure the filtering in the Asset Browser doesn't filter out
collection assets.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/BKE_blender_version.h | 2 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_300.c | 17 |
2 files changed, 18 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_blender_version.h b/source/blender/blenkernel/BKE_blender_version.h index 1f3b0606dfd..1651ea243f2 100644 --- a/source/blender/blenkernel/BKE_blender_version.h +++ b/source/blender/blenkernel/BKE_blender_version.h @@ -25,7 +25,7 @@ extern "C" { /* Blender file format version. */ #define BLENDER_FILE_VERSION BLENDER_VERSION -#define BLENDER_FILE_SUBVERSION 9 +#define BLENDER_FILE_SUBVERSION 10 /* Minimum Blender version that supports reading file written with the current * version. Older Blender versions will test this and show a warning if the file diff --git a/source/blender/blenloader/intern/versioning_300.c b/source/blender/blenloader/intern/versioning_300.c index 2fd983814dd..a2e846041fa 100644 --- a/source/blender/blenloader/intern/versioning_300.c +++ b/source/blender/blenloader/intern/versioning_300.c @@ -2534,6 +2534,23 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain) } } + if (!MAIN_VERSION_ATLEAST(bmain, 302, 10)) { + for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) { + LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { + LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { + if (sl->spacetype != SPACE_FILE) { + continue; + } + SpaceFile *sfile = (SpaceFile *)sl; + if (sfile->browse_mode != FILE_BROWSE_MODE_ASSETS) { + continue; + } + sfile->asset_params->base_params.filter_id |= FILTER_ID_GR; + } + } + } + } + /** * Versioning code until next subversion bump goes here. * |