Blender Git Loki

Git Commits -> Revision de1c4fa

Revision de1c4fa by Joshua Leung (master)
July 4, 2011, 03:12 (GMT)
First stages of easier "expressions" creation...

It is now possible to create "scripted expression" drivers by simply
clicking on some property, and typing some short Python expression
prefixed with a '#'. This will result in a scripted expression driver,
with the typed-in text being created.

For example, you can click on X-Location of the default cube, and
type:
#sin(frame)
and a new driver will be created for the x-location of the cube. This
will use the current frame value, and modulate this with a sine wave.

Do note though, that the current frame is a special case here. In the
current implementation, a special "frame" driver variable, which
references the current scene frame is created automatically, so that
this simple and (assumed) common case will work straight out of the
box.

Future improvements:
- Explore possibilities of semi-automated extraction of variables from
such expressions, resulting in automated variable extraction. (Doing
away with variables completely is definitely 100% off the agenda
though)
- Look into some ways of defining some shorthands for referencing
local data (possibly related to variable extraction?)

Commit Details:

Full Hash: de1c4fafc7ecd644dd9ba06dfc7a4f77b4d06683
SVN Revision: 38076
Parent Commit: e358064
Lines Changed: +88, -3

5 Modified Paths:

/source/blender/editors/animation/drivers.c (+1, -1) (Diff)
/source/blender/editors/include/ED_keyframing.h (+7, -0) (Diff)
/source/blender/editors/interface/interface.c (+4, -0) (Diff)
/source/blender/editors/interface/interface_anim.c (+75, -2) (Diff)
/source/blender/editors/interface/interface_intern.h (+1, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021