Changeset View
Changeset View
Standalone View
Standalone View
source/blender/python/intern/bpy_interface.c
| Show First 20 Lines • Show All 187 Lines • ▼ Show 20 Lines | if (bpy_context_module) | ||||
| bpy_context_module->ptr.data = (void *)C; | bpy_context_module->ptr.data = (void *)C; | ||||
| } | } | ||||
| void BPY_context_set(bContext *C) | void BPY_context_set(bContext *C) | ||||
| { | { | ||||
| BPy_SetContext(C); | BPy_SetContext(C); | ||||
| } | } | ||||
| #ifdef WITH_MANTA | |||||
| /* defined in manta module */ | |||||
| extern PyObject *Manta_initPython(void); | |||||
| #endif | |||||
| #ifdef WITH_AUDASPACE | |||||
| /* defined in AUD_C-API.cpp */ | /* defined in AUD_C-API.cpp */ | ||||
| extern PyObject *AUD_initPython(void); | extern PyObject *AUD_initPython(void); | ||||
| #endif | |||||
mont29: This looks like a fix? Should be committed to master directly, then… | |||||
| #ifdef WITH_CYCLES | #ifdef WITH_CYCLES | ||||
| /* defined in cycles module */ | /* defined in cycles module */ | ||||
| static PyObject *CCL_initPython(void) | static PyObject *CCL_initPython(void) | ||||
| { | { | ||||
| return (PyObject *)CCL_python_module_init(); | return (PyObject *)CCL_python_module_init(); | ||||
| } | } | ||||
| #endif | #endif | ||||
| Show All 10 Lines | #endif | ||||
| {"blf", BPyInit_blf}, | {"blf", BPyInit_blf}, | ||||
| {"imbuf", BPyInit_imbuf}, | {"imbuf", BPyInit_imbuf}, | ||||
| {"bmesh", BPyInit_bmesh}, | {"bmesh", BPyInit_bmesh}, | ||||
| #if 0 | #if 0 | ||||
| {"bmesh.types", BPyInit_bmesh_types}, | {"bmesh.types", BPyInit_bmesh_types}, | ||||
| {"bmesh.utils", BPyInit_bmesh_utils}, | {"bmesh.utils", BPyInit_bmesh_utils}, | ||||
| {"bmesh.utils", BPyInit_bmesh_geometry}, | {"bmesh.utils", BPyInit_bmesh_geometry}, | ||||
| #endif | #endif | ||||
| #ifdef WITH_MANTA | |||||
| {"manta", Manta_initPython}, | |||||
| #endif | |||||
| #ifdef WITH_AUDASPACE | #ifdef WITH_AUDASPACE | ||||
| {"aud", AUD_initPython}, | {"aud", AUD_initPython}, | ||||
| #endif | #endif | ||||
| #ifdef WITH_CYCLES | #ifdef WITH_CYCLES | ||||
| {"_cycles", CCL_initPython}, | {"_cycles", CCL_initPython}, | ||||
| #endif | #endif | ||||
| {"gpu", BPyInit_gpu}, | {"gpu", BPyInit_gpu}, | ||||
| {"idprop", BPyInit_idprop}, | {"idprop", BPyInit_idprop}, | ||||
| ▲ Show 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | /* sigh, why do python guys not have a (char **) version anymore? */ | ||||
| } | } | ||||
| PySys_SetObject("argv", py_argv); | PySys_SetObject("argv", py_argv); | ||||
| Py_DECREF(py_argv); | Py_DECREF(py_argv); | ||||
| } | } | ||||
| /* Initialize thread support (also acquires lock) */ | /* Initialize thread support (also acquires lock) */ | ||||
| PyEval_InitThreads(); | PyEval_InitThreads(); | ||||
| /* (sebbas): Required to prevent assertion error */ | |||||
| /* see: https://stackoverflow.com/questions/27844676/assertionerror-3-x-only-when-calling-py-finalize-with-threads */ | |||||
| Py_DECREF(PyImport_ImportModule("threading")); | |||||
| #else | #else | ||||
| (void)argc; | (void)argc; | ||||
| (void)argv; | (void)argv; | ||||
| /* must run before python initializes */ | /* must run before python initializes */ | ||||
| /* broken in py3.3, load explicitly below */ | /* broken in py3.3, load explicitly below */ | ||||
| // PyImport_ExtendInittab(bpy_internal_modules); | // PyImport_ExtendInittab(bpy_internal_modules); | ||||
| #endif | #endif | ||||
| ▲ Show 20 Lines • Show All 730 Lines • Show Last 20 Lines | |||||
This looks like a fix? Should be committed to master directly, then…