BGE Py Api

importing modules wasnt returning the error from the blender text if it failed.
This commit is contained in:
2009-04-15 08:08:42 +00:00
parent 34a617e308
commit 19c869ab64
4 changed files with 67 additions and 28 deletions

View File

@@ -1275,7 +1275,8 @@ static int bpy_pydriver_create_dict(void)
/* If there's a Blender text called pydrivers.py, import it.
* Users can add their own functions to this module. */
if (G.f&G_DOSCRIPTLINKS) {
mod = importText("pydrivers"); /* can also use PyImport_Import() */
int found; /* not used but needed as an arg */
mod = importText("pydrivers", &found); /* can also use PyImport_Import() */
if (mod) {
PyDict_SetItemString(d, "pydrivers", mod);
PyDict_SetItemString(d, "p", mod);