diff options
author | Julian Eisel <julian@blender.org> | 2021-09-16 17:39:51 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2021-09-16 17:41:31 +0300 |
commit | c9daab7936562b1e02262cd28f1d6cc4dde91d71 (patch) | |
tree | 6956cd7b233b0b327164acd583307234b1f007ae /source/blender/blenloader | |
parent | 73ed07648901c047887f2e8e94750a3eae9afb08 (diff) |
Assets: Recursive reading of asset libraries
With this, asset libraries can be directory structures and all assets in
sub-directories will show up in an Asset Browser.
With complex directory structures and many .blend files inside, asset
library reading will be quite slow for now. There's initial work being
done to introduce indexing for this (T82979), other optimizations are
being discussed as well.
Addresses T91406.
Differential Revision: https://developer.blender.org/D12139
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/versioning_300.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_300.c b/source/blender/blenloader/intern/versioning_300.c index 55aed4ddc2b..538634f4c9e 100644 --- a/source/blender/blenloader/intern/versioning_300.c +++ b/source/blender/blenloader/intern/versioning_300.c @@ -1261,5 +1261,18 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain) */ { /* Keep this block, even when empty. */ + + 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) { + SpaceFile *sfile = (SpaceFile *)sl; + if (sfile->asset_params) { + sfile->asset_params->base_params.recursion_level = FILE_SELECT_MAX_RECURSIONS; + } + } + } + } + } } } |