== 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
This commit is contained in:
2006-06-12 00:10:00 +00:00
parent 7cad5ce842
commit 873e2eaae3
5 changed files with 88 additions and 4 deletions

View File

@@ -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 );