diff options
Diffstat (limited to 'source/gameengine/VideoTexture/blendVideoTex.cpp')
-rw-r--r-- | source/gameengine/VideoTexture/blendVideoTex.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/source/gameengine/VideoTexture/blendVideoTex.cpp b/source/gameengine/VideoTexture/blendVideoTex.cpp index dad52a426b6..998d63506b0 100644 --- a/source/gameengine/VideoTexture/blendVideoTex.cpp +++ b/source/gameengine/VideoTexture/blendVideoTex.cpp @@ -67,7 +67,7 @@ static PyObject * getMaterialID (PyObject *self, PyObject *args) // get last error description static PyObject * getLastError (PyObject *self, PyObject *args) { - return PyString_FromString(Exception::m_lastError.c_str()); + return PyUnicode_FromString(Exception::m_lastError.c_str()); } // set log file @@ -159,8 +159,6 @@ static void registerAllTypes(void) pyFilterTypes.add(&FilterBGR24Type, "FilterBGR24"); } - -#if (PY_VERSION_HEX >= 0x03000000) static struct PyModuleDef VideoTexture_module_def = { {}, /* m_base */ "VideoTexture", /* m_name */ @@ -172,7 +170,6 @@ static struct PyModuleDef VideoTexture_module_def = { 0, /* m_clear */ 0, /* m_free */ }; -#endif PyObject* initVideoTexture(void) { @@ -202,14 +199,8 @@ PyObject* initVideoTexture(void) else { PyErr_Clear(); -#if (PY_VERSION_HEX >= 0x03000000) m = PyModule_Create(&VideoTexture_module_def); PyDict_SetItemString(PySys_GetObject("modules"), VideoTexture_module_def.m_name, m); -#else - m = Py_InitModule4("VideoTexture", moduleMethods, - "Module that allows to play video files on textures in GameBlender.", - (PyObject*)NULL,PYTHON_API_VERSION); -#endif } if (m == NULL) |