From 0e37d3efc017151309b272e4562edd901bfbde7a Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 28 Jan 2021 13:36:23 +0100 Subject: Fix T84717: missing 3D viewport updates when changing shading settings Previously this relied on the dependency graph to detect changes in the screen datablock, which would then notify the renderers. This was rather indirect an not even really by design. Instead use notifiers to tag specific 3D viewports to be updated. Includes changes to BKE_scene_get_depsgraph to accept a const Scene pointer. Testing if this works correctly requires adding back commits 81d444c and 088904d, since those have been temporarily reverted. Differential Revision: https://developer.blender.org/D10235 --- source/blender/depsgraph/DEG_depsgraph.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/depsgraph') diff --git a/source/blender/depsgraph/DEG_depsgraph.h b/source/blender/depsgraph/DEG_depsgraph.h index 0ded511b8f8..567916fdebe 100644 --- a/source/blender/depsgraph/DEG_depsgraph.h +++ b/source/blender/depsgraph/DEG_depsgraph.h @@ -175,7 +175,8 @@ typedef struct DEGEditorUpdateContext { } DEGEditorUpdateContext; typedef void (*DEG_EditorUpdateIDCb)(const DEGEditorUpdateContext *update_ctx, struct ID *id); -typedef void (*DEG_EditorUpdateSceneCb)(const DEGEditorUpdateContext *update_ctx, int updated); +typedef void (*DEG_EditorUpdateSceneCb)(const DEGEditorUpdateContext *update_ctx, + const bool updated); /* Set callbacks which are being called when depsgraph changes. */ void DEG_editors_set_update_cb(DEG_EditorUpdateIDCb id_func, DEG_EditorUpdateSceneCb scene_func); -- cgit v1.2.3