When using the "Add VR Landmark from Session" operator, we want to
calculate an angle around the Z-axis for the landmark to use as
ground-aligned base rotation. The former way to calculate this was
rather primitive and broke easily (angle would point in the opposite
direction).
Now we project the camera direction onto the ground plane to get the
angle. This should be a very reliable way to do it.
Besides minor tweaks:
* Always use selected, not active landmark for editing operators
* Fix failure when trying to access non-existant scene camera or custom
base pose camera
* More consistent naming and descriptions
* Enable custom poses for landmarks (so they don't require adding a new
camera).
* New landmark operators, available in Sidebar menu:
** "Add VR Landmark from Selected Camera"
** "Update Custom Landmark" (updates landmark to match current VR viewer
pose)
** "Cursor to VR Landmark"
** "Active Camera to Landmark"
** "New Camera from Landmark"
* "Show Landmarks" option, adding gizmos as landmark indicators to 3D
Views.
This should make the landmarks more practical.
Patch by Sebastian Koenig, with some smaller edits.
Followup commits will do further edits.
Part of T71347.
* Use different, more clear icon for activating a landmark
* Update layout to work better with recent layout changes in master
* Add warning regarding performance impact of viewport feedback options
This add-on adds a basic UI for managing the new VR features to the sidebar, in
a new "VR" tab.
Features:
* Buttons to control general VR session settings (e.g. toggle session,
positional tracking)
* Options for viewport clipping and overlay toggles
* Landmarks - VR base pose management:
** Each landmark can either follow the scene camera or use a custom camera.
** Differentiates between active and selected landmarks. That way landmark
settings can be changed without changing the current reference pose.
** Stored per scene
* Virtual camera gizmo (non-interactive) to show the current VR viewer position
and rotation in regular 3D Views
* Per 3D View feedback options:
** Virtual camera gizmo
** VR mirror (3D View follows VR view position and rotation)
Differential Revision: https://developer.blender.org/D7100