Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2007-12-03 19:43:58 +0300
committerCampbell Barton <ideasman42@gmail.com>2007-12-03 19:43:58 +0300
commitccc82beb642e9d78c4c074dcef33d4a954ddafd6 (patch)
tree2dae489a243525ce522c96a37b6d61eeefa82b29 /source/blender/python/BPY_interface.c
parenta8c8aee7c66fecd3ae5656ec6db0c49f4f799fa0 (diff)
import all math funcs (sin/cos/tan/e... etc) by default into buttons and drivers
Diffstat (limited to 'source/blender/python/BPY_interface.c')
-rw-r--r--source/blender/python/BPY_interface.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/python/BPY_interface.c b/source/blender/python/BPY_interface.c
index 9c8203cf3fd..a56a14b3db9 100644
--- a/source/blender/python/BPY_interface.c
+++ b/source/blender/python/BPY_interface.c
@@ -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) {