Page MenuHome

XR: Fix navigation gizmo hidden when toggling session mirror
Needs ReviewPublic

Authored by Peter Kim (muxed-reality) on Nov 5 2021, 5:52 AM.

Details

Summary

This fixes the navigation gizmo in the 3D viewport always being hidden
after using the VR session mirror (either when toggling the option or
at the end of the VR session).

The reason was that V3D_GIZMO_HIDE_NAVIGATE was always set when
preparing the mirror view for drawing (view3d_xr_mirror_setup()) and
the original View3D gizmo flag was not restored. Setting the
V3D_GIZMO_HIDE_NAVIGATE flag was done as a workaround in 7ae281084833
to avoid displaying a distorted gizmo when the view matrix has a scale
factor (which can occur in VR due to session base scale or navigation).

However, this fix does away with this workaround by adjusting the
navigation gizmo calculation for the mirror view so that the gizmo is
displayed the same regardless of the VR scale.

Diff Detail

Repository
rB Blender
Branch
xr-navgizmo-fix (branched from master)
Build Status
Buildable 18492
Build 18492: arc lint + arc unit