[Bf-blender-cvs] [de037b031d2] soc-2019-openxr: Expose WITH_OPENXR build option to Python API

Julian Eisel noreply at git.blender.org
Tue Aug 20 09:19:23 CEST 2019


Commit: de037b031d26c424ab31e282d30645b8dee879e2
Author: Julian Eisel
Date:   Tue Aug 20 00:12:59 2019 +0200
Branches: soc-2019-openxr
https://developer.blender.org/rBde037b031d26c424ab31e282d30645b8dee879e2

Expose WITH_OPENXR build option to Python API

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

M	source/blender/python/intern/CMakeLists.txt
M	source/blender/python/intern/bpy_app_build_options.c

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

diff --git a/source/blender/python/intern/CMakeLists.txt b/source/blender/python/intern/CMakeLists.txt
index fc945562c98..a609f9b440a 100644
--- a/source/blender/python/intern/CMakeLists.txt
+++ b/source/blender/python/intern/CMakeLists.txt
@@ -309,6 +309,10 @@ if(WITH_OPENSUBDIV)
   )
 endif()
 
+if(WITH_OPENXR)
+  add_definitions(-DWITH_OPENXR)
+endif()
+
 add_definitions(${GL_DEFINITIONS})
 
 blender_add_lib(bf_python "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/python/intern/bpy_app_build_options.c b/source/blender/python/intern/bpy_app_build_options.c
index a841e974e85..254b434ce53 100644
--- a/source/blender/python/intern/bpy_app_build_options.c
+++ b/source/blender/python/intern/bpy_app_build_options.c
@@ -59,6 +59,7 @@ static PyStructSequence_Field app_builtopts_info_fields[] = {
     {(char *)"openmp", NULL},
     {(char *)"openvdb", NULL},
     {(char *)"alembic", NULL},
+    {(char *)"openxr", NULL},
     {NULL},
 };
 
@@ -268,6 +269,12 @@ static PyObject *make_builtopts_info(void)
   SetObjIncref(Py_False);
 #endif
 
+#ifdef WITH_OPENXR
+  SetObjIncref(Py_True);
+#else
+  SetObjIncref(Py_False);
+#endif
+
 #undef SetObjIncref
 
   return builtopts_info;



More information about the Bf-blender-cvs mailing list