This repository has been archived on 2023-10-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
blender-archive/source/blender
Joshua Leung 332e001989 Drivers: "Scripted Expression" drivers (i.e. PyDrivers) work again
Now it is possible to write a Python Expression using the variable names for driver targets (see mockup from initial commit) to substitute the appropriate values into the expression.

In the __global__ namespace for PyDriver evaluation, the following modules are available:
* __builtins__ - i.e. the builtin Python functions
* bpy - new Python API
* math or m - math module

For example:
Consider a driver with three targets, named: A, B, C
Now, you could write an expression like:
   C if A < 5 else B
or even:
   2*C if A < 5 or A > 20 else m.PI*B

Of course, you don't have to have three targets, the above was just an example.

TODO:
* Bring back way to load pydrivers.py
* Blender.Noise equivalent would be nice to have

P.S.  I hope I haven't made any terrible Python API coding errors here (i.e. mem leaks, etc.)
2009-04-20 09:17:43 +00:00
..
2008-12-23 21:20:34 +00:00
2.5
2009-04-15 14:43:54 +00:00
2009-04-19 13:37:59 +00:00
UI:
2009-04-17 11:59:25 +00:00
2009-04-19 17:12:16 +00:00
2.5
2009-02-19 16:22:07 +00:00
2009-03-17 22:27:15 +00:00
2.5
2009-04-10 16:30:28 +00:00
2.5
2009-04-10 16:30:28 +00:00
2.5
2009-04-10 16:30:28 +00:00