fix for noise module in driver namespace (was infact mathutils).
This commit is contained in:
@@ -219,7 +219,7 @@ typedef struct Object {
|
|||||||
ListBase controllers; /* game logic controllers */
|
ListBase controllers; /* game logic controllers */
|
||||||
ListBase actuators; /* game logic actuators */
|
ListBase actuators; /* game logic actuators */
|
||||||
|
|
||||||
float bbsize[3];
|
float bbsize[3] DNA_DEPRECATED;
|
||||||
short index; /* custom index, for renderpasses */
|
short index; /* custom index, for renderpasses */
|
||||||
unsigned short actdef; /* current deformation group, note: index starts at 1 */
|
unsigned short actdef; /* current deformation group, note: index starts at 1 */
|
||||||
float col[4]; /* object color */
|
float col[4]; /* object color */
|
||||||
|
@@ -82,9 +82,10 @@ int bpy_pydriver_create_dict(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* add noise to global namespace */
|
/* 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) {
|
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);
|
Py_DECREF(mod);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user