Disable importing module python controller scripts at conversion time because it can run BGE functions and crash since the internal state isnt setup yet.

face-select mode wasnt working when used with projection paint.
This commit is contained in:
2009-05-05 05:57:08 +00:00
parent be2c21bcdb
commit 9e8261a13b
3 changed files with 13 additions and 3 deletions

View File

@@ -164,6 +164,11 @@ static const char* sPyGetCurrentController__doc__;
/* warning, self is not the SCA_PythonController, its a PyObjectPlus_Proxy */
PyObject* SCA_PythonController::sPyGetCurrentController(PyObject *self)
{
if(m_sCurrentController==NULL)
{
PyErr_SetString(PyExc_SystemError, "GameLogic.getCurrentController(), this function is being run outside the python controllers context, or blenders internal state is corrupt.");
return NULL;
}
return m_sCurrentController->GetProxy();
}