[Bf-blender-cvs] [c88ba461cf7] master: Fix "toggle shading" op not updating VR view

Peter Kim noreply at git.blender.org
Fri Aug 27 13:05:56 CEST 2021


Commit: c88ba461cf7e271de16d6951c7b185b964a252b9
Author: Peter Kim
Date:   Fri Aug 27 20:05:34 2021 +0900
Branches: master
https://developer.blender.org/rBc88ba461cf7e271de16d6951c7b185b964a252b9

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.

===================================================================

M	source/blender/editors/space_view3d/view3d_edit.c

===================================================================

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;
 }



More information about the Bf-blender-cvs mailing list