diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-04-16 11:37:06 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-04-16 11:37:06 +0400 |
commit | 079304d199f7619f7eb0e8c256953505df1fcb53 (patch) | |
tree | b6b101f1ce5dae1b4f8af5eeb7729aaacda67be7 /source/blender/blenkernel/BKE_fcurve.h | |
parent | 88d394d47dc0d1933faa06b50068f761d79a97ba (diff) |
Animato - Drivers with Multiple Targets:
Drivers now support multiple targets which act as 'variables'. The targets have a short 'name' (see later), and reference some property (in much the same way as F-Curves do, using RNA-Paths) which acts as the 'value'.
These named variables can then be used in a Python Expression which relates them to each other for more fine-grained control over the result of the driver. By using only the names of these variables in the expressions, we are able to define expressions/relationships in a much more readable way, as data access is separated from data use. This makes the underlying relationships easier to understand.
By default, if no Python Expression is given, the variables are simply averaged together, so old files won't break. :)
For example, check the following diagram (thanks Cessen/Nathan V from Peach team):
http://download.blender.org/ftp/incoming/250_drivers_mockup_cessen.png
TODO List:
* Depsgraph building for new driver relationships doesn't work yet. This needs to be recoded again, but this new system makes this much easier, since the targets are clearly defined (i.e. no need to parse py expressions to get list of objects)
* Graph Editor interface for editing these needs to be rewritten
* Python function for evaluating these expressions is needed (Campbell?)
Diffstat (limited to 'source/blender/blenkernel/BKE_fcurve.h')
-rw-r--r-- | source/blender/blenkernel/BKE_fcurve.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_fcurve.h b/source/blender/blenkernel/BKE_fcurve.h index 63ecc9d548a..f973f86972d 100644 --- a/source/blender/blenkernel/BKE_fcurve.h +++ b/source/blender/blenkernel/BKE_fcurve.h @@ -6,9 +6,12 @@ #define BKE_FCURVE_H //struct ListBase; + struct FCurve; struct FModifier; struct ChannelDriver; +struct DriverTarget; + struct BezTriple; /* ************** Keyframe Tools ***************** */ @@ -27,6 +30,9 @@ void bezt_add_to_cfra_elem(ListBase *lb, struct BezTriple *bezt); void fcurve_free_driver(struct FCurve *fcu); struct ChannelDriver *fcurve_copy_driver(struct ChannelDriver *driver); +void driver_free_target(struct ChannelDriver *driver, struct DriverTarget *dtar); +struct DriverTarget *driver_add_new_target(struct ChannelDriver *driver); + /* ************** F-Curve Modifiers *************** */ /* F-Curve Modifier Type-Info (fmi): |