diff options
author | Joshua Leung <aligorith@gmail.com> | 2011-07-03 15:56:24 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2011-07-03 15:56:24 +0400 |
commit | b6c1490359964311db7ffb2b74ebc05772bf8be9 (patch) | |
tree | 36a89f14ec83d12f8d3a0b8a6bc2282383c16e3b /source/blender/blenkernel/intern/depsgraph.c | |
parent | c922b413742588ea2fb267b90a649d0a82447eed (diff) |
Experimental depsgraph tweak:
Objects with drivers are now treated as needing updates when the
current frame changes. This assumption has been documented in the
code, and should at least mean that users who try to use drivers for
creating simple time-based expressions that this should work.
Note:
- It is still recommended to create a "cfra" driver variable instead
of actually inlining bpy.context.scene.frame_current into the
expressions. Not only does the latter look rather nasty to type/have
in the expression, but it is also less future-proof for when I get
around to actually working on a beefed-up depsgraph (nothing official
on that front yet...)
Diffstat (limited to 'source/blender/blenkernel/intern/depsgraph.c')
-rw-r--r-- | source/blender/blenkernel/intern/depsgraph.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c index c2800410657..fa4f4c99f08 100644 --- a/source/blender/blenkernel/intern/depsgraph.c +++ b/source/blender/blenkernel/intern/depsgraph.c @@ -2061,6 +2061,12 @@ static short animdata_use_time(AnimData *adt) return 1; } + /* experimental check: if we have drivers, more likely than not, on a frame change + * they'll need updating because their owner changed + */ + if (adt->drivers.first) + return 1; + return 0; } |