[Bf-blender-cvs] [057fe2c8d0c] asset-browser: Add versioning so old files open the Asset Browser in "Current File" repository
Julian Eisel
noreply at git.blender.org
Sat Nov 14 01:53:49 CET 2020
Commit: 057fe2c8d0c3abf78309d47ad552878ac5ca411a
Author: Julian Eisel
Date: Sat Nov 14 01:08:40 2020 +0100
Branches: asset-browser
https://developer.blender.org/rB057fe2c8d0c3abf78309d47ad552878ac5ca411a
Add versioning so old files open the Asset Browser in "Current File" repository
===================================================================
M source/blender/blenloader/intern/versioning_290.c
===================================================================
diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c
index fab4ce6727f..f9449f1d264 100644
--- a/source/blender/blenloader/intern/versioning_290.c
+++ b/source/blender/blenloader/intern/versioning_290.c
@@ -1128,6 +1128,24 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
+ {
+ if (!DNA_struct_find(fd->filesdna, "FileSelectAssetRepositoryID")) {
+ /* Remove options of legacy UV/Image editor */
+ 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->params) {
+ sfile->params->asset_repository.type = FILE_ASSET_REPO_LOCAL;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
/**
* Versioning code until next subversion bump goes here.
*
More information about the Bf-blender-cvs
mailing list