diff options
author | Julian Eisel <julian@blender.org> | 2022-04-04 18:54:39 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2022-04-04 18:54:39 +0300 |
commit | b5f3f8ef1d52e58cfe2fc8747047c45267055fab (patch) | |
tree | 985f685cb93dac6a9edd4790b2e6891388c47bbd /source/blender/blenloader | |
parent | 9eb4cb956b7037e9737c2f15cde3d1bdcfff7d5f (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/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/versioning_300.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_300.c b/source/blender/blenloader/intern/versioning_300.c index d2b8c4330bc..3088dc4c7e8 100644 --- a/source/blender/blenloader/intern/versioning_300.c +++ b/source/blender/blenloader/intern/versioning_300.c @@ -2549,6 +2549,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. * |