[Bf-blender-cvs] [5f5289512cf] xr-controller-support: XR: Improve "Invalid stage ref space" warning

Peter Kim noreply at git.blender.org
Fri Aug 13 00:29:40 CEST 2021


Commit: 5f5289512cfd3c9ed6845a4ac6274f2f9ff494bb
Author: Peter Kim
Date:   Fri Aug 13 06:21:50 2021 +0900
Branches: xr-controller-support
https://developer.blender.org/rB5f5289512cfd3c9ed6845a4ac6274f2f9ff494bb

XR: Improve "Invalid stage ref space" warning

Originally mentioned that absolute tracking was disabled, which is
wrong because absolute tracking (skipping application of eye offsets)
is always available, although it may not give the expected result of
persistent tracking origins across sessions if the stage space is
unavailable (hence the need for a warning).

Now, the warning makes no mention of absolute tracking, instead
informing the user that the local space fallback will be used and
that they should define tracking bounds via the XR runtime if they
wish to use the stage space.

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

M	intern/ghost/intern/GHOST_XrSession.cpp

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

diff --git a/intern/ghost/intern/GHOST_XrSession.cpp b/intern/ghost/intern/GHOST_XrSession.cpp
index 9a74822a784..f0b723f9c1c 100644
--- a/intern/ghost/intern/GHOST_XrSession.cpp
+++ b/intern/ghost/intern/GHOST_XrSession.cpp
@@ -151,13 +151,12 @@ static void create_reference_spaces(OpenXRSessionData &oxr, const GHOST_XrPose &
 
   if (XR_FAILED(result)) {
     /* One of the rare cases where we don't want to immediately throw an exception on failure,
-     * since run-times are not required to support the stage reference space. Although we need the
-       stage reference space for absolute tracking, if the runtime doesn't support it then just
-       fallback to the local space. */
+     * since runtimes are not required to support the stage reference space. If the runtime
+     * doesn't support it then just fall back to the local space. */
     if (result == XR_ERROR_REFERENCE_SPACE_UNSUPPORTED) {
       printf(
-          "Warning: XR runtime does not support stage reference space, disabling absolute "
-          "tracking.\n");
+          "Warning: XR runtime does not support stage reference space, falling back to local "
+          "reference space.\n");
 
       create_info.referenceSpaceType = XR_REFERENCE_SPACE_TYPE_LOCAL;
       CHECK_XR(xrCreateReferenceSpace(oxr.session, &create_info, &oxr.reference_space),
@@ -175,8 +174,9 @@ static void create_reference_spaces(OpenXRSessionData &oxr, const GHOST_XrPose &
              "Failed to get stage reference space bounds.");
     if (extents.width == 0.0f || extents.height == 0.0f) {
       printf(
-          "Warning: Invalid stage reference space bounds, disabling absolute tracking. To enable "
-          "absolute tracking, please define a tracking space via the XR runtime.\n");
+          "Warning: Invalid stage reference space bounds, falling back to local reference space. "
+          "To use the stage reference space, please define a tracking space via the XR "
+          "runtime.\n");
 
       /* Fallback to local space. */
       if (oxr.reference_space != XR_NULL_HANDLE) {



More information about the Bf-blender-cvs mailing list