Merge branch 'master' into blender2.8
[blender.git] / source / blender / blenloader / intern / versioning_270.c
index ba985ef50865ccda0631703d02da71840f588fd6..cabb1409603aa1302ae9085560e8524b67cf2aa5 100644 (file)
@@ -1670,6 +1670,27 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main)
                for (Mesh *me = main->mesh.first; me; me = me->id.next) {
                        CustomData_set_layer_name(&me->vdata, CD_MDEFORMVERT, 0, "");
                }
                for (Mesh *me = main->mesh.first; me; me = me->id.next) {
                        CustomData_set_layer_name(&me->vdata, CD_MDEFORMVERT, 0, "");
                }
+
+               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;
+                                                       }
+                                               }
+                                       }
+                               }
+                       }
+               }
        }
 }
 
        }
 }