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:
Diffstat (limited to 'source/blender/blenloader/intern/versioning_270.c')
-rw-r--r--source/blender/blenloader/intern/versioning_270.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c
index 4ca1a44d64e..572566df6a2 100644
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@ -51,6 +51,7 @@
#include "BKE_main.h"
#include "BKE_node.h"
+#include "BKE_screen.h"
#include "BLI_math.h"
#include "BLI_listbase.h"
@@ -60,6 +61,7 @@
#include "readfile.h"
+#include "MEM_guardedalloc.h"
static void do_version_constraints_radians_degrees_270_1(ListBase *lb)
{
@@ -561,4 +563,32 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main)
FOREACH_NODETREE_END
}
}
+
+ if (!MAIN_VERSION_ATLEAST(main, 273, 7)) {
+ bScreen *scr;
+ ScrArea *sa;
+ SpaceLink *sl;
+ ARegion *ar;
+
+ for (scr = main->screen.first; scr; scr = scr->id.next) {
+ /* Remove old deprecated region from filebrowsers */
+ for (sa = scr->areabase.first; sa; sa = sa->next) {
+ for (sl = sa->spacedata.first; sl; sl = sl->next) {
+ if (sl->spacetype == SPACE_FILE) {
+ for (ar = sl->regionbase.first; ar; ar = ar->next) {
+ if (ar->regiontype == RGN_TYPE_CHANNELS) {
+ break;
+ }
+ }
+
+ if (ar) {
+ /* Free old deprecated 'channel' region... */
+ BKE_area_region_free(NULL, ar);
+ BLI_freelinkN(&sl->regionbase, ar);
+ }
+ }
+ }
+ }
+ }
+ }
}