diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-11-28 17:57:40 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-11-28 17:59:56 +0300 |
commit | 2d720f51cd786f3e0924602efb6ec89ef8ed077f (patch) | |
tree | 3b1ac1223a1c35e17e5085f99ef231273c801526 /source/blender/blenloader/intern/versioning_defaults.c | |
parent | 52458ab49d40081466e369709d68c13a6a47663e (diff) |
Workbench: Change Studio lighting
This is in order to have more flexible ligthing presets in the future.
The diffuse lighting from hdris was nice but lacked the corresponding
specular information. This is an attempt to make it possible to customize
the lighting and have a cheap/easy/nice-looking pseudo-PBR workflow.
* Add cheap PBR to Workbench with fresnel and better roughness support.
This improves the look of the metallic surfaces and is easier to control.
* Add ambient light to studio lights settings: just a constant color added
to the shading.
* Add Smooth option to studio lights settings: This option fakes the
effect of making the light bigger making the lighting smoother for this
light. Smoother lights gets reflected like a background hdri.
* Change default light settings to include the smooth params.
* Remove specular highlights from flat shading. (could be added back but
how do we make it good looking?)
* If specular lighting is disabled, use base color without using metallic.
* Include a lot of code simplification/cleanup/confusion fix.
Diffstat (limited to 'source/blender/blenloader/intern/versioning_defaults.c')
-rw-r--r-- | source/blender/blenloader/intern/versioning_defaults.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c index f9f9905be3c..055e4b065a1 100644 --- a/source/blender/blenloader/intern/versioning_defaults.c +++ b/source/blender/blenloader/intern/versioning_defaults.c @@ -280,4 +280,15 @@ void BLO_update_defaults_startup_blend(Main *bmain, const char *app_template) } } } + + for (bScreen *sc = bmain->screen.first; sc; sc = sc->id.next) { + for (ScrArea *sa = sc->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_HIGHLIGHT; + } + } + } + } } |