fix for noise module in driver namespace (was infact mathutils).

This commit is contained in:
Campbell Barton 2011-12-07 00:36:57 +00:00
parent b8cc575ee3
commit 6f7ae034fd
2 changed files with 4 additions and 3 deletions

@ -219,7 +219,7 @@ typedef struct Object {
ListBase controllers; /* game logic controllers */
ListBase actuators; /* game logic actuators */
float bbsize[3];
float bbsize[3] DNA_DEPRECATED;
short index; /* custom index, for renderpasses */
unsigned short actdef; /* current deformation group, note: index starts at 1 */
float col[4]; /* object color */

@ -82,9 +82,10 @@ int bpy_pydriver_create_dict(void)
}
/* add noise to global namespace */
mod= PyImport_ImportModuleLevel((char *)"mathutils.noise", NULL, NULL, NULL, 0);
mod= PyImport_ImportModuleLevel((char *)"mathutils", NULL, NULL, NULL, 0);
if (mod) {
PyDict_SetItemString(bpy_pydriver_Dict, "noise", mod);
PyObject *modsub= PyDict_GetItemString(PyModule_GetDict(mod), "noise");
PyDict_SetItemString(bpy_pydriver_Dict, "noise", modsub);
Py_DECREF(mod);
}