[Bf-blender-cvs] [8c317272984] vr_scene_inspection: Fix build error and warnings when WITH_XR_OPENXR is disabled

Julian Eisel noreply at git.blender.org
Thu Mar 5 13:01:27 CET 2020


Commit: 8c317272984fe649a38481b4955c716c7ae83d8e
Author: Julian Eisel
Date:   Thu Mar 5 13:00:55 2020 +0100
Branches: vr_scene_inspection
https://developer.blender.org/rB8c317272984fe649a38481b4955c716c7ae83d8e

Fix build error and warnings when WITH_XR_OPENXR is disabled

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

M	source/blender/editors/space_view3d/view3d_draw.c
M	source/blender/makesrna/intern/rna_xr.c
M	source/tools

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

diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 9ab7e44e2b8..483fe02be99 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -381,6 +381,10 @@ void ED_view3d_draw_setup_view(const wmWindowManager *wm,
   else {
     view3d_main_region_setup_view(depsgraph, scene, v3d, ar, viewmat, winmat, rect);
   }
+
+#ifndef WITH_XR_OPENXR
+  UNUSED_VARS(wm);
+#endif
 }
 
 /** \} */
diff --git a/source/blender/makesrna/intern/rna_xr.c b/source/blender/makesrna/intern/rna_xr.c
index 11e95b02855..42ce1c10b16 100644
--- a/source/blender/makesrna/intern/rna_xr.c
+++ b/source/blender/makesrna/intern/rna_xr.c
@@ -34,10 +34,16 @@
 
 static bool rna_XrSessionState_is_running(bContext *C)
 {
+#  ifdef WITH_XR_OPENXR
   const wmWindowManager *wm = CTX_wm_manager(C);
   return WM_xr_is_session_running(&wm->xr);
+#  else
+  UNUSED_VARS(C);
+  return false;
+#  endif
 }
 
+#  ifdef WITH_XR_OPENXR
 static wmXrData *rna_XrSessionState_wm_xr_data_get(PointerRNA *ptr)
 {
   /* Callers could also get bXrSessionState pointer through ptr->data, but prefer if we just
@@ -50,17 +56,26 @@ static wmXrData *rna_XrSessionState_wm_xr_data_get(PointerRNA *ptr)
 
   return &wm->xr;
 }
+#  endif
 
 static void rna_XrSessionState_viewer_location_get(PointerRNA *ptr, float *values)
 {
+#  ifdef WITH_XR_OPENXR
   const wmXrData *xr = rna_XrSessionState_wm_xr_data_get(ptr);
   WM_xr_session_state_viewer_location_get(xr, values);
+#  else
+  UNUSED_VARS(ptr, values);
+#  endif
 }
 
 static void rna_XrSessionState_viewer_rotation_get(PointerRNA *ptr, float *values)
 {
+#  ifdef WITH_XR_OPENXR
   const wmXrData *xr = rna_XrSessionState_wm_xr_data_get(ptr);
   WM_xr_session_state_viewer_rotation_get(xr, values);
+#  else
+  UNUSED_VARS(ptr, values);
+#  endif
 }
 
 #else /* RNA_RUNTIME */
diff --git a/source/tools b/source/tools
index d230f2161f3..4a6f1706258 160000
--- a/source/tools
+++ b/source/tools
@@ -1 +1 @@
-Subproject commit d230f2161f36f8b21f3ce8eeb19b34c0629506c2
+Subproject commit 4a6f1706258439db3ee5a50ec6938fef79c7cb97



More information about the Bf-blender-cvs mailing list