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:
authorClément Foucault <foucault.clem@gmail.com>2020-04-27 22:13:53 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-04-27 22:14:10 +0300
commit133bf05b184bfeed3002be28c29199b5716b8f1e (patch)
tree0f52c34c49c61b8e445f9b30648551595e52e873 /source/blender/draw/engines/workbench
parent84e40ee84692004fcd7e9e229c5f4adf8cf326be (diff)
Fix T75736 Viewport update problem when switching between view layers
The problem comes from the fact by no data being modified when switching viewlayers. To follow what the external render engines do, we completely reset the viewport by freeing the GPUViewport to avoid any cached data from being kept.
Diffstat (limited to 'source/blender/draw/engines/workbench')
-rw-r--r--source/blender/draw/engines/workbench/workbench_data.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/draw/engines/workbench/workbench_data.c b/source/blender/draw/engines/workbench/workbench_data.c
index 24d95a13ee8..2e8119fca2f 100644
--- a/source/blender/draw/engines/workbench/workbench_data.c
+++ b/source/blender/draw/engines/workbench/workbench_data.c
@@ -217,8 +217,7 @@ void workbench_private_data_init(WORKBENCH_PrivateData *wpd)
if (!v3d || (v3d->shading.type == OB_RENDER && BKE_scene_uses_blender_workbench(scene))) {
/* FIXME: This reproduce old behavior when workbench was separated in 2 engines.
* But this is a workaround for a missing update tagging from operators. */
- if (scene->display.shading.type != wpd->shading.type ||
- (v3d && (XRAY_ENABLED(v3d) != XRAY_ENABLED(&scene->display))) ||
+ if ((v3d && (XRAY_ENABLED(v3d) != XRAY_ENABLED(&scene->display))) ||
(scene->display.shading.flag != wpd->shading.flag)) {
wpd->view_updated = true;
}
@@ -245,8 +244,7 @@ void workbench_private_data_init(WORKBENCH_PrivateData *wpd)
else {
/* FIXME: This reproduce old behavior when workbench was separated in 2 engines.
* But this is a workaround for a missing update tagging from operators. */
- if (v3d->shading.type != wpd->shading.type || XRAY_ENABLED(v3d) != XRAY_ENABLED(wpd) ||
- v3d->shading.flag != wpd->shading.flag) {
+ if (XRAY_ENABLED(v3d) != XRAY_ENABLED(wpd) || v3d->shading.flag != wpd->shading.flag) {
wpd->view_updated = true;
}