Exponential execution times :(


I made a script that Collapses a Spline_IK_Control down to a new SplineShape with animation.

But execution times are exponential to animation range. The snippet that causes this is:

local k = addNewKey controllers[k] t -- controller[] stored in array, t == time
k.value = param

Without the section above the execution times are linear.

Any idea how I could do this more effieciently? I'll attach the script for those interested.

Thanks :)

collapsesplineanimation.ms4.74 KB