Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-12-08 13:36:46 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-12-08 13:36:46 +0300
commit0391b1ab780b34a149d3c4181d0fe676ef55199e (patch)
treefcc5611cd83129f9c475591d47fb47cea84dc491 /source/blender/makesdna/DNA_anim_types.h
parent445d077cf4ecc84b5d5cf422bfb2040186d60164 (diff)
compile python driver expressions for faster re-evaluation.
approx 15-25x speedup
Diffstat (limited to 'source/blender/makesdna/DNA_anim_types.h')
-rw-r--r--source/blender/makesdna/DNA_anim_types.h5
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 -------------------------------------- */