diff options
Diffstat (limited to 'source/blender/python/intern')
-rw-r--r-- | source/blender/python/intern/CMakeLists.txt | 7 | ||||
-rw-r--r-- | source/blender/python/intern/bpy.c | 7 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_app.c | 13 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_app_build_options.c | 7 |
4 files changed, 28 insertions, 6 deletions
diff --git a/source/blender/python/intern/CMakeLists.txt b/source/blender/python/intern/CMakeLists.txt index b531e08f8d4..30ab4bd4b0e 100644 --- a/source/blender/python/intern/CMakeLists.txt +++ b/source/blender/python/intern/CMakeLists.txt @@ -143,6 +143,13 @@ if(WITH_CYCLES_OSL) add_definitions(-DWITH_CYCLES_OSL) endif() +if(WITH_FREESTYLE) + list(APPEND INC + ../../freestyle/intern/python + ) + add_definitions(-DWITH_FREESTYLE) +endif() + if(WITH_GAMEENGINE) add_definitions(-DWITH_GAMEENGINE) endif() diff --git a/source/blender/python/intern/bpy.c b/source/blender/python/intern/bpy.c index c4d68290da3..1f8385288bd 100644 --- a/source/blender/python/intern/bpy.c +++ b/source/blender/python/intern/bpy.c @@ -60,6 +60,10 @@ #include "../generic/blf_py_api.h" #include "../mathutils/mathutils.h" +#ifdef WITH_FREESTYLE +# include "BPy_Freestyle.h" +#endif + PyObject *bpy_package_py = NULL; PyDoc_STRVAR(bpy_script_paths_doc, @@ -258,6 +262,9 @@ void BPy_init_modules(void) } /* stand alone utility modules not related to blender directly */ IDProp_Init_Types(); /* not actually a submodule, just types */ +#ifdef WITH_FREESTYLE + Freestyle_Init(); +#endif mod = PyModule_New("_bpy"); diff --git a/source/blender/python/intern/bpy_app.c b/source/blender/python/intern/bpy_app.c index 5195f821d56..7889b9a7f0b 100644 --- a/source/blender/python/intern/bpy_app.c +++ b/source/blender/python/intern/bpy_app.c @@ -245,12 +245,13 @@ static PyObject *bpy_app_driver_dict_get(PyObject *UNUSED(self), void *UNUSED(cl static PyGetSetDef bpy_app_getsets[] = { - {(char *)"debug", bpy_app_debug_get, bpy_app_debug_set, (char *)bpy_app_debug_doc, (void *)G_DEBUG}, - {(char *)"debug_ffmpeg", bpy_app_debug_get, bpy_app_debug_set, (char *)bpy_app_debug_doc, (void *)G_DEBUG_FFMPEG}, - {(char *)"debug_python", bpy_app_debug_get, bpy_app_debug_set, (char *)bpy_app_debug_doc, (void *)G_DEBUG_PYTHON}, - {(char *)"debug_events", bpy_app_debug_get, bpy_app_debug_set, (char *)bpy_app_debug_doc, (void *)G_DEBUG_EVENTS}, - {(char *)"debug_handlers", bpy_app_debug_get, bpy_app_debug_set, (char *)bpy_app_debug_doc, (void *)G_DEBUG_HANDLERS}, - {(char *)"debug_wm", bpy_app_debug_get, bpy_app_debug_set, (char *)bpy_app_debug_doc, (void *)G_DEBUG_WM}, + {(char *)"debug", bpy_app_debug_get, bpy_app_debug_set, (char *)bpy_app_debug_doc, (void *)G_DEBUG}, + {(char *)"debug_ffmpeg", bpy_app_debug_get, bpy_app_debug_set, (char *)bpy_app_debug_doc, (void *)G_DEBUG_FFMPEG}, + {(char *)"debug_freestyle", bpy_app_debug_get, bpy_app_debug_set, (char *)bpy_app_debug_doc, (void *)G_DEBUG_FREESTYLE}, + {(char *)"debug_python", bpy_app_debug_get, bpy_app_debug_set, (char *)bpy_app_debug_doc, (void *)G_DEBUG_PYTHON}, + {(char *)"debug_events", bpy_app_debug_get, bpy_app_debug_set, (char *)bpy_app_debug_doc, (void *)G_DEBUG_EVENTS}, + {(char *)"debug_handlers", bpy_app_debug_get, bpy_app_debug_set, (char *)bpy_app_debug_doc, (void *)G_DEBUG_HANDLERS}, + {(char *)"debug_wm", bpy_app_debug_get, bpy_app_debug_set, (char *)bpy_app_debug_doc, (void *)G_DEBUG_WM}, {(char *)"debug_value", bpy_app_debug_value_get, bpy_app_debug_value_set, (char *)bpy_app_debug_value_doc, NULL}, {(char *)"tempdir", bpy_app_tempdir_get, NULL, (char *)bpy_app_tempdir_doc, NULL}, diff --git a/source/blender/python/intern/bpy_app_build_options.c b/source/blender/python/intern/bpy_app_build_options.c index 6db0a52bdf0..60105f73f37 100644 --- a/source/blender/python/intern/bpy_app_build_options.c +++ b/source/blender/python/intern/bpy_app_build_options.c @@ -41,6 +41,7 @@ static PyStructSequence_Field app_builtopts_info_fields[] = { {(char *)"compositor", NULL}, {(char *)"cycles", NULL}, {(char *)"cycles_osl", NULL}, + {(char *)"freestyle", NULL}, {(char *)"gameengine", NULL}, {(char *)"image_cineon", NULL}, {(char *)"image_dds", NULL}, @@ -137,6 +138,12 @@ static PyObject *make_builtopts_info(void) SetObjIncref(Py_False); #endif +#ifdef WITH_FREESTYLE + SetObjIncref(Py_True); +#else + SetObjIncref(Py_False); +#endif + #ifdef WITH_GAMEENGINE SetObjIncref(Py_True); #else |