diff options
Diffstat (limited to 'source/blender/blenloader/intern/versioning_280.c')
-rw-r--r-- | source/blender/blenloader/intern/versioning_280.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index bdac8067bb5..a4b5f53e0eb 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -1494,4 +1494,22 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *main) } } } + + { + if (!DNA_struct_elem_find(fd->filesdna, "SceneDisplay", "float", "roughness")) { + for (Scene *scene = main->scene.first; scene; scene = scene->id.next) { + scene->display.roughness = 0.0f; + } + for (bScreen *screen = main->screen.first; screen; screen = screen->id.next) { + for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) { + for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) { + if (sl->spacetype == SPACE_VIEW3D) { + View3D *v3d = (View3D *)sl; + v3d->shading.flag |= V3D_SHADING_SPECULAR_HIGHLIGHTS; + } + } + } + } + } + } } |