[Bf-committers] Ipo keyframe speedup

Campbell Barton cbarton at metavr.com
Fri Aug 4 12:12:05 CEST 2006


Hi, I was looking at speeding up BVH import and the bottleneck is adding 
keyframes.

In further hunting  it seems that calchandles_ipocurve is running on all 
curves everytime a keyframe is added, even if the handels arnt being 
used. (constant or a linear curves)


So I modified Line 450 or ipo.c to only loop over bezier types.
void calchandles_ipocurve(IpoCurve *icu)
{
    BezTriple *bezt, *prev, *next;
    int a;

    a= icu->totvert;
    // was       if(a<2) return;
    if(a<2 || icu->ipo==IPO_LIN || icu->ipo==IPO_CONST) return; /* 
IPO_CONST or IPO_LIN, no handels */


Importing a the BVH 1956 framses long went for 86.2 seconds to 13.3sec 
with this change.
Since changing this may mess up other areas of Blender, I was wondering 
of sombody else could look into this change.
- Cam

-- 
Campbell J Barton

133 Hope Street
Geelong West, Victoria 3218 Australia

URL:    http://www.metavr.com
e-mail: cbarton at metavr.com
phone: AU (03) 5229 0241


More information about the Bf-committers mailing list