diff options
author | Martin Poirier <theeth@yahoo.com> | 2006-06-12 04:10:00 +0400 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2006-06-12 04:10:00 +0400 |
commit | 873e2eaae3c59f468d169d95e20436bd57f39deb (patch) | |
tree | 437a7484c219532543bf9fedd42d11337e7493f6 /source/blender/blenkernel/BKE_bad_level_calls.h | |
parent | 7cad5ce8429daf738cfd7e9d0d0f78f4b5304625 (diff) |
== Python Button Evaluation ==
Users can write any valid Python expression (that evals to an int or float) inside Blender's gui number buttons (preceded by #) and have them evaluated to their actual int or float value.
Button Evaluation has access to the same modules as PyDrivers.
For example:
#1.0*9-2.3
#ob("Camera").LocZ
#1.0/ob("Cube").LocX
#math.sin(math.pi) -- or simply #m.sin(m.pi)
etc
Diffstat (limited to 'source/blender/blenkernel/BKE_bad_level_calls.h')
-rw-r--r-- | source/blender/blenkernel/BKE_bad_level_calls.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_bad_level_calls.h b/source/blender/blenkernel/BKE_bad_level_calls.h index 9e1870ac36f..4ae25a44b94 100644 --- a/source/blender/blenkernel/BKE_bad_level_calls.h +++ b/source/blender/blenkernel/BKE_bad_level_calls.h @@ -71,6 +71,8 @@ void BPY_free_screen_spacehandlers (struct bScreen *sc); struct Object **BPY_pydriver_get_objects(struct IpoDriver *driver); float BPY_pydriver_eval(struct IpoDriver *driver); void BPY_pydriver_update(void); +/* button python evaluation */ +int BPY_button_eval(char *expr, double *value); /* writefile.c */ struct Oops; |