Blender Git Commit Log
Git Commits -> Revision 02cc806
Revision 02cc806 by Campbell Barton (master) November 27, 2010, 02:39 (GMT) |
python access to driver namespace, rather then have a textblock defined for drivers allow scripts to add functions directly. - bpy.app.driver_namespace, read-only dictionary, edit in-place. - reset on file load and new file. - on errors the namespace used to be reset, this should not be needed. simple example. def driverFunc(val): return val * val bpy.app.driver_namespace['driverFunc'] = driverFunc ... now all drivers can access this function. |
Commit Details:
Full Hash: 02cc80691d71ea305780655d3b0d4cd4530db9c7
SVN Revision: 33348
Parent Commit: 4a80485
Lines Changed: +38, -14
7 Modified Paths:
/source/blender/python/BPY_extern.h (+1, -1) (Diff)
/source/blender/python/intern/bpy_app.c (+24, -5) (Diff)
/source/blender/python/intern/bpy_app.h (+4, -0) (Diff)
/source/blender/python/intern/bpy_driver.c (+2, -8) (Diff)
/source/blender/windowmanager/intern/wm_files.c (+4, -0) (Diff)
/source/blender/windowmanager/intern/wm_init_exit.c (+2, -0) (Diff)
/source/creator/creator.c (+1, -0) (Diff)
/source/blender/python/intern/bpy_app.c (+24, -5) (Diff)
/source/blender/python/intern/bpy_app.h (+4, -0) (Diff)
/source/blender/python/intern/bpy_driver.c (+2, -8) (Diff)
/source/blender/windowmanager/intern/wm_files.c (+4, -0) (Diff)
/source/blender/windowmanager/intern/wm_init_exit.c (+2, -0) (Diff)
/source/creator/creator.c (+1, -0) (Diff)