diff options
Diffstat (limited to 'source/blender/python/intern')
-rw-r--r-- | source/blender/python/intern/CMakeLists.txt | 1 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_interface.c | 15 |
2 files changed, 12 insertions, 4 deletions
diff --git a/source/blender/python/intern/CMakeLists.txt b/source/blender/python/intern/CMakeLists.txt index f110576a297..05583e133dc 100644 --- a/source/blender/python/intern/CMakeLists.txt +++ b/source/blender/python/intern/CMakeLists.txt @@ -35,6 +35,7 @@ set(INC ../../windowmanager ../../gpu ../../../../intern/guardedalloc + ../../../../intern/cycles/blender ) set(INC_SYS diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c index 7d91438e4f7..6c961d8e6a8 100644 --- a/source/blender/python/intern/bpy_interface.c +++ b/source/blender/python/intern/bpy_interface.c @@ -57,12 +57,13 @@ #include "BLI_string_utf8.h" #include "BLI_utildefines.h" - #include "BKE_context.h" #include "BKE_text.h" #include "BKE_main.h" #include "BKE_global.h" /* only for script checking */ +#include "CCL_api.h" + #include "BPY_extern.h" #include "../generic/bpy_internal_import.h" // our own imports @@ -176,8 +177,14 @@ void BPY_context_set(bContext *C) /* defined in AUD_C-API.cpp */ extern PyObject *AUD_initPython(void); -/* defined in cycles/blender */ -extern PyObject *CYCLES_initPython(void); + +#ifdef WITH_CYCLES +/* defined in cycles module */ +static PyObject *CCL_initPython(void) +{ + return (PyObject*)CCL_python_module_init(); +} +#endif static struct _inittab bpy_internal_modules[] = { {(char *)"mathutils", PyInit_mathutils}, @@ -189,7 +196,7 @@ static struct _inittab bpy_internal_modules[] = { {(char *)"aud", AUD_initPython}, #endif #ifdef WITH_CYCLES - {(char *)"_cycles", CYCLES_initPython}, + {(char *)"_cycles", CCL_initPython}, #endif {(char *)"gpu", GPU_initPython}, {NULL, NULL} |