import all math funcs (sin/cos/tan/e... etc) by default into buttons and drivers

This commit is contained in:
Campbell Barton
2007-12-03 16:43:58 +00:00
parent a8c8aee7c6
commit ccc82beb64

View File

@@ -1071,10 +1071,15 @@ static int bpy_pydriver_create_dict(void)
mod = PyImport_ImportModule("math");
if (mod) {
PyDict_Merge(d, PyModule_GetDict(mod), 0); /* 0 - dont overwrite existing values */
/* Only keep for backwards compat! - just import all math into root, they are standard */
PyDict_SetItemString(d, "math", mod);
PyDict_SetItemString(d, "m", mod);
Py_DECREF(mod);
}
}
mod = PyImport_ImportModule("Blender.Noise");
if (mod) {