Workbench: Basic Solid Studio

Currently uses static lighting. Will become HDRI lighting.
Added do_versions to set default drawtype_solid and drawtype_texture to
OB_LIGHTING_STUDIO. When View3D space is created drawtype_solid and
drawtype_texture are also set to OB_LIGHTING_STUDIO.

Current studio lighting uses a dot product to simulate static lighting.
Will need to be changed in the future with different lighting models.
This commit is contained in:
2018-04-18 08:20:12 +02:00
parent 3f762dd764
commit ccb104b9c2
10 changed files with 202 additions and 8 deletions

View File

@@ -948,4 +948,22 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *main)
}
}
}
if (!MAIN_VERSION_ATLEAST(main, 280, 6)) {
bScreen *sc;
ScrArea *sa;
SpaceLink *sl;
for (sc = main->screen.first; sc; sc = sc->id.next) {
for (sa = sc->areabase.first; sa; sa = sa->next) {
for (sl = sa->spacedata.first; sl; sl = sl->next) {
if (sl->spacetype == SPACE_VIEW3D) {
View3D *v3d = (View3D *)sl;
v3d->drawtype_solid = OB_LIGHTING_STUDIO;
v3d->drawtype_wireframe = OB_LIGHTING_STUDIO;
}
}
}
}
}
}