[Bf-blender-cvs] [21a24aa61e2] xr-controller-support: Fix view3d.toggle_shading() not updating VR view
Peter Kim
noreply at git.blender.org
Thu Aug 26 12:55:05 CEST 2021
Commit: 21a24aa61e2f5e8438890f5aaf38b20565b98ad3
Author: Peter Kim
Date: Thu Aug 26 18:55:08 2021 +0900
Branches: xr-controller-support
https://developer.blender.org/rB21a24aa61e2f5e8438890f5aaf38b20565b98ad3
Fix view3d.toggle_shading() not updating VR view
Reason was that the WM notifier did not set the NS_VIEW3D_SHADING
subtype, which the VR view listens for for a shading update.
In the case of view3d.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