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:
authorJeroen Bakker <j.bakker@atmind.nl>2019-11-08 18:47:33 +0300
committerJeroen Bakker <j.bakker@atmind.nl>2019-11-28 11:12:28 +0300
commit320d8ab1556f1bc76cd9f654476250aebdec101e (patch)
treec627f82f76ddc6286ad21b98d54eb4a81cf51b63 /source/blender/blenloader
parentffcf39e3b5dbe7f12d04a350c629055ad21d40ce (diff)
EEVEE: Viewport Renderpasses
This patch will allow the user to select the EEVEE renderpass to be shown in the viewport by default the combined pass will be shown. Limitations: * Viewport rendering stores the result in a `RenderResult`. RenderResult is not aware of the type of data it holds. In many places where RenderResult is used it is assumed that it stores a combined pass and the display+view transform are applied. I will propose to fix this in a future patch. But that is still being designed and discussed. Reviewed By: fclem Differential Revision: https://developer.blender.org/D6319
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/versioning_280.c18
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 7c33e853ed1..47e55a55ea1 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -4231,5 +4231,23 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
UnifiedPaintSettings *ups = &ts->unified_paint_settings;
ups->flag &= ~(UNIFIED_PAINT_FLAG_UNUSED_0 | UNIFIED_PAINT_FLAG_UNUSED_1);
}
+
+ /* Set the default render pass in the viewport to Combined. */
+ if (!DNA_struct_elem_find(fd->filesdna, "View3DShading", "int", "render_pass")) {
+ for (Scene *scene = bmain->scenes.first; scene; scene = scene->id.next) {
+ scene->display.shading.render_pass = SCE_PASS_COMBINED;
+ }
+
+ for (bScreen *screen = bmain->screens.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.render_pass = SCE_PASS_COMBINED;
+ }
+ }
+ }
+ }
+ }
}
}