diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-02-23 19:40:55 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-02-23 19:40:55 +0300 |
commit | 0dd58a27e9cbae086abf8a40810d20bc1fe59a15 (patch) | |
tree | da0fec3e09083e5a2878e64e11b09f043dd46be7 | |
parent | 9e2e528c36c4e01ff2fd88250d81d32733e675eb (diff) |
- py-drivers were not using the name lookup cache.
- use manager context for keymap script.
-rw-r--r-- | release/scripts/ui/space_userpref.py | 4 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_driver.c | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/release/scripts/ui/space_userpref.py b/release/scripts/ui/space_userpref.py index 329f795af89..ed0a1a429b1 100644 --- a/release/scripts/ui/space_userpref.py +++ b/release/scripts/ui/space_userpref.py @@ -1689,7 +1689,7 @@ class WM_OT_keyconfig_import(bpy.types.Operator): __import__(config_name) - wm = bpy.data.window_managers[0] + wm = bpy.context.manager wm.active_keyconfig = wm.keyconfigs[config_name] return {'FINISHED'} @@ -1731,7 +1731,7 @@ class WM_OT_keyconfig_export(bpy.types.Operator): f.write("# Configuration %s\n" % name) f.write("import bpy\n\n") - f.write("wm = bpy.data.window_managers[0]\n") + f.write("wm = bpy.context.manager\n") f.write("kc = wm.add_keyconfig('%s')\n\n" % name) for km in kc.keymaps: diff --git a/source/blender/python/intern/bpy_driver.c b/source/blender/python/intern/bpy_driver.c index 356abeeb40f..288b6edf87d 100644 --- a/source/blender/python/intern/bpy_driver.c +++ b/source/blender/python/intern/bpy_driver.c @@ -207,6 +207,8 @@ float BPY_pydriver_eval (ChannelDriver *driver) for (dvar= driver->variables.first, i=0; dvar; dvar= dvar->next) { PyTuple_SET_ITEM(expr_vars, i++, PyUnicode_InternFromString(dvar->name)); } + + driver->flag &= ~DRIVER_FLAG_RENAMEVAR; } else { expr_vars= PyTuple_GET_ITEM(((PyObject *)driver->expr_comp), 1); |