Commit: 322f86d6b330ebeb1da5c1f527714745dc901460
Author: Joshua Leung
Date:   Thu Mar 24 13:02:22 2016 +1300
Branches: master
https://developer.blender.org/rB322f86d6b330ebeb1da5c1f527714745dc901460

Fix T47896: Scripted Expression string length limit is too short for some 
autogenerated expressions

While most scripted expressions are quite short (e.g. "var" or "frame + 1"),
those that are autogenerated by scripts (to take into account a wide range of 
factors)
may require a bit more headroom to operate in.

By doubling the maximum length here, we now make it possible to combine up to 38
3-letter variables in some linear combination (with all factors expressed to 4 
dp).
That should be more than enough for anyone or anything for quite a while!

Unfortunately, this does increase memory consumption for drivers across the 
board.

===================================================================

M       source/blender/makesdna/DNA_anim_types.h

===================================================================

diff --git a/source/blender/makesdna/DNA_anim_types.h 
b/source/blender/makesdna/DNA_anim_types.h
index e41ca93..d80b509 100644
--- a/source/blender/makesdna/DNA_anim_types.h
+++ b/source/blender/makesdna/DNA_anim_types.h
@@ -374,7 +374,7 @@ 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];   /* expression to compile for evaluation */
+       char expression[512];   /* expression to compile for evaluation */
        void *expr_comp;                /* PyObject - compiled expression, 
don't save this */
        
        float curval;           /* result of previous evaluation */

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to