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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-07-11 15:20:39 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-07-17 15:59:07 +0300
commit7b3a18f0aa3ed9612aca602878a8ebdf2f1250f9 (patch)
tree4f8ff9cdc37f66dd200946f4589e13d135f1e140 /source/blender/blenloader
parentf8e2dba7fe429c6e514a2f12ff35addc8f474294 (diff)
Cleanup: moving shading type into View3DShading.
So all shading settings are in this struct and can be reused in the OpenGL render engine.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c7
-rw-r--r--source/blender/blenloader/intern/versioning_280.c16
2 files changed, 20 insertions, 3 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index f7d585e6fd7..18a6198254e 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -6606,9 +6606,10 @@ static void direct_link_area(FileData *fd, ScrArea *area)
v3d->properties_storage = NULL;
/* render can be quite heavy, set to solid on load */
- if (v3d->drawtype == OB_RENDER)
- v3d->drawtype = OB_SOLID;
- v3d->prev_drawtype = OB_SOLID;
+ if (v3d->shading.type == OB_RENDER) {
+ v3d->shading.type = OB_SOLID;
+ }
+ v3d->shading.prev_type = OB_SOLID;
if (v3d->fx_settings.dof)
v3d->fx_settings.dof = newdataadr(fd, v3d->fx_settings.dof);
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index b854438ed47..5855b9d39de 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -1599,5 +1599,21 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
+ if (!DNA_struct_elem_find(fd->filesdna, "View3DShading", "short", "type")) {
+ for (bScreen *screen = bmain->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;
+ if (v3d->drawtype == OB_RENDER) {
+ v3d->drawtype = OB_SOLID;
+ }
+ v3d->shading.type = v3d->drawtype;
+ v3d->shading.prev_type = OB_SOLID;
+ }
+ }
+ }
+ }
+ }
}
}