Add OpenSubdiv information to bpy.app
authorSergey Sharybin <sergey.vfx@gmail.com>
Tue, 3 Sep 2019 09:21:51 +0000 (11:21 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Tue, 3 Sep 2019 09:45:52 +0000 (11:45 +0200)
Allows to customize interface and inform about lack of
subdivision surface support.

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

index fc945562c989aae8dd45b9eb99b62d31ce7447ef..a5f71e9243825e8a7fd43dbfd2da6480406569ec 100644 (file)
@@ -231,6 +231,10 @@ if(WITH_OPENAL)
   add_definitions(-DWITH_OPENAL)
 endif()
 
+if(WITH_OPENSUBDIV)
+  add_definitions(-DWITH_OPENSUBDIV)
+endif()
+
 if(WITH_SDL)
   list(APPEND INC_SYS
     ${SDL_INCLUDE_DIR}
index a841e974e85a15dbd1d682478e6abcdc590f3a3e..afb2f6b3636aa2d0a7d2c9b356e3a7210e5efbf9 100644 (file)
@@ -46,6 +46,7 @@ static PyStructSequence_Field app_builtopts_info_fields[] = {
     {(char *)"audaspace", NULL},
     {(char *)"international", NULL},
     {(char *)"openal", NULL},
+    {(char *)"opensubdiv", NULL},
     {(char *)"sdl", NULL},
     {(char *)"sdl_dynload", NULL},
     {(char *)"jack", NULL},
@@ -190,6 +191,12 @@ static PyObject *make_builtopts_info(void)
   SetObjIncref(Py_False);
 #endif
 
+#ifdef WITH_OPENSUBDIV
+  SetObjIncref(Py_True);
+#else
+  SetObjIncref(Py_False);
+#endif
+
 #ifdef WITH_SDL
   SetObjIncref(Py_True);
 #else