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/python/BPY_extern.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/python/BPY_extern.h')
-rw-r--r-- | source/blender/python/BPY_extern.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/python/BPY_extern.h b/source/blender/python/BPY_extern.h index b2c6287f9b3..d7db680a458 100644 --- a/source/blender/python/BPY_extern.h +++ b/source/blender/python/BPY_extern.h @@ -85,6 +85,8 @@ extern "C" { float BPY_pydriver_eval(struct IpoDriver *driver); struct Object **BPY_pydriver_get_objects(struct IpoDriver *driver); + int BPY_button_eval(char *expr, double *value); + /* format importer hook */ int BPY_call_importloader( char *name ); |