From c88ba461cf7e271de16d6951c7b185b964a252b9 Mon Sep 17 00:00:00 2001 From: Peter Kim Date: Fri, 27 Aug 2021 20:05:34 +0900 Subject: [PATCH] Fix "toggle shading" op not updating VR view Reason was that the notifier did not set the NS_VIEW3D_SHADING subtype, which the VR view listens for for a shading update. In the case of "toggle xray", a notifier was absent altogether. --- source/blender/editors/space_view3d/view3d_edit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index b055a0fe947..466820353b9 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -5292,7 +5292,7 @@ static int toggle_shading_exec(bContext *C, wmOperator *op) } ED_view3d_shade_update(bmain, v3d, area); - WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, v3d); + WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D | NS_VIEW3D_SHADING, v3d); return OPERATOR_FINISHED; } @@ -5347,6 +5347,7 @@ static int toggle_xray_exec(bContext *C, wmOperator *op) } ED_area_tag_redraw(area); + WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D | NS_VIEW3D_SHADING, v3d); return OPERATOR_FINISHED; }