Fix T74957: Matcap flip not updating

Caused by rBc476c36e4008.

This hooks into the existing FIXME (workaround for a missing update
tagging from operators), needs to also check the shading.flag (to detect
changes in V3D_SHADING_MATCAP_FLIP_X).

Differential Revision: https://developer.blender.org/D7192
This commit is contained in:
Philipp Oeser 2020-03-20 10:30:35 +01:00
parent 579447bd89
commit a6dd22d431
Notes: blender-bot 2023-02-14 02:29:01 +01:00
Referenced by issue #74957, Matcap flip function does not work in 2.83
Referenced by issue #65012, Flip matcap doesn't work in workbench rendered display mode
1 changed files with 4 additions and 2 deletions

View File

@ -203,7 +203,8 @@ void workbench_private_data_init(WORKBENCH_PrivateData *wpd)
/* 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)))) {
(v3d && (XRAY_ENABLED(v3d) != XRAY_ENABLED(&scene->display))) ||
(scene->display.shading.flag != wpd->shading.flag)) {
wpd->view_updated = true;
}
@ -229,7 +230,8 @@ 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)) {
if (v3d->shading.type != wpd->shading.type || XRAY_ENABLED(v3d) != XRAY_ENABLED(wpd) ||
v3d->shading.flag != wpd->shading.flag) {
wpd->view_updated = true;
}