[Bf-blender-cvs] [42478436ae6] master: Add OpenSubdiv information to bpy.app

Sergey Sharybin noreply at git.blender.org
Tue Sep 3 11:45:55 CEST 2019


Commit: 42478436ae60e4fd75439c3962c97ebb15023d94
Author: Sergey Sharybin
Date:   Tue Sep 3 11:21:51 2019 +0200
Branches: master
https://developer.blender.org/rB42478436ae60e4fd75439c3962c97ebb15023d94

Add OpenSubdiv information to bpy.app

Allows to customize interface and inform about lack of
subdivision surface support.

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

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..a5f71e92438 100644
--- a/source/blender/python/intern/CMakeLists.txt
+++ b/source/blender/python/intern/CMakeLists.txt
@@ -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}
diff --git a/source/blender/python/intern/bpy_app_build_options.c b/source/blender/python/intern/bpy_app_build_options.c
index a841e974e85..afb2f6b3636 100644
--- a/source/blender/python/intern/bpy_app_build_options.c
+++ b/source/blender/python/intern/bpy_app_build_options.c
@@ -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



More information about the Bf-blender-cvs mailing list