Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <bastien@blender.org>2021-09-23 11:43:31 +0300
committerBastien Montagne <bastien@blender.org>2021-09-23 12:01:00 +0300
commit3042994c91667f9c8a1ecadc11e69c012c33d581 (patch)
tree304a8b52bf2abf07661ad73254741f74d0c02e1e /source/blender/blenloader/intern/versioning_300.c
parent12924ed573c9c4faf025a7cd2f61c53732667ad5 (diff)
Link/Append: Refactor flags.
Flags controlling link/append code are split between two enums, one in `DNA_space_types.h` and one in `BLO_readfile.h`. This commit: - Moves flags exclusively used in WM and BLO code to `eBLOLibLinkFlags` in `BLO_readfile.h`. Flags in `eFileSel_Params_Flag` from `DNA_space_types.h` are now only the ones effectively used by the file browser editor code too. - Fixes some internal utils in `readfile.c` still taking `short` flag parameter instead of proper `int` one. NOTE: there are a few other flags that could probably be moved to `eBLOLibLinkFlags` (at the very least `FILE_LINK`, probably also `FILE_AUTOSELECT` and `FILE_ACTIVE_COLLECTION`), since those are not effectively used by the file browser, and control linking/appending behavior, not filebrowser behavior. However for now think it's safer to not touch that.
Diffstat (limited to 'source/blender/blenloader/intern/versioning_300.c')
-rw-r--r--source/blender/blenloader/intern/versioning_300.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_300.c b/source/blender/blenloader/intern/versioning_300.c
index 58265bca238..9908e231452 100644
--- a/source/blender/blenloader/intern/versioning_300.c
+++ b/source/blender/blenloader/intern/versioning_300.c
@@ -1438,5 +1438,24 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
}
+
+ LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) {
+ LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) {
+ LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) {
+ switch (sl->spacetype) {
+ case SPACE_FILE: {
+ SpaceFile *sfile = (SpaceFile *)sl;
+ if (sfile->params) {
+ sfile->params->flag &= ~(FILE_PARAMS_FLAG_UNUSED_1 | FILE_PARAMS_FLAG_UNUSED_2 |
+ FILE_PARAMS_FLAG_UNUSED_3 | FILE_PARAMS_FLAG_UNUSED_4);
+ }
+ break;
+ }
+ default:
+ break;
+ }
+ }
+ }
+ }
}
}