diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-12-08 13:36:46 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-12-08 13:36:46 +0300 |
commit | 0391b1ab780b34a149d3c4181d0fe676ef55199e (patch) | |
tree | fcc5611cd83129f9c475591d47fb47cea84dc491 /source/blender/makesdna | |
parent | 445d077cf4ecc84b5d5cf422bfb2040186d60164 (diff) |
compile python driver expressions for faster re-evaluation.
approx 15-25x speedup
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_anim_types.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h index 09f77d98f4b..c5d0231ce62 100644 --- a/source/blender/makesdna/DNA_anim_types.h +++ b/source/blender/makesdna/DNA_anim_types.h @@ -291,7 +291,8 @@ typedef struct ChannelDriver { /* python expression to execute (may call functions defined in an accessory file) * which relates the target 'variables' in some way to yield a single usable value */ - char expression[256]; + char expression[256]; + void *expr_comp; /* PyObject - compiled expression, dont save this */ float curval; /* result of previous evaluation, for subtraction from result under certain circumstances */ float influence; /* influence of driver on result */ // XXX to be implemented... this is like the constraint influence setting @@ -322,6 +323,8 @@ typedef enum eDriver_Flags { /* driver does replace value, but overrides (for layering of animation over driver) */ // TODO: this needs to be implemented at some stage or left out... DRIVER_FLAG_LAYERING = (1<<2), + + DRIVER_FLAG_RECOMPILE = (1<<3), /* use when the expression needs to be recompiled */ } eDriver_Flags; /* F-Curves -------------------------------------- */ |