Blender Git Commit Log

Git Commits -> Revision 9ab26be

Revision 9ab26be by Joshua Leung (master)
June 11, 2018, 05:44 (GMT)
Driver Workflow (T55145): Tweak to default expression used for new drivers created from UI

Previously, newly created drivers were set to "Scripted Expression"
mode and had their 'expression' field set to the pre-driver value of the
property, so that adding a driver didn't cause the property to immediately
lose its old value (and potentially causing havok in the scene).
However, this had the unintended consequence of making the driver setup
workflow more cumbersome, as you first had to replace that value with
the name of the driver variable before your driver would work.

This commit works around this issue by trying to combine the best of both
worlds (quite literally): Now, the driver expression for drivers created
using Ctrl-D will be "var + <old value>".

Thus, in the simplest case, the driver will do something as soon as you fill
out the driver variable settings (e.g. just filling out the Target Object field
will do it), meaning you get your drivers working faster. Of course, it may now
be necessary to edit out the old-value, and/or it might be a bit more confusing
what/why it's there for newbies. However, the improved ease of setup, and/or
a more tangible example of how an expression may be constructed outweigh the
downsides IMO.

Commit Details:

Full Hash: 9ab26bec27607fc03600bbbf2cea733ab9cce1cc
Parent Commit: 4605e57
Lines Changed: +14, -4

1 Modified Path:

/source/blender/editors/animation/drivers.c (+14, -4) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021