Merge branch 'master' into blender2.8
[blender.git] / source / blender / blenloader / intern / versioning_270.c
index d3f33cf725f852586a6959e676b0083d109f9ab9..be15070d0cc0548592171d016071dd19a8b4b480 100644 (file)
@@ -1610,6 +1610,29 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main)
                        }
                }
        }
+
+       {
+               if (!DNA_struct_elem_find(fd->filesdna, "View3DDebug", "char", "background")) {
+                       bScreen *screen;
+
+                       for (screen = main->screen.first; screen; screen = screen->id.next) {
+                               ScrArea *sa;
+                               for (sa = screen->areabase.first; sa; sa = sa->next) {
+                                       SpaceLink *sl;
+
+                                       for (sl = sa->spacedata.first; sl; sl = sl->next) {
+                                               switch (sl->spacetype) {
+                                                       case SPACE_VIEW3D:
+                                                       {
+                                                               View3D *v3d = (View3D *)sl;
+                                                               v3d->debug.background = V3D_DEBUG_BACKGROUND_NONE;
+                                                       }
+                                               }
+                                       }
+                               }
+                       }
+               }
+       }
 }
 
 void do_versions_after_linking_270(Main *main)